text:
LaTeX/Installation

If this is the first time you are trying out LaTeX, you don't even need to install anything. For quick testing purpose you may just create a user account with an online LaTeX editor such as Overleaf, and continue this tutorial in the next chapter. These websites offer collaborative editing capabilities while allowing you to experiment with LaTeX syntax — without having to bother with installing and configuring a distribution and an editor. When you later feel that you would benefit from having a standalone LaTeX installation, you can return to this chapter and follow the instructions below.

LaTeX is not a program by itself; it is a document preparation system along with a language. Using LaTeX requires a series of tools. Acquiring them manually would result in downloading and installing multiple programs in order to have a suitable computer system that can be used to create LaTeX output, such as PDFs. TeX Distributions help the user in this way, in that it is a single step installation process that provides (almost) everything.

At a minimum, you'll need a TeX distribution, a good text editor and a DVI or PDF viewer. More specifically, the basic requirement is to have a TeX compiler (which is used to generate output files from source), fonts, and the LaTeX macro set. Optional, and recommended installations include an attractive editor to write LaTeX source documents (this is probably where you will spend most of your time), and a bibliographic management program to manage references if you use them a lot.

Distributions
TeX and LaTeX are available for most computer platforms, since they were programmed to be very portable. They are most commonly installed using a distribution, such as TeX Live, MiKTeX, or MacTeX. TeX distributions are collections of packages and programs (compilers, fonts, and macro packages) that enable you to typeset without having to manually fetch files and configure things. LaTeX is just a set of macro packages built for TeX.

The recommended distributions for each of the major operating systems are:

 * TeX Live is a major TeX distribution for *BSD, GNU/Linux, Mac OS X and Windows.
 * MiKTeX is a Windows-specific distribution which can be installed on Windows or GNU/Linux.
 * MacTeX is a Mac OS-specific distribution based on TeX Live.

These, however, do not necessarily include an editor. You might be interested in other programs that are not part of the distribution, which will help you in writing and preparing TeX and LaTeX files.

*BSD and GNU/Linux
In the past, the most common distribution used to be teTeX. As of May 2006 teTeX is no longer actively maintained and its former maintainer Thomas Esser recommended TeX Live as the replacement.

The easy way to get TeX Live is to use the package manager or portage tree coming with your operating system. Usually it comes as several packages, with some of them being essential, other optional. The core TeX Live packages should be around 200-300 MB.

If your *BSD or GNU/Linux distribution does not have the TeX Live packages, you should report a wish to the bug tracking system. In that case you will need to download TeX Live yourself and run the installer by hand.

You may wish to install the content of TeX Live more selectively. See below.

Mac OS X
Mac OS X users may use MacTeX, a TeX Live-based distribution supporting TeX, LaTeX, AMSTeX, ConTeXt, XeTeX and many other core packages. Download MacTeX.pkg on the MacTeX page, unzip it and follow the instructions. Further information for Mac OS X users can be found on the TeX on Mac OS X Wiki.

Since Mac OS X is also a Unix-based system, TeX Live is naturally available through MacPorts and Fink. Homebrew users should use the official MacTeX installer because of the unique directory structure used by TeX Live. Further information for Mac OS X users can be found on the TeX on Mac OS X Wiki.

Microsoft Windows
Microsoft Windows users can install MiKTeX onto their computer. It has an easy installer that takes care of setting up the environment and downloading core packages. Both the basic and the complete LaTeX systems are provided, with the distribution offering advanced features such as automatic installation of packages and simple interfaces to modify settings (e.g., default paper sizes).

There is also a port of TeX Live available for Windows. For more, see TeX Live on Windows.

Custom installation with TeX Live
This section targets users who want fine-grained control over their TeX distribution, like an installation with a minimum of disk space usage. If not needed, the user may feel free to jump to the next section.

Picky users may wish to have more control over their installation. Common distributions might be tedious for the user caring about disk space. In fact, MikTeX and MacTeX and packaged TeX Live features hundreds of LaTeX packages, most of them which you will never use. Most Unix with a package manager will offer TeX Live as a set of several big packages, and you often have to install 300–400 MB for a functional system.

TeX Live features a manual installation with a lot of possible customizations. You can get the network installer at tug.org. This installer allows you to select precisely the packages you want to install. As a result, you may have everything you need for less than 100 MB. TeX Live is then managed through its own package manager, tlmgr. It will let you configure the distributions, install or remove extra packages and so on.

You will need a Unix-based operating system for the following. Mac OS X, GNU/Linux or *BSD are fine. It may work for Windows but the process must be quite different.

TeX Live groups features and packages into different concepts:
 * Collections are groups of packages that can always be installed individually, except for the Essential programs and files collection. You can install collections at any time.
 * Installation Schemes group collections and packages. Schemes can only be used at installation time. You can select only one scheme at a time.

Minimal installation
We will give you general guidelines to install a minimal TeX distribution (i.e., only for plain TeX).
 * 1) Download the installer at http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz and extract it to a temporary folder.
 * 2) Open a terminal in the extracted folder and log in as root.
 * 3) Change the umask permissions to 022 (user read/write/execute, group/others read/execute only)  to make sure other users will have read-only access to the installed distribution.
 * 4) umask 022

 * 1) Launch install-tl.
 * 2) Select the minimal scheme (plain only).
 * 3) You may want to change the directory options. For example you may want to hide your personal macro folder which is located at TEXMFHOME. It is ~/texmf by default. Replace it by ~/.texmf to hide it.
 * 4) Now the options:
 * 5) use letter size instead of A4 by default: mostly for users from the USA.
 * 6) allow execution of restricted list of programs via \write18: it is recommended to select it for security reasons. Otherwise it allows the TeX engines to call any external program. You may still configure the list afterwards.
 * 7) create all format files: targetting a minimal disk space, the best choice depends on whether there is only one user on the system, then deselecting it is better, otherwise select it. From the help menu: "If this option is set, format files are created for system-wide use by the installer. Otherwise they will be created automatically when needed. In the latter case format files are stored in user's directory trees and in some cases have to be re-created when new packages are installed."
 * 8) install macro/font doc tree: useful if you are a developer, but very space consuming. Turn it off if you want to save space.
 * 9) install macro/font source tree: same as above.
 * 10) create symlinks to standard directories: symlinks are fine by default, change it if you know what you are doing.
 * 11) Select portable installation if you install the distribution to an optical disc, or any kind of external media. Leave to default for a traditional installation on the system hard drive.

At this point it should display 1 collections out of 85, disk space required: 40 MB or a similar space usage.

You can now proceed to installation: start installation to hard disk.

Don't forget to add the binaries to your PATH as it's noticed at the end of the installation procedure.

First test
In a terminal write $ tex '\empty Hello world!\bye' $ pdftex '\empty Hello world!\bye' You should get a DVI or a PDF file accordingly.

Configuration
Formerly, TeX distributions used to be configured with the texconfig tool from the teTeX distribution. TeX Live still features this tool, but recommends using its own tool instead: tlmgr. Tlmgr’s functionality completely subsumes texconfig.

List current installation options: tlmgr option

You can change the install options: tlmgr option srcfiles 1 tlmgr option docfiles 0 tlmgr paper letter

See the TLMGR(1) man page for more details on its usage. If you did not install the documents as told previously, you can still access the <tt>tlmgr</tt> man page with tlmgr help

Installing LaTeX
Now we have a running plain TeX environment, let's install the base packages for LaTeX.

 * 1) tlmgr install latex latex-bin latexconfig latex-fonts

In this case you can omit <tt>latexconfig latex-fonts</tt> as they are auto-resolved dependencies to LaTeX. Note that <tt>tlmgr</tt> resolves some dependencies, but not all. You may need to install dependencies manually. Thankfully this is rarely too cumbersome.

Other interesting packages:
 * 1) tlmgr install amsmath babel carlisle ec geometry graphics hyperref lm  marvosym oberdiek parskip graphics-def url

If you installed a package you do not need anymore, use
 * 1) tlmgr remove

Hyphenation
If you are using Babel for non-English documents, you need to install the hyphenation patterns for every language you are going to use. They are all packaged individually. For instance, use

 * 1) tlmgr install hyphen-{finnish,sanskrit}

for finnish and sanskrit hyphenation patterns.

Note that if you have been using another TeX distribution beforehand, you may still have hyphenation cache stored in you home folder. You need to remove it so that the new packages are taken into account. The TeX Live cache is usually stored in the <tt>~/.texliveYYYY</tt> folder (<tt>YYYY</tt> stands for the year). You may safely remove this folder as it contains only generated data. TeX compilers will re-generate the cache accordingly on next compilation.

Uninstallation
By default TeX Live will install in <tt>/usr/local/texlive</tt>. The distribution is quite proper as it will not write any file outside its folder, except for the cache (like font cache, hyphenation patters, etc.). By default,
 * the system cache goes in <tt>/var/lib/texmf</tt>;
 * the user cache goes in <tt>~/.texliveYYYY</tt>.

Therefore TeX Live can be installed and uninstalled safely by removing the aforementioned folders.

Still, TeX Live provides a more convenient way to do this: You may still have to wipe out the folders if you put untracked files in them.
 * 1) tlmgr uninstall

Editors
TeX and LaTeX source documents (and its related auxiliary files) are all plain-text files, and can be opened and modified in almost any text editor. You should use a text editor (e.g. Notepad), not a word processor (e.g., Microsoft Word, LibreOffice Writer). Dedicated LaTeX editors are more useful than generic plain text editors, because they are usually equipped with the autocomplete feature for commands, spelling and error checking and other handy macros.

Emacs
Emacs is a general purpose, extensible text processing system. Advanced users can program it (in elisp) to make Emacs the best LaTeX environment that will fit their needs. In turn beginners may prefer to use it in combination with AUCTeX and Reftex (extensions that may be installed into the Emacs program). Depending on the configuration, Emacs can provide a complete LaTeX editing environment with auto-completion, spell-checking, a complete set of keyboard shortcuts, view of table of contents, document preview and many other features.

gedit-latex-plugin
Gedit with gedit-latex-plugin is also worth trying out for users of GNOME. GEdit is a cross-platform application for Windows, Mac, and Linux

Gummi
Gummi is a LaTeX editor for Linux, which compiles the output of pdflatex in real-time and shows it on the right half of the screen.

LyX

LyX is a popular document preparation system for Windows, Linux and Mac OS. It provides a graphical interface to LaTeX, including several popular packages. It contains formula and table editors and shows visual clues of the final document on the screen — which enables users to write LaTeX documents without worrying about the actual syntax. LyX calls this a What You See Is What You Mean (WYSIWYM) approach, since the screen only shows the structure and an approximation of the output.

LyX saves a document in its own markup, from which LaTeX code can then be generated. The user is mostly isolated from the LaTeX code and is not in complete control of it, and for that reason LyX is generally not considered as a proper LaTeX editor. However, since it uses LaTeX as its underlying system, knowledge of how LaTeX works can also be useful to a LyX user. In addition, if one wants to implement a feature that is not supported in the GUI, then the use of LaTeX code may be required.

TeXmaker
TeXmaker is a cross-platform editor that is very similar to Kile in both features and user interface. It is also equipped with its own PDF viewer as well.

TeXstudio
TeXstudio is a cross-platform open source LaTeX editor forked from Texmaker.

TeXworks
TeXworks is a dedicated TeX editor that is included in MiKTeX and TeX Live. It was developed with the idea that a simple interface is better than a cluttered one, and thus to make it easier for the beginners of LaTeX to write their own documents. TeXworks originally came about precisely because a math professor wanted his students to have a better initial experience with LaTeX.

You can install TeXworks with the package manager of your Linux distribution or choose it as an install option in the Windows or Mac installer.

Vim
Vim is another general purpose text editor for a wide variety of platforms including UNIX, Mac OS X and Windows. A variety of extensions exist including LaTeX Box and Vim-LaTeX.

Kile
Kile is a LaTeX editor for KDE (cross platform), providing a powerful GUI for editing multiple documents and compiling them with many different TeX compilers. Kile is based on Kate editor, has a quick access toolbar for symbols, document structure viewer, a console and customizable build options. Kile can be run in all operating systems that can run KDE.

GNOME-LaTeX
GNOME-LaTeX is another text editor for Linux (GNOME).

TeXShop
TeXShop, the model for the TeXworks editor and previewer, is for Mac OS and is bundled with the MacTeX distribution. It uses multiple windows, one for editing the source, one for the preview, and one as a console for error messages. It offers one-click updating of the preview and allows easy crossfinding between the code and the preview by using CMD-click along with many features to make editing and typesetting TeX source easier.

TeXnicle
TeXnicle is a free editor for Mac OS that includes the ability to perform live updates. It includes a code library for the swift insertion of code and the ability to execute detailed word counts on documents. It also performs code highlighting and the editing window is customisable, permitting the user to select the font, colour, background colour of the editing environment. It is in active development.

Archimedes
Archimedes is an easy-to-use LaTeX and Markdown editor designed from the ground up for Mac OS X. It includes a built-in LaTeX library, code completion support, live previews, macro support, integration with sharing services, and PDF and HTML export options. Archimedes's Magic Type feature lets users insert mathematical symbols just by drawing them on their MacBook's trackpad or Magic Trackpad.

Texpad
Texpad is an integrated editor and viewer for Mac OS with a companion app for iOS devices. Similar to TeXShop, Texpad requires a working MacTeX distribution to function, however it can also support other distributions side-by-side with MacTex. It offers numerous features including templates, outline viewing, auto-completion, spell checking, customizable syntax highlighting, to-do list integration, code snippets, Markdown integration, multi-lingual support, and a Mac OS native user interface. Although Texpad offers a free evaluation period, the unlocked version is a paid download.

LEd
LEd

TeXnicCenter
TeXnicCenter is a popular free and open source LaTeX editor for Windows. It also has a similar user interface to TeXmaker and Kile.

WinEdt
WinEdt is a powerful and versatile text editor with strong predisposition towards creation of LaTeX/TeX documents for Windows. It has been designed and configured to integrate with TeX Systems such as MiTeX or TeX Live. Its built-in macro helps in compiling the LaTeX source to the WYSIWYG-like DVI or PDF or PS and also in exporting the document to other mark-up languages as HTML or XML.

WinShell
WinShell

Online solutions
To get started without needing to install anything, you can use a web-hosted service featuring a full TeX distribution and a web LaTeX editor.

 * Authorea is an integrated online framework for the creation of technical documents in collaboration. Authorea's frontend allows one to enter text in LaTeX or Markdown, as well as figures, and equations (in LaTeX or MathML). Authorea's versioning control system is entirely based on Git (as every article is a Git repository).
 * CoCalc is a collaborative online workplace for computations, which also offers an editor for LaTeX documents.

 * Overleaf is a secure, easy to use online LaTeX editor with integrated rapid preview - like Etherpad for LaTeX. One can start writing by creating a free account, and share the link or add collaborators to the projects before publishing it through their platform. It supports real time preview, Rich Text mode (a partial WYSIWYG mode with math expressions, ordered/unordered lists, sectional titles and figures in rendered form), bibliographies and custom styles. Since July 2017, ShareLaTeX is now part of Overleaf.

 * Verbosus is a professional online LaTeX Editor that supports collaboration with other users and is free to use. Merge conflicts can easily resolved by using a built-in merge tool that uses an implementation of the diff-algorithm to generate information required for a successful merge.

Bibliography management
Bibliography files (<tt>*.bib</tt>) are most easily edited and modified using a management system. These graphical user interfaces all feature a database form, where information is entered for each reference item, and the resulting text file can be used directly by BibTeX.

Cross-platform

 * JabRef
 * Mendeley
 * Zotero

Mac OS X-only

 * BibDesk is a bibliography manager based on a BibTeX file. It imports references from the internet and makes it easy to organize references using tags and categories.

Viewers
Finally, you will need a viewer for the files to view LaTeX outputs. By default, LaTeX saves the final document as a <tt>.dvi</tt> (Device independent file format), but you will rarely want it to, as DVI files do not contain embedded fonts — not to mention that many document viewers are unable to open them.

In most scenarios, you will use a LaTeX compiler like <tt>pdflatex</tt> to produce a PDF file directly, or a tool like <tt>dvi2pdf</tt> to convert the DVI file to PDF format. Then you can view the result with any PDF viewer.

Practically all LaTeX distributions have a DVI viewer for viewing the default output of <tt>latex</tt>, and also tools such as <tt>dvi2pdf</tt> for converting the result automatically to PDF and PS formats.

The following is a list of the various PDF viewers available on the web:
 * PDF.js (web-library and built-in modern browsers)
 * Evince (Linux GNOME)
 * Foxit (Windows)
 * Okular (Linux KDE)
 * Preview (built-in Mac OS X)
 * Reader (built-in in Windows 8 through Windows 10 1703)
 * Edge PDF Viewer (built in in Windows 10)
 * Adobe Acrobat Reader
 * Skim (Mac OS X)
 * Sumatra PDF (Windows)
 * Xpdf (Linux)
 * Zathura (Linux)

Tables and graphics tools
LaTeX is a document preparation system above all else: it does not aim at being a spreadsheet tool nor a vector graphics tool.

If LaTeX can render beautiful tables in a dynamic and flexible manner, it will not handle the handy features you could get with a spreadsheet like dynamic cells and calculus. Other tools are better at that. The ideal solution is to combine the strength of both tools: build your dynamic table with a spreadsheet, and export it to LaTeX to get a beautiful table seamlessly integrated to your document. See Tables for more details.

The graphics topic is a bit different since it is possible to write procedural graphics from within your LaTeX document. Procedural graphics produce state-of-the-art results that integrates perfectly to LaTeX (e.g. no font change), but have a steep learning curve and require a lot of time to draw.

For easier and quicker drawings, you may want to use a WYSIWYG tool (e.g., Adobe Photoshop, Canva) and export the result to a vector format like PDF. The drawback is that it will contrast in style with the rest of your document (e.g., font, size, color). Some tools have the capability to export to LaTeX, which will partially solve this issue. See Importing Graphics for more details.

title: LaTeX/Installation


text:
User talk:Qualiaphilia

Hi Qualiaphilia,

Please don't remove requirements from the Adventist Honors. As written, they reflect the official requirements as set forth by the Pathfinder organization. --Jomegat 03:21, 5 September 2007 (UTC)

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

title: User talk:Qualiaphilia


text:
The Geology of Indonesia

The Geology of Indonesia Wikibook is an online book about the Geology of Indonesia. This is a Wikibooks project, aimed for a collaborative approach to gather maximum knowledge available about the subject. It is intended to compile the current technical knowledge on the geology of Indonesia. Anybody is welcome to contribute to this book.

The initial content of this Wikibook came from "An Outline of the Geology of Indonesia", Darman, H. & Sidi, H. (eds.), 2000, a special publication of the Indonesian Association of Geologist (IAGI). Different authors have contributed to this book and new information is added through time.

As Indonesia is a vast region, the general geology for each region is described separately under different chapters. The book also covers the geological application for the petroleum, natural resources and geological hazards. The geological hazard will also cover the recent development of earthquake, tsunami, and other hazards in Indonesia. Indonesia is located on the Pacific Ring of Fire with extensive volcanic network which give rise to the recent earthquake.

Preface
Indonesia is the largest archipelagic state in the world comprising five major islands and about 300 smaller island groups. Altogether there are 13,667 islands and islets of which about 6,000 inhabited. The archipelago is situated on a crossroad between two oceans, the Pacific and Indian oceans, and bridges two continents, the Asian and Australian. Indonesia has a total area of 9,8 million km2, of which more than 7,9 million km2 are under water. Physiographically, the islands of Sumatra, Java and Kalimantan are attached to the Sunda Shelf of the Asian continent. On this landmass the water depth does not exceed 200 meters. To the east, Irian Jaya and the Aru islands lie on the Sahul Shelf, which are parts of the Australian continent. Located between these two shelves is the island group of Nusa Tenggara, Sulawesi, Maluku and Halmahera. These islands are encircled by deep seas which in many places reach 5,000 meters.

About 60 Tertiary sedimentary basins, spread out from Sumatra in the west to Irian Jaya in the east, are identified in Indonesia. So far only 38 basins have been explored and drilled for petroleum and 14 of the are now producing oil and gas. Seventy three percent of these basins are located offshore, about one third of them in the deeper sea, with water depth exceeding 200 m.

Background

In 1949, R. W van Bemmelen published a compilation of reports and data on the Geology of Indonesia. The book was reprinted in 1970 with no additional data. This book has documented a lot of data and geological understanding before the second world war and only covered onshore geology of Indonesia. W. Hamilton published a book titled Tectonics of the Indonesian Region in 1979 which include offshore seismic data and remote sensing. The Indonesian geologist celebrated the 50th anniversary of R. W. van Bemmelen's book in a conference titled "Tectonics and Sedimentation of Indonesian" in 1999 and published "An Outline of the Geology of Indonesia" the following year (2000). The data and the knowledge on the geology of Indonesia are so much and make it so difficult to compile them in a single book. In 2007 the Wikibook of the Geology of Indonesia was started by converting Än Outline of the Geoloyg of Indonesia"to a digital version. The idea is to include as many geoscientists as possible to keep the information on the geology of Indonesia as good as possible. This online version of the Geology of Indonesia will also give a chance to renew or update the information stored at anytime.
 * 1) /Contributors/
 * 2) /Data Source/

1. Introduction
Indonesia is the largest archipelagic state in the world comprising five major islands and about 300 smaller island groups. Altogether there are 13,667 islands and islets of which about 6,000 are inhabited. The archipelago is situated on a crossroad between two oceans, the Pacific and Indian oceans, and bridges two continents, the Asian and Australian. Indonesia has a total area of 9.8 million km2, of which more than 7.9 million km2 are under water. Physiographically, the islands of Sumatra, Java and Kalimantan are attached to the Sunda Shelf of the Asian continent. On this landmass the water depth does not exceed 200 meters. To the east, Irian Jaya and the Aru islands lie on the Sahul Shelf, which are parts of the Australian continent. Located between these two shelves is the island group of Nusa Tenggara, Sulawesi, Maluku and Halmahera. These islands are encircled by deep seas which in many places reach 5,000 meters. About 60 Tertiary sedimentary basins, spread out from Sumatra in the west to Irian Jaya in the east, are identified in Indonesia. So far only 38 basins have been explored and drilled for petroleum and 14 of them are now producing oil and gas. 73 percent of these basins are located offshore, about one third of them in the deeper sea, with water depth exceeding 200 m.

 * 1) /History of geological studies/

2. Tectonic

 * 1) /Regional Tectonic Framework/
 * 2) /Plate Tectonic/
 * 3) /Major Suture/

3. Stratigraphy
The stratigraphical knowledge of the Indonesian Archipelago will be summarized in this chapter. A synopsis of the stratigraphy of the Netherlands East Indies has been published by BROUWER (1925) and L. M. R. RUTTEN (1927). In 1938 UMBGROVE gave a comprehensive review of the geological history of the East Indies. A number of important contributions to the stratigraphy which appeared in 1937–1938, not available to UMBGROVE, were summarized by SMIT SIBINGA (1940). L. M. R. RUTTEN (1948) and DE BEAUFORT (1948) reviewed the paleontological work carried out in the Netherlands for the Dutch Overseas Territories during the period 1918–1943.

Other important reviews on the stratigraphy of the Indian Archipelago are to be found in: The "MARTIN-Volume" of the "Leidsche Geologische Mededeelingen" (1931), in which a number of authors gives a review of the paleontological and stratigraphical data up to the year 1930; UMBGROVE (1934 b) on theNeogene, and(1935)on thePre-Tertiary; BADINGS (1936) on the Paleogene; STAUFFER (1945) on the stratigraphy of Indonesia; SMITH (1924, 1925) on the stratigraphy of the Philippines; MONTGOMERY, OSBORN and GLAESSNER on the stratigraphy of Eastern New Guinea 1); CHHIBBER (1934) on the stratigraphy of the Andamans and Nicobars.

In 1950, P. Marks, published Stratigraphic Lexicon of Indonesia, which is a compilation of formation names in Indonesia. The formation names are sorted in alphabetical order with their description, rough map of the localities, and summarized them in stratigraphic charts.

The first Indonesian Stratigraphic Nomenclature guide (Sandi Stratigraphy Indonesia) was published in 1973 by Soejono Martodjojo and Djuhaeni. This book was updated in 1996 and published electronically by the Indonesian Geologist Association. The file is available online in SSI-1996. Many publications related to sequence stratigraphy and seismic stratigraphy in Indonesia were published by the Indonesian Petroleum Association (IPA), the Indonesian Geological Association (IAGI)and other professional organizations. A compilation of updated article on biostratigraphy of SE Asia is currently being prepared by the Indonesian Sedimentologists Forum (FOSI), which aim to issue it in 2014. Another key source on the stratigraphy of Indonesia is the Geological Research and Development Centre of Indonesia (GRDC)

In 1979, S. Sartono, from the Institute of Technology, Bandung, published a lecture outline in Indonesian, titled Stratigrafi Indonesia with occurrence maps of the stratigraphic units in Indonesia. This book also provide updates on R. W. van Bemmelen's book.

For the sake of brevity, in this chapter only some notes will be given on recent advances in our knowledge of the pre-tertiary stratigraphy. For the rest the reader is referred to the regional descriptions.

The tertiary and quaternary formations have a much wider distribution than the pre-tertiary rocks. Their stratigraphy is most important in the unraveling of the evolution of the younger mountain systems in this area. Therefore, the stratigraphy of the Tertiary and the Quaternary will be treated at some length in this chapter.

 * 1) Basement
 * 2) Paleozoic
 * 3) Mesozoic
 * 4) Cenozoic

Regional Geology

 * 1) /Sumatra/
 * 2) /Natuna/
 * 3) /Java & Java Sea/
 * 4) /Kalimantan/
 * 5) /Makassar Strait/
 * 6) /Sulawesi Sea/
 * 7) /Sulawesi/
 * 8) /The lesser Sunda Islands/
 * 9) /Halmahera/
 * 10) /Banda Arc/
 * 11) /Timor/
 * 12) /Arafura Sea/
 * 13) /Papua/

Petroleum Geology

 * 1) /Sedimentary Basins/
 * 2) /Exploration License/
 * 3) /Petroleum Issues/
 * 4) /Recent Development/

Geological Hazards

 * 1) /Earthquake/
 * 2) /Volcanoes/
 * 3) /Tsunami/
 * 4) /Landslides/

Geotourism

 * 1) Lake Toba
 * 2) /Ngarai Sianouk/
 * 3) Krakatau
 * 4) Tangkuban Perahu

title: The Geology of Indonesia


text:
The Geology of Indonesia/Preface

Indonesia is the largest archipelagic state in the world comprising five major islands and about 300 smaller island groups. Altogether there are 13,667 islands and islets of which about 6,000 inhabited. The archipelago is situated on a crossroad between two oceans, the Pacific and Indian oceans, and bridges two continents, the Asian and Australian. Indonesia has a total area of 9,8 million sq km, of which more than 7,9 million sq km are under water. Physiographically, the islands of Sumatra, Java and Kalimantan are attached to the Sunda Shelf of the Asian continent. On this landmass the water depth does not exceed 200 meters. To the east, Irian Jaya and the Aru islands lie on the Sahul Shelf, which are parts of the Australian continent. Located between these two shelves is the island group of Nusa Tenggara, Sulawesi, Maluku and Halmahera. These islands are encircled by deep seas which in many places reach 5,000 meters.

About 60 Tertiary sedimentary basins, spread out from Sumatra in the west to Irian Jaya in the east, are identified in Indonesia. So far only 38 basins have been explored and drilled for petroleum and 14 of the are now producing oil and gas. Seventy three percent of these basins are located offshore, about one third of them in the deeper sea, with water depth exceeding 200 m.

Background

In 1949, R. W van Bemmelen published a compilation of reports and data on the Geology of Indonesia. The book was reprinted in 1970 with no additional data. This book has documented a lot of data and geological understanding before the second world war and only covered onshore geology of Indonesia. W. Hamilton published a book titled Tectonics of the Indonesian Region in 1979 which include offshore seismic data and remote sensing. The Indonesian geologist celebrated the 50th anniversary of R. W. van Bemmelen's book in a conference titled "Tectonics and Sedimentation of Indonesian" in 1999 and published "An Outline of the Geology of Indonesia" the following year (2000). The data and the knowledge on the geology of Indonesia are so much and make it so difficult to compile them in a single book. In 2007 the Wikibook of the Geology of Indonesia was started by converting Än Outline of the Geoloyg of Indonesia"to a digital version. The idea is to include as many geoscientists as possible to keep the information on the geology of Indonesia as good as possible. This online version of the Geology of Indonesia will also give a chance to renew or update the information stored at anytime.

title: The Geology of Indonesia/Preface


text:
The Geology of Indonesia/History of Geological Studies

Indonesia is the largest archipelagic state in the world comprising five major islands and about 300 smaller island groups. Altogether there are 13,667 islands and islets of which about 6,000 are inhabited. The archipelago is situated on a crossroad between two oceans, the Pacific and Indian oceans, and bridges two continents, the Asian and Australian. Indonesia has a total area of 9.8 million sq km, of which more than 7.9 million sq km are under water. Physiographically, the islands of Sumatra, Java and Kalimantan are attached to the Sunda Shelf of the Asian continent. On this landmass the water depth does not exceed 200 meters. To the east, Irian Jaya and the Aru islands lie on the Sahul Shelf, which are parts of the Australian continent. Located between these two shelves is the island group of Nusa Tenggara, Sulawesi, Maluku and Halmahera. These islands are encircled by deep seas which in many places reach 5,000 meters. About 60 Tertiary sedimentary basins, spread out from Sumatra in the west to Irian Jaya in the east, are identified in Indonesia. So far only 38 basins have been explored and drilled for petroleum and 14 of them are now producing oil and gas. 73 percent of these basins are located offshore, about one third of them in the deeper sea, with water depth exceeding 200 m.


text:
The Geology of Indonesia/Contributors

This online book collaboration was originated from a special publication published by the Indonesian Geologists Association (IAGI) with additional material from discussions of Indonesian geologists online community (iagi-net).

Contributors (status 05-2015):
 * Herman Darman (Shell) - Editor - Kalimantan
 * Awang Harun Satyana (SKKMigas)- Kalimantan
 * Aris Setiawan (Consultant) - Wiki-Editor
 * F. Hasan Sidi (Woodside) - Editor
 * Nila Murti (Gaffney, Cline & Associates) - Natuna Sea
 * Minarwan (Mubadala) - Natuna Sea
 * Bambang Gumilar (Chevron) - Central Sumatra
 * Agus Guntoro (Trisakti University) - The Lesser Sunda Island
 * Surono (PPPG) - Sulawesi
 * Benyamin Sapiie (Institute of Technology, Bandung) - Papua

title: The Geology of Indonesia/Contributors


text:
User talk:Crapiecorn

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. --Derbeth talk 08:50, 5 September 2007 (UTC)

title: User talk:Crapiecorn


text:
User talk:Pak.aris

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. --Derbeth talk 08:51, 5 September 2007 (UTC)

title: User talk:Pak.aris


text:
User talk:90.156.169.224

You have been blocked from editing Wikibooks  as a result of your .  Please note that page blanking, addition of random text or spam, deliberate misinformation, privacy violations, personal attacks; and repeated, blatant violations of our neutral point of view policy are considered vandalism. If you wish to make useful contributions, you are welcome to come back after the block expires. Webaware talk 09:20, 5 September 2007 (UTC)

title: User talk:90.156.169.224


text:
User:607evalam

allo, mon nom est Eva

title: User:607evalam


text:
The Geology of Indonesia/Sedimentary Basins

Introduction
The basic premise to explore the petroleum is the existence of sedimentary basin. Sedimentary basin is a depression on the earth surface the can accumulated the sedimentation material through time. Since most of the sediment transporting agent are water, the sedimentary basin usually the place where the water finally accumulate. It can be in the form of sea, lake, delta, or river.

Indonesia is a large country with various type of sedimentary basins. Most of the sedimentary basin in the western Indonesia are already explored since the end of 19th century. The recent years also saws the exploration on the frontier basins, especially in the eastern Indonesia. Unfortunately, the interest of the major oil companies lost their appetite to conduct explorational activities in Indonesia probably due to the unfavorable fiscal regime. As a result, the oil and gas production is keep declining in Indonesia without any substantial reserve replacement.

The sediment which comprise of clay, sand, boulder or carbonate are being deposited in the sedimentary basin over a geologic time (million years). Due to the weight of the sedimentary deposit, the sedimentary basin experience subsidence to allow more sedimentation. This sedimentary process may accumulate sediment with cumulative thickness of several thousand meters.

Characteristics
About 60 Tertiary sedimentary basins, spread out from Sumatra in the west to Irian Jaya in the east, are identified in Indonesia. So far only 38 basins have been explored and drilled for petroleum and 14 of the are now producing oil and gas. Seventy three percent of these basins are located offshore, about one third of them in the deeper sea, with water depth exceeding 200 m.

Back-arc Basin
The most prolific sedimentary basin in Indonesia are belong to back-arc basin, whichis located on the 'back' of the volcanic-arc. Most of the back-arc basin located in the northeastern coast of Sumatra, northern Java, and continue to northern Lesser Island. Almost all of the back-arc basin are currently producing oil and gas, therefore categorized as proven petroleum province.

Fore-arc Basin
The fore-arc basin located to the 'front' of the volcanic arc, which is located along southwestern coast of Sumatra, southern coast of Java and Lesser Island. The fore-arc basin is mainly considered as a frontier basin and no commercial hydrocarbon found yet. However, there is strong indication of working petroleum system in the fore-arc basin, such as gas discoveries in the Nias area. Oil shows also reported to be found in offshore Bengkulu (Southern Sumatra). On the interesting note, the fore-arc basin in the southern part of Papua New Guinea already found commercial gas accummulation in the Pandorra Gas Field.


text:
Category talk:Book:Raising Chickens

Hi! Can anybody please tell me if chickens can absorb bonemeal and if this is a good source of calcium.I have noticed they love it especially if it has abit of meat in it (protein). Small chicks grow well with this additive too. I ahve also noticed that greens make a nice orangy/yellow yolk. Please respond

title: Category talk:Book:Raising Chickens


text:
The Geology of Indonesia/Petroleum Issues

Fiscal Regime
Fiscal regime for the petroleum exploration in Indonesia is considered un-competitive compared to other countries. It reflected on the minimal interest from the major oil companies to invest their money for the petroleum exploration activities in Indonesia.

Technical Brain Drain
The problem on the petroleum industry in Indonesia is the technical brain drain. Large proportion of the highly skilled technical people with good experience in the oil industry are left to working overseas to gain international experience and higher salary. It is not a secret that oil industry in Indonesia is unfairly renumerate their workers. The renumeration for expatriate personnel is about 5-10 times higher than the local employee with similar technical skills and level of experiences.


text:
User talk:Ted19

Well, I don't have time to create a proper page now. (I've just made my account and I'm anxious to get started!) I didn't want to leave it blank though so this is a filler until I get some extra time.

title: User talk:Ted19


text:
User talk:Keishazown

I replied to your query here.

In Special:Preferences, you can set it up so pages you edit are added to your watchlist automatically; then you can just click Special:Watchlist to see recent edits to those pages. That way when you ask a question, you can just check your watchlist instead of relying on someone to tell you they've replied, or checking the page manually.  – Mike.lifeguard  | talk 12:47, 5 September 2007 (UTC)

title: User talk:Keishazown


text:
Cookbook:Bacon and Egg Stuffed Tomatoes

| American cuisine
 * Southern cuisine
 * Breakfast cuisine

Ingredients

 * 6 large tomatoes, washed
 * Salt and pepper to taste
 * 6 slices bacon, cooked and crumbled; or 4 tablespoons bacon bits
 * ¾ cups diced celery
 * 6 hard boiled eggs
 * ⅓ cup mayonnaise
 * 2 teaspoon chopped fresh parsley
 * ¼ teaspoon salt
 * ¼ teaspoon pepper
 * Paprika

Procedure

 * 1) Cut tops from tomatoes.
 * 2) Scoop out pulp, leaving shells intact.
 * 3) Chop tomato pulp.
 * 4) Drain tomato shells and sprinkle cavities with salt and pepper.
 * 5) Combine tomato pulp, bacon, celery, eggs, mayonnaise, parsley, and measured salt and pepper.
 * 6) Stir well.
 * 7) Fill tomato shell with bacon and egg mixture.
 * 8) Sprinkle with paprika.

title: Cookbook:Bacon and Egg Stuffed Tomatoes


text:
User talk:24.251.107.160

 – Mike.lifeguard  | talk 13:46, 5 September 2007 (UTC)

title: User talk:24.251.107.160


text:
User talk:172.212.97.9

 – Mike.lifeguard  | talk 13:56, 5 September 2007 (UTC)

title: User talk:172.212.97.9


text:
User talk:Mason L.

Merging First Aid/Wilderness First Aid into Outdoor Survival
I notice that you marked First Aid/Wilderness First Aid for merge with another book. You're welcome to use our content in any book you like, however it is most definitely a part of the First Aid wikibook, and should stay as such. I'm going to remove the tag, but again: feel free to use the content. If you need help with anything, just ask.  – Mike.lifeguard  | talk 14:00, 5 September 2007 (UTC)

 * Ok thats no problem Mike, I was more so thinking about adding the content. Is there any tag like merge that says you want to leave the current page as well? Thanks Mason L. 14:03, 5 September 2007 (UTC)

 * I don't know, actually. I doubt it. Wikipedia has massive amounts of templates for just about everything under the sun, but we don't. I left the tag on Outdoor Survival so contributors know that they can take content from First Aid/Wilderness First Aid. I also left a note on Talk:First Aid/Wilderness First Aid to the same effect.
 * The other thing you can do is request an import of pages from Wikipedia at WB:RFI. That's a great way to bring in large amounts of content - the only catch is that everything needs to be rewritten from encyclopaedia-style to textbook-style.  – Mike.lifeguard  | talk 14:08, 5 September 2007 (UTC)

 * Ok thanks for the info I'm a new user and just learning. I'm interested in Outdoor Survival and saw that there were many articles about it scattered all over. I'm trying to piece them together and I had just thought the First Aid/Wilderness First Aid had some good information in it. Any ways thanks for your help Mason L. 14:10, 5 September 2007 (UTC)

 * By the way you might want to take a look at this article Transwiki:Wilderness first aid. It has more information on Wilderness First Aid. If you would like any help on the First Aid section I'd be glad to do anything that needs to be done. Mason L. 14:12, 5 September 2007 (UTC)

 * Thanks - we've already culled all the content we needed. It's mostly stuff that isn't specific to Wilderness first aid (surprisingly), and the stuff that is has been integrated into First Aid/Wilderness First Aid  – Mike.lifeguard  | talk 14:19, 5 September 2007 (UTC)

 * If the information is already integrated should that article be changed to a redirect then? Or is there some reason for keeping the Transwiki version such as a copyright policy or something? I would like to know for the future if I merge any other Transwiki articles. Mason L. 14:23, 5 September 2007 (UTC)

reset tabs

We had most of those topics covered already, so it wasn't a full-on merge. If you're going to use Transwikis as a basis for pages in a book, I'd suggest that instead of merging manually, you simply move the page from the transwiki namespace into the book as whatever you want the page name to be, then work on it there. So for Transwiki:Wilderness first aid, you might move it to Outdoor Survival/First aid, then start working on it there... dewikifying, rewriting for style, copyediting etc. That's the easiest way to ensure that the edit history stays intact. If anyone needs the wikipedia page again, we can import it again.  – Mike.lifeguard  | talk 14:30, 5 September 2007 (UTC)

 * Ok thanks again for all your help with this, I appreciate it. Mason L. 14:42, 5 September 2007 (UTC)

 * No problem. If you need anything else, you can ask me on my talk page, or also at the staff lounge.  – Mike.lifeguard  | talk 14:48, 5 September 2007 (UTC)

Please be careful when you move pages. Try to move them only once; if you move them multiple times you create double redirects that have to get cleaned up. If you lay out the structure of your book ahead of time, then start moving content and filling in pages, you'll fare better.  – Mike.lifeguard  | talk 15:10, 5 September 2007 (UTC)

 * Ok sorry about that I thought I was going to name it something then I changed my mind. I'll plan it out more next time. Mason L. 15:11, 5 September 2007 (UTC)

title: User talk:Mason L.


text:
Subject:Electrical engineering

de:Regal:Elektrotechnik 電気工学

title: Subject:Electrical engineering


text:
Java Persistence/Identity and Sequencing

=Identity=

An object id (OID) is something that uniquely identifies an object. Within a JVM this is typically the object's pointer. In a relational database table, a row is uniquely identified in its table by its primary key. When persisting objects to a database you need a unique identifier for the objects, this allows you to query the object, define relationships to the object, and update and delete the object. In JPA the object id is defined through the  annotation or   element and should correspond to the primary key of the object's table.

Strange behavior, unique constraint violation.

 * You must never change the id of an object. Doing so will cause errors, or strange behavior depending on your JPA provider.  Also do not create two objects with the same id, or try persisting an object with the same id as an existing object.  If you have an object that may be existing use the     API, do not use   for an existing object, and avoid relating an un-managed existing object to other managed objects.

No primary key.

 * See No Primary Key.

=Sequencing= An object id can either be a natural id or a generated id. A natural id is one that occurs in the object and has some meaning in the application. Examples of natural ids include email addresses, phone numbers, and social insurance numbers. A generated id (also known as a surrogate id) is one that is generated by the system. A sequence number in JPA is a sequential id generated by the JPA implementation and automatically assigned to new objects. The benefits of using sequence numbers are that they are guaranteed to be unique, allow all other data of the object to change, are efficient values for querying and indexes, and can be efficiently assigned. The main issue with natural ids is that everything always changes at some point; even a person's social insurance number can change. Natural ids can also make querying, foreign keys and indexing less efficient in the database.

In JPA an  can be easily assigned a generated sequence number through the   annotation, or   element.

Sequence Strategies
There are several strategies for generating unique ids. Some strategies are database agnostic and others make use of built-in databases support.

JPA provides support for several strategies for id generation defined through the  enum values: TABLE, SEQUENCE and IDENTITY.

The choice of which sequence strategy to use is important as it affects performance, concurrency and portability.

Table sequencing
Table sequencing uses a table in the database to generate unique ids. The table has two columns, one stores the name of the sequence, the other stores the last id value that was assigned. There is a row in the sequence table for each sequence object. Each time a new id is required the row for that sequence is incremented and the new id value is passed back to the application to be assigned to an object. This is just one example of a sequence table schema, for other table sequencing schemas see Customizing.

Table sequencing is the most portable solution because it just uses a regular database table, so unlike sequence and identity can be used on any database. Table sequencing also provides good performance because it allows for sequence pre-allocation, which is extremely important to insert performance, but can have potential concurrency issues.

In JPA the  annotation or   element is used to define a sequence table. The TableGenerator defines a  for the column used to store the name of the sequence,   for the column used to store the last id allocated, and   for the value to store in the name column (normally the sequence name).

Error when allocating a sequence number.

 * Errors such as "table not found", "invalid column" can occur if you do not have a SEQUENCE table defined in your database, or its schema does not match what you have configured, or what your JPA provider is expecting by default. Ensure you create the sequence table correctly, or configure your   to match the table that you created, or let your JPA provider create you tables for you (most JPA provider support schema creation).  You may also get an error such as "sequence not found", this means you did not create a row in the table for your sequence.  You must insert an initial row in the sequence table for your sequence with the initial id (i.e.  ), or let your JPA provider create your schema for you.

Deadlock or poor concurrency in the sequence table.

 * See concurrency issues.

Sequence objects
Sequence objects use special database objects to generate ids. Sequence objects are only supported in some databases, such as Oracle, DB2, and Postgres. Usually, a SEQUENCE object has a name, an INCREMENT, and other database object settings. Each time the  is selected the sequence is incremented by the INCREMENT.

Sequence objects provide the optimal sequencing option, as they are the most efficient and have the best concurrency, however they are the least portable as most databases do not support them. Sequence objects support sequence preallocation through setting the INCREMENT on the database sequence object to the sequence preallocation size.

In JPA the  annotation or   element is used to define a sequence object. The SequenceGenerator defines a  for the name of the database sequence object, and an   for the sequence preallocation size or sequence object INCREMENT.

Error when allocating a sequence number.

 * Errors such as "sequence not found", can occur if you do not have a SEQUENCE object defined in your database. Ensure you create the sequence object, or let your JPA provider create your schema for you (most JPA providers support schema creation).  When creating your sequence object, ensure the sequence's   matches your  's  .  The DDL to create a sequence object depends on the database, for Oracle it is,.

Invalid, duplicate or negative sequence numbers.

 * This can occur if your sequence object's  does not match your  .  This results in the JPA provider thinking it got back more sequences than it really did, and ends up duplicating values, or with negative numbers.  This can also occur on some JPA providers if your sequence object's   is 0 instead of a value equal or greater to the.

Identity sequencing
Identity sequencing uses special IDENTITY columns in the database to allow the database to automatically assign an id to the object when its row is inserted. Identity columns are supported in many databases, such as MySQL, DB2, SQL Server, Sybase, and PostgreSQL. Oracle supports IDENTITY columns as of Oracle 12c. If using an older version, it is possible to simulate them using sequence objects and triggers.

Although identity sequencing seems like the easiest method to assign an id, they have several issues. One is that since the id is not assigned by the database until the row is inserted the id cannot be obtained in the object until after commit or after a flush call. Identity sequencing also does not allow for sequence preallocation, so can require a select for each object that is inserted, potentially causing a major performance problem, so in general are not recommended.

In JPA there is no annotation or element for identity sequencing as there is no additional information to specify. Only the 's strategy needs to be set to.

PostgreSQL Serial Columns
Sequence objects are database constructs and can be instantiated as distinct objects as needed. They provide incremental values when their "next" method is called. Note that the increments can be values greater than one, for example incremented by two's, three's etc. An 'on insert' trigger can be constructed for each table that calls a sequence object created for that specific table primary key asking for the next value and inserting it into the table with the new record. Identity datatypes in products like MySQL or SQL Server are encapsulated types that do the same thing without requiring the set up of triggers and sequences (although PostgreSQL at least has automated much of this with its Serial and Big Serial pseudo datatypes (these actually create an int/bigint column and run a "macro" creating the sequence and 'on insert' trigger when the CREATE TABLE statement is executed.)).

null is inserted into the database, or error on insert.

 * This typically occurs because the @Id was not configured to use an @GeneratedValue(strategy=GenerationType.IDENTITY). Ensure it is configured correctly.  It could also be that your JPA provider does not support identity sequencing on the database platform that you are using, or you have not configured your database platform.  Most providers require that you set the database platform through a persistence.xml property, most provider also allow you to customize your own platform if it is not directly supported. It may also be that you did not set your primary key column in your table to be an identity type.

Object's id is not assigned after persist.

 * Identity sequencing requires the insert to occur before the id can be assigned, so it is not assigned on persist like other types of sequencing. You must either call   on the current transaction, or call   on the  .  It may also be that you did not set your primary key column in your table to be an identity type.

Child's id is not assigned from parent on persist.

 * A common issue is that the generated  is part of a child object's   through a   or   mapping.  In this case, because JPA requires that the child define a duplicate   mapping for the , its   will be inserted as null.  One solution to this is to mark the   on the   mapping in the child as  , and define the   or   using a normal   this will ensure the foreign key field is populated by the   or   not the  .  Another option is to first persist the parent, then call   before persisting the child.

Poor insert performance.

 * Identity sequencing does not support sequence preallocation, so requires a select after each insert, in some cases doubling the insert cost. Consider using a sequence table, or sequence object to allow sequence preallocation.

Lost latest free id.

 * MySQL bug 199 causes its autoincrement counter to be lost on restart. So if the last entity is removed and the MySQL server restarted, the same id will be re-used and thus not be unique.

=Advanced=

Composite Primary Keys
A composite primary key is one that is made up of several columns in the table. A composite primary key can be used if no single column in the table is unique. It is generally more efficient and simpler to have a one-column primary key, such as a generated sequence number, but sometimes a composite primary key is desirable and unavoidable.

Composite primary keys are common in legacy database schemas, where cascaded keys can sometimes be used. This refers to a model where dependent objects' key definitions include their parents' primary key; for example, 's primary key is ,  's primary key is composed of a   and a  ,  's primary key is composed of  ,  , and  , and so on. Although this generally does not match object-oriented design principles, some DBA's prefer this model. Difficulties with the model include the restriction that employees cannot switch departments, that foreign-key relationships become more complex, and that all primary-key operations (including queries, updates, and deletes) are less efficient. However, each department has control over its own employee IDs, and if needed the database  table can be partitioned based on the   or , as these are included in every query.

Other common usages of composite primary keys include many-to-many relationships where the join table has additional columns, so the table itself is mapped to an object whose primary key consists of the pair of foreign-key columns and dependent or aggregate one-to-many relationships where the child object's primary key consists of its parent's primary key and a locally unique field.

There are two methods of declaring a composite primary key in JPA,  and.

Id Class
An  defines a separate Java class to represent the primary key. It is defined through the  annotation or   XML element. The  must define an attribute (field/property) that mirrors each   attribute in the entity. It must have the same attribute name and type. When using an  you still require to mark each   attribute in the entity with.

The main purpose of the  is to be used as the structure passed to the     and   API. Some JPA products also use the  as a cache key to track an object's identity. Because of this, it is required (depending on JPA product) to implement an  and   method on the. Ensure that the  method checks each part of the primary key, and correctly uses   for objects and   for primitives. Ensure that the  method will return the same value for two equal objects.
 * TopLink / EclipseLink : Do not require the implementation of  or   in the id class.

Embedded Id
An  defines a separate   Java class to contain the entities primary key. It is defined through the  annotation or   XML element. The 's   class must define each id attribute for the entity using   mappings. All attributes in the 's   are assumed to be part of the primary key.

The  is also used as the structure passed to the     and   API. Some JPA products also use the  as a cache key to track an object's identity. Because of this, it is required (depending on JPA product) to implement an  and   method on the. Ensure that the  method checks each part of the primary key, and correctly uses   for objects and   for primitives. Ensure that the  method will return the same value for two equal objects.
 * TopLink / EclipseLink : Do not require the implementation of  or   in the id class.

Primary Keys through OneToOne and ManyToOne Relationships
A common model is to have a dependent object share the primary key of its parent. In the case of a  the child's primary key is the same as the parent, and in the case of a   the child's primary key is composed of the parent's primary key and another locally unique field.

JPA 1.0 does not allow  on a   or , but JPA 2.0 does.

One of the biggest pitfalls when working with composite primary keys comes with the implementation of associations to entity classes whose tables have multi-column primary keys (using the @JoinColumns annotation). Many JPA implementations may throw seemingly inconsistent exceptions when not specifying referencedColumnName for every @JoinColumns annotation, which JPA requires for composite foreign keys (even if all referenced column names are equal to the ones in the referencing table). See http://download.oracle.com/javaee/5/api/javax/persistence/JoinColumns.html

JPA 1.0
Unfortunately JPA 1.0 does not handle this model well, and things become complicated, so to make your life a little easier you may consider defining a generated unique id for the child. JPA 1.0 requires that all  mappings be   mappings, so if your   comes from a foreign key column through a   or   mapping, you must also define a     mapping for the foreign key column. The reason for this is in part that the  must be a simple object for identity and caching purposes, and for use in the   or the     API.

Because you now have two mappings for the same foreign key column you must define which one will be written to the database (it must be the  one), so the   or   foreign key must be defined to be read-only. This is done through setting the  attributes   and   to false, or by using the   instead of the.

A side effect of having two mappings for the same column is that you now have to keep the two in synch. This is typically done through having the set method for the  attribute also set the   attribute value to the target object's id. This can become very complicated if the target object's primary key is a, in this case you must ensure that the target object's id has been assigned before relating the two objects.

Some times I think that JPA primary keys would be much simpler if they were just defined on the entity using a collection of s instead of mixing them up with the attribute mapping. This would leave you free to map the primary key field in any manner you desired. A generic  could be used to pass the primary key to   methods, and it would be the JPA provider's responsibility for hashing and comparing the primary key correctly instead of the user's. But perhaps for simple singleton primary key models the JPA model is more straight forward.

 * TopLink / EclipseLink : Allow the primary key to be specified as a list of columns instead of using  mappings.  This allows   and   mapping foreign keys to be used as the primary key without requiring a duplicate mapping.  It also allows the primary key to be defined through any other mapping type.  This is set through using a   and the     API.

 * Hibernate / Open JPA / EclipseLink (as of 1.2): Allows the  annotation to be used on a   or   mapping.

JPA 2.0
Defining an  for a   or   in JPA 2.0 is much simpler. The  annotation or   XML attribute can be added to a   or   mapping. The  used for the object will be derived from the target object's. If the  is a single value, then the source object's   is the same as the target object's. If it is a composite, then the   will contain the     attributes, and the target object's   as the relationship value. If the target object also has a composite, then the source object's   will contain the target object's.

Concurrency and Deadlocks
One issue with table sequencing is that the sequence table can become a concurrency bottleneck, even causing deadlocks. If the sequence ids are allocated in the same transaction as the insert, this can cause poor concurrency, as the sequence row will be locked for the duration of the transaction, preventing any other transaction that needs to allocate a sequence id. In some cases the entire sequence table or the table page could be locked causing even transactions allocating other sequences to wait or even deadlock. If a large sequence pre-allocation size is used this becomes less of an issue, because the sequence table is rarely accessed. Some JPA providers use a separate (non-JTA) connection to allocate the sequence ids in, avoiding or limiting this issue. In this case, if you use a JTA data-source connection, it is important to also include a non-JTA data-source connection in your persistence.xml.

Guaranteeing Sequential Ids
Table sequencing also allows for truly sequential ids to be allocated. Sequence and identity sequencing are non-transactional and typically cache values on the database, leading to large gaps in the ids that are allocated. Typically this is not an issue and desired to have good performance, however if performance and concurrency are less of a concern, and true sequential ids are desired then a table sequence can be used. By setting the  of the sequence to 1 and ensuring the sequence ids are allocated in the same transaction of the insert, you can guarantee sequence ids without gaps (but generally it is much better to live with the gaps and have good performance).

Running Out of Numbers
One paranoid delusional fear that programmers frequently have is running out of sequence numbers. Since most sequence strategies just keep incrementing a number it is unavoidable that you will eventually run out. However as long a large enough numeric precision is used to store the sequence id this is not an issue. For example if you stored your id in a NUMBER(5) column, this would allow 99,999 different ids, which on most systems would eventually run out. However if you store your id in a NUMBER(10) column, which is more typical, this would store 9,999,999,999 ids, or one id each second for about 300 years (longer than most databases exist). But perhaps your system will process a lot of data, and (hopefully) be around a very long time. If you store your id in a NUMBER(20) this would be 99,999,999,999,999,999,999 ids, or one id each millisecond for about 3,000,000,000 years, which is pretty safe.

But you also need to store this id in Java. If you store the id in a Java int, this would be a 32 bit number, which is 4,294,967,296 different ids (well actually 2,147,483,648 positive ids), or one id each second for about 100 years. If you instead use a long, this would be a 64 bit number, which is 9,223,372,036,854,775,808 different ids, or one id each millisecond for about 300,000,000 years, which is pretty safe. I would recommend using a long vs an int however, as I have seen int ids run out on large databases before (what happens is they become negative until they wrap around to 0 and start getting constraint errors).

Customizing
JPA supports three different strategies for generating ids, however there are many other methods. Normally the JPA strategies are sufficient, so you would only use a different method in a legacy situation.

Sometimes the application has an application specific strategy for generating ids, such as prefixing ids with the country code, or branch number. There are several ways to integrate a customize ids generation strategy, the simplest is just define the id as a normal id and have the application assign the id value when the object is created.

Some JPA products provide additional sequencing and id generation options, and configuration hooks.

 * TopLink, EclipseLink : Several additional sequencing options are provided. A   allows a single column table to be used.  A   allows for custom SQL or stored procedures to be used.  An API also exists to allow a user to supply their own code for allocating ids.

 * Hibernate : A GUID id generation options is provided through the  annotation.

Primary Keys through Triggers
A database table can be defined to have a trigger that automatically assign its' primary key. Generally this is normally not a good idea (although some DBAs may think it is), and it is better to use a JPA provider generated sequence id, or assign the id in the application. The main issue with the id being assigned in a trigger is that the application and object require this value back. For non-primary key values assigned through triggers it is possible to refresh the object after committing or flushing the object to obtain the values back. However this is not possible for the id, as the id is required to refresh an object.

If you have an alternative way to select the id generated by the trigger, such as selecting the object's row using another unique field, you could issue this  select after the insert to obtain the id and set it back in the object. You could perform this select in a JPA event. Some JPA providers may not allow/like a query execution during an event, they also may not pick up a change to an object during an event callback, so there may be issues with doing this. Also some JPA providers may not allow the primary key to be un-assigned/null when not using a, so you may have issues. Some JPA providers have built-in support for returning values assigned in a trigger (or stored procedure) back into the object.

 * TopLink / EclipseLink : Provide a  that allows for any field values including the primary key to be returned from the database after an insert or update.  This is defined through the ,   annotations, or the  ,   XML elements in the eclipselink-orm.xml.

Primary Keys through Events
If the application generates its own id instead of using a JPA, it is sometimes desirable to perform this id generation in a JPA event, instead of the application code having to generate and set the id. In JPA this can be done through the event.

No Primary Key
Sometimes your object or table has no primary key. The best solution in this case is normally to add a generated id to the object and table. If you do not have this option, sometimes there is a column or set of columns in the table that make up a unique value. You can use this unique set of columns as your id in JPA. The JPA  does not always have to match the database table primary key constraint, nor is a primary key or a unique constraint required.

If your table truly has no unique columns, then use all of the columns as the id. Typically when this occurs the data is read-only, so even if the table allows duplicate rows with the same values, the objects will be the same anyway, so it does not matter that JPA thinks they are the same object. The issue with allowing updates and deletes is that there is no way to uniquely identify the object's row, so all of the matching rows will be updated or deleted.

If your object does not have an id, but its table does, this is fine. Make the object an  object, embeddable objects do not have ids. You will need a  that contains this   to persist and query it.

/Mapping


text: Subject:Computer engineering

title: Subject:Computer engineering


text:
User talk:70.47.242.208

You have been blocked from editing Wikibooks  as a result of your .  Please note that page blanking, addition of random text or spam, deliberate misinformation, privacy violations, personal attacks; and repeated, blatant violations of our neutral point of view policy are considered vandalism. If you wish to make useful contributions, you are welcome to come back after the block expires. Webaware talk 14:24, 5 September 2007 (UTC)

title: User talk:70.47.242.208


text: Category:Book:Circuit Idea

title: Category:Book:Circuit Idea


text: Category:Book:Digital Circuits

title: Category:Book:Digital Circuits


text:
Talk:Serial Programming/Complete Wikibook

Look at the table of the LCR.. the parity select columns say "Bit 3 | Bit 4 | Bit 5" and the word length bits go "Bit 1 | Bit 0". The one ascending and the other descending. Look at the parity select table from here http://www.beyondlogic.org/serial/serial.htm

Am I right to think that the parity select table there is correct? (Yes it is, I checked. Main document is wrong)

I've written a serial communication program in Turbo C (DOS) recently and I've encountered quite a few "gotcha's" that don't seem to be described in the main document. You mostly run into these problems when doing high volume/high speed data transfers. I am crapy with formatting wiki text, so I'll leave this here for others to implement into the main document.

 * Flowcontrol. When implementing flow control in your program keep in mind that some data will be 'on the wire' or in the UARTS fifo. Only the more advanced 16750 uarts can have hardware support for flowcontrol, (and it usually doesn't). In the most common 16550 uart, you will have to implement flowcontrol in software yourself. So, in case of RTS/CTS flowcontrol, make sure you raise your RTS before you reach your absolute limit in your receive buffer or you will have to drop data bytes. Since most uarts use a 16 byte fifo, raising the RTS some 20 bytes before your receive buffer is full should be sufficient.  In the same spirit, keep your transmit buffer on short leash. When the remote side raises a flowcontrol flag, try stop sending as soon as possible. Keep in mind that anything in the transmit fifo will go out regardless.
 * Shared IRQs. Data transfer over multiple serial ports on the same IRQ should be possible since the uarts will use a flag (bit 0 of IIR will be 0) to indicate if it generated any interrupts.
 * Broken fifos. Not all uart types have working fifo's. Be sure to check which one you are running on and disable them if needed.
 * BREAK signal. If you have 'Break signal enabled' (bit 6 in the LCR) then receiving a BREAK from the remote side will set your parity to space (aka sticky) to send a BREAK signal back. If you are not doing anything with BREAKs, I reccoment you turn this off.
 * Interrupt priorities. For EACH event the uart will generate an interrupt; receiving a byte, having send a byte or changes on status lines. However, some events will be of a higher priority then others. This creates a problem for the 'Transmit holding register empty' interrupt which is on the lowest priority. Sometimes this event will be lost if there's a lot of other events coming in. If you are relying on 'THR empty' interrupts to drive your transmit-buffer sending code, then you will end up in a deadlock where you are waiting for the interrupt but it won't come since it has been lost. To prevent this, you must twiddle the 'TX interrupt enable' bit (bit 1 of IER) after servicing an interrupt event from the uart. This will ensure that if the THR is empty, an interrupt will be guaranteed.
 * Many events in one interrupt. If you are doing high-speed, full duplex, flowcontrolled transfers then many events will occur. To speed up handling these events you can keep processing events in a single interrupt. Once you clear the current event by reading the correct register for example, then you can jump back to checking the uart for more events.
 * Shadow registers. Reading some registers will reset counters and some, like you speed divisor, are just hard to reach. I reccomend you keep shadow registers for most of these registers and read these out instead of the registers themselves. An exception can be made for line signals like CTS, DCD and such.

Here's a correct and complete template for a C ISR function. Note that this template does not include XON/XOFF flowcontrol.

void interrupt serial_isr(void) { unsigned char iir, t, b;

disable;                             /* Disable all interrupts */

for(t=0; t<MAX_UARTS; t++)             /* Loop through the UARTS we're servicing */ {

if(UART[t].in_use==0)                /* This uart in use? */   continue;

UART[t].counter_int++;               /* We received an interrupt for this uart */

for                              /* Keep looping until we serviced ALL events for this uart */ {   iir=inportb(UART[t].base+IIR);      /* Get interrupt status */

if(iir & BIT_0)                    /* Is there (still) an uart event available? (1==No further events) */ break;

switch(iir&(BIT_1+BIT_2+BIT_3))    /* Check the status bits to see what event this is */ {     case  0:  /* 000 - Modem status change (MSR) */

UART[t].counter_status_change++; UART[t].reg.msr=inportb(UART[t].base+MSR); UART[t].status_changed=1;

/* cts, ring, and such indicators are here */ break;

case 2:  /* 001 - Transmitter holding register empty (IIR/THR) */

UART[t].counter_tx_int++;

/* Don't send anything if we're being flowcontrolled */

if(UART[t].flow_config==FLOW_RTS_CTS && get_CTS(t)==0) break;

/* If the THR is _NOT_ empty, break */

if((inportb(UART[t].base+LSR) & BIT_5) == 0) break;

/* Output 1 byte from the ring buffer to the uart */

if(read_ring(UART[t].out, &b, 1)) outportb(UART[t].base+THR, b);

/* If we have nothing more to transmit, turn off ENABLE TRANSMIT INTERRUPT */

if(used_ring(UART[t].out)==0) set_write_irq(t, 0);

break;

case 12: /* 110 - Character timeout (16550) (RBR) */

UART[t].counter_timeout++;

/* FALL THROUGH */

case 4:  /* 010 - Received data available (RBR) */

UART[t].counter_rx_int++;

/* Read in the byte from the uart and store it in the ring buffer */

b=inportb(UART[t].base+RBR); if(write_ring(UART[t].in, &b, 1)==0) UART[t].counter_rx_dropped++;

/* Raise flowcontrol flag if we're starting to run low on space in the receive buffer */

if(UART[t].flow_config==FLOW_RTS_CTS && free_ring(UART[t].in)<20) set_RTS(t, 0); /* Tell other side to stop sending data */

break;

case 6:  /* 011 - Line status change (LSR) */

UART[t].counter_lsr++;

b=inportb(UART[t].base+LSR);

if(b & BIT_1) UART[t].counter_overrun_err++;

if(b & BIT_2) UART[t].counter_parity_err++;

if(b & BIT_3) UART[t].counter_framing_err++;

if(b & BIT_4) UART[t].break_active=1;

if(b & BIT_7) UART[t].counter_fifo_err++;

break;

default: UART[t].counter_unknown++; break;

} /* switch */

twiddle_write_enable(t);  /* Make sure we don't miss any write interrupts */

} /* for loop that keeps checking the IRQ_active bit */

clear_irq(UART[t].irq);  /* Dismiss IRQ, PIC1 or PIC2-PIC1 */

} /* for */

enable;      /* Re-enable all interrupts */

} /* serial_isr */

-- Ren (82.197.192.59 11:57, 13 October 2007 (UTC))


text: Template:BOOKSORTKEY

title: Template:BOOKSORTKEY


text:
User:Speregrination/Sandbox

= Building Numbers =

One of the most familiar entities in maths are numbers. From pre-school to advanced levels, numbers are intimately linked with maths. But what are these numbers mathematically speaking? This little book builds numbers the way mathematicians build them up (at least the way most of them do now). We start from the bare axioms of set theory and develop numbers in the mathematical sense. The reader is assumed to be sufficiently mathematically mature, having been exposed at least to high school maths to understand the arguments that follow.

The Basics
Nothiing can be build out of nothing. Our arguments can only proceed from some unproven assumptions. We start off with a list of the axioms of set theory, using these as our "unproven truths". We do not bother to focus much on logic here, rather give an intutive feel of the axioms, so that our end goal of building numbers is not sidetracked.

For those interested in a very logically sound discussion of these axioms (specifically in first order logic) the bibliography mentions books which carry further details.

1. Axiom of extensionality

Two sets are equal (are the same set) if they have the same elements.

2. Axiom of regularity

Every non-empty set x contains a member y such that x and y are disjoint sets.

3. Axiom schema of specification

If z is a set, and $$\phi\!$$ is any property which may characterize the elements x of z, then there is a subset y of z containing those x in z which satisfy the property.

4. Axiom of pairing

If x and y are sets, then there exists a set which contains x and y as elements.

5. Axiom of union

For any set $$\mathcal{F}$$ there is a set A containing every set that is a member of some member of $$\mathcal{F}$$. (For example if $$\mathcal{F}=\{\{X,Y\},\{Z\}\}$$ then there is a set A containing X, Y and Z. Here X, Y and Z are sets.)

6. Axiom schema of replacement

The image of any set under any definable mapping is also a set.

7. Axiom of infinity

Let $$S(x)\!$$ abbreviate $$ x \cup \{x\} \!$$, where $$ x \!$$ is some set. Then there exists a set X such that the empty set $$\varnothing$$ is a member of X and, whenever a set y is a member of X, then $$S(y)\!$$ is also a member of X.

8. Axiom of power set

Let $$z \subseteq x$$ abbreviate $$\forall q (q \in z \Rightarrow q \in x).$$ For any set x, there is a set y which is a superset of the power set of x.

9. Axiom of choice

Let a choice function be a function f, defined on a collection X of nonempty sets, such that for every set s in X, f(s) is an element of s. For any set X of nonempty sets, there exists a choice function f defined on X.

The Natural numbers
With these axioms in hand we can start building the numbers. Our focus here is to quick start and build all the commonly used numbers. Hence, we wont focus on developing all properties that sets have, trusting that the user will agree that our constructions are sound enough and proofs of all properties proved strictly through these axioms do exist.

Our first target is to make the basic counting numbers, also called natural numbers. The axiom of infinity says that a set X exists which satisfies the property that it contains the empty set and the set and, whenever a set y is a member of X, then $$S(y)\!$$ is also a member of X. There may or may not exist any other such sets. Taking the intersection of all such sets we get the set of natural numbers N. Clearly it is the smallest such set. Also as $$\varnothing$$ is a member of N, so is, $$\{\varnothing\}$$, and so is $$\{\varnothing\,\{\varnothing\}\}$$ and so on. Intutively it is obvious that no other kind of members are there as N was the smallest such set. We let $$0=\varnothing$$ to match with our intuition that 0 should be defined as "nothing". Next we define $$1=\{\varnothing\}$$ to match with our intuition that 1 should convey the notion of "one-ness" which a set having a solitary element does. Similarly we define, $$2=\{\varnothing\,\{\varnothing\}\}$$ and so on.

Hence we have mathematically defined the set of natural numbers. We will define addition and multiplication for natural numbers as follows: Let $$x^+=S(x)\!$$. Then we can recursively define addition by $$a + (b^+) = (a + b)^+$$. (Hence $$1+1=1+0^+=(1+0)^+=1^+=2$$ and so on. Note that $$0^+=1$$.) Similarly multiplication is defined recursively by x×0 = 0 and x×S(y) = (x×y) + x. Such definitions are justified owing to a particular theorem in maths called recursion theorem, but we needn't go there. A few examples are usually sufficient to convince oneself of the validity of these definitions.

The Integers
Once more we will take a leap and assume that the reader trusts us when we say that all usual properties of natural numbers can be established in our constructed system of natural numbers. The reason we avoid doing that here is because we wish to avoid getting tied up in formal arguments, and sidetrack our goal to provide a quick mathematical build-up of the numbers.

Next we tackle the integers. Since we need some brief extraneous concepts in our toolbox for this purpose (which all are defined and their properties established consistent with the axioms of set theory) we shall briefly mention those. First up is the concept of an ordered pair (a,b) which is defined as the set {{a},{a,b}} and using this a 3-tuple (a,b,c) is defined as the ordered pair (a,(b,c)) i.e. . Similary 4-tuples, 5-tuples etc may be defined. Next is the concept of functions and relations which we trust the reader is aware of from calculus. Finally, we talk of equivalence relations and equivalence classes.

A given relation ~ on a set A is said to be an equivalence relation if and only if it is reflexive, symmetric and transitive. Equivalently, for all a, b and c in A:
 * a ~ a. (Reflexivity)
 * if a ~ b then b ~ a. (Symmetry)
 * if a ~ b and b ~ c then a ~ c. (Transitivity)

The equivalence class of a under ~, denoted [a], is defined as $$[a] = \{b\in A | a\sim b\}$$. For example, if A is the set of all cars, and ~ is the equivalence relation "has the same color as", then one particular equivalence class consists of all green cars. Another example deals with functions: any function f : X → Y defines an equivalence relation on X by x1 ~ x2 if and only if f(x1) = f(x2). The equivalence class of x is the set of all elements in X which get mapped to f(x), i.e. the class [x] is the inverse image of f(x).

[[File:Relatives Numbers Representation.png|thumb|alt=Representation of equivalence classes for the numbers -5 to 5 Now the set of integers can be formally defined as the set of equivalence classes of a particular relation. That relation is defined between ordered pairs of natural numbers (not between the natural numbers themselves but between their pairs).
 * Red Points represent ordered pairs of natural numbers. Linked red points are equivalence classes representing the blue integers at the end of the line.
 * upright=2]]

The intuition is that (a, b) stands for the result of subtracting b from a. To confirm our expectation that 1 − 2 and 4 − 5 denote the same number, we define an equivalence relation ~ on these pairs with the following rule:
 * $$ (a,b) \sim (c,d) \,\! $$

precisely when
 * $$a+d = b+c. \,\!$$

Addition and multiplication of integers can be defined in terms of the equivalent operations on the natural numbers; denoting by [(a,b)] the equivalence class having (a,b) as a member, one has:
 * $$[(a,b)]+[(c,d)] := [(a+c,b+d)].\,$$
 * $$[(a,b)]\cdot[(c,d)] := [(ac+bd,ad+bc)].\,$$

The negation (or additive inverse) of an integer is obtained by reversing the order of the pair:
 * $$-[(a,b)] := [(b,a)].\,$$

Hence subtraction can be defined as the addition of the additive inverse:
 * $$[(a,b)]-[(c,d)] := [(a+d,b+c)].\,$$

The standard ordering on the integers is given by:
 * $$[(a,b)]<[(c,d)]\,$$ if and only if $$a+d < b+c.\,$$

It is easily verified that these definitions are independent of the choice of representatives of the equivalence classes.

Every equivalence class has a unique member that is of the form (n,0) or (0,n) (or both at once). The natural number n is identified with the class [(n,0)] (in other words the natural numbers are embedded into the integers by map sending n to [(n,0)]), and the class [(0,n)] is denoted −n (this covers all remaining classes, and gives the class [(0,0)] a second time since −0 = 0.

Thus, [(a,b)] is denoted by
 * $$\begin{cases} a-b, & \mbox{if } a \ge b  \\ -(b-a),  & \mbox{if } a < b. \end{cases} $$

If the natural numbers are identified with the corresponding integers, this convention creates no ambiguity.

This notation recovers the familiar representation of the integers as {... −3,−2,−1, 0, 1, 2, 3, ...}.

Some examples are:
 * $$\begin{align}

0 &= [(0,0)] &= [(1,1)] &= \cdots & &= [(k,k)] \\ 1 &= [(1,0)] &= [(2,1)] &= \cdots & &= [(k+1,k)] \\ -1 &= [(0,1)] &= [(1,2)] &= \cdots & &= [(k,k+1)] \\ 2 &= [(2,0)] &= [(3,1)] &= \cdots & &= [(k+2,k)] \\ -2 &= [(0,2)] &= [(1,3)] &= \cdots & &= [(k,k+2)]. \end{align}$$

The Rational numbers
Next stop: the rationals!

Those who have done a course in algebra may recognize the construction that follows as precisely being the one by which an integral domain is embedded in a field. (And indeed it is no big wonder as the integers form an integral domain and the rationals a field.) For those who think fields are open spaces and are thinking about agriculture, not to worry. We provide the full construction below.

Mathematically the construction is similar as when we constructed the integers out of the naturals. We consider the following relation between all ordered pairs of integers (m,n), with n ≠ 0. Specifically, the relation is (m1,n1) ~ (m2,n2) if, and only if, m1n2 − m2n1 = 0. We can define addition and multiplication of these pairs with the following rules:
 * $$\left(m_1, n_1\right) + \left(m_2, n_2\right) := \left(m_1n_2 + n_1m_2, n_1n_2\right)$$
 * $$\left(m_1, n_1\right) \times \left(m_2, n_2\right) := \left(m_1m_2, n_1n_2\right)$$

and, if m2 ≠ 0, division by
 * $$\frac{\left(m_1, n_1\right)} {\left(m_2, n_2\right)} := \left(m_1n_2, n_1m_2\right).$$

The equivalence relation (m1,n1) ~ (m2,n2) if, and only if, m1n2 − m2n1 = 0 is a congruence relation, i.e. it is compatible with the addition and multiplication defined above, and we may define the set of all rational numbers Q to be the set of all equivalence classes under this relation. We denote by [(m1,n1)] the equivalence class containing (m1,n1). If (m1,n1) ~ (m2,n2) then, by definition, (m1,n1) belongs to [(m2,n2)] and (m2,n2) belongs to [(m1,n1)]; in this case we can write [(m1,n1)] = [(m2,n2)]. Given any equivalence class [(m,n)] there are a countably infinite number of representation, since

 * $$ \cdots = [(-2m,-2n)] = [(-m,-n)] = [(m,n)] = [(2m,2n)] = \cdots. $$

The canonical choice for [(m,n)] is chosen so that gcd(m,n) = 1, i.e. m and n share no common factors, i.e. m and n are coprime. For example, we would write [(1,2)] instead of [(2,4)] or [(−12,−24)], even though [(1,2)] = [(2,4)] = [(−12,−24)].

The integers may be considered to be rational numbers by the embedding that maps m to [(m, 1)].

The Reals
The Real Numbers await us!

For starters we need the concept of Dedekind cuts. A Dedekind cut, named after Richard Dedekind, is a partition of the rational numbers into two non-empty parts A and B, such that all elements of A are less than all elements of B, and A contains no greatest element. The cut itself is, conceptually, the "gap" defined between A and B. In other words, A contains every rational number less than the cut, and B contains every rational number greater than the cut.

For convenience we may take the lower set A as the representative of any given Dedekind cut A, B, since A completely determines B. We now define the set of real numbers to be the set of all Dedekind cuts. In more detail, a real number $$r$$ is any subset of the set $$\textbf{Q}$$ of rational numbers that fulfills the following conditions:
 * 1) $$r$$ is not empty
 * 2) $$r \neq \textbf{Q}$$
 * 3) r is closed downwards.  In other words,  for all $$x, y \in \textbf{Q}$$ such that $$x < y$$, if $$y \in r$$ then $$x \in r$$
 * 4) r contains no greatest element.  In other words, there is no $$x \in r$$ such that for all $$y \in r$$, $$y \leq x$$

 * We form the set $$ \textbf{R} $$ of real numbers as the set of all Dedekind cuts $$A$$ of $$ \textbf{Q} $$.

 * We embed the rational numbers into the reals by identifying the rational number $$q$$ with the set of all smaller rational numbers $$ \{ x \in \textbf{Q} : x < q \} $$.

 * Addition. $$A + B := \{a + b: a \in A \land b \in B\}$$

 * Defining multiplication is less straightforward.
 * if $$A, B \geq 0$$ then $$ A \times B := \{ a \times b : a \geq 0 \land a \in A \land b \geq 0 \land b \in B \} \cup \{ x \in \mathrm{Q} : x < 0 \}$$
 * if either $$A\,$$ or $$B\,$$ is negative, we use the identities $$ A \times B = -(A \times -B) = -(-A \times B) = (-A \times -B) \,$$ to convert $$A\,$$ and/or $$B\,$$ to positive numbers and then apply the definition above.

The Complex numbers
Are we done? Not quite. The set of complex numbers which the reader has no doubt encountered still awaits us. Fortunately, it does not require such a detailed development as the reals and we quickly obtain it as follows.

Let C be the the set R2 of ordered pairs (a, b) of real numbers. C is defined as the set of complex numbers. In this notation, the above formulas for addition and multiplication read

 * $$(a, b) + (c, d) = (a + c, b + d)\,$$
 * $$ (a, b) \cdot (c, d) = (ac - bd, bc + ad)\,$$

It is then just a matter of notation to express (a, b) as a + ib. Addition and multiplication are defined naturally.

title: User:Speregrination/Sandbox


text: Subject:Mechanical engineering

title: Subject:Mechanical engineering


text:
Subject:Civil engineering

de:Regal:Architektur und Bauingenieurwesen 土木工学

title: Subject:Civil engineering


text: Subject:Aerospace engineering

title: Subject:Aerospace engineering


text: Subject:Architectural engineering

title: Subject:Architectural engineering


text:
User talk:170.185.146.19

You have been blocked from editing Wikibooks  as a result of your .  Please note that page blanking, addition of random text or spam, deliberate misinformation, privacy violations, personal attacks; and repeated, blatant violations of our neutral point of view policy are considered vandalism. If you wish to make useful contributions, you are welcome to come back after the block expires. – Mike.lifeguard  | talk 15:45, 5 September 2007 (UTC)

title: User talk:170.185.146.19


text:
User talk:221.126.149.187

 – Mike.lifeguard  | talk 15:46, 5 September 2007 (UTC)

title: User talk:221.126.149.187


text:
User talk:82.201.163.237

Thanks for experimenting with Wikibooks. Your test worked, and has now been removed. Please use Sandbox for any other tests you want to do, since testing material in modules will normally be removed quickly. Please see the welcome page if you would like to learn more about contributing to our project. Thanks. – Mike.lifeguard  | talk 15:49, 5 September 2007 (UTC)

title: User talk:82.201.163.237


text:
User talk:87.226.65.163

Please do not add inappropriate external links to Wikibooks. Wikibooks is intended to be read without the need for external reference and requires content rather than external links particularly those which are for advertising or promotion. Inappropriate links may include (but are not limited to) links to personal web sites, links to web sites with which you are affiliated, and links that exist to attract visitors to a web site or promote a product. If you feel the link should be added to the article, then please discuss it on the article's talk page rather than re-adding it. See the welcome page to learn more about Wikibooks. Thank you. – Mike.lifeguard  | talk 15:55, 5 September 2007 (UTC)

title: User talk:87.226.65.163


text:
Nanotechnology/AFM/Overview of properties of various cantilevers

=Examples of AFM cantilevers=

For a BS-75kHz
L=225 w=28 t=3 h=17+3/2 (is actually trapezoidal)}

$$k_{N}=\frac{1}{4}Yw\left( \frac{t}{L}\right)  ^{3}=\frac{1}{4}\left(160000\right)  28\left(  \frac{3}{225}\right)  ^{3}=2.\,654\,8$$

$$f[Hz]=\frac{t\beta_{i}^{2}}{4\pi L^{2}}\sqrt{\frac{Y}{3\rho}} =\frac{\left( 3\ast10^{-6}\right)  \left(  1.875\right)  ^{2}}{4\pi\left( 225\ast10^{-6}\right)  ^{2}}\sqrt{\frac{\left(  160\ast10^{9}\right)  } {3\ast2330}}=79318.Hz$$

$$2\left( \frac{wh}{tL}\right)  ^{2}=2\left(  \frac{28\ast18.5}{3\ast 225}\right)  ^{2}=1.\,177\,8$$ so $$k_{lat}~k_{tor}.$$

$$k_{tor}=k_{N}\frac{1}{2}\left( \frac{L}{h}\right)  ^{2}=2.65\frac{1} {2}\left( \frac{225}{18.5}\right)  ^{2}=195.\,99$$

$$k_{lat}=\frac{1}{4}Y\frac{tw^{3}}{L^{3}}=\frac{1}{4}\left( 160000\right) 3\left( \frac{28}{225}\right)  ^{3}=231.\,26$$

For a MPP311
Specs: 13 kHz, 0.45 N/m : L=440 w=30 t=4 h=17.5+2 (is it actually trapezoidal??)

$$k_{N}=\frac{1}{4}Yw\left( \frac{t}{L}\right)  ^{3}=\frac{1}{4}\left( 160000\right)  30\left(  \frac{4}{440}\right)  ^{3}=0.901\,58$$

$$f$$ $$[Hz]=\frac{t\beta_{i}^{2}}{4\pi L^{2}}\sqrt{\frac{Y}{3\rho}} =\frac{\left( 4\ast10^{-6}\right)  \left(  1.875\right)  ^{2}}{4\pi\left( 440\ast10^{-6}\right)  ^{2}}\sqrt{\frac{\left(  160\ast10^{9}\right)  } {3\ast2330}}=27655.Hz$$

$$2\left( \frac{wh}{tL}\right)  ^{2}=2\left(  \frac{30\ast19.5}{4\ast 440}\right)  ^{2}=0.220\,96$$ so $$k_{lat}<k_{tor}.$$

$$k_{tor}=k_{N}\frac{1}{2}\left( \frac{L}{h}\right)  ^{2}=0.9\frac{1} {2}\left( \frac{440}{19.5}\right)  ^{2}=229.\,11$$

$$k_{lat}=\frac{1}{4}Y\frac{tw^{3}}{L^{3}}=\frac{1}{4}\left( 160000\right) 4\left( \frac{30}{440}\right)  ^{3}=50.\,714$$

For a MPP211
Specs: 50 kHz, 1.5 N/m : L=215 w=30 t=4 h=17.5+2 (is it actually trapezoidal??)

$$k_{N}=\frac{1}{4}Yw\left( \frac{t}{L}\right)  ^{3}=\frac{1}{4}\left( 160000\right)  30\left(  \frac{4}{215}\right)  ^{3}=7.\, 727\,6$$

$$f$$ $$[Hz]=\frac{t\beta_{i}^{2}}{4\pi L^{2}}\sqrt{\frac{Y}{3\rho}} =\frac{\left( 4\ast10^{-6}\right)  \left(  1.875\right)  ^{2}}{4\pi\left( 215\ast10^{-6}\right)  ^{2}}\sqrt{\frac{\left(  160\ast10^{9}\right)  } {3\ast2330}}=1.\,158\,2\times10^{5}Hz$$

$$2\left( \frac{wh}{tL}\right)  ^{2}=2\left(  \frac{30\ast19.5}{4\ast 215}\right)  ^{2}=0.925\,43$$

so $$k_{lat}~k_{tor}.$$

$$k_{tor}=k_{N}\frac{1}{2}\left( \frac{L}{h}\right)  ^{2}=7.7\frac{1} {2}\left( \frac{215}{19.5}\right)  ^{2}=468.\,02$$

$$k_{lat}=\frac{1}{4}Y\frac{tw^{3}}{L^{3}}=\frac{1}{4}\left( 160000\right) 4\left( \frac{30}{215}\right)  ^{3}=434.\,68$$

For a MPP111
Specs: 200 kHz, 20 N/m : L=115 w=30 t=4 h=17.5+2 (is it actually trapezoidal??)

$$k_{N}=\frac{1}{4}Yw\left( \frac{t}{L}\right)  ^{3}=\frac{1}{4}\left( 160000\right)  30\left(  \frac{4}{115}\right)  ^{3}= 50.\,497$$

$$f$$ $$[Hz]=\frac{t\beta_{i}^{2}}{4\pi L^{2}}\sqrt{\frac{Y}{3\rho}} =\frac{\left( 4\ast10^{-6}\right)  \left(  1.875\right)  ^{2}}{4\pi\left( 115\ast10^{-6}\right)  ^{2}}\sqrt{\frac{\left(  160\ast10^{9}\right)  } {3\ast2330}}=4.\,048\,4\times10^{5}Hz$$

$$2\left( \frac{wh}{tL}\right)  ^{2}=2\left(  \frac{30\ast19.5}{4\ast 115}\right)  ^{2}=3.\,234\,6$$ so $$k_{lat}>k_{tor}.$$

$$k_{tor}=k_{N}\frac{1}{2}\left( \frac{L}{h}\right)  ^{2}=50.4\frac{1} {2}\left( \frac{115}{19.5}\right)  ^{2}=876.\,45$$

$$k_{lat}=\frac{1}{4}Y\frac{tw^{3}}{L^{3}}=\frac{1}{4}\left( 160000\right) 4\left( \frac{30}{115}\right)  ^{3}=2840.\,5$$