code
stringlengths 3
1.01M
| repo_name
stringlengths 5
116
| path
stringlengths 3
311
| language
stringclasses 30
values | license
stringclasses 15
values | size
int64 3
1.01M
|
|---|---|---|---|---|---|
const router = require('express').Router()
const { users } = require('./users')
const { todos } = require('./todos')
router.use('/', users)
router.use('/', todos)
module.exports = { routes : router }
|
dbsimeone/todo-api
|
routes/api/index.js
|
JavaScript
|
mit
| 202
|
<HTML><HEAD>
<TITLE>Review for Event Horizon (1997)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0119081">Event Horizon (1997)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Shane+Burridge">Shane Burridge</A></H3><HR WIDTH="40%" SIZE="4">
<PRE> EVENT HORIZON (1997) 95m. </PRE>
<P> It's not that EVENT HORIZON isn't well made. It's just that I've
been there before. In fact, I'm hard pressed to think of another
film more entirely fabricated of quotes from other movies. Barely
five minutes into the story I found myself sidetracked with
references from obvious candidates like ALIEN, LIFEFORCE, and 2010,
but the quotespotting soon brought forth non-SF films such as DON'T
LOOK NOW and THE SHINING, and culminated with SOLARIS and, God help
me, Disney's THE BLACK HOLE.</P>
<P> Why is it - pardon the pun - that black hole movies always suck?
It's a fascinating subject that still hasn't been treated right by
Hollywood. In this case, the Event Horizon is not the rim of a
black hole, but the name of a spaceship that reappears in Neptune's
orbit after a seven year absence. But maybe it's really a
non-Event Horizon. It's a Marie Celeste in Space scenario, the
kind of story that early STAR TREK episodes bought the patent on
years ago. To be fair, the opening scenes are writ large upon the
screen, at least proving once again that SF cinema was the reason
that Panavision was invented. The actors - Laurence Fishburne and
Sam Neill head the cast - are all fine, the sets are great, the
budget is big, there is some legitimate haunted-house atmosphere, a
couple of gripping sequences, and at least one moment that made me
laugh (when Fishburne decisively announces they're vacating the
ship). But there are still holes in the plot, and I don't mean the
black kind either, that keep the film from being solidly grounded:
the abandonment of all scientific rationale (even Neill's pragmatic
Doctor gives up) shows that the film-makers were less interested in
explanation than effect. And, come to think of it, isn't there a
crew member unaccounted for at the end?</P>
<P> It may not be the movie's fault. I guess I was expecting something
more purely science-fictional, and instead got that SF-horror
hybrid that seems to have consumed the genre of late. If I had
seen EVENT HORIZON fifteen years ago I would have no doubt loved
it. But you can only jump out of your seats from the same shock
effects so many times, and after that there's not a lot left for a
story to go on. Which is a shame, because I wanted to enjoy this
film more than I did. Contrary to its title, EVENT HORIZON didn't
take me into unchartered territory. The most unexpected thing
about the ending was hearing a song by the Prodigy played over the
final credits.</P>
<HR><P CLASS=flush><SMALL>The review above was posted to the
<A HREF="news:rec.arts.movies.reviews">rec.arts.movies.reviews</A> newsgroup (<A HREF="news:de.rec.film.kritiken">de.rec.film.kritiken</A> for German reviews).<BR>
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.<BR>
Please direct comments/criticisms of the review to relevant newsgroups.<BR>
Broken URLs inthe reviews are the responsibility of the author.<BR>
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
</SMALL></P>
<P ALIGN=CENTER>Related links: <A HREF="/Reviews/">index of all rec.arts.movies.reviews reviews</A></P>
</P></BODY></HTML>
|
xianjunzhengbackup/code
|
data science/machine_learning_for_the_web/chapter_4/movie/9233.html
|
HTML
|
mit
| 3,856
|
{% extends data.outerLayout %}
{% import 'macros/nav.html' as nav %}
{% import 'global/svg/toolbox.html' as tool %}
{% block beforeMain %}
<div class="demo-modal">
<div class="demo-modal-content">
<img src="/images/demo-computer.svg" alt="ApostropheCMS Demo Site">
<h4>Welcome to the Apostrophe Demo</h4>
<p><strong>Just click on text to edit it.</strong> There is no save button because <strong>your edits are saved automatically.</strong></p>
<p>To add images, slideshow and more <strong>click the "+" icons</strong> that appear when you hover the mouse over the page.</p>
<p>Be sure to visit the "blog" and "default" pages, and try clicking "Page Menu" to create new subpages.</p>
<p>Have fun!</p>
<button>Let's Get Started</button>
</div>
</div>
<div class="off-canvas-container">
{{ nav.nav(data, {classes: 'off-canvas-nav hide-desktop', logo: true, showChildren: true}) }}
</div>
<div class="block top">
<div class="inner demo-inner">
<header>
<div class="demo-header bg-red">
<h5>{% block headerMessage %}
You are using the Apostrophe demo site.
{% endblock %}</h5>
{%- if not data.user and not data.user._permissions.admin -%}
<h5 class="demo-login-button"><a href="/login"><span></span>Login</a></h5>
{%- endif -%}
<p><strong>Just click on text to edit it.</strong> There is no save button because <strong>your edits are saved automatically.</strong></p>
<p>To add images, slideshow and more <strong>click the "+" icons</strong> that appear when you hover the mouse over the page.</p>
<p>Be sure to visit the "blog" and "default" pages, and try clicking "Page Menu" to create new subpages.</p>
<p>Have fun!</p>
</div>
{{ nav.nav(data, {classes: 'hide-mobile'}) }}
<a href="#" class="off-canvas-trigger hide-desktop">
<svg class="a-toolbox">
{{ tool.icon() }}
</svg>
</a>
</header>
{% block headerContent %}
{% endblock %}
</div>
</div>
<div class="block header {% block upperClass %}{% endblock %}">
{% block headerBackground %}{% endblock %}
</div>
{% endblock %}
{% block main %}
{% block mainContent %}
{% endblock %}
{% endblock %}
{% block afterMain %}
<footer class="block footer">
<div class="inner">
{% block footerContent %}
<div class="inline-middle width-50">
Apostrophe is led by <a href="http://punkave.com">P'unk Avenue</a> in Philadelphia, PA.
</div>{#
#}<div class="inline-middle width-50 align-right">
<a class="inline-top footer-logo" href="http://punkave.com">
<img src="/images/demo_logo_punk.png" class="" alt="P'unk Avenue" width="150" height="32" />
</a>
</div>
{% endblock %}
</div>
<div class="inner">
<div class="linode-credit">
Generously hosted by <a href="http://linode.com">linode</a>.
</div>
</div>
</footer>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-496991-33', 'auto');
ga('send', 'pageview');
</script>
{% endblock %}
|
punkave/apostrophe-sandbox
|
lib/modules/apostrophe-templates/views/layout.html
|
HTML
|
mit
| 3,560
|
<?php
$targetchargers = [];
array_push($targetchargers,"Roadchef Rownhams South, M27 Motorway Southbound, Jct 3/4, SouthamptonDC & AC fast charge");
include("../../php/rss_template.php");
?>
|
jivemonkey2000/evhighwaystatus
|
backup/public/rss/160109/199209.php
|
PHP
|
mit
| 190
|
<div>
<h2 class="ui header">
<i class="users icon"></i>
<span class="content">
Table Tennis Tournament
<span class="sub header">Scores need to be updated</span>
</span>
</h2>
</div>
|
balaganesanr/Tournament-Organizer
|
TournamentOrganizer/TournamentOrganizer/MainApp/app/LoggedIn/users/dashboard/_dashboard.html
|
HTML
|
mit
| 240
|
// All symbols in the Supplemental Arrows-B block as per Unicode v5.0.0:
[
'\u2900',
'\u2901',
'\u2902',
'\u2903',
'\u2904',
'\u2905',
'\u2906',
'\u2907',
'\u2908',
'\u2909',
'\u290A',
'\u290B',
'\u290C',
'\u290D',
'\u290E',
'\u290F',
'\u2910',
'\u2911',
'\u2912',
'\u2913',
'\u2914',
'\u2915',
'\u2916',
'\u2917',
'\u2918',
'\u2919',
'\u291A',
'\u291B',
'\u291C',
'\u291D',
'\u291E',
'\u291F',
'\u2920',
'\u2921',
'\u2922',
'\u2923',
'\u2924',
'\u2925',
'\u2926',
'\u2927',
'\u2928',
'\u2929',
'\u292A',
'\u292B',
'\u292C',
'\u292D',
'\u292E',
'\u292F',
'\u2930',
'\u2931',
'\u2932',
'\u2933',
'\u2934',
'\u2935',
'\u2936',
'\u2937',
'\u2938',
'\u2939',
'\u293A',
'\u293B',
'\u293C',
'\u293D',
'\u293E',
'\u293F',
'\u2940',
'\u2941',
'\u2942',
'\u2943',
'\u2944',
'\u2945',
'\u2946',
'\u2947',
'\u2948',
'\u2949',
'\u294A',
'\u294B',
'\u294C',
'\u294D',
'\u294E',
'\u294F',
'\u2950',
'\u2951',
'\u2952',
'\u2953',
'\u2954',
'\u2955',
'\u2956',
'\u2957',
'\u2958',
'\u2959',
'\u295A',
'\u295B',
'\u295C',
'\u295D',
'\u295E',
'\u295F',
'\u2960',
'\u2961',
'\u2962',
'\u2963',
'\u2964',
'\u2965',
'\u2966',
'\u2967',
'\u2968',
'\u2969',
'\u296A',
'\u296B',
'\u296C',
'\u296D',
'\u296E',
'\u296F',
'\u2970',
'\u2971',
'\u2972',
'\u2973',
'\u2974',
'\u2975',
'\u2976',
'\u2977',
'\u2978',
'\u2979',
'\u297A',
'\u297B',
'\u297C',
'\u297D',
'\u297E',
'\u297F'
];
|
mathiasbynens/unicode-data
|
5.0.0/blocks/Supplemental-Arrows-B-symbols.js
|
JavaScript
|
mit
| 1,484
|
from utils import Base, engine
Base.metadata.create_all(engine)
|
MarkWh1te/xueqiu_predict
|
crawler/init_db.py
|
Python
|
mit
| 65
|
<?php
namespace Acme\MainBundle\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20141029162225 extends AbstractMigration
{
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE comments (id INT AUTO_INCREMENT NOT NULL, post_id INT DEFAULT NULL, name VARCHAR(100) NOT NULL, email VARCHAR(100) NOT NULL, text VARCHAR(255) NOT NULL, updated DATETIME DEFAULT NULL, created DATETIME NOT NULL, INDEX IDX_5F9E962A4B89032C (post_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE posts (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, title VARCHAR(100) NOT NULL, shortText VARCHAR(255) NOT NULL, text LONGTEXT NOT NULL, updated DATETIME DEFAULT NULL, created DATETIME NOT NULL, INDEX IDX_885DBAFAA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE post_tag (post_id INT NOT NULL, tag_id INT NOT NULL, INDEX IDX_5ACE3AF04B89032C (post_id), INDEX IDX_5ACE3AF0BAD26311 (tag_id), PRIMARY KEY(post_id, tag_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE tags (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(100) NOT NULL, updated DATETIME DEFAULT NULL, created DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE users (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(100) NOT NULL, password VARCHAR(100) NOT NULL, name VARCHAR(255) NOT NULL, updated DATETIME DEFAULT NULL, created DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE comments ADD CONSTRAINT FK_5F9E962A4B89032C FOREIGN KEY (post_id) REFERENCES posts (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE posts ADD CONSTRAINT FK_885DBAFAA76ED395 FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post_tag ADD CONSTRAINT FK_5ACE3AF04B89032C FOREIGN KEY (post_id) REFERENCES posts (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE post_tag ADD CONSTRAINT FK_5ACE3AF0BAD26311 FOREIGN KEY (tag_id) REFERENCES tags (id) ON DELETE CASCADE');
}
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE comments DROP FOREIGN KEY FK_5F9E962A4B89032C');
$this->addSql('ALTER TABLE post_tag DROP FOREIGN KEY FK_5ACE3AF04B89032C');
$this->addSql('ALTER TABLE post_tag DROP FOREIGN KEY FK_5ACE3AF0BAD26311');
$this->addSql('ALTER TABLE posts DROP FOREIGN KEY FK_885DBAFAA76ED395');
$this->addSql('DROP TABLE comments');
$this->addSql('DROP TABLE posts');
$this->addSql('DROP TABLE post_tag');
$this->addSql('DROP TABLE tags');
$this->addSql('DROP TABLE users');
}
}
|
knopa/symfony-demo-project
|
app/DoctrineMigrations/Version20141029162225.php
|
PHP
|
mit
| 3,514
|
<!DOCTYPE html>
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie10 lt-ie9" lang="en"><![endif]-->
<!--[if (IE 9)&!(IEMobile)]><html class="no-js lt-ie10" lang="en"><![endif]-->
<!--[if gt IE 9]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
Tiny slider
</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<link rel="stylesheet" href="../dist/tiny-slider.css">
<link rel="stylesheet" href="css/styles.css"><!--[if (IE 8)&!(IEMobile)]><script src="../dist/tiny-slider.helper.ie8.js"></script><![endif]-->
<script src="../dist/tiny-slider.js"></script>
</head>
<body>
<div class="slider-container">
<div id="responsive5_wrapper">
<h2>
Responsive5
</h2>
<div class="responsive5" id="responsive5">
<div class="item">
<div class="img img-1" style="height: 500px;">
<a href="">0</a>
</div>
</div>
<div class="item">
<div class="img img-2" style="height: 700px;">
<a href="">1</a>
</div>
</div>
<div class="item">
<div class="img img-3" style="height: 600px;">
<a href="">2</a>
</div>
</div>
<div class="item">
<div class="img img-4" style="height: 800px;">
<a href="">3</a>
</div>
</div>
<div class="item">
<div class="img img-5" style="height: 500px;">
<a href="">4</a>
</div>
</div>
</div>
</div>
</div>
<script>
var mobile = false,
isTestPage = false,
isDemoPage = false,
prefix = "",
classIn = "tns-fadeIn",
classOut = "tns-fadeOut",
speed = 0,
doc = document,
win = window,
ww = win.innerWidth || doc.documentElement.clientWidth || doc.body.clientWidth,
fw = getFW(ww),
initFns = {},
sliders = new Object(),
edgepadding = 50,
gutter = 10;
function getFW (width) {
var sm = 400, md = 900, lg = 1400;
return width < sm ? 150 : width >= sm && width < md ? 200 : width >= md && width < lg ? 300 : 400;
}
window.addEventListener('resize', function() { fw = getFW(ww); });
</script>
<script src="js/options.js"></script>
<script src="js/run.js"></script>
</body>
</html>
|
ganlanyuan/tiny-slider
|
test/parts/responsive5.html
|
HTML
|
mit
| 2,840
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-field: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.13.1 / mathcomp-field - 1.6.4</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
mathcomp-field
<small>
1.6.4
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-03-08 23:20:38 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-08 23:20:38 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 4 Virtual package relying on a GMP lib system installation
coq 8.13.1 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.05.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0 Official 4.05.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
name: "coq-mathcomp-field"
version: "1.6.4"
maintainer: "Mathematical Components <mathcomp-dev@sympa.inria.fr>"
homepage: "http://math-comp.github.io/math-comp/"
bug-reports: "Mathematical Components <mathcomp-dev@sympa.inria.fr>"
license: "CeCILL-B"
build: [ make "-C" "mathcomp/field" "-j" "%{jobs}%" ]
install: [ make "-C" "mathcomp/field" "install" ]
remove: [ "sh" "-c" "rm -rf '%{lib}%/coq/user-contrib/mathcomp/field'" ]
depends: [
"ocaml"
"coq-mathcomp-solvable" {= "1.6.4"}
]
tags: [ "keyword:algebra" "keyword:field" "keyword:small scale reflection" "keyword:mathematical components" "keyword:odd order theorem" ]
authors: [ "Jeremy Avigad <>" "Andrea Asperti <>" "Stephane Le Roux <>" "Yves Bertot <>" "Laurence Rideau <>" "Enrico Tassi <>" "Ioana Pasca <>" "Georges Gonthier <>" "Sidi Ould Biha <>" "Cyril Cohen <>" "Francois Garillot <>" "Alexey Solovyev <>" "Russell O'Connor <>" "Laurent Théry <>" "Assia Mahboubi <>" ]
synopsis: "Mathematical Components Library on Fields"
description: """
This library contains definitions and theorems about field extensions,
galois theory, algebraic numbers, cyclotomic polynomials..."""
url {
src: "http://github.com/math-comp/math-comp/archive/mathcomp-1.6.4.tar.gz"
checksum: "md5=29362a734d183301e2ce839b0ad14bd9"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-mathcomp-field.1.6.4 coq.8.13.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.13.1).
The following dependencies couldn't be met:
- coq-mathcomp-field -> coq-mathcomp-solvable = 1.6.4 -> coq-mathcomp-algebra = 1.6.4 -> coq-mathcomp-fingroup = 1.6.4 -> coq-mathcomp-ssreflect = 1.6.4 -> coq < 8.8~ -> ocaml < 4.03.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-mathcomp-field.1.6.4</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.05.0-2.0.1/released/8.13.1/mathcomp-field/1.6.4.html
|
HTML
|
mit
| 7,978
|
package io.fnx.backend.util.conf;
import io.fnx.backend.util.EnumerationRepository;
import io.fnx.backend.util.MessageAccessor;
import javax.inject.Inject;
import java.io.IOException;
import java.util.Map;
/**
*
* Use this class for sending configuration to Dart admin client. Enums, settings, flags, enabled modules etc.
* Anything you wish to manage from the server goes here.
*
*/
public class ClientConfiguration {
private final Map<String, String> messages;
private final EnumerationRepository enumerations;
@Inject
public ClientConfiguration(EnumerationRepository enumerationRepository, MessageAccessor messageAccessor) throws IOException {
this.enumerations = enumerationRepository;
this.messages = messageAccessor.buildMessagesMap();
}
public Map<String, String> getMessages() {
return messages;
}
public EnumerationRepository getEnumerations() {
return enumerations;
}
}
|
fnx-io/backend
|
server/src/main/java/io/fnx/backend/util/conf/ClientConfiguration.java
|
Java
|
mit
| 913
|
---
layout: page
title: Bell Limited Show
date: 2016-05-24
author: Thomas Henry
tags: weekly links, java
status: published
summary: Fusce euismod molestie tortor eget vehicula. Morbi sed varius dui.
banner: images/banner/leisure-02.jpg
booking:
startDate: 02/02/2019
endDate: 02/04/2019
ctyhocn: MIASTHX
groupCode: BLS
published: true
---
Sed gravida tincidunt nulla a efficitur. Integer nec dolor sed lacus tincidunt lobortis. Pellentesque lorem dui, bibendum vitae mollis sit amet, porttitor nec tellus. Phasellus ultricies consequat ultricies. Mauris a nisi convallis neque ornare ultricies. Curabitur eget quam feugiat, faucibus tellus non, euismod enim. Integer volutpat odio non mattis cursus. Cras sodales nisl nunc. Morbi tincidunt viverra nunc a posuere. In ullamcorper velit eu gravida auctor. Curabitur non elementum ipsum. Ut pretium pulvinar magna placerat scelerisque. Nulla facilisi. Nulla facilisi. Nunc neque ex, commodo at porttitor et, tempus non ex. Phasellus mattis tortor ac arcu imperdiet, in hendrerit arcu mollis.
* Curabitur ac tortor pellentesque, efficitur lacus vitae, placerat ex
* Sed eleifend libero eget tincidunt maximus
* Fusce venenatis diam at ultrices tempus
* Suspendisse id lectus faucibus, pellentesque lacus ac, finibus elit
* Integer a nisl viverra, pulvinar tortor ac, hendrerit metus.
Duis euismod eu metus eget ullamcorper. Donec tellus urna, tincidunt quis placerat at, sodales ac mi. In vehicula purus a turpis semper, placerat accumsan elit vehicula. Donec quis hendrerit orci. Aliquam at ipsum purus. In hendrerit malesuada pulvinar. Donec eget justo neque. Duis mattis id velit eget gravida.
|
KlishGroup/prose-pogs
|
pogs/M/MIASTHX/BLS/index.md
|
Markdown
|
mit
| 1,653
|
import React, {Component, PropTypes} from 'react';
import moment from 'moment';
import theme from '../../Item/components/FieldsView.scss';
const tripHelps = {
auto: 'Автомобиль',
plane: 'Самолет',
train: 'Поезд'
};
export default class TripFields extends Component {
static propTypes = {
fields: PropTypes.object.isRequired
};
render() {
const {fields} = this.props;
const startDate = moment(fields.startDate);
const endDate = moment(fields.endDate);
return (
<div className={theme.fields}>
<h5>Основные сведения</h5>
<table className={theme.table}>
<tbody>
<tr>
<td className={theme.key}>Тип поездки:</td>
<td className={theme.value}>
<pre>{fields.tripType === 'trip' ? 'Командировка' : 'Служебная поездка'}</pre>
</td>
</tr>
<tr>
<td className={theme.key}>Период:</td>
<td className={theme.value}>
<pre>{startDate.format('DD.MM.YYYY')} - {endDate.format('DD.MM.YYYY')}</pre>
</td>
</tr>
<tr>
<td className={theme.key}>Сотрудники:</td>
<td className={theme.value}>
<pre>
{Object.keys(fields.forUsers).map((key) => {
return <span key={key}>{fields.forUsers[key].title}</span>;
})}
</pre>
</td>
</tr>
<tr>
<td className={theme.key}>Цель поездки:</td>
<td className={theme.value}>
<pre>{fields.target}</pre>
</td>
</tr>
</tbody>
</table>
<h5>Местоназначение</h5>
<table className={theme.table}>
<tbody>
<tr>
<td className={theme.key}>Страна, город:</td>
<td className={theme.value}><pre>{fields.country} {fields.city}</pre></td>
</tr>
<tr>
<td className={theme.key}>Организация:</td>
<td className={theme.value}><pre>{fields.company}</pre></td>
</tr>
<tr>
<td className={theme.key}>Проезд туда:</td>
<td className={theme.value}><pre>{tripHelps[fields.tripTo]}</pre></td>
</tr>
<tr>
<td className={theme.key}>Проезд обратно:</td>
<td className={theme.value}><pre>{tripHelps[fields.tripBack]}</pre></td>
</tr>
<tr>
<td className={theme.key}>Другие расходы:</td>
<td className={theme.value}><pre>{fields.otherExpenses}</pre></td>
</tr>
</tbody>
</table>
</div>
);
}
}
|
rebiz/requests
|
frontend/src/routes/Requests/Trip/Fields/TripFields.js
|
JavaScript
|
mit
| 2,940
|
require 'ffi'
require_relative 'cld2/generated_language'
require_relative 'cld2/name_to_code_mapping'
module CLD2
extend FFI::Library
class << self
def detect_language(text, is_plain_text = true)
is_reliable = FFI::MemoryPointer.new(:int)
detected = ext_detect_language(text.to_s, text.to_s.length, is_plain_text, is_reliable)
build_result(detected, is_reliable)
end
def detect_language_summary(text, is_plain_text = true)
language3 = FFI::MemoryPointer.new(:int, 3)
percent3 = FFI::MemoryPointer.new(:int, 3)
text_bytes = FFI::MemoryPointer.new(:int)
is_reliable = FFI::MemoryPointer.new(:int)
detected = ext_detect_language_summary(text.to_s, text.to_s.length, is_plain_text, language3, percent3, text_bytes, is_reliable)
build_summary(detected, language3, percent3, text_bytes, is_reliable)
end
private
def build_result(detected, is_reliable)
{
:name => detected.to_s,
:code => NameToCodeMapping::CODE_BY_NAME[detected],
:reliable => (is_reliable.read_int == 1)
}
end
def build_summary(detected, language3, percent3, text_bytes, is_reliable)
languages = language3.read_array_of_int(3).collect { |l| GeneratedLanguage::Language[l] }
percents = percent3.read_array_of_int(3)
{
:primary => build_result(detected, is_reliable),
:languages =>
[
{ :name => languages[0].to_s, :code => NameToCodeMapping::CODE_BY_NAME[languages[0]], :confidence => percents[0] },
{ :name => languages[1].to_s, :code => NameToCodeMapping::CODE_BY_NAME[languages[1]], :confidence => percents[1] },
{ :name => languages[2].to_s, :code => NameToCodeMapping::CODE_BY_NAME[languages[2]], :confidence => percents[2] }
]
}
end
end
GEM_ROOT = File.expand_path("../../", __FILE__)
ffi_lib "#{GEM_ROOT}/ext/cld2/lib/libcld2_full.so"
attach_function 'ext_detect_language', 'DetectLanguage', [ :string, :int, :bool, :pointer ], GeneratedLanguage::Language
attach_function 'ext_detect_language_summary', 'DetectLanguageSummary', [ :string, :int, :bool, :pointer, :pointer, :pointer, :pointer ], GeneratedLanguage::Language
end
|
craig-day/ruby_cld2
|
lib/cld2.rb
|
Ruby
|
mit
| 2,256
|
# Gmaps autocomplete for Rails
Extracted from [gmaps-autocomplete](https://github.com/rjshade/gmaps-autocomplete) and improved markedly and then packaged for use with Rails as an asset gem :)
## General info
The script is now compiled from Coffeescript and allows you to have multiple fields linked to multiple instances of the `GmapsCompleter` class on the same page.
I recommend that you also check out: [google maps and RoR](http://stackoverflow.com/questions/7466872/google-maps-and-ror-3-1)
## Upgrading
Version 1.3 now comes only with a Class based GmapsCompleter. The old static GmapsCompleter container, used in version 1.2 (and below) has been deprecated. Please upgrade your configuration functionality as demonstrated in the usage/config instructions below.
## Install
In your project `Gemfile`
```ruby
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'gmaps-autocomplete-rails'
```
Then run `bundle install`;)
Packed and ready for use with the Asset pipeline :)
Add to javascript manifest file, fx `application.js`
```
//= require jquery_ujs
//= require jquery.ui.all
//= require gmaps-auto-complete
```
PS: I have been notified that `//= require gmaps-autocomplete` should work, but I don't see why/how, since the js file is called `gmaps-auto-complete.js`.
Include the google maps script before `application.js`, fx in your layout file:
*application.html.erb*
```erb
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<%= javascript_include_tag "application" %>
```
Note also that the autocomplete script depends on jQuery 1.6+.
## Initialize
Add functionality that is executed after the document (and all scripts) have been fully loaded. Example:
*mypage.js*
```javascript
jQuery(function() {
var completer;
completer = new GmapsCompleter({
inputField: '#gmaps-input-address',
errorField: '#gmaps-error'
});
completer.autoCompleteInit({
country: "us"
});
});
```
or using Coffeescript
*mypage.js.coffee*
```
jQuery ->
completer = new GmapsCompleter
inputField: '#gmaps-input-address'
errorField: '#gmaps-error'
completer.autoCompleteInit
country: "us"
```
### Configuration options
The constructor function can take a configuration option hash that can configure the specific workings of the `GmapsCompleter`. It uses the following defaults:
```javascript
{
mapElem: "#gmaps-canvas",
zoomLevel: 2,
mapType: google.maps.MapTypeId.ROADMAP,
pos: [51.751724, -1.255284],
inputField: '#gmaps-input-address',
errorField: '#gmaps-error',
debugOn: false
};
```
The following default methods can be replaced by configuration:
* positionOutputter
* updateUI
* updateMap
These methods are used to control how the gmaps data is used to update the UI on the page, such as the position output and map position update. Customize these needed.
The default logic (taken from GmapsCompleterDefaultAssist) is:
```coffeescript
defaultUpdateMap: (geometry) ->
map = @map
marker = @marker
map.fitBounds(geometry.viewport) if map
marker.setPosition(geometry.location) if marker
# fill in the UI elements with new position data
defaultUpdateUI: (address, latLng) ->
$(@inputField).autocomplete 'close'
@debug 'country', @country
updateAdr = address.replace ', ' + @country, ''
updateAdr = address
@debug 'updateAdr', updateAdr
$(@inputField).val updateAdr
@positionOutputter latLng
defaultPositionOutputter: (latLng) ->
$('#gmaps-output-latitude').html latLng.lat()
$('#gmaps-output-longitude').html latLng.lng()
```
The default update UI logic removes the country from the address displayed.
## autoCompleteInit
The function `autoCompleteInit`, called on an instance of GmapsCompleter, can takes an option hash. Currently only [region](https://developers.google.com/maps/documentation/geocoding/#RegionCodes), `country` and `autocomplete` can be used.
Example:
```javascript
autoCompleteInit({region: 'DK', country: 'Denmark'});
```
Will make searches in the DK region and remove `', Denmark'` from the result.
Note: Not sure if this is still useful with the new instance based approach!?
Parameter `autocomplete` allows to configure JQuery autocomplete widget
Example:
```javascript
autoCompleteInit({
region: 'DK',
country: 'Denmark',
autocomplete: {
minLength: 4,
position: {
my: "center top",
at: "center bottom"
}
}
});
```
## Assist object
The options hash for the constructor can now take an `assist` object as an argument.
The `assist` object can be a class or a simple object containing the following:
```coffeescript
options:
mapElem: '#gmaps-canvas'
zoomLevel: 2
mapType: google.maps.MapTypeId.ROADMAP
pos: [0, 0]
inputField: '#gmaps-input-address'
errorField: '#gmaps-error'
debugOn: true
# update marker and map
updateMap: (geometry) ->
# fill in the UI elements with new position data
updateUI: (address, latLng) ->
# display current position
positionOutputter: (latLng) ->
# optionally also message functions (see below)
```
If you use a class you can use Coffeescript `extends` (see http://coffeescript.org/#classes) to subclass the default implementation. You can then optionally use `super` to call the base implementation.
Example:
```coffeescript
class MyCompleterAssist extends GmapsCompleterDefaultAssist
updateUI: (address, latLng) ->
console.log "Doing my own thang!"
// ...
super (address, latLng)
```
Usage (config):
```coffeescript
completer = new GmapsCompleter
inputField: '#gmaps-my-input-address'
assist: MyCompleterAssist
```
## Usage with Rails form helpers
Simple form example:
```ruby
= simple_form_for(@post) do |f|
= f.input :address, :input_html =>{:id => 'gmaps-input-address'}, :placeholder => 'Start typing a place...'
```
## Examples
See `spec/test-gmaps-auto-coffee.html` for an example page using this "plugin". Note that if you set `mapElem` to null or leave out that element on the page, the autocomplete will function without attempting to update the map :)
This is very useful in scenarios where you want to geolocate the address without displaying on the map.
## Advanced Customization
Some of the prime candidate functions for customization are:
* updateUi
* updateMap
Here the default simple `updateUI` implementation:
```javascript
updateUi: function( address, latLng ) {
$(this.inputField).autocomplete("close");
$(this.inputField).val(address);
this.positionOutputter(latLng);
}
```
Let's enrich the autocomplete fields with a jobs count for "the area" for each address.
```javascript
updateUi: function( address, latLng ) {
$(this.inputField).autocomplete("close");
var jobsCount = $.ajax(url: 'jobs/search?address=' + address + '&type=count');
$(this.inputField).val(address + ' (' + jobsCount + ' jobs)');
}
```
Note that you can encapsulate this kind of customization using the `assist` option and an Assist object/class as demonstrated above.
## Customizing messages
The following message functions can be customized, either by passing in the options hash, overriding directly on the GmapsCompleter object or even by using the Assist object/class.
* geocodeErrorMsg: function()
* invalidAddressMsg: function(value)
* noAddressFoundMsg: function()
Example:
```javascript
GmapsCompleter.prototype.geocodeErrorMsg = function() {
"Geocode error!"
}
```
Here, ensuring that ALL instances of `GmapsCompleter` will use this functionality as the baseline (since overriding the prototype function).
### Localizing messages
For localization/internationalization support, you could customize your Assist object constructor to set the current locale and then have your custom `xMsg` functions use this locale to display the localized message.
## Formtastic example
For [formtastic](https://github.com/justinfrench/formtastic) something like:
```ruby
= semantic_form_for @search do |f|
= f.input :address, placeholder: 'find address'
%span#address_error
```
Or,
```ruby
<%= semantic_form_for(@search) do |f| %>
<%= f.input :pickupAddress, :as => :string, :label => "House/Apt Number and Street", :input_html => { :id => "gmaps-input-address", :style => "width:350px; font-size:14px", :placeholder => "Start typing an address or location" } %>
...
```
And matching configuration in your javascript:
```javascript
$(document).ready(function() {
var completer;
completer = new GmapsCompleter({inputField: 'form#search #address', errorField: 'form#search #address_error'});
completer.autoCompleteInit({region: 'DK'});
});
```
### Tips
To avoid loading google maps script on all pages, either use turbolinks or alternatively conditionally load it depending on whether the page needs it.
For this you could use a simple `Page` model, something like this:
```ruby
class Page
include ::ActiveModel::Model
attr_accessor :name, :type, :mode
def map?
mode && mode.to_s =~ /location/
end
```
Then use the Page in the controller
```ruby
class PropertiesController < BaseController
def show
@name = params[:id]
@mode = params[:mode] || 'gallery'
@page = Page.new name: :property, mode: @mode
end
end
```
Then use page instance to have fine-grained control over how to display the page!
```erb
<% if @page.map? %>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<% end %>
<%= javascript_include_tag "application" %>
```
This could fx be integrated into your page layouts (layout files) or similar.
Alternatively perhaps use RequireJS via the `requirejs-rails` gem, and load it "AMD" style, and then use a HTML data attribute to set if the page should load the google map script or not. There are many ways to achieve this...
Enjoy!
## TODO
* even better class based functionality encapsulation
* possibly remove `autoCompleteInit` ??
Please help out with suggestions and improvements etc!
## Contributing to gmaps-autocomplete-rails
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
* Fork the project.
* Start a feature/bugfix branch.
* Commit and push until you are happy with your contribution.
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
## Copyright
Copyright (c) 2012 Kristian Mandrup. See LICENSE.txt for
further details.
|
brandonhilkert/gmaps-autocomplete-rails
|
README.md
|
Markdown
|
mit
| 10,827
|
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>Henge: _sta</title>
<link rel="stylesheet" href="/vendor/bootstrap-3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<div id="staticBody">
<header>
<h1><img src="/imgs/logo.svg" alt="henge"></h1>
</header>
<h2>#309 _sta</h2>
<ul id="words">
<li>barista</li>
<li>canasta</li>
<li>celesta</li>
<li>fashionista</li>
<li>fiesta</li>
<li>gangsta</li>
<li>siesta</li>
<li>vista</li>
</ul>
</div>
<div id="CircleApp" data-floor="26" data-floor-pos="8"></div>
<script type="text/javascript" src="/CircleApp.bundle.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-631498-5', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
|
henge-tech/henge-tech
|
docs/circles/_sta.html
|
HTML
|
mit
| 1,122
|
<!doctype html>
<html>
<title>npm-prune</title>
<meta http-equiv="content-type" value="text/html;utf-8">
<link rel="stylesheet" type="text/css" href="../../static/style.css">
<link rel="canonical" href="https://www.npmjs.org/doc/cli/npm-prune.html">
<script async=true src="../../static/toc.js"></script>
<body>
<div id="wrapper">
<h1><a href="../cli/npm-prune.html">npm-prune</a></h1> <p>Remove extraneous packages</p>
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm prune [<name> [<name ...]]
npm prune [<name> [<name ...]] [--production]
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>This command removes "extraneous" packages. If a package name is
provided, then only packages matching one of the supplied names are
removed.</p>
<p>Extraneous packages are packages that are not listed on the parent
package's dependencies list.</p>
<p>If the <code>--production</code> flag is specified, this command will remove the
packages specified in your <code>devDependencies</code>.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-rm.html"><a href="../cli/npm-rm.html">npm-rm(1)</a></a></li>
<li><a href="../files/npm-folders.html"><a href="../files/npm-folders.html">npm-folders(5)</a></a></li>
<li><a href="../cli/npm-ls.html"><a href="../cli/npm-ls.html">npm-ls(1)</a></a></li>
</ul>
</div>
<table border=0 cellspacing=0 cellpadding=0 id=npmlogo>
<tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18> </td></tr>
<tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td><td style="width:40px;height:10px;background:#fff" colspan=4> </td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)"> </td><td colspan=6 style="width:60px;height:10px;background:#fff"> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4> </td></tr>
<tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2> </td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td><td style="width:10px;height:10px;background:#fff" rowspan=3> </td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3> </td></tr>
<tr><td style="width:10px;height:10px;background:#fff" rowspan=2> </td></tr>
<tr><td style="width:10px;height:10px;background:#fff"> </td></tr>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6> </td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)"> </td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff"> </td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4> </td><td style="width:90px;height:10px;background:#fff" colspan=9> </td></tr>
</table>
<p id="footer">npm-prune — npm@2.1.6</p>
|
gwake1/NSS-Mocha-Test
|
node_modules/npm/html/doc/cli/npm-prune.html
|
HTML
|
mit
| 3,515
|
`safe_switch` library
=====================
A small C++ utility class to let `if`-`else` work like `switch`.
*by David Krauss (potatoswatter)*
<!-- language: lang-cxx -->
Summary
=======
This utility provides the strengths of the `switch`-`case`-`break` idiom without the potential to forget a `break` statement.
Features include:
- arbitrary values, not only integers and enumerations
- several values in one case
- comparisons besides strict equality
- less-than (`std::less<>`), for selection between numeric ranges
- approximate equality, for floating-point values (comparison algorithm not included)
- predicates besides simple value comparison
- heterogeneous-type comparisons (avoiding implicit conversion)
- safe with rvalues (captured by value) and efficient with lvalues (captured by reference)
A typical `switch` goes like this:
switch ( condition ) {
case A:
foo();
break;
case B:
case C:
bar();
break;
default:
baz();
break;
}
With this utility it would be written like this:
auto case_ = bind_comparator( condition );
if ( case_( A ) ) {
foo();
} else if ( case_({ B, C }) ) {
bar();
} else {
baz();
}
Or this (having enabled the macros):
SWITCH ( condition )
CASE ( A ) {
foo();
}
CASE ({ B, C }) {
bar();
}
DEFAULT {
baz();
}
Usage
=====
The entire interface is the function `sstar_safe_switch::bind_comparator`.
template< typename comparison = std::equal_to<>, typename operand >
impl::bound_comparison< operand, comparison >
bind_comparator( operand && o, comparison c = {} );
The name is long to write every time, so you might write inside one of your namespaces:
using sstar_safe_switch::bind_comparator;
It returns the class `bound_comparison`. This could perhaps be useful separately, but better options include `std::bind` with
a comparator object, or a lambda function. The result is not intended for encapsulation. It should only be used as a local variable.
`bind_comparator()`
-------------------
The first parameter, `operand && o`, is the subject of the comparison.
If it is an lvalue, such as the name of a variable `x` or `vec[3]`, that variable will be passed to the comparison.
If it is an rvalue like `x+3` or `std::vector<int>{1,2}`, a copy is saved and passed to the comparison.
The second parameter, `comparison c = {}`, is optional. It defaults to the `==` operator via the `std::equal_to` wrapper.
A stateless comparison can be specified by an explicit template argument like `bind_comparator< std::less<> >( var )`.
A stateful comparison can be passed as a second parameter like `bind_comparator( value, fuzzy_compare( 0.001 ) )`.
The bound parameter will be passed as the left-hand side or first argument to the comparator.
The case values will be passed as the right-hand side or second argument.
So, using `std::less` creates conditions like `var < 3`, and the cases should be listed from least to greatest (ascending order).
The case object
---------------
The result is a function-like object. Given a value or set of values, it performs the comparison and returns `true` or `false`.
A good, canonical name for it is `case_`. There is no need to name it differently for different "switches."
Behind the scenes, there are three overloads. The first handles single-value cases:
template< typename rhs >
bool operator () ( rhs const & r ) const;
// usage: if ( case_( 5 ) ) …
The type `rhs` can be anything. Often it will be the same type as `operand`, but it doesn't matter, as long as the comparison works.
The default comparison, `std::equal_to<>`, forms an expression using `==` *without* first performing conversions.
### List-based cases
Likewise, there is a template for handling lists of values:
template< typename rhs >
bool operator () ( std::initializer_list< rhs > il ) const;
// usage: if ( case_({ "foo", "bar", "baz" }) ) …
If the comparison returns `true` for any value in the list, the function returns `true`.
In this example, if the `operand` type is `std::string`, it will be compared to the literals `"foo"` etc. without creating
`std::string` temporaries. This saves some overhead.
However, template type deduction of `rhs` in `std::initializer_list< rhs >` requires that every expression in the list have
the same type. When this isn't the case, or if the expressions are all of type `operand`, a non-template overload is used:
bool operator () ( std::initializer_list< std::decay_t< operand > > il ) const;
// usage: if ( case_({ std::string( "foo" ), "bar" }) ) …
(The `decay_t` business is simply stripping reference qualification.
The list contains values even if the class encapsulates a reference.)
In this example, `"bar"` will be converted to `std::string`. For optimal performance, you might forgo the list syntax like so:
if ( case_( std::string( "foo" ) || case_( "bar" ) ) …
(For the sake of argument, using `case_({ std::string( "foo" ).c_str(), "bar" })` would achieve the same.)
### Retrieving the value
If you don't want to use the the encapsulated comparator, the case object provides a method `get_value`.
std::decay_t< operand > const & get_value() const;
// usage: if ( std::isspace( case_.get_value() ) ) …
Macros
======
The `"safe_switch_macros.hpp"` header provides macros so you can write
`SSTAR_SAFE_SWITCH` and `SSTAR_SAFE_SWITCH_CASE` instead of `bind_comparator` and `else if`:
SSTAR_SAFE_SWITCH ( control_value )
SSTAR_SAFE_SWITCH_CASE ( case_value ) {
do_something();
} SSTAR_SAFE_SWITCH_CASE ({ case2, case3 }) {
something_else();
} SSTAR_SAFE_SWITCH_DEFAULT {
fallback();
}
Under the hood, this is still an `if`-`else` ladder. You can still write `else if`, and if you do, the `SSTAR_SAFE_SWITCH_VALUE`
macro expands to call the `get_value()` method of the control object.
The case object introduced by `SSTAR_SAFE_SWITCH` is only in scope until the last `else` clause, then it's destroyed.
The macros have no slot for explicit template arguments. For a default-constructed custom comparison object, explicitly pass it
as a second parameter.
SSTAR_SAFE_SWITCH ( control_value, std::less<>{} )
These macro names are verbose, to prevent name collisions. You probably want to alias them to something else.
A convenience interface is provided to this end: `#include "begin_safe_switch"` will create a "preprocessing scope"
mapping the macro names:
SWITCH => SSTAR_SAFE_SWITCH
CASE => SSTAR_SAFE_SWITCH_CASE
DEFAULT => SSTAR_SAFE_SWITCH_DEFAULT
SWITCH_VALUE => SSTAR_SAFE_SWITCH_VALUE
The "scope" created by ``#include "begin_safe_switch"`` should be terminated by `#include "end_safe_switch"`.
At the end of the outermost scope, the short macro names will be `#undef`ed.
These scopes may nest, but the nesting levels are limited to 16 deep. This can be extended if you file a bug report.
(Nesting `begin_safe_switch` and `end_safe_switch` is not important to safety, anyway. You can still nest `SWITCH` statements
without a second `#include "begin_safe_switch"`.)
#include "begin_safe_switch"
SWITCH ( control_value )
CASE ( case_value ) {
do_something();
} CASE ({ case2, case3 }) {
something_else();
} else if ( complex_predicate( SWITCH_VALUE ) ) {
#include "begin_safe_switch"
SWITCH ( inner_value )
CASE ( inner_case ) {
ugh();
}
#include "end_safe_switch"
} DEFAULT {
fallback();
}
#include "end_safe_switch"
Note that no C++ scope is generated by these book-end headers. No error occurs if you forget `end_safe_switch`.
FAQ
===
### Why even bother?
Good question. Writing `if ( var == 5 )` is hardly error-prone. Some folks see `switch`…`case`…`break` as superior due to
less repetition. (Ironically, this argument tends to forget about `break`.)
If you already eschew `switch` and have no problem with `if`…`else`, then maybe this utility isn't for you.
This utility ensures that the condition variable and the comparison are specified at a single point, so they can be adjusted
without running through all the `if` statements. It's more handy when the comparison is more complicated than `==`.
### Performance?
There are several ways of implementing a `switch` at the machine level: a lookup table with indirect branching, a series of
conditional branches, or a tree of conditional branches. The compiler is responsible for choosing the right one.
Likewise for `if`…`else`. Any modern compiler *should* be able to translate seamlessly between the two.
If yours loses performance in a particular case, file a bug against it.
Before you file a bug, though, try using profile-guided optimization (PGO). This makes a huge difference for programs that
spend lots of time on branches, whether by `switch`, `if`, `goto`, or whatever.
Note that an indirect branch can have at most one predicted result, so a `switch` implemented that way needs to pick the same
path in the vast majority of cases.
CPUs are much better at predicting conditional branches, even when they're lined up in sequence. PGO gives the compiler
statistics to direct the CPU toward good predictions.
This is likely to cause table-based `switch`es to become more like `if`-`else`.
### C++03?
Aside from `std::initializer_list`, which is only sugar, nothing here really needs C++11. It could be back-ported to C++98/C++03.
However, we're well into the 2010's and nobody should be using such old compilers.
The attitude that compiler upgrades lead to dangerous random breakage is very obsolete. That is dinosaur thinking.
This is open source, though, and submissions are welcome.
### What about fallthrough not handled by the `initializer_list` overloads?
Use `goto`.
|
potswa/safe_switch
|
README.md
|
Markdown
|
mit
| 9,941
|
#region
/*
Copyright (c) 2002-2012, Bas Geertsema, Xih Solutions
(http://www.xihsolutions.net), Thiago.Sayao, Pang Wu, Ethem Evlice, Andy Phan, Chang Liu.
All rights reserved. http://code.google.com/p/msnp-sharp/
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the names of Bas Geertsema or Xih Solutions nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
*/
#endregion
using System;
using System.IO;
using System.Xml;
using System.Text;
using System.Diagnostics;
using System.Globalization;
namespace MSNPSharp.Core
{
/// <summary>
/// Represents a single NOT or IPG message.
/// </summary>
/// <remarks>
/// These messages are receid from, and send to, a nameserver. NOT messages are rececived for MSN-Calendar or MSN-Alert notifications.
/// IPG commands are received/send to exchange pager (sms) messages.
/// </remarks>
[Serializable()]
public class NotificationMessage : MSNMessage
{
/// <summary>
/// Constructor.
/// </summary>
public NotificationMessage()
{
}
/// <summary>
/// Constructs a NotificationMessage from the inner body contents of the specified message object.
/// This will also set the InnerMessage property of the message object to the newly created NotificationMessage.
/// </summary>
public NotificationMessage(NetworkMessage message)
{
ParseBytes(message.InnerBody);
message.InnerMessage = this;
}
/* Example notification
* <NOTIFICATION ver="1" siteid="111100200" siteurl="http://calendar.msn.com" id="1">\r\n
<TO pid="0x00060000:0x81ee5a43" name="example@passport.com" />\r\n
<MSG pri="" id="1">\r\n
<ACTION url="/calendar/isapi.dll?request=action&operation=modify&objectID=1&uicode1=modifyreminder&locale=2052"/>\r\n
<SUBSCR url="/calendar/isapi.dll?request=action&operation=modify&objectID=1&uicode1=modifyreminder&locale=2052"/><CAT id="111100201" />\r\n
<BODY lang="2052" icon="/En/img/calendar.png">\r\n
<TEXT>goto club 7. 2002 21:15 - 22:15 </TEXT>\r\n
</BODY>\r\n
</MSG>\r\n
</NOTIFICATION>\r\n
*/
#region Private
private bool notificationTypeSpecified = false;
public bool NotificationTypeSpecified
{
get { return notificationTypeSpecified; }
set { notificationTypeSpecified = value; }
}
/// <summary>
/// </summary>
NotificationType notificationType = NotificationType.Alert;
public NotificationType NotificationType
{
get { return notificationType; }
set { notificationType = value; }
}
private int id = 0;
public int Id
{
get { return id; }
set { id = value; }
}
private int siteId = 0;
public int SiteId
{
get { return siteId; }
set { siteId = value; }
}
private string siteUrl = string.Empty;
public string SiteUrl
{
get { return siteUrl; }
set { siteUrl = value; }
}
private string receiverAccount = string.Empty;
public string ReceiverAccount
{
get { return receiverAccount; }
set { receiverAccount = value; }
}
private string receiverOfflineMail = string.Empty;
public string ReceiverOfflineMail
{
get { return receiverOfflineMail; }
set { receiverOfflineMail = value; }
}
private string receiverMemberIdLow = string.Empty;
public string ReceiverMemberIdLow
{
get { return receiverMemberIdLow; }
set { receiverMemberIdLow = value; }
}
private string receiverMemberIdHigh = string.Empty;
public string ReceiverMemberIdHigh
{
get { return receiverMemberIdHigh; }
set { receiverMemberIdHigh = value; }
}
private string senderAccount = string.Empty;
public string SenderAccount
{
get { return senderAccount; }
set { senderAccount = value; }
}
private string senderMemberIdLow = string.Empty;
public string SenderMemberIdLow
{
get { return senderMemberIdLow; }
set { senderMemberIdLow = value; }
}
private string senderMemberIdHigh = string.Empty;
public string SenderMemberIdHigh
{
get { return senderMemberIdHigh; }
set { senderMemberIdHigh = value; }
}
private string sendDevice = string.Empty;
public string SendDevice
{
get { return sendDevice; }
set { sendDevice = value; }
}
private int messageId = 0;
public int MessageId
{
get { return messageId; }
set { messageId = value; }
}
private string pri = string.Empty;
public string Pri
{
get { return pri; }
set { pri = value; }
}
private string actionUrl = string.Empty;
public string ActionUrl
{
get { return actionUrl; }
set { actionUrl = value; }
}
private string subcriptionUrl = string.Empty;
public string SubcriptionUrl
{
get { return subcriptionUrl; }
set { subcriptionUrl = value; }
}
private string catId = "110110001";
public string CatId
{
get { return catId; }
set { catId = value; }
}
private string language = string.Empty;
public string Language
{
get { return language; }
set { language = value; }
}
private string iconUrl = string.Empty;
public string IconUrl
{
get { return iconUrl; }
set { iconUrl = value; }
}
private string text = string.Empty;
public string Text
{
get { return text; }
set { text = value; }
}
private string offlineText = string.Empty;
public string OfflineText
{
get { return offlineText; }
set { offlineText = value; }
}
private string bodyPayload = string.Empty;
public string BodyPayload
{
get { return bodyPayload; }
set { bodyPayload = value; }
}
#endregion
#region Public
/// <summary>
/// Creates a xml message based on the data in the object. It is used before the message is send to the server.
/// </summary>
protected virtual XmlDocument CreateXmlMessage()
{
XmlDocument doc = new XmlDocument();
XmlElement root = doc.CreateElement("NOTIFICATION");
if (NotificationTypeSpecified)
root.Attributes.Append(doc.CreateAttribute("ver")).Value = ((int)NotificationType).ToString(CultureInfo.InvariantCulture);
root.Attributes.Append(doc.CreateAttribute("id")).Value = Id.ToString();
if (siteId > 0)
root.Attributes.Append(doc.CreateAttribute("siteid")).Value = SiteId.ToString();
if (siteUrl.Length > 0)
root.Attributes.Append(doc.CreateAttribute("siteurl")).Value = SiteUrl;
XmlElement to = doc.CreateElement("TO");
if (ReceiverMemberIdLow.Length > 0 && ReceiverMemberIdHigh.Length > 0)
to.Attributes.Append(doc.CreateAttribute("pid")).Value = ReceiverMemberIdLow.ToString() + ":" + ReceiverMemberIdHigh.ToString();
if (ReceiverAccount.Length > 0)
to.Attributes.Append(doc.CreateAttribute("name")).Value = ReceiverAccount;
if (ReceiverOfflineMail.Length > 0)
to.Attributes.Append(doc.CreateAttribute("email")).Value = ReceiverOfflineMail;
if (SendDevice.Length > 0)
{
XmlElement via = doc.CreateElement("VIA");
via.Attributes.Append(doc.CreateAttribute("agent")).Value = SendDevice;
to.AppendChild(via);
}
root.AppendChild(to);
XmlElement from = doc.CreateElement("FROM");
if (SenderMemberIdLow.Length > 0 && SenderMemberIdHigh.Length > 0)
from.Attributes.Append(doc.CreateAttribute("pid")).Value = SenderMemberIdLow.ToString() + ":" + SenderMemberIdHigh.ToString();
if (SenderAccount.Length > 0)
from.Attributes.Append(doc.CreateAttribute("name")).Value = SenderAccount;
root.AppendChild(from);
XmlElement msg = doc.CreateElement("MSG");
if (Pri.Length > 0)
msg.Attributes.Append(doc.CreateAttribute("pri")).Value = Pri.ToString();
msg.Attributes.Append(doc.CreateAttribute("id")).Value = MessageId.ToString();
if (ActionUrl.Length > 0)
{
XmlElement action = doc.CreateElement("ACTION");
action.Attributes.Append(doc.CreateAttribute("url")).Value = ActionUrl;
msg.AppendChild(action);
}
if (SubcriptionUrl.Length > 0)
{
XmlElement subscr = doc.CreateElement("SUBSCR");
subscr.Attributes.Append(doc.CreateAttribute("url")).Value = SubcriptionUrl;
msg.AppendChild(subscr);
}
if (CatId.Length > 0)
{
XmlElement cat = doc.CreateElement("CAT");
cat.Attributes.Append(doc.CreateAttribute("id")).Value = CatId.ToString();
msg.AppendChild(cat);
}
XmlElement body = doc.CreateElement("BODY");
if (Language.Length > 0)
body.Attributes.Append(doc.CreateAttribute("id")).Value = Language;
if (IconUrl.Length > 0)
body.Attributes.Append(doc.CreateAttribute("icon")).Value = IconUrl;
if (Text.Length > 0)
{
XmlElement textEl = doc.CreateElement("TEXT");
textEl.AppendChild(doc.CreateTextNode(Text));
body.AppendChild(textEl);
}
if (OfflineText.Length > 0)
{
XmlElement emailTextEl = doc.CreateElement("EMAILTEXT");
emailTextEl.AppendChild(doc.CreateTextNode(OfflineText));
body.AppendChild(emailTextEl);
}
msg.AppendChild(body);
root.AppendChild(msg);
doc.AppendChild(root);
return doc;
}
/// <summary>
/// Returns the command message as a byte array. This can be directly send over a networkconnection.
/// </summary>
/// <remarks>
/// Remember to set the transaction ID before calling this method.
/// Uses UTF8 Encoding.
/// </remarks>
/// <returns></returns>
public override byte[] GetBytes()
{
return new byte[] { 0x00 };
//throw new MSNPSharpException("You can't send notification messages yourself. It is only possible to retrieve them.");
}
/// <summary>
/// Parses incoming byte data send from the network.
/// </summary>
/// <param name="data">The raw message as received from the server</param>
public override void ParseBytes(byte[] data)
{
if (data != null)
{
// retrieve the innerbody
XmlDocument xmlDoc = new XmlDocument();
TextReader reader = new StreamReader(new MemoryStream(data), new System.Text.UTF8Encoding(false));
Trace.WriteLineIf(Settings.TraceSwitch.TraceVerbose, reader.ReadToEnd(), GetType().Name);
reader = new StreamReader(new MemoryStream(data), new System.Text.UTF8Encoding(false));
xmlDoc.Load(reader);
// Root node: NOTIFICATION
XmlNode node = xmlDoc.SelectSingleNode("//NOTIFICATION");
if (node != null)
{
if (node.Attributes.GetNamedItem("ver") != null)
{
NotificationType = (NotificationType)int.Parse(node.Attributes.GetNamedItem("ver").Value, CultureInfo.InvariantCulture);
NotificationTypeSpecified = true;
}
if (node.Attributes.GetNamedItem("id") != null)
Id = int.Parse(node.Attributes.GetNamedItem("id").Value);
if (node.Attributes.GetNamedItem("siteid") != null)
SiteId = int.Parse(node.Attributes.GetNamedItem("siteid").Value);
if (node.Attributes.GetNamedItem("siteurl") != null)
SiteUrl = node.Attributes.GetNamedItem("siteurl").Value;
}
// TO element
node = xmlDoc.SelectSingleNode("/NOTIFICATION/TO");
if (node != null)
{
if (node.Attributes.GetNamedItem("pid") != null)
{
string[] values = node.Attributes.GetNamedItem("pid").Value.Split(':');
ReceiverMemberIdLow = values[0];
ReceiverMemberIdHigh = values[1];
}
if (node.Attributes.GetNamedItem("name") != null)
ReceiverAccount = node.Attributes.GetNamedItem("name").Value;
if (node.Attributes.GetNamedItem("email") != null)
ReceiverOfflineMail = node.Attributes.GetNamedItem("email").Value;
}
// VIA element
node = xmlDoc.SelectSingleNode("/NOTIFICATION/TO/VIA");
if (node != null)
{
if (node.Attributes.GetNamedItem("agent") != null)
SendDevice = node.Attributes.GetNamedItem("agent").Value;
}
// FROM element
node = xmlDoc.SelectSingleNode("/NOTIFICATION/FROM");
if (node != null)
{
if (node.Attributes.GetNamedItem("pid") != null)
{
string[] values = node.Attributes.GetNamedItem("pid").Value.Split(':');
SenderMemberIdLow = values[0];
SenderMemberIdHigh = values[1];
}
if (node.Attributes.GetNamedItem("name") != null)
SenderAccount = node.Attributes.GetNamedItem("name").Value;
}
// MSG element
node = xmlDoc.SelectSingleNode("/NOTIFICATION/MSG");
if (node != null)
{
if (node.Attributes.GetNamedItem("pri") != null)
Pri = node.Attributes.GetNamedItem("pri").Value;
if (node.Attributes.GetNamedItem("id") != null)
MessageId = int.Parse(node.Attributes.GetNamedItem("id").Value);
}
// ACTION element
node = xmlDoc.SelectSingleNode("/NOTIFICATION/MSG/ACTION");
if (node != null)
{
if (node.Attributes.GetNamedItem("url") != null)
ActionUrl = node.Attributes.GetNamedItem("url").Value;
}
// SUBSCR element
node = xmlDoc.SelectSingleNode("/NOTIFICATION/MSG/SUBSCR");
if (node != null)
{
if (node.Attributes.GetNamedItem("url") != null)
SubcriptionUrl = node.Attributes.GetNamedItem("url").Value;
}
// CAT element
node = xmlDoc.SelectSingleNode("/NOTIFICATION/MSG/CAT");
if (node != null)
{
if (node.Attributes.GetNamedItem("id") != null)
CatId = node.Attributes.GetNamedItem("id").Value;
}
// BODY element
node = xmlDoc.SelectSingleNode("/NOTIFICATION/MSG/BODY");
if (node != null)
{
if (node.Attributes.GetNamedItem("lang") != null)
Language = node.Attributes.GetNamedItem("lang").Value;
if (node.Attributes.GetNamedItem("icon") != null)
IconUrl = node.Attributes.GetNamedItem("icon").Value;
}
if (!NotificationTypeSpecified && Id == 0 && node != null)
{
bodyPayload = node.InnerText;
}
// TEXT element
node = xmlDoc.SelectSingleNode("/NOTIFICATION/MSG/BODY/TEXT");
if (node != null)
{
Text = node.Value;
}
// EMAILTEXT element
node = xmlDoc.SelectSingleNode("/NOTIFICATION/MSG/BODY/EMAILTEXT");
if (node != null)
{
OfflineText = node.Value;
}
}
else
throw new MSNPSharpException("NotificationMessage expected payload data, but not InnerBody is present.");
}
/// <summary>
/// </summary>
/// <returns></returns>
public override string ToString()
{
return System.Text.UTF8Encoding.UTF8.GetString(this.GetBytes());
}
#endregion
}
};
|
mt830813/code
|
Project/WebMSN/MSNPSharp/Core/NotificationMessage.cs
|
C#
|
mit
| 19,176
|
using System;
using System.Collections;
using System.Linq;
using System.Net;
using Akka.Interfaced;
using DG.Tweening;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class MainScene : MonoBehaviour
{
public RectTransform LoginPanel;
public RectTransform LoadingPanel;
public RectTransform MainPanel;
public InputField ServerInput;
public InputField IdInput;
public InputField PasswordInput;
public Text LoadingText;
protected void Start()
{
UiManager.Initialize();
StartLogin();
}
private void StartLogin()
{
LoginPanel.gameObject.SetActive(false);
LoadingPanel.gameObject.SetActive(false);
MainPanel.gameObject.SetActive(false);
if (G.User != null)
{
MainPanel.gameObject.SetActive(true);
}
else
{
if (G.Communicator != null)
{
UiMessageBox.Show("Connection Closed!");
G.Communicator = null;
}
LoginPanel.gameObject.SetActive(true);
var loginServer = PlayerPrefs.GetString("LoginServer");
var loginId = PlayerPrefs.GetString("LoginId");
var loginPassword = PlayerPrefs.GetString("LoginPassword");
if (string.IsNullOrEmpty(loginId) == false)
{
ServerInput.text = loginServer;
IdInput.text = loginId;
PasswordInput.text = loginPassword;
}
}
}
private IEnumerator ProcessLoginUser(string server, string id, string password)
{
G.Logger.Info("ProcessLoginUser");
IPEndPoint endPoint;
try
{
endPoint = LoginProcessor.GetEndPointAddress(server);
}
catch (Exception e)
{
UiMessageBox.Show("Server EndPoint Error: " + e);
yield break;
}
SwitchPanel(LoginPanel, LoadingPanel);
var task = LoginProcessor.Login(this, endPoint, id, password, p => LoadingText.text = p + "...");
yield return task.WaitHandle;
if (task.Status == TaskStatus.RanToCompletion)
{
SwitchPanel(LoadingPanel, MainPanel);
PlayerPrefs.SetString("LoginServer", server);
PlayerPrefs.SetString("LoginId", id);
PlayerPrefs.SetString("LoginPassword", password);
}
else
{
UiMessageBox.Show(task.Exception.Message);
SwitchPanel(LoadingPanel, LoginPanel);
PlayerPrefs.DeleteKey("LoginServer");
PlayerPrefs.DeleteKey("LoginId");
PlayerPrefs.DeleteKey("LoginPassword");
}
}
public void OnLoginButtonClick()
{
var server = ServerInput.text;
var id = IdInput.text;
var password = PasswordInput.text;
if (string.IsNullOrEmpty(id))
{
UiMessageBox.Show("ID is required.");
return;
}
StartCoroutine(ProcessLoginUser(server, id, password));
}
public void OnPlayButtonClick()
{
if (G.User == null)
{
UiMessageBox.Show("Login reqruied.");
return;
}
SceneManager.LoadScene("GameScene");
}
public void OnInfoButtonClick()
{
if (G.User == null)
{
UiMessageBox.Show("Login reqruied.");
return;
}
UiManager.Instance.ShowModalRoot<UserInfoDialogBox>(
new UserInfoDialogBox.Argument { UserContext = G.UserContext });
}
public void OnLogoutButtonClick()
{
if (G.User == null)
return;
PlayerPrefs.DeleteKey("LoginId");
PlayerPrefs.DeleteKey("LoginPassword");
foreach (var channel in G.Communicator.Channels.ToList())
channel.Close();
G.Communicator = null;
G.User = null;
SwitchPanel(MainPanel, LoginPanel);
}
private void SwitchPanel(RectTransform panelFrom, RectTransform panelTo)
{
DOTween.Kill(panelFrom.transform, true);
DOTween.Kill(panelTo.transform, true);
var y = panelFrom.anchoredPosition.y;
panelFrom.anchoredPosition = new Vector2(0, y);
panelFrom.DOAnchorPos(new Vector2(-700, y), 0.25f)
.OnComplete(() => panelFrom.gameObject.SetActive(false));
panelTo.gameObject.SetActive(true);
panelTo.anchoredPosition = new Vector2(700, y);
panelTo.DOAnchorPos(new Vector2(0, y), 0.25f);
}
}
|
SaladbowlCreative/TicTacToe
|
src/GameClient/Assets/Scripts/Scenes/MainScene.cs
|
C#
|
mit
| 4,566
|
---
title: ayl6
type: products
image: /img/Screen Shot 2017-05-09 at 11.56.54 AM.png
heading: l6
description: lksadjf lkasdjf lksajdf lksdaj flksadj flksa fdj
main:
heading: Foo Bar BAz
description: |-
***This is i a thing***kjh hjk kj
# Blah Blah
## Blah
### Baah
image1:
alt: kkkk
---
|
pblack/kaldi-hugo-cms-template
|
site/content/pages2/ayl6.md
|
Markdown
|
mit
| 337
|
---
title: akd20
type: products
image: /img/Screen Shot 2017-05-09 at 11.56.54 AM.png
heading: d20
description: lksadjf lkasdjf lksajdf lksdaj flksadj flksa fdj
main:
heading: Foo Bar BAz
description: |-
***This is i a thing***kjh hjk kj
# Blah Blah
## Blah
### Baah
image1:
alt: kkkk
---
|
pblack/kaldi-hugo-cms-template
|
site/content/pages2/akd20.md
|
Markdown
|
mit
| 339
|
// Copyright 2017 0lento. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class FixedTimestepDemoTarget : TargetRules
{
public FixedTimestepDemoTarget(TargetInfo Target)
{
Type = TargetType.Game;
}
//
// TargetRules interface.
//
public override void SetupBinaries(
TargetInfo Target,
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
ref List<string> OutExtraModuleNames
)
{
OutExtraModuleNames.AddRange( new string[] { "FixedTimestepDemo" } );
}
}
|
0lento/UE4-FixedTimestepDemo
|
Source/FixedTimestepDemo.Target.cs
|
C#
|
mit
| 529
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class BlogConfig(AppConfig):
name = 'blog'
|
LoveKano/hs_django_blog
|
blog/apps.py
|
Python
|
mit
| 156
|
# Static Website Container
Lets create a static website container using **nginx**.
Create a directory **examples/nginx**
```sh
mkdir examples/nginx
cd examples/nginx
touch index.html
```
### index.html
```html
<html>
<head>
<title>Hello from Docker</title>
</head>
<body>
<h1>Hello from Docker!!!</h1>
</body>
</html>
```
Create the docker container
```sh
docker container run -d --name test-nginx -p 80:80 -v $(pwd):/usr/share/nginx/html:ro nginx:latest
```
* **-p** is a ports mapping <HOST PORT>:<CONTAINER PORT>.
* **-v** is a volume mounting <HOST DIRECTORY>:<CONTAINER DIRECTORY>.
Important: run command accepts only absolute paths. In our example we've used $(pwd) to set current directory absolute path.
Now you can check this [url](http://localhost/) in your browser.
We can try to change /example/nginx/index.html (which is mounted as a volume to directory /usr/share/nginx/html inside container) and refresh the page.
Let’s investigate some information about test-nginx container:
```sh
docker inspect test-nginx
```
This command displays system wide information regarding the Docker installation. Information displayed includes the kernel version, number of containers and images, exposed ports, mounted volumes, etc.
There are a lot of information in inspect output. If we just need to see the port mappings we can use port:
```sh
docker port test-nginx
```
### Console Output
```sh
80/tcp -> 0.0.0.0:80
```
|
vravishankar/vravishankar.github.io
|
docker/chapters/Website.md
|
Markdown
|
mit
| 1,448
|
package com.example.gs.mvpdemo.mvp;
/**
* Created by kyluzoi on 2016/11/26.
* 17:20
*
* @VERSION V1.4
* mvp之v
*/
public interface IView {
}
|
HappyImp/BaseMvpOkhttpdemo
|
app/src/main/java/com/example/gs/mvpdemo/mvp/IView.java
|
Java
|
mit
| 150
|
{% extends "layout.html" %}
{% block page_title %}
GOV.UK prototyping kit
{% endblock %}
{% block propositionHeader %}
{% include "includes/propositional_navigation.html" %}
{% endblock %}
{% block content %}
<main id="content" role="main">
<div class="grid-row">
<div class="column-quarter grid-col" style="padding-bottom:90px; padding-top:30px; margin-left:-40px">
<ul class="main-nav">
<li id="nav-home"><a href="job">Search</a></li>
<li id="nav-job"><a href="job_new">Create record</a></li>
<li id="nav-perf"><a href="performance">Caseload</a></li>
</ul>
</div>
<!-- Start three quarters container for main content columns -->
<div class="column-three-quarters">
<h1 class="heading-large"> Claim</h1>
<div class="column">
<!-- 3rd level nav buttons -->
<div id="id-claimant-actions" class="grid-wrapper gutter-half-top">
<div class="grid grid-1-5">
<div class="inner-block left">
<a id="view_record" href="job_record_confirm_active" class="menu-item">
<strong>View record</strong>
</a>
</div>
</div>
<div class="grid grid-1-5">
<div class="inner-block left">
<a id="edit_record" href="job_edit_active" class="menu-item">
<strong>Edit claimant</strong>
</a>
</div>
</div>
<div class="grid grid-1-5">
<div class="inner-block left">
<a id="appointments" href="job_next_new_active" class="menu-item">
<strong>Appointment</strong>
</a>
</div>
</div>
<div class="grid grid-1-5">
<div class="inner-block left">
<a id="claim_active" href="job_claim_active" class="menu-item selected">
<strong>Claim</strong>
</a>
</div>
</div>
</div>
</div>
<div class="column-half">
<div class="form-group">
<fieldset>
<legend class="form-label">Benefit type</legend>
<label class="block-label" for="JSA">
<input id="JSA" name="JSA" type="radio" value="Jobseeker's Allowance" checked>
Jobseeker's Allowance
</label><br>
<label class="block-label disabled" class="disabled" for="ESA">
<input id="ESA" name="ESA" type="radio" value="ESA" disabled>
Employment Support Allowance
</label><br>
<label class="block-label disabled" class="disabled" for="IS">
<input id="IS" name="IS" type="radio" value="IS" disabled>
Income Support
</label>
</fieldset>
</div>
<div class="form-group">
<fieldset>
<legend>
<span class="form-label">
Initial date of claim
</span>
</legend>
<div class="form-date">
<p class="form-hint">For example, 01 08 2015</p>
<div class="form-group form-group-day">
<label for="dob-day">Day</label>
<input class="form-control" id="dob-day" type="number" pattern="[0-9]*" min="0" max="31" value="14">
</div>
<div class="form-group form-group-month">
<label for="dob-month">Month</label>
<input class="form-control" id="dob-month" type="number" pattern="[0-9]*" min="0" max="12" value="09">
</div>
<div class="form-group form-group-year">
<label for="dob-year">Year</label>
<input class="form-control" id="dob-year" type="number" pattern="[0-9]*" min="0" max="2014" value="2015">
</div>
</div>
</fieldset>
</div>
</div>
<!-- End col -->
<div class="column-half">
<div class="form-group">
<label class="form-label" for="title">Jobcentre</label>
<select class="select form-control">
<option value="Bambury">Bambury</option>
<option value="Southampton">Southampton</option>
<option value="Bradford">Bradford</option>
<option value="Derby">Derby</option>
<option value="Liverpool">Liverpool</option>
<option value="Manchester">Manchester</option>
<option value="Portsmouth">Portsmouth</option>
<option value="Southampton">Southampton</option>
<option value="Wolverhampton">Wolverhampton</option>
</select>
</div>
<div class="form-group">
<label class="form-label" for="title">Work coach</label>
<select class="select form-control">
<option value="amanda.wright">amanda.wright</option>
<option value="richard.kaine">richard.kaine</option>
<option value="john.smith2">john.smith2</option>
<option value="amanda.wright">amanda.wright</option>
<option value="darren.moody">darren.moody</option>
<option value="mark.jones1">mark.jones1</option>
<option value="sam.steel">sam.steel</option>
<option value="harry.brown2">harry.brown2</option>
<option value="julia.granger">julia.granger</option>
<option value="paul.brookes1">paul.brookes1</option>
<option value="sarah.fielding">sarah.fielding</option>
</select>
</div>
<div class="form-group">
<fieldset>
<legend>
<span class="form-label">
Last effective date
</span>
</legend>
<div class="form-date">
<p class="form-hint">For example, 01 09 2015</p>
<div class="form-group form-group-day">
<label for="dob-day">Day</label>
<input class="form-control" id="dob-day" type="number" pattern="[0-9]*" min="0" max="31" value="16">
</div>
<div class="form-group form-group-month">
<label for="dob-month">Month</label>
<input class="form-control" id="dob-month" type="number" pattern="[0-9]*" min="0" max="12" value="09">
</div>
<div class="form-group form-group-year">
<label for="dob-year">Year</label>
<input class="form-control" id="dob-year" type="number" pattern="[0-9]*" min="0" max="2015" value="2015">
</div>
</div>
</fieldset>
</div>
<div class="form-group">
<label class="form-label" for="circs">Claim closure</label>
<select class="select form-control" id="circs">
<option value="Select">Select</option>
<option value="Found work">Found work</option>
<option value="Self employed">Self employed</option>
<option value="Failed to attend">Failed to attend</option>
<option value="Gone abroad">Gone abroad</option>
<option value="Other">Other</option>
<option value="To JSA">To JSA</option>
<option value="To ESA">To ESA</option>
<option value="To IS">To IS</option>
<option value="To Pension">To Pension</option>
</select>
</div>
</div>
<!-- End column -->
<div class="column">
<div class="form-group" id="get-started">
<a href="job_record_confirm" class="button" value="Save">Save</a>
</div>
</div>
<!-- End row-->
</div>
</main>
{% endblock %}
|
dwpdigitaltech/ejs-prototype
|
app/views/latest_c/job_claim_active_one_button.html
|
HTML
|
mit
| 8,817
|
# Information about filesystem storage
DRAFT not yet finished
## Features
- [ ] compression
- [ ] encryption
## Storage on Filesystem
The key value will be hashed with Blake2b 32 byte
git-like objects folder
Hexadecimal path in the format:
`xx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
Example:
`92/8b20366943e2afd11ebc0eae2e53a93bf177a4fcf35bcc64d503704e65e202`
## File format
Current Version 1 (not yet finished)
Encoded using [msgpack](http://msgpack.org/)
Flat encoding
Format differs based on flags?
Key-Value-Format
```
version: positive fixint (current 1)
flags: uint32 (not yet used, feature flags, key_value object
[optional additional header based on flags]
value: bin 8; bin 16; bin 32 (using the smallest possible)
key: bin 8; bin 16; bin 32 (using the smallest possible)
```
CAS-Format:
```
version: positive fixint (current 1)
flags: uint32 (not yet used, feature flags, cas object)
[optional additional header based on flags]
value: bin 8; bin 16; bin 32 (using the smallest possible)
```
### Flags
Bitflags (u32)
* const FLAG_READONLY = 0b00000001,
* const FLAG_DELETEABLE = 0b00000010,
* const FLAG_ENCRYPTED = 0b00000100, (additional header)
* const FLAG_COMPRESSED = 0b00001000, (additional header)
* const FLAG_CAS = 0b00010000,
### Additional Header
For the additional headers there is a special order:
* if flag FLAG_ENCRYPTED is set, the crypto header is the first additional header
* if flag FLAG_COMPRESSED is set, it is the second header (when crypto is set)
Crypto Header:
```
crypo-method: fixstr utf8 (Possible values: "AES", "ChaCha20")
```
Compression Header:
```
compression-method: fixstr utf8 (Possible values: "LZ4")
```
|
okard/rust-playground
|
storage/doc/storage_filesystem.md
|
Markdown
|
mit
| 1,714
|
import React, { Component } from "react";
class PageHeader extends Component {
render() {
return (
<div>
Page Header
</div>
);
}
}
export default PageHeader;
|
TrevorWAdams/cool-news-site
|
client/src/components/PageHeader.js
|
JavaScript
|
mit
| 192
|
<?php
/*
* This file is part of the Elcodi package.
*
* Copyright (c) 2014-2015 Elcodi.com
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Marc Morera <yuhu@mmoreram.com>
* @author Aldo Chiecchia <zimage@tiscali.it>
* @author Elcodi Team <tech@elcodi.com>
*/
namespace Elcodi\Bundle\CurrencyBundle;
use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\HttpKernel\KernelInterface;
use Elcodi\Bundle\CoreBundle\Interfaces\DependentBundleInterface;
use Elcodi\Bundle\CurrencyBundle\CompilerPass\MappingCompilerPass;
use Elcodi\Bundle\CurrencyBundle\DependencyInjection\ElcodiCurrencyExtension;
/**
* ElcodiCurrencyBundle Bundle
*/
class ElcodiCurrencyBundle extends Bundle implements DependentBundleInterface
{
/**
* @param ContainerBuilder $container
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new MappingCompilerPass());
}
/**
* Returns the bundle's container extension.
*
* @return ExtensionInterface The container extension
*/
public function getContainerExtension()
{
return new ElcodiCurrencyExtension();
}
/**
* Create instance of current bundle, and return dependent bundle namespaces
*
* @return array Bundle instances
*/
public static function getBundleDependencies(KernelInterface $kernel)
{
return [
'Elcodi\Bundle\LanguageBundle\ElcodiLanguageBundle',
'Elcodi\Bundle\CoreBundle\ElcodiCoreBundle',
];
}
/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
|
shopery/elcodi
|
src/Elcodi/Bundle/CurrencyBundle/ElcodiCurrencyBundle.php
|
PHP
|
mit
| 2,200
|
#-------------------------------------------------------------------------------
# Name: Main.py
# Purpose: This script creates chainages from a single or mutile line
#
# Author: smithc5
#
# Created: 10/02/2015
# Copyright: (c) smithc5 2015
# Licence: <your licence>
#------------------------------------------------------------------------------
import os
import arcpy
import sys
import traceback
from modules import create_chainages
source_align_location = arcpy.GetParameterAsText(0)
# Variable to store the location of the original source alignment.
database_location = arcpy.GetParameterAsText(1)
# Variable to store the location where the database is created to store the.
# feature classes.
chainage_distance = arcpy.GetParameterAsText(2)
new_fc_name = os.path.basename(source_align_location[:-4])
# New name for the copied feature class. Original name minus file extension
database_name = "{}.gdb".format(new_fc_name)
# Variable to store the name of the .gdb to store the feature classes.
DATABASE_FLIEPATH = os.path.join(database_location, database_name)
new_fc_filepath = os.path.join(DATABASE_FLIEPATH, new_fc_name)
# New file path to the copied feature class
new_fc_filepath_with_m = "{0}_M".format(new_fc_filepath)
# New file path to the copied feature class
chainage_feature_class = "{0}_Chainages".format(new_fc_filepath)
# This is the output feature class to store the chainages.
def main():
try:
create_chainages.check_if_gdb_exist(DATABASE_FLIEPATH)
create_chainages.create_gdb(database_location, database_name)
create_chainages.copy_features(source_align_location, new_fc_filepath)
create_chainages.create_route(new_fc_filepath, "Name", new_fc_filepath_with_m)
create_chainages.create_chainages(new_fc_filepath_with_m, chainage_distance,
database_location, new_fc_filepath_with_m,
DATABASE_FLIEPATH, chainage_feature_class)
except:
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
pymsg = "PYTHON ERRORS:\nTraceback Info:\n{0}\nError Info:\n {1}: {2}\n".format(tbinfo,
str(sys.exc_type),
str(sys.exc_value))
msgs = "ARCPY ERRORS:\n{}\n".format(arcpy.GetMessages(2))
arcpy.AddError(msgs)
arcpy.AddError(pymsg)
print msgs
print pymsg
arcpy.AddMessage(arcpy.GetMessages(1))
print arcpy.GetMessages(1)
if __name__ == '__main__':
main()
|
smithchristian/arcpy-create-chainages
|
main.py
|
Python
|
mit
| 2,746
|
// Code borrowed from:
// https://github.com/DockYard/ember-one-way-controls/blob/v2.0.0/addon/-private/dynamic-attribute-bindings.js
import Mixin from '@ember/object/mixin';
export default Mixin.create({
attributeBindings: [],
NON_ATTRIBUTE_BOUND_PROPS: ['class', 'classNames'],
concatenatedProperties: ['NON_ATTRIBUTE_BOUND_PROPS'],
_isKeyBoundToAttribute(key) {
return (
this.NON_ATTRIBUTE_BOUND_PROPS.indexOf(key) === -1
&& this.attributeBindings .indexOf(key) === -1
);
},
init() {
this._super(...arguments);
const newAttributeBindings =
Object
.keys(this.attrs)
.filter(key => this._isKeyBoundToAttribute(key));
const attributeBindings = this.attributeBindings.concat(newAttributeBindings);
this.setProperties({attributeBindings});
}
});
|
Deveo/ember-emojione
|
addon/-private/mixins/dynamic-attribute-bindings.js
|
JavaScript
|
mit
| 840
|
# README
## Table of Contents
* [Usage](#usage)
* [Building](#building)
* [Contributing](#contributing)
* [License](#license)
+ [Contribution](#contribution)
## Usage
Since we are using git submodules system, additional steps to work with the
repository are required. To correctly clone the repository you should add
`--recursive` argument:
```sh
$ git clone --recursive https://github.com/iotacommunity/iota-rdb
```
To correctly pull changes from the upstream, run the following commands:
```sh
$ git pull
$ git submodule update --init --recursive
```
Make sure [Docker][docker] and [Docker Compose][docker-compose] are installed.
Edit `docker-compose.yml` file for configuration.
Run the service with the following command:
```sh
$ docker-compose up --build
```
## Building
The project is written in [Rust][rust] programming language. To install it, run
the following command:
```sh
$ curl https://sh.rustup.rs -sSf | sh
```
You may need to relogin to update your environment variables.
We are using nightly channel of rust. If you haven't checked it in the previous
step, install it with the following command:
```sh
$ rustup install nightly
```
Currently, the project requires [ZeroMQ][zmq] 3.2 or newer. For example, on
recent Debian-based distributions, you can use the following command to get the
prerequisite headers and library installed:
```sh
$ apt-get install libzmq3-dev pkg-config
```
Once you installed all required dependencies, run the following command in the
project root to build executable:
```sh
$ rustup run nightly cargo build --release
```
The binary will be located at `target/release/iota-rdb`.
## Contributing
Please check the following steps before contributing to the project:
1. Follow syntax guidelines.
We are using [rustfmt][rustfmt] tool to automatically style the code. You can
install it with the following command:
```sh
$ rustup run nightly cargo install rustfmt-nightly
```
To format the source codes run the following command:
```sh
$ rustup run nightly cargo fmt
```
2. Check that the linter produces no warnings.
We are using [clippy][clippy] rust linter as a development dependency. To check
the lints run the following commands:
```sh
$ rustup run nightly cargo build --features "clippy"
```
The output should not contain warnings.
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.
[rust]: https://www.rust-lang.org/
[rustfmt]: https://github.com/rust-lang-nursery/rustfmt
[clippy]: https://github.com/rust-lang-nursery/rust-clippy
[zmq]: https://github.com/zeromq/libzmq
[docker]: https://www.docker.com/community-edition#/download
[docker-compose]: https://docs.docker.com/compose/install/
|
iotacommunity/iota-rdb
|
README.md
|
Markdown
|
mit
| 3,128
|
var autoprefixer = require('autoprefixer');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
var getClientEnvironment = require('./env');
var paths = require('./paths');
// Webpack uses `publicPath` to determine where the app is being served from.
// In development, we always serve from the root. This makes config easier.
var publicPath = '/';
// `publicUrl` is just like `publicPath`, but we will provide it to our app
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
var publicUrl = '';
// Get environment variables to inject into our app.
var env = getClientEnvironment(publicUrl);
// This is the development configuration.
// It is focused on developer experience and fast rebuilds.
// The production configuration is different and lives in a separate file.
module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.
devtool: 'cheap-module-source-map',
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.
entry: [
// Include an alternative client for WebpackDevServer. A client's job is to
// connect to WebpackDevServer by a socket and get notified about changes.
// When you save a file, the client will either apply hot updates (in case
// of CSS changes), or refresh the page (in case of JS changes). When you
// make a syntax error, this client will display a syntax error overlay.
// Note: instead of the default WebpackDevServer client, we use a custom one
// to bring better experience for Create React App users. You can replace
// the line below with these two lines if you prefer the stock client:
// require.resolve('webpack-dev-server/client') + '?/',
// require.resolve('webpack/hot/dev-server'),
require.resolve('react-dev-utils/webpackHotDevClient'),
// We ship a few polyfills by default:
require.resolve('./polyfills'),
// Finally, this is your app's code:
paths.appIndexJs
// We include the app code last so that if there is a runtime error during
// initialization, it doesn't blow up the WebpackDevServer client, and
// changing JS code would still trigger a refresh.
],
output: {
// Next line is not used in dev but WebpackDevServer crashes without it:
path: paths.appBuild,
// Add /* filename */ comments to generated require()s in the output.
pathinfo: true,
// This does not produce a real file. It's just the virtual path that is
// served by WebpackDevServer in development. This is the JS bundle
// containing code from all our entry points, and the Webpack runtime.
filename: 'static/js/bundle.js',
// This is the URL that app is served from. We use "/" in development.
publicPath: publicPath
},
resolve: {
// This allows you to set a fallback for where Webpack should look for modules.
// We read `NODE_PATH` environment variable in `paths.js` and pass paths here.
// We use `fallback` instead of `root` because we want `node_modules` to "win"
// if there any conflicts. This matches Node resolution mechanism.
// https://github.com/facebookincubator/create-react-app/issues/253
fallback: paths.nodePaths,
// These are the reasonable defaults supported by the Node ecosystem.
// We also include JSX as a common component filename extension to support
// some tools, although we do not recommend using it, see:
// https://github.com/facebookincubator/create-react-app/issues/290
extensions: ['.js', '.json', '.jsx', ''],
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web'
}
},
module: {
// First, run the linter.
// It's important to do this before Babel processes the JS.
preLoaders: [
{
test: /\.(js|jsx)$/,
loader: 'eslint',
include: paths.appSrc,
}
],
loaders: [
// Default loader: load all assets that are not handled
// by other loaders with the url loader.
// Note: This list needs to be updated with every change of extensions
// the other loaders match.
// E.g., when adding a loader for a new supported file extension,
// we need to add the supported extension to this loader too.
// Add one new line in `exclude` for each loader.
//
// "file" loader makes sure those assets get served by WebpackDevServer.
// When you `import` an asset, you get its (virtual) filename.
// In production, they would get copied to the `build` folder.
// "url" loader works like "file" loader except that it embeds assets
// smaller than specified limit in bytes as data URLs to avoid requests.
// A missing `test` is equivalent to a match.
{
exclude: [
/\.html$/,
/\.(js|jsx)$/,
/\.(css|scss)$/,
/\.json$/,
/\.svg$/
],
loader: 'url',
query: {
limit: 10000,
name: 'static/media/[name].[hash:8].[ext]'
}
},
// Process JS with Babel.
{
test: /\.(js|jsx)$/,
include: paths.appSrc,
loader: 'babel',
query: {
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
cacheDirectory: true
}
},
{
test: /\.scss$/,
include: paths.appSrc,
loaders: ["style", "css", "sass"]
},
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader turns CSS into JS modules that inject <style> tags.
// In production, we use a plugin to extract that CSS to a file, but
// in development "style" loader enables hot editing of CSS.
{
test: /\.css$/,
loader: 'style!css?importLoaders=1!postcss'
},
// JSON is not enabled by default in Webpack but both Node and Browserify
// allow it implicitly so we also enable it.
{
test: /\.json$/,
loader: 'json'
},
// "file" loader for svg
{
test: /\.svg$/,
loader: 'file',
query: {
name: 'static/media/[name].[hash:8].[ext]'
}
}
]
},
// We use PostCSS for autoprefixing only.
postcss: function() {
return [
autoprefixer({
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9', // React doesn't support IE8 anyway
]
}),
];
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"window.jQuery": "jquery"
}),
// Makes the public URL available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
// In development, this will be an empty string.
new InterpolateHtmlPlugin({
PUBLIC_URL: publicUrl
}),
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin({
inject: true,
template: paths.appHtml,
}),
// Makes some environment variables available to the JS code, for example:
// if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`.
new webpack.DefinePlugin(env),
// This is necessary to emit hot updates (currently CSS only):
new webpack.HotModuleReplacementPlugin(),
// Watcher doesn't work well if you mistype casing in a path so we use
// a plugin that prints an error when you attempt to do this.
// See https://github.com/facebookincubator/create-react-app/issues/240
new CaseSensitivePathsPlugin(),
// If you require a missing module and then `npm install` it, you still have
// to restart the development server for Webpack to discover it. This plugin
// makes the discovery automatic so you don't have to restart.
// See https://github.com/facebookincubator/create-react-app/issues/186
new WatchMissingNodeModulesPlugin(paths.appNodeModules)
],
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
}
};
|
friedow/bpd
|
config/webpack.config.dev.js
|
JavaScript
|
mit
| 9,066
|
angular
.module('sectorWeb.ctrl.reports', [])
.controller('reportsCtrl', [
'$scope',
'$location',
'reportsService',
'$routeParams',
function ($scope, $location, reportsService, $routeParams) {
$scope.list = [];
$scope.searchText = $routeParams.param ? $routeParams.param: "";
$scope.refresh = function () {
$scope.list = [];
reportsService.list()
.then(function successCallback(response) {
$scope.list = response.data;
});
};
$scope.search = function () {
if ($scope.searchText.length >= 3) {
$scope.go("/reports/" + $scope.searchText);
}
}
$scope.refresh();
}]);
|
imdfana/test-ams-developert
|
Sectores.Web/Scripts/app/ctrl/reportsCtrl.js
|
JavaScript
|
mit
| 858
|
<?php
namespace Orm;
/**
* @Entity
* @Table(name="_label_bundle")
**/
class LabelBundle
{
/**
* @Id
* @Column(type="integer")
* @GeneratedValue
**/
protected $id;
/**
* @Column(type="string")
**/
protected $name;
public function getId() { return $this->id; }
public function getName() { return $this->name; }
public function setId($x) { $this->id = $x; }
public function setName($x) { $this->name = $x; }
}
?>
|
ttoth/thesis
|
WebAlkalmazas/hermes-web/orm/LabelBundle.Orm.php
|
PHP
|
mit
| 493
|
/** embedded font double rendering issue fix -- https://css-tricks.com/forums/discussion/10449/weird-mobile-safari-font-face-problem-font-doubled-and-offset-to-the-left-/p1 **/
h1, h2, h3, h4, h5, h6 { /*reset for mobile browsers */
font-weight: normal;
}
/* ==========================================================================
HTML5 Boilerplate styles - h5bp.com (generated via initializr.com)
========================================================================== */
html,
button,
input,
select,
textarea {
color: #222;
}
body {
font-size: 1em;
line-height: 1.4;
}
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
a {
color: #b1bf92;
text-decoration: none;
}
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
img {
vertical-align: middle;
}
fieldset {
border: 0;
margin: 0;
padding: 0;
}
textarea {
resize: vertical;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
body {
font: 16px/26px Helvetica, Helvetica Neue, Arial;
}
.wrapper {
height: 100%;
position: relative;
width: 90%;
margin: 0 5%;
}
/* =============================================================================
GOOGLE MAPS
========================================================================== */
#gmap {
text-align: center;
margin: 20px auto 20px auto;
}
#gmap iframe {
width: 93%;
height: 200px;
border: 10px solid #090909;
-ms-border-radius: 8px;
-o-border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
}
#gmap small a,
#gmap small a:active,
#gmap small a:visited {
color: #b1bf92;
text-decoration: none;
outline: none;
}
#gmap small a:hover {
color: #b1bf92;
text-decoration: underline;
outline: none;
}
/* ===================
Theme
=================== */
.header-container {
position:absolute;
bottom:20px;
width: 100%;
background: black;
z-index: 10;
/* Fallback for web browsers that doesn't support RGBa */
background: rgb(0, 0, 0);
/* RGBa with 0.9 opacity */
background: rgba(0, 0, 0, 0.8);
/* For IE 5.5 - 7*/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#CC000000, endColorstr=#CC000000);
/* For IE 8*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#CC000000, endColorstr=#CC000000)";
}
.title {
color: black;
}
#introtext {
display: block;
padding: 10px 0 10px 0;
margin-bottom: 300px;
background: black;
-ms-border-radius: 8px;
-o-border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
/* Fallback for web browsers that doesn't support RGBa */
background: rgb(0, 0, 0);
/* RGBa with 0.7 opacity */
background: rgba(0, 0, 0, 0.4);
/* For IE 5.5 - 7*/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#B2000000, endColorstr=#B2000000);
/* For IE 8*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#B2000000, endColorstr=#B2000000)";
}
#introtext .head-sarah {
font-family: "EdwardianScrAltITCTT", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 5em;
line-height: 100%;
}
#introtext .amp {
position: relative;
top: 19px;
margin-left: -10px;
font-size: 0.7em;
}
#introtext .head-brad {
font-family: "futura_ltbook", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 2em;
line-height: 100%;
}
#introtext .date {
margin-top: 10px;
font-family: "futura_ltbook", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 1em;
}
/* ==============
MOBILE: Menu
============== */
nav {
z-index: 42;
}
nav ul {
font-family:"futura_ltbook",Arial,sans-serif;
font-weight: normal;
margin: 0;
padding: 0;
}
nav a {
display: block;
margin-bottom: 10px;
padding: 5px 0;
text-align: center;
text-decoration: none;
font-weight: bold;
color: white;
background: transparent;
white-space: nowrap;
outline: none;
}
nav li a:hover {
color: #fff;
background: #b1bf92;
text-decoration: none;
outline: none;
}
nav li a.selected {
color: #fff;
background: #b1bf92;
text-decoration: none;
outline: none;
}
/** firefox remove outline **/
nav ul li a:focus {outline:none;}
nav ul li a::-moz-focus-inner {border:0;}
/* ==============
MOBILE: Main
============== */
.main {
padding: 5% 0;
}
.main header {
float: left;
width: 80%;
}
/* ==========================================================================
Brad's custom styles
========================================================================== */
* { margin: 0; padding: 0; }
html {
}
body {
font-family: "futura_ltbook", "HelveticaNeueLTStdRegular","HelveticaNeue", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
color: #fff;
text-align: center;
}
#bg-image {
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
}
#bg-image img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
min-width: 50%;
min-height: 50%;
}
#bg-container {
}
section {
text-align: left;
padding: 25px;
background-color: black;
height: 100%;
margin-top: 200px;
color: white;
-ms-border-radius: 8px;
-o-border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
/* Fallback for web browsers that doesn't support RGBa */
background: rgb(0, 0, 0);
/* RGBa with 0.7 opacity */
background: rgba(0, 0, 0, 0.7);
/* For IE 5.5 - 7*/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#B2000000, endColorstr=#B2000000);
/* For IE 8*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#B2000000, endColorstr=#B2000000)";
}
section h1 {
font-family: "EdwardianScrAltITCTT", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-size: 2.6em;
}
section h2 {
font-size: 1.1em;
line-height: 120%;
padding: 0 0px;
}
.column {
float: none;
width: 100%;
padding: 0;
margin: 0;
}
.column p {
font-size: 1em;
line-height: 145%;
padding: 0;
}
/* ==========================================================================
Media Queries
========================================================================== */
@media only screen and (min-width: 480px) {
/* ====================
INTERMEDIATE: Menu
==================== */
body {
background-position: 50% 20%;
}
/** get the transparent bar on the bottom **/
.header-container {
position:absolute;
bottom:20px;
width:100%;
line-height:12px;
}
.header-container.sticky {
position: fixed;
top: 15px;
animation:thedrop 1s 1;
-moz-animation:thedrop 1s 1;
-webkit-animation:thedrop 1s 1;
}
#introtext {
padding: 30px 0 30px 0;
}
#introtext .head-sarah {
font-size: 7em;
}
#introtext .amp {
position: relative;
top: 29px;
font-size: 0.9em;
margin-left: -20px;
}
#introtext .head-brad {
font-size: 3em;
}
#introtext .date {
font-size: 1.1em;
margin-top: 15px;
margin-bottom: 20px;
}
nav {
display: block;
}
nav ul {
text-align: center;
margin: auto;
padding: 0;
text-align: center;
}
nav ul li {
display: inline;
padding: 0;
margin: 0;
}
nav a {
padding: 15px 1%;
margin-bottom: 0;
display:inline-block;
font-size: 60%;
white-space: nowrap;
-moz-font-smoothing: antialiased;
-o-font-smoothing: antialiased;
-ms-font-smoothing: antialiased;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
-webkit-transition: all .3s ease;
-moz-transition: all .3s ease;
-o-transition: all .3s ease;
-ms-transition: all .3s ease;
transition: all .3s ease;
}
.main header {
margin-top: 10%;
float: left;
width: 40%;
min-width: 320px;
}
section {
padding: 40px 40px 70px 40px;
}
section h1 {
font-size: 3.1em;
}
section h2 {
font-size: 1.7em;
}
.column p {
font-size: 1.1em;
}
#gmap iframe {
height: 400px;
}
/* ========================
INTERMEDIATE: IE Fixes
======================== */
nav ul li {
display: inline;
}
.oldie nav a {
margin: 0 0.7%;
}
}
@media only screen and (min-width: 768px) {
/* ====================
WIDE: CSS3 Effects
==================== */
section h1 {
font-size: 4.9em;
}
section h2 {
font-size: 2.0em;
}
/* ============
WIDE: Menu
============ */
#introtext .head-sarah {
font-size: 9em;
}
#introtext .amp {
top: 0;
font-size: 1em;
}
#introtext .head-brad {
font-size: 4em;
}
#introtext .date {
font-size: 2em;
margin-top: 15px;
margin-bottom: 20px;
}
/* ============
WIDE: Main
============ */
.main header {
margin-top: 10%;
margin-bottom: 30%;
float: left;
width: 100%;
}
nav a {
padding: 15px 2%;
font-size: 90%;
}
}
@media only screen and (min-width: 900px) {
section h1,
section h2 {
padding: 0 20px;
}
section h1 {
font-size: 5.9em;
}
.column.full {
clear: both;
float: none;
width: 100%;
}
.column {
float: left;
width: 50%;
}
.column p {
font-size: 1.4em;
line-height: 145%;
padding: 0 20px;
}
}
@media only screen and (min-width: 1140px) {
/* ===============
Maximal Width
=============== */
nav a {
padding: 15px 3%;
font-size: 120%;
}
.wrapper {
width: 1026px; /* 1140px - 10% for margins */
margin: 0 auto;
}
#introtext .head-sarah {
font-size: 11em;
}
#introtext .amp {
top: 0;
font-size: 1.1em;
}
#introtext .head-brad {
font-size: 5em;
}
#introtext .date {
font-size: 2.5em;
margin-top: 15px;
margin-bottom: 20px;
}
.main header {
margin-top: 4%;
margin-bottom: 30%;
float: left;
width: 100%;
}
}
/* ==========================================================================
Helper classes
========================================================================== */
.ir {
background-color: transparent;
border: 0;
overflow: hidden;
*text-indent: -9999px;
}
.ir:before {
content: "";
display: block;
width: 0;
height: 150%;
}
.hidden {
display: none !important;
visibility: hidden;
}
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
}
.invisible {
visibility: hidden;
}
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
*zoom: 1;
}
/* ==========================================================================
Print styles
========================================================================== */
@media print {
* {
background: transparent !important;
color: #000 !important; /* Black prints faster: h5bp.com/s */
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
/*
* Don't show links for images, or javascript/internal links
*/
.ir a:after,
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group; /* h5bp.com/t */
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
@page {
margin: 0.5cm;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
}
/* =============================================================================
FONTS
========================================================================== */
@font-face {
font-family: 'futura_ltbold';
src: url('futuralt-bold-webfont.eot');
src: url('futuralt-bold-webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('futuralt-bold-webfont.woff') format('woff'), /* Modern Browsers */
url('futuralt-bold-webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('futuralt-bold-webfont.svg#futura_ltbold') format('svg'); /* Legacy iOS */
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'futura_ltbook';
src: url('futuralt-book-webfont.eot');
src: url('futuralt-book-webfont.eot?#iefix') format('embedded-opentype'),
url('futuralt-book-webfont.woff') format('woff'),
url('futuralt-book-webfont.ttf') format('truetype'),
url('futuralt-book-webfont.svg#futura_ltbook') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'futura_ltregular';
src: url('futuralt-webfont.eot');
src: url('futuralt-webfont.eot?#iefix') format('embedded-opentype'),
url('futuralt-webfont.woff') format('woff'),
url('futuralt-webfont.ttf') format('truetype'),
url('futuralt-webfont.svg#futura_ltregular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'alex_brushregular';
src: url('alexbrush-regular-otf-webfont.eot');
src: url('alexbrush-regular-otf-webfont.eot?#iefix') format('embedded-opentype'),
url('alexbrush-regular-otf-webfont.woff') format('woff'),
url('alexbrush-regular-otf-webfont.ttf') format('truetype'),
url('alexbrush-regular-otf-webfont.svg#alex_brushregular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'great_vibesregular';
src: url('greatvibes-regular-webfont.eot');
src: url('greatvibes-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('greatvibes-regular-webfont.woff') format('woff'),
url('greatvibes-regular-webfont.ttf') format('truetype'),
url('greatvibes-regular-webfont.svg#great_vibesregular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'scriptina_proregular';
src: url('scriptina_pro-webfont.eot');
src: url('scriptina_pro-webfont.eot?#iefix') format('embedded-opentype'),
url('scriptina_pro-webfont.woff') format('woff'),
url('scriptina_pro-webfont.ttf') format('truetype'),
url('scriptina_pro-webfont.svg#scriptina_proregular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'EdwardianScrAltITCTT';
src: url('edwasai.eot');
src: url('edwasai.eot?#iefix') format('embedded-opentype'),
url('edwasai.woff') format('woff'),
url('edwasai.ttf') format('truetype'),
url('edwasai.svg#edwasai') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'EdwardianScrAltITCTTBold';
src: url('edwasaib.eot');
src: url('edwasaib.eot?#iefix') format('embedded-opentype'),
url('edwasaib.woff') format('woff'),
url('edwasaib.ttf') format('truetype'),
url('edwasaib.svg#edwasaib') format('svg');
font-weight: normal;
font-style: normal;
}
.responsive-image.proposal {
text-align: center;
margin: 60px auto 60px auto;
}
.responsive-image.proposal img {
border: 10px solid #090909;
-ms-border-radius: 8px;
-o-border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
}
.responsive-image.family {
text-align: center;
margin: 60px auto 60px auto;
}
.responsive-image.family img {
border: 10px solid #090909;
-ms-border-radius: 8px;
-o-border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
}
img.theinn {
text-align: center;
margin-bottom: 50px;
}
div.bp h2 {
margin: 0;
}
div.bp .column p {
line-height: 180%;
}
.hr-t {
margin: 80px auto 0 auto;
width: 97%;
border-top:#1e1e1e solid 1px;
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
}
.hr-b {
margin: 0 auto 80px auto;
width: 97%;
border-bottom:#808080 solid 1px;
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
}
a[href^=tel] {
color: white;
text-decoration: none;
outline: none;
}
a.email {
color: #b1bf92;
}
.thumb {
height: 80px;
width: 80px;
background-color: black;
margin-right: 10px;
margin-bottom: 0;
float: left;
border: 4px solid #090909;
-ms-border-radius: 2px;
-o-border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
}
.contact-box{
margin:2em 0;
}
.text{
margin:1em 0;
}
.text input[type="text"]{
width:80%;
padding:10px;
margin-top:1%;
display:inline-block;
border:1px solid #cacaca;
outline:none;
-webkit-appearance: none;
}
.text textarea{
width:80%;
padding:10px;
height:250px;
resize:none;
margin-top:1%;
margin-right:5%;
border:1px solid #cacaca;
outline:none;
-webkit-appearance: none;
}
.text input[type="submit"]{
font-size:1em;
color:#fff;
text-transform:uppercase;
margin-top:1%;
background:#d53e3e;
padding:10px 30px;
outline:none;
-webkit-appearance: none;
cursor:pointer;
border:0;
}
.text input[type="submit"]:hover{
background:#3c3a3e;
transition:0.5s all;
-webkit-transition:0.5s all;
-o-transition:0.5s all;
-moz-transition:0.5s all;
-ms-transition:0.5s all;
}
/*-- Footer Part Starts Here --*/
.footer{
background:#d53e3e;
padding:0.5em 0;
margin-right:5%;
margin-left:5%;
}
.footer p{
font-size:1em;
margin-right:5%;
margin-left:5%;
color:#fff;
font-weight:400;
}
.footer p a{
color:#00ffe4;
margin-right:5%;
margin-left:5%;
}
.footer p a:hover{
color:#fff;
margin-right:5%;
margin-left:5%;
}
/*-- Footer Part Ends Here --*/
|
shylaharild/invitation
|
css/main-1.6.css
|
CSS
|
mit
| 19,478
|
var pins={};
module.exports={
setup:function(pin, direction, callback){
pins[pin]={value:0, direction:direction};
callback(null);
},
read:function(pin, callback){
callback(null, pins[pin].value);
},
write:function(pin, value, callback){
pins[pin].value=value;
callback(null);
}
}
|
nickolanack/rpi-node-gpio-webserver
|
test/mock-gpio.js
|
JavaScript
|
mit
| 302
|
package algo.leetcode;
import java.util.*;
public class SmallestRange {
public int[] smallestRange(List<List<Integer>> nums) {
//List<Integer> window = new ArrayList<>();
Queue<int[]> queue = new PriorityQueue<>(new Comparator<int[]>() {
@Override
public int compare(int[] o1, int[] o2) {
return o1[0] - o2[0];
}
});
Queue<Integer> maxQ = new PriorityQueue<>(Comparator.reverseOrder());
Queue<Integer> minQ = new PriorityQueue<>();
int[] d = new int[2];
for(int i = 0; i < nums.size(); i ++){
int[] vals = new int[3];
vals[0] = nums.get(i).get(0);
vals[1] = i;
vals[2] = 0;
queue.add(vals);
//window.add(vals[0]);
maxQ.add(vals[0]);
minQ.add(vals[0]);
}
int min = Integer.MAX_VALUE;
while (!queue.isEmpty()){
int mix = maxQ.peek() - minQ.peek();
if(mix < min){
d[0] = minQ.peek();
d[1] = maxQ.peek();
min = mix;
}
int[] val = queue.poll();
while (!queue.isEmpty() && val[2] == nums.get(val[1]).size()-1){
val = queue.poll();
}
System.out.println(queue.size() + " " + val[0] + " " + val[2]);
if(!queue.isEmpty()){
maxQ.remove(val[0]);
minQ.remove(val[0]);
//window.remove((Integer)val[0]);
val[2] ++;
val[0] = nums.get(val[1]).get(val[2]);
//window.add(nums.get(val[1]).get(val[2]));
maxQ.add(val[0]);
minQ.add(val[0]);
queue.add(val);
}
}
return d;
}
public int[] smallestRange2(List<List<Integer>> nums) {
int start = -1;
int end = -1;
int range = Integer.MAX_VALUE;
int max = Integer.MIN_VALUE;
PriorityQueue<Element> queue = new PriorityQueue<>(new Comparator<Element>(){
public int compare(Element e1, Element e2){
return e1.val - e2.val;
}
});
for(int i = 0; i < nums.size(); i++){
Element e = new Element(nums.get(i).get(0), 0, i);
queue.offer(e);
max = Math.max(max, e.val);
}
while(queue.size() == nums.size()){
Element e = queue.poll();
if(max - e.val < range){
range = max - e.val;
start = e.val;
end = max;
}
if(e.index + 1 < nums.get(e.row).size()){
e.index = e.index + 1;
e.val = nums.get(e.row).get(e.index);
queue.offer(e);
if(e.val > max){
max = e.val;
}
}
}
return new int[] {start, end};
}
class Element{
int val;
int index;
int row;
public Element(int val, int index, int row){
this.val = val;
this.index = index;
this.row = row;
}
}
}
|
Brucechen13/algocodes
|
codes/src/algo/leetcode/SmallestRange.java
|
Java
|
mit
| 3,201
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("LinkedIN.Application")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LinkedIN.Application")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9db92474-f86a-4e87-aee3-c1cf4b25eba1")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
Gloor/lma
|
src/LinkedIN.Application/Properties/AssemblyInfo.cs
|
C#
|
mit
| 1,376
|
/* -*- Mode: C++; indent-tabs-mode: nil -*- */
#ifndef SCHWA_LEARN_FEATURES_H_
#define SCHWA_LEARN_FEATURES_H_
#include <iosfwd>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <schwa/_base.h>
#include <schwa/learn/feature_transformers.h>
namespace schwa {
namespace learn {
void dump_crfsuite_feature(const std::string &feature, std::ostream &out);
template <class TRANSFORM=NoTransform, typename VALUE=float>
class Features {
public:
using transform_type = TRANSFORM;
using key_type = typename TRANSFORM::value_type;
using value_type = VALUE;
using underlying_type = std::unordered_map<key_type, value_type>;
using const_iterator = typename underlying_type::const_iterator;
protected:
const transform_type &_transformer;
underlying_type _values;
public:
explicit Features(const transform_type &transformer=transform_type()) : _transformer(transformer) { }
Features(const Features &o) : _transformer(o._transformer), _values(o._values) { }
Features(const Features &&o) : _transformer(o._transformer), _values(o._values) { }
const_iterator begin(void) const { return _values.begin(); }
const_iterator end(void) const { return _values.end(); }
const_iterator cbegin(void) const { return _values.cbegin(); }
const_iterator cend(void) const { return _values.cend(); }
inline value_type
operator ()(const std::string &key, const value_type delta=1.0f) {
return _values[_transformer(key)] += delta;
}
inline void clear(void) { _values.clear(); }
void dump_crfsuite(std::ostream &out) const;
};
template <class TRANSFORM=NoTransform>
class Instance {
public:
Features<TRANSFORM> features;
std::string klass;
explicit Instance(const TRANSFORM &transformer) : features(transformer) { }
Instance(const Instance &o) : features(o.features), klass(o.klass) { }
Instance(const Instance &&o) : features(o.features), klass(o.klass) { }
void dump_crfsuite(std::ostream &out) const;
};
}
}
#include <schwa/learn/features_impl.h>
#endif // SCHWA_LEARN_FEATURES_H_
|
schwa-lab/libschwa
|
src/lib/schwa/learn/features.h
|
C
|
mit
| 2,200
|
cd ~/Code/skype-noisy-circles/
node index.js
|
tableflip/noisy-circles
|
startup.command
|
Shell
|
mit
| 45
|
0.0.1 - 2014-12-02
=====
Mostly feature complete:
* Vanitygen.network
* Vanitygen.valid?
* Vanitygen.difficulty
* Vanitygen.generate
* Vanitygen.continuous
Options supported:
* case_insensitive
* regex patterns
* that's about it...
|
bitvain/vanitygen-wrapper
|
CHANGELOG.md
|
Markdown
|
mit
| 233
|
<?php
/**
* PHP Token Reflection
*
* Version 1.3.1
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this library in the file LICENSE.
*
* @author Ondřej Nešpor
* @author Jaroslav Hanslík
*/
namespace TokenReflection;
use TokenReflection\Exception, TokenReflection\Stream\StreamBase as Stream;
/**
* Base abstract class for tokenized function and method.
*/
abstract class ReflectionFunctionBase extends ReflectionElement implements IReflectionFunctionBase
{
/**
* Function/method namespace name.
*
* @var string
*/
protected $namespaceName;
/**
* Determines if the function/method returns its value as reference.
*
* @var boolean
*/
private $returnsReference = false;
/**
* Parameters.
*
* @var array
*/
protected $parameters = array();
/**
* Static variables defined within the function/method.
*
* @var array
*/
private $staticVariables = array();
/**
* Definitions of static variables defined within the function/method.
*
* @var array
*/
private $staticVariablesDefinition = array();
/**
* Returns the name (FQN).
*
* @return string
*/
public function getName()
{
if (null !== $this->namespaceName && ReflectionNamespace::NO_NAMESPACE_NAME !== $this->namespaceName) {
return $this->namespaceName . '\\' . $this->name;
}
return $this->name;
}
/**
* Returns the unqualified name (UQN).
*
* @return string
*/
public function getShortName()
{
return $this->name;
}
/**
* Returns the namespace name.
*
* @return string
*/
public function getNamespaceName()
{
return null === $this->namespaceName || $this->namespaceName === ReflectionNamespace::NO_NAMESPACE_NAME ? '' : $this->namespaceName;
}
/**
* Returns if the function/method is defined within a namespace.
*
* @return boolean
*/
public function inNamespace()
{
return '' !== $this->getNamespaceName();
}
/**
* Returns if the function/method is a closure.
*
* @return boolean
*/
public function isClosure()
{
return false;
}
/**
* Returns this pointer bound to closure.
*
* @return null
*/
public function getClosureThis()
{
return null;
}
/**
* Returns the closure scope class.
*
* @return string|null
*/
public function getClosureScopeClass()
{
return null;
}
/**
* Returns if the function/method returns its value as reference.
*
* @return boolean
*/
public function returnsReference()
{
return $this->returnsReference;
}
/**
* Returns a particular function/method parameter.
*
* @param integer|string $parameter Parameter name or position
* @return \TokenReflection\ReflectionParameter
* @throws \TokenReflection\Exception\RuntimeException If there is no parameter of the given name.
* @throws \TokenReflection\Exception\RuntimeException If there is no parameter at the given position.
*/
public function getParameter($parameter)
{
if (is_numeric($parameter)) {
if (!isset($this->parameters[$parameter])) {
throw new Exception\RuntimeException(sprintf('There is no parameter at position "%d".', $parameter), Exception\RuntimeException::DOES_NOT_EXIST, $this);
}
return $this->parameters[$parameter];
} else {
foreach ($this->parameters as $reflection) {
if ($reflection->getName() === $parameter) {
return $reflection;
}
}
throw new Exception\RuntimeException(sprintf('There is no parameter "%s".', $parameter), Exception\RuntimeException::DOES_NOT_EXIST, $this);
}
}
/**
* Returns parameters.
*
* @return array
*/
public function getParameters()
{
return $this->parameters;
}
/**
* Returns the number of parameters.
*
* @return integer
*/
public function getNumberOfParameters()
{
return count($this->parameters);
}
/**
* Returns the number of required parameters.
*
* @return integer
*/
public function getNumberOfRequiredParameters()
{
$count = 0;
array_walk($this->parameters, function(ReflectionParameter $parameter) use (&$count) {
if (!$parameter->isOptional()) {
$count++;
}
});
return $count;
}
/**
* Returns static variables.
*
* @return array
*/
public function getStaticVariables()
{
if (empty($this->staticVariables) && !empty($this->staticVariablesDefinition)) {
foreach ($this->staticVariablesDefinition as $variableName => $variableDefinition) {
$this->staticVariables[$variableName] = Resolver::getValueDefinition($variableDefinition, $this);
}
}
return $this->staticVariables;
}
/**
* Returns an element pretty (docblock compatible) name.
*
* @return string
*/
public function getPrettyName()
{
return $this->name . '()';
}
/**
* Creates aliases to parameters.
*
* @throws \TokenReflection\Exception\RuntimeException When called on a ReflectionFunction instance.
*/
protected final function aliasParameters()
{
if (!$this instanceof ReflectionMethod) {
throw new Exception\RuntimeException('Only method parameters can be aliased.', Exception\RuntimeException::UNSUPPORTED, $this);
}
foreach ($this->parameters as $index => $parameter) {
$this->parameters[$index] = $parameter->alias($this);
}
}
/**
* Parses if the function/method returns its value as reference.
*
* @param \TokenReflection\Stream\StreamBase $tokenStream Token substream
* @return \TokenReflection\ReflectionFunctionBase
* @throws \TokenReflection\Exception\ParseException If could not be determined if the function\method returns its value by reference.
*/
final protected function parseReturnsReference(Stream $tokenStream)
{
if (!$tokenStream->is(T_FUNCTION)) {
throw new Exception\ParseException($this, $tokenStream, 'Could not find the function keyword.', Exception\ParseException::UNEXPECTED_TOKEN);
}
$tokenStream->skipWhitespaces(true);
$type = $tokenStream->getType();
if ('&' === $type) {
$this->returnsReference = true;
$tokenStream->skipWhitespaces(true);
} elseif (T_STRING !== $type) {
throw new Exception\ParseException($this, $tokenStream, 'Unexpected token found.', Exception\ParseException::UNEXPECTED_TOKEN);
}
return $this;
}
/**
* Parses the function/method name.
*
* @param \TokenReflection\Stream\StreamBase $tokenStream Token substream
* @return \TokenReflection\ReflectionMethod
* @throws \TokenReflection\Exception\ParseException If the class name could not be determined.
*/
final protected function parseName(Stream $tokenStream)
{
$this->name = $tokenStream->getTokenValue();
$tokenStream->skipWhitespaces(true);
return $this;
}
/**
* Parses child reflection objects from the token stream.
*
* @param \TokenReflection\Stream\StreamBase $tokenStream Token substream
* @param \TokenReflection\IReflection $parent Parent reflection object
* @return \TokenReflection\ReflectionElement
*/
final protected function parseChildren(Stream $tokenStream, IReflection $parent)
{
return $this
->parseParameters($tokenStream)
->parseStaticVariables($tokenStream);
}
/**
* Parses function/method parameters.
*
* @param \TokenReflection\Stream\StreamBase $tokenStream Token substream
* @return \TokenReflection\ReflectionFunctionBase
* @throws \TokenReflection\Exception\ParseException If parameters could not be parsed.
*/
final protected function parseParameters(Stream $tokenStream)
{
if (!$tokenStream->is('(')) {
throw new Exception\ParseException($this, $tokenStream, 'Could find the start token.', Exception\ParseException::UNEXPECTED_TOKEN);
}
static $accepted = array(T_NS_SEPARATOR => true, T_STRING => true, T_ARRAY => true, T_CALLABLE => true, T_VARIABLE => true, '&' => true);
$tokenStream->skipWhitespaces(true);
while (null !== ($type = $tokenStream->getType()) && ')' !== $type) {
if (isset($accepted[$type])) {
$parameter = new ReflectionParameter($tokenStream, $this->getBroker(), $this);
$this->parameters[] = $parameter;
}
if ($tokenStream->is(')')) {
break;
}
$tokenStream->skipWhitespaces(true);
}
$tokenStream->skipWhitespaces();
return $this;
}
/**
* Parses static variables.
*
* @param \TokenReflection\Stream\StreamBase $tokenStream Token substream
* @return \TokenReflection\ReflectionFunctionBase
* @throws \TokenReflection\Exception\ParseException If static variables could not be parsed.
*/
final protected function parseStaticVariables(Stream $tokenStream)
{
$type = $tokenStream->getType();
if ('{' === $type) {
if ($this->getBroker()->isOptionSet(Broker::OPTION_PARSE_FUNCTION_BODY)) {
$tokenStream->skipWhitespaces(true);
while ('}' !== ($type = $tokenStream->getType())) {
switch ($type) {
case T_STATIC:
$type = $tokenStream->skipWhitespaces(true)->getType();
if (T_VARIABLE !== $type) {
// Late static binding
break;
}
while (T_VARIABLE === $type) {
$variableName = $tokenStream->getTokenValue();
$variableDefinition = array();
$type = $tokenStream->skipWhitespaces(true)->getType();
if ('=' === $type) {
$type = $tokenStream->skipWhitespaces(true)->getType();
$level = 0;
while ($tokenStream->valid()) {
switch ($type) {
case '(':
case '[':
case '{':
case T_CURLY_OPEN:
case T_DOLLAR_OPEN_CURLY_BRACES:
$level++;
break;
case ')':
case ']':
case '}':
$level--;
break;
case ';':
case ',':
if (0 === $level) {
break 2;
}
default:
break;
}
$variableDefinition[] = $tokenStream->current();
$type = $tokenStream->skipWhitespaces(true)->getType();
}
if (!$tokenStream->valid()) {
throw new Exception\ParseException($this, $tokenStream, 'Invalid end of token stream.', Exception\ParseException::READ_BEYOND_EOS);
}
}
$this->staticVariablesDefinition[substr($variableName, 1)] = $variableDefinition;
if (',' === $type) {
$type = $tokenStream->skipWhitespaces(true)->getType();
} else {
break;
}
}
break;
case T_FUNCTION:
// Anonymous function -> skip to its end
if (!$tokenStream->find('{')) {
throw new Exception\ParseException($this, $tokenStream, 'Could not find beginning of the anonymous function.', Exception\ParseException::UNEXPECTED_TOKEN);
}
// Break missing intentionally
case '{':
case '[':
case '(':
case T_CURLY_OPEN:
case T_DOLLAR_OPEN_CURLY_BRACES:
$tokenStream->findMatchingBracket()->skipWhitespaces(true);
break;
default:
$tokenStream->skipWhitespaces();
break;
}
}
} else {
$tokenStream->findMatchingBracket();
}
} elseif (';' !== $type) {
throw new Exception\ParseException($this, $tokenStream, 'Unexpected token found.', Exception\ParseException::UNEXPECTED_TOKEN);
}
return $this;
}
}
|
lekster/md_new
|
new/libraries/common/TokenReflection/ReflectionFunctionBase.php
|
PHP
|
mit
| 11,596
|
module BetfairApiNgRails
module Api
module Parsers
class ListEvents < Api::Parsers::ListBase
private
def data_class
Api::Data::EventResult
end
end
end
end
end
|
alterego-labs/betfair_api_ng_rails
|
lib/betfair_api_ng_rails/api/parsers/list_events.rb
|
Ruby
|
mit
| 218
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>higman-cf: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.10.2 / higman-cf - 8.6.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
higman-cf
<small>
8.6.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-01-09 17:44:16 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-09 17:44:16 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
coq 8.10.2 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.05.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0 Official 4.05.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/higman-cf"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/HigmanCF"]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.7~"}
]
tags: [
"keyword: Higman's lemma"
"keyword: extraction"
"category: Mathematics/Combinatorics and Graph Theory"
"category: Miscellaneous/Extracted Programs/Combinatorics"
]
authors: [ "Stefan Berghofer" ]
bug-reports: "https://github.com/coq-contribs/higman-cf/issues"
dev-repo: "git+https://github.com/coq-contribs/higman-cf.git"
synopsis: "A direct constructive proof of Higman's Lemma"
description: """
This development formalizes in Coq the Coquand-Friedlender proof of
Higman's lemma for a two-letter alphabet.
An efficient program can be extracted from the proof."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/higman-cf/archive/v8.6.0.tar.gz"
checksum: "md5=da619ecd7a965fd5f44a94f7390ceef4"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-higman-cf.8.6.0 coq.8.10.2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.10.2).
The following dependencies couldn't be met:
- coq-higman-cf -> coq < 8.7~ -> ocaml < 4.03.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-higman-cf.8.6.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.05.0-2.0.1/released/8.10.2/higman-cf/8.6.0.html
|
HTML
|
mit
| 7,039
|
require 'subexec/notifications'
|
customink/subexec-notifications
|
lib/subexec-notifications.rb
|
Ruby
|
mit
| 32
|
# Load the rails application.
require File.expand_path('../application', __FILE__)
# Initialize the rails application.
Cookinme::Application.initialize!
|
MarsBased/cookinme
|
config/environment.rb
|
Ruby
|
mit
| 154
|
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="jquery.fast-reader.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Droid+Sans+Mono" rel="stylesheet" type="text/css">
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link href='jquery.fast-reader.min.css' rel='stylesheet' type='text/css'>
<style>
#text
{
background-color: ghostwhite;
width: 80%;
padding: 10px 20px;
margin: 0 auto;
margin-top: 10px;
}
button#fastreader-init
{
margin: 0 auto;
display: block;
}
</style>
</head>
<body>
<button id="fastreader-init">START FASTREADER</button>
<div id="text">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam a efficitur est. Pellentesque et erat tempus, tristique ex at, interdum purus. Proin tempor sodales luctus. Donec interdum ullamcorper magna, ut hendrerit lorem molestie vel. Phasellus eget lectus vehicula, faucibus nulla a, rutrum quam. Nunc ut lobortis sem. Aliquam efficitur nec sapien a semper. Etiam vel mollis elit, at condimentum ante. Mauris ultricies, eros sit amet commodo ornare, ligula turpis feugiat lacus, ultrices pellentesque enim diam nec justo.</p>
<p>Donec neque dolor, ornare non metus eget, ultrices egestas elit. Aliquam eget auctor nisi. Praesent accumsan mauris et ante bibendum, ac luctus nunc volutpat. Donec mollis vulputate ultricies. Mauris vel consequat quam. Ut a interdum ligula, quis posuere ex. Duis porttitor ultrices massa, in lobortis augue eleifend nec. Nullam cursus velit diam, a pharetra sapien eleifend et. In sollicitudin, est et efficitur placerat, est nisl pharetra mi, non semper lectus diam ac ligula.</p>
<p>Nam aliquam vestibulum lorem sit amet finibus. Nunc placerat a purus et sollicitudin. Praesent ligula nibh, ultricies et sodales a, laoreet ut odio. Nulla condimentum convallis eros, eget aliquet nisi efficitur in. Cras vel dignissim nisl, mattis vulputate orci. Curabitur egestas nulla id posuere auctor. Nam hendrerit efficitur magna quis convallis. Integer vel erat dolor.</p>
<p>Sed varius, felis sed ullamcorper hendrerit, leo orci viverra odio, at pharetra diam sem volutpat est. Vestibulum dignissim, erat eget semper scelerisque, libero diam venenatis ex, at cursus risus odio eu tortor. Praesent augue massa, vehicula eget libero eget, fringilla commodo nisl. Vivamus sagittis id neque at aliquet. Fusce euismod ligula vitae leo suscipit fringilla. Morbi rhoncus diam ac lacus gravida interdum. Pellentesque fringilla at tellus at facilisis. Praesent quis erat vitae nunc varius molestie. Fusce tempor ex mauris, ut iaculis diam scelerisque sit amet. Nulla laoreet diam mauris, convallis luctus magna fringilla a. Quisque vestibulum erat dui.</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce ultrices diam ornare, venenatis risus id, accumsan tellus. Phasellus nec urna consectetur, ullamcorper dolor quis, fermentum nisl. Quisque interdum metus elit, a gravida nisl rhoncus quis. Phasellus congue, tortor at hendrerit sagittis, arcu justo elementum mauris, in sodales nisi ex ac tellus. Morbi pretium purus turpis, non feugiat lorem molestie ut. Sed ac neque sit amet mauris aliquet tempor. Cras ligula risus, imperdiet et pellentesque quis, finibus sed erat. Quisque tristique metus arcu, condimentum pharetra velit ultricies at. Cras sit amet fringilla nisi. Aenean quis risus maximus, placerat mi a, tincidunt tellus. Morbi imperdiet dolor quis urna vestibulum, a suscipit ipsum imperdiet. Suspendisse id elementum nibh, ac tempus neque. Vivamus vel ipsum sem. Aenean hendrerit mauris at mi commodo, at pharetra eros pharetra.</p>
</div>
<script>
$(document).ready(function() {
$("button#fastreader-init").click(function(){
$("#text").fastreader();
});
});
</script>
</body>
</html>
|
frikinside/jquery.fast-reader
|
demo/demo.html
|
HTML
|
mit
| 4,035
|
(function() {
$(function() {
$.getHash = function(url) {
if (url) {
return url.substring(url.indexOf("#") + 1);
} else {
return window.location.hash;
}
};
/* ```javascript
unless Modernizr.input.placeholder
$("input").each ->
$(this).placeholder() unless $(this).attr("placeholder") is ""
```
*/
$.fn.placeholder = function() {
var emptyMe, fullMe;
$(this).data("placeholder", $(this).attr("placeholder"));
$(this).val(jQuery(this).attr("placeholder"));
emptyMe = function() {
$(this).data("placeholder", $(this).val());
return $(this).val("");
};
fullMe = function() {
if ($(this).val() === "") {
return $(this).val($(this).data("placeholder"));
}
};
$(this).on("focus", emptyMe);
$(this).on("blur", fullMe);
return $(this);
};
$.fn.hoverSrc = function(on_, off_) {
var hoverIn, hoverOut, suffixeOff, suffixeOn;
suffixeOn = (on_ ? on_ : "-hover");
suffixeOff = (off_ ? off_ : "-off");
hoverIn = function() {
var srcName;
if (!$(this).hasClass("active")) {
srcName = $(this).attr("src");
srcName = srcName.replace(suffixeOff, suffixeOn);
return $(this).attr({
src: srcName
});
}
};
hoverOut = function() {
var srcName;
if (!$(this).hasClass("active")) {
srcName = $(this).attr("src");
srcName = srcName.replace(suffixeOn, suffixeOff);
return $(this).attr({
src: srcName
});
}
};
$(this).each(function() {
$(this).bind("focus mouseenter", hoverIn);
$(this).bind("blur mouseleave", hoverOut);
return (new Image()).src = $(this).attr("src").replace("-off", "-hover");
});
return $(this);
};
$.fn.fixToTop = function(gap, steps) {
var $that, fix, free, offSet, origin, originOffSet, step, stepsClasses;
$that = $(this);
origin = (gap ? $that[0].offsetTop + gap : $that[0].offsetTop);
originOffSet = parseFloat($that.next().css("marginTop"));
offSet = parseFloat($that.height()) + parseFloat($that.next().css("marginTop"));
/* If steps option is found, listen to scroll to set classes for each step
```JavaScript
steps:
"className": offsetValue
```
*/
if (steps) {
stepsClasses = "";
for (step in steps) {
stepsClasses += ' ' + step;
}
$(window).scroll(function() {
var _results;
_results = [];
for (step in steps) {
if ($that.css("visibility") !== "hidden" && $(window).scrollTop() > steps[step]) {
_results.push($that.removeClass(stepsClasses).addClass(step));
} else {
_results.push(void 0);
}
}
return _results;
});
}
$(window).scroll(function() {
if ($that.css("visibility") !== "hidden" && $(window).scrollTop() > origin) {
return fix();
} else {
return free();
}
});
fix = function() {
if (!$that.hasClass("fixed")) {
offSet = parseFloat($that.height()) + parseFloat($that.next().css("marginTop"));
$that.addClass("fixed");
return $that.next().css("marginTop", offSet + "px");
}
};
free = function() {
$that.removeClass("fixed");
return $that.next().css("marginTop", originOffSet + "px");
};
return $(this);
};
$.fn.pulldown = function() {
var $buttons, $items, $list;
$list = $(this);
$items = $list.children();
$buttons = $items.find("> *:first-child");
$items.addClass("close");
$buttons.addClass("pulldownButton");
$buttons.unbind(" click");
$buttons.bind("click", function(e) {
return e.preventDefault();
});
$items.children().not($buttons).addClass("pulldownContent");
$items.data("state", 0);
$items.on("click", function(e) {
var $item;
e.preventDefault();
$item = $(this);
if ($item.data("state")) {
return $item.data("state", 0).addClass("close");
} else {
$item.data("state", 1).removeClass("close");
return $items.not($item).data("state", 0).addClass("close");
}
});
$list.data("pulldown", 1);
return $(this);
};
$.fn.backToTop = function(gap) {
var $that;
$that = $(this);
gap = (gap ? gap : 0);
$(this).off("click");
$(this).on("click", function(e) {
e.preventDefault();
return $("html").scrollTo(0, {
duration: 800
});
});
$(this).off("backToTop.scroll");
$(this).on("backToTop.scroll", function() {
if ($(window).scrollTop() >= gap) {
return $that.fadeIn();
} else {
return $that.fadeOut();
}
});
if (!$(this).data("backToTop")) {
$(window).scroll(function() {
return $that.trigger("backToTop.scroll");
});
}
$(this).data("backToTop", 1);
return $(this);
};
return $.fn.smoothAnchors = function(offsetTop, screenOffset) {
var $anchors, anchorsOffsets, anchorsOffsetsLength, lastExecution, timeWindow;
$anchors = $(this).find("a[href*=\"#c\"]");
anchorsOffsets = [];
offsetTop = (offsetTop ? offsetTop : 50);
screenOffset = (screenOffset ? screenOffset : $(window).height() / 6);
$anchors.each(function() {
return anchorsOffsets.push($("#" + $.getHash($(this).attr("href"))).offset().top);
});
anchorsOffsetsLength = anchorsOffsets.length;
$anchors.unbind("click");
$anchors.click(function(e) {
e.preventDefault();
return $("html").scrollTo($("#" + $.getHash($(this).attr("href"))), {
offset: {
top: -offsetTop
},
duration: 800
});
});
timeWindow = 500;
lastExecution = new Date((new Date()).getTime());
$(window).scroll(function(e) {
var i, j, scrollTop;
if ((lastExecution.getTime() + timeWindow) <= (new Date()).getTime()) {
scrollTop = $(window).scrollTop() + offsetTop + screenOffset;
$anchors.removeClass("active");
i = 0;
while (i < anchorsOffsetsLength) {
j = i + 1;
if (scrollTop >= anchorsOffsets[i] && !anchorsOffsets[j]) {
$anchors.not($anchors[i]).removeClass("active");
$($anchors[i]).addClass("active");
lastExecution = new Date((new Date()).getTime());
return;
} else if (scrollTop >= anchorsOffsets[i] && scrollTop < anchorsOffsets[j]) {
$anchors.not($anchors[i]).removeClass("active");
$($anchors[i]).addClass("active");
lastExecution = new Date((new Date()).getTime());
return;
}
i++;
}
}
});
return $(this);
};
});
}).call(this);
//# sourceMappingURL=base.js.map
|
Gregcop1/test4u
|
content/themes/skin/assets/js/base.js
|
JavaScript
|
mit
| 7,240
|
# Roadmap
## [Unreleased]
### Change createdAt, and updatedAt field names to created_at and updated_at according to doctrine.orm.naming_strategy
### Update PHP to 5.6
* Last LTS version : See http://php.net/supported-versions.php
* Will be useful for Symfony 3 upgrade and depreciation resolution
### Fix remaining SF 2.x deprecations
* Accessing form type by its fully-qualified type class name instead string name
* Passing type instances to FormBuilder::add() by its fully-qualified type class name instead string name
* Use "constraints" with a Valid constraint instead of "cascade_validation" in form types.
* Use form option "entry_type" instead of "type"
* Replace "empty_value" option in types "choice", "date", ...by "placeholder".
Todo when this issue https://github.com/schmittjoh/JMSTranslationBundle/issues/228 will be resolved
### Fix BDD tests
### Use "php-http/httplug" instead abandonned "egeloen/http-adapter" package in CocoricoGeoBundle
* Wait merge of this PR https://github.com/geocoder-php/Geocoder/pull/487
### Architecture evolution
* Decoupling
* Modularity
* ...
### Fix bug:
* Double click on save availabilities pop-in
* Wait merge of WebProfilerBundle https://github.com/symfony/symfony/pull/18413
## [0.2.0] - 2016-04-06
### Update Symfony from 2.5 to 2.8 (see https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md)
* Update Symfony package to its last LTS version (2.8).
* Resolve depreciated warnings
### Update dependencies
|
doydoy44/doydoyPF
|
ROADMAP.md
|
Markdown
|
mit
| 1,575
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Login Page - Photon Admin Panel Theme</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/favicon.ico"/>
<link rel="apple-touch-icon" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/iosicon.png"/>
<link rel="stylesheet" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/css/css_compiled/photon-min.css?v1.1" media="all"/>
<link rel="stylesheet" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/css/css_compiled/photon-min-part2.css?v1.1" media="all"/>
<link rel="stylesheet" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/css/css_compiled/photon-responsive-min.css?v1.1" media="all"/>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/css_compiled/ie-only-min.css?v1.1" />
<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="css/css_compiled/ie8-only-min.css?v1.1" />
<script type="text/javascript" src="js/plugins/excanvas.js"></script>
<script type="text/javascript" src="js/plugins/html5shiv.js"></script>
<script type="text/javascript" src="js/plugins/respond.min.js"></script>
<script type="text/javascript" src="js/plugins/fixFontIcons.js"></script>
<![endif]-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/modernizr.custom.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.pnotify.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/less-1.3.1.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/xbreadcrumbs.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.maskedinput-1.3.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.autotab-1.1b.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/charCount.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.textareaCounter.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/elrte.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/elrte.en.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/select2.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery-picklist.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.validate.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/additional-methods.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.form.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.metadata.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.mockjax.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.uniform.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.rating.pack.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/farbtastic.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.timeentry.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.jstree.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.mCustomScrollbar.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.flot.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.flot.stack.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.flot.pie.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.flot.resize.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/raphael.2.1.0.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/justgage.1.0.1.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.clock.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.countdown.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.jqtweet.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/jquery.cookie.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/bootstrap-fileupload.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/prettify/prettify.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/bootstrapSwitch.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/plugins/mfupload.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/js/common.js"></script>
</head>
<body class="body-login">
<div class="nav-fixed-topright" style="visibility: hidden">
<ul class="nav nav-user-menu">
<li class="user-sub-menu-container">
<a href="javascript:;">
<i class="user-icon"></i><span class="nav-user-selection">Theme Options</span><i class="icon-menu-arrow"></i>
</a>
<ul class="nav user-sub-menu">
<li class="light">
<a href="javascript:;">
<i class='icon-photon stop'></i>Light Version
</a>
</li>
<li class="dark">
<a href="javascript:;">
<i class='icon-photon stop'></i>Dark Version
</a>
</li>
</ul>
</li>
<li>
<a href="javascript:;">
<i class="icon-photon mail"></i>
</a>
</li>
<li>
<a href="javascript:;">
<i class="icon-photon comment_alt2_stroke"></i>
<div class="notification-count">12</div>
</a>
</li>
</ul>
</div>
<script>
$(function(){
setTimeout(function(){
$('.nav-fixed-topright').removeAttr('style');
}, 300);
$(window).scroll(function(){
if($('.breadcrumb-container').length){
var scrollState = $(window).scrollTop();
if (scrollState > 0) $('.nav-fixed-topright').addClass('nav-released');
else $('.nav-fixed-topright').removeClass('nav-released')
}
});
$('.user-sub-menu-container').on('click', function(){
$(this).toggleClass('active-user-menu');
});
$('.user-sub-menu .light').on('click', function(){
if ($('body').is('.light-version')) return;
$('body').addClass('light-version');
setTimeout(function() {
$.cookie('themeColor', 'light', {
expires: 7,
path: '/'
});
}, 500);
});
$('.user-sub-menu .dark').on('click', function(){
if ($('body').is('.light-version')) {
$('body').removeClass('light-version');
$.cookie('themeColor', 'dark', {
expires: 7,
path: '/'
});
}
});
});
</script>
<div class="container-login">
<div class="form-centering-wrapper">
<div class="form-window-login">
<div class="form-window-login-logo">
<div class="login-logo">
<img src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/images/photon/login-logo@2x.png" alt="Photon UI"/>
</div>
<h2 class="login-title">Welcome to Photon UI!</h2>
<div class="login-member">Not a Member? <a href="jquery.mCustomScrollbar.js.html#">Sign Up »</a>
<a href="jquery.mCustomScrollbar.js.html#" class="btn btn-facebook"><i class="icon-fb"></i>Login with Facebook<i class="icon-fb-arrow"></i></a>
</div>
<div class="login-or">Or</div>
<div class="login-input-area">
<form method="POST" action="dashboard.php">
<span class="help-block">Login With Your Photon Account</span>
<input type="text" name="email" placeholder="Email">
<input type="password" name="password" placeholder="Password">
<button type="submit" class="btn btn-large btn-success btn-login">Login</button>
</form>
<a href="jquery.mCustomScrollbar.js.html#" class="forgot-pass">Forgot Your Password?</a>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1936460-27']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
|
user-tony/photon-rails
|
lib/assets/images/photon/plugins/elrte/js/plugins/js/plugins/prettify/css/css_compiled/js/plugins/jquery.mCustomScrollbar.js.html
|
HTML
|
mit
| 14,468
|
---
layout: post
title: How to set up Google Hangouts on Air for Workshop Streaming
description: "Tips for remote teaching"
modified: 2016-03-29
tags: [teaching]
image:
feature: googlehangout-pic.png
credit:
creditlink:
comments: true
share: true
---
So you want to broadcast and archive a workshop (or something else) to the Internet?
I organize a lot of [training workshops](http://dib-training.readthedocs.org/en/pub/) for my job as a
Training Coordinator in Titus Brown's lab. Recently we've been broadcasting some of our workshops using
Google Hangouts on Air, which streams our lesson to YouTube and saves the video on the same page.
This post is a guide on how to set up the Hangouts, along with some tips I've learned. I'm happy to
take questions on this process as well!
### Done Before the Workshop
*Setting Up the Hangouts:*
1. Go to the [Hangouts on Air page](https://plus.google.com/hangouts/onair), click yellow "Create Hangout on Air" button. You also must make sure you have a verified YouTube account associated with the gmail account of the person hosting the hangout.
2. Give it a name, description (optional), click starts later and specify time to start. Helpfully,
the Hangout won't automatically start at that time, you still need to press the "Go Live" button in
the Hangout to start the streaming to YouTube, which you can do before or after the specified time.
Also, I always overestimate the duration of the Hangout, because you can end it at any time. So for
a three hour workshop I'll set it to five hours. If you set this too short, the streaming to YouTube
may stop early and that portion of the video will not be saved.
3. Under "Audience", delete "Public". This would allow anyone to join your Hangout on Air call.
Because we are recording lectures, we don't want people we don't know joining in and possibly
interrupting the lesson. I put the email address of another instructor here because it will
complain if that box is left blank.
4. Click "Share". This will take you to the Google+ page for the Hangout.
*To get the links:* Click "Start", and "Skip" on the Invite Guests pop up screen (though it doesn't
hurt anything to invite people because you are not streaming at this point). In the Hangout screen,
click "Links", and this will give you relevant links for the Hangout. Our lab only uses the YouTube
link here because our Hangout is private, so people can't join from the Google+ Hangout page anyway.
*To invite people:* In the Hangout screen, click the "Invite People" icon at the top center of the
screen. This will give you a pop up screen with the permanent sharing link. I've found that it is easiest
to send this link to whomever you want to join the Hangout instead of messing with giving people access
via email accounts.
#### Creating and Distributing Materials
Before the workshop, we will also make an Etherpad which allows remote sites or students in our own
classroom to ask questions (and of course serves as a collaborate note taking tool/place to post
code snippets). Once I have the YouTube link, I can go to that page and put the Etherpad and link to
our lesson materials in the video description. I used to tweet out the link to the Etherpad with the
YouTube link, but we would get spammers (I guess this is a thing?) posting text ads all over the
Etherpad. It is kind of fun to locate and delete spam as it happens, but maybe not the most conducive
to a learning environment.
#### Remote Sites
Remote classrooms have someone in charge of making sure questions get asked (or the instructor themselves)
as well as several helpers.
We'll do a tech test with remote sites to make sure that their video and audio are correctly working.
You can join the actual Hangout for the workshop (nothing is recorded until you hit "go live") or make
a test one.
#### During the Workshop
To make the Hangout live and stream it to YouTube, click the green "Start Broadcast" button at the
bottom of the Hangout screen. Before you start the broadcast, you can join and leave and invite others
who join and leave the hangout as many times as you want before starting the broadcast. An important point
is that you do **not** want to click "Stop Broadcast" before you are done. Once this is clicked, you can't
go back to streaming (to my knowledge). If this is accidentally done before the lesson is done, a new Hangout
needs to be created with a new YouTube link, which is a hassle and problematic for people watching the stream.
During the stream, the creator of the Hangout can click on the lecturer's screen to designate that it is
always displayed to everyone. If this isn't done, the screen will switch whenever another site talks into
their mic. All remote sites should have their mics muted until they want to ask a question to the lecturer.
Also, as the Hangout creator, you can adjust sound levels or mute mics in the "Control Room" within the
Hangout window, though I rarely have a reason to do this. The lecturer must click "Share Screen" in their
Hangout window.
We don't have live chat on the YouTube video itself because the majority of people in classrooms don't have
the YouTube video on their computers, and the Etherpad has worked very well for taking questions from people.
During the stream itself, people can leave and come back to the stream without an issue. We've had the lecturer
disconnect from the stream during a coffee break and reconnect back with no problem. The YouTube video will
display any other videos on the screen. Personally I try to put a message on the screen saying we will be back
either by sharing my own screen displaying text which says that, or the low-tech way of writing it on papers and
displaying it to the camera.
#### After the Workshop
The YouTube video remains in the same spot as the stream link. I change the video from "Unlisted" (the default
if you do a private Hangout, meaning only those with the link can view it) to "Public".
I used to spend a lot of time going back and putting time stamps in video descriptions for what happens when (like
[this](https://www.youtube.com/watch?v=eIrZjVH0Zcg) for example), but I don't know how helpful this is to people
if the lecture materials are already linked in the description.
#### Failure Modes
* We unfortunately had our awesome [d3.js workshop](https://www.youtube.com/watch?v=eIrZjVH0Zcg) stream taught by Emily Dolson as MSU get cut off early, though the Hangout continued to work fine. This was our first live streamed workshop, and my guess about why that happened is that the length of the Hangout was automatically specified to be a shorter amount of time than the workshop. Since then, I've always specified that the length of stream be much longer than necessary while setting it up and this problem hasn't occurred again. I also make sure to monitor the YouTube watch page to ensure it's still running correctly, though if anything went wrong, all I could do is make a new Hangout and YouTube stream.
* We have had poor internet connections result in less than stellar audio and video, or even cause an instructor to be dropped out of a stream (but they can rejoin when their connection returns!). A poor connection can also result in a blurry stream video, but it seems like the saved videos are sharper. There's not a great solution to this besides being connected via ethernet.
* We once had a remote site need to leave our lesson early because they were having a fire drill. Luckily, it was just a drill and they were able to finish the lesson by watching the video! Not much to prevent this problem expect maybe eliminating fires and the need for drills, which is unlikely.
#### Workshops we've one so far using this technique:
* [Short-read trimming and quality evaluation - half day workshop (Titus Brown)](https://www.youtube.com/watch?v=_nNq4kq1Wx0)
* [Amazon Web Services (Titus Brown)](https://www.youtube.com/watch?v=IFdBD3YdLJc)
* [Sphinx and Bitbucket (Adelaide Rhodes)](https://www.youtube.com/watch?v=ughHAjjM7Fc)
* [scipy.optimize (Ariel Rokem)](http://www.youtube.com/watch?v=0eFokR-ikaA)
* [Regular Expressions & Python (Tiffany Timbers)](https://www.youtube.com/watch?v=GklxBhgUR4g)
* [Advanced git (Raniere Silva)](https://www.youtube.com/watch?v=JTnIDMn47Pk&feature=youtu.be)
* [pydoit for Workflow Automation (Camille Scott)](http://www.youtube.com/watch?v=EfD9bWmL-1M&t=20m20s)
* [d3.js for Interactive Data Visualization (Emily Dolson)](https://www.youtube.com/watch?v=eIrZjVH0Zcg)
I won't update this list here, but additional videos and future streams (including an Advanced Beginner
Python from Titus and a Beginner and then Intermediate Git lesson from Daniel Chen) are posted on the
[DIB Training Workshop Page](http://dib-training.readthedocs.org/en/pub/). As always, materials from past
workshops are there as well for reference.
I hope this information is help to those wanting to stream lessons. I think this is a great tool for teaching, and I have emails from thankful people in my inbox to prove it!
|
jessicamizzi/jessicamizzi.github.io
|
_posts/2016-03-29-broadcast-hangouts.md
|
Markdown
|
mit
| 9,049
|
'use strict';
/**
* @ngdoc function
* @name anyandgoApp.controller:MemosNewCtrl
* @description
* # MemosNewCtrl
* Controller of the anyandgoApp
*/
angular.module('anyandgoApp')
.controller('MemosNewCtrl', function ($scope, $routeParams, PeopleService, $interval) {
if(typeof chatInterval !== 'undefined') {
//Cancel it
$interval.cancel(chatInterval);
}
var CKupdate = function(){
var instance;
for(instance in CKEDITOR.instances) {
CKEDITOR.instances[instance].updateElement();
}
CKEDITOR.instances[instance].setData('');
}
$scope.usersto = {};
var configS2 = {
placeholder: "Destinatarios...",
ajax: {
url : '/services/search/people/tags',
dataType: 'json',
quietMillis: 250,
data: function (term, page) {
return {
keyword: term
};
},
results: function (data, page) {
console.log(data);
return { results: data };
},
cache: true
},
tags:[],
//minimumInputLength: 3,
id: function(data){ return data._id; },
dropdownCssClass: "bigdrop",
initSelection: function(element, callback) {
//console.log(element, callback);
callback(data);
},
formatSelection: function(data) {
return data.name;
},
formatResult: function(data) {
var markup = '<div class="row-fluid">';
markup += data.name + " - " + data.email;
markup += '</div>';
return markup;
}
};
var usuario = $('#usuarios');
usuario.select2(configS2);
usuario.on('select2-selecting', function(e) {
//console.log(e);
});
// https://github.com/lemonde/angular-ckeditor
//$('#message').wysihtml5();
// Editor options.
$scope.options = {
language: 'en',
allowedContent: true,
entities: false
};
// Called when the editor is completely ready.
$scope.onReady = function () {
// ...
};
$scope.sendMemo = function (e) {
e.preventDefault();
e.stopPropagation();
// You cannot use double binding with hidden field.
// http://stackoverflow.com/questions/18446359/angularjs-does-not-send-hidden-field-value
PeopleService.sendMemo($('#usuarios').val(), $scope.memocontent).then(function(r){
// console.log(r.data);
// Clear the form
CKupdate();
$('#usuarios').select2('data',null);
});
};
});
|
cortezcristian/hermes
|
public/scripts/site/controllers/memosnew.js
|
JavaScript
|
mit
| 2,890
|
package org.demis.comics.data.jpa;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import java.util.Properties;
@Configuration
@PropertySource(value = {"classpath:comics.properties"})
@ComponentScan(basePackages = {"org.demis.comics.data.jpa"})
@EnableJpaRepositories
@EnableTransactionManagement
public class PersistenceJPAConfiguration {
@Autowired
private Environment environment;
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
em.setPackagesToScan("org.demis.comics.data.jpa.entity");
JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
em.setJpaVendorAdapter(vendorAdapter);
em.setJpaProperties(additionalProperties());
return em;
}
@Bean
public DataSource dataSource(){
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName(environment.getProperty("database.driver.class.name"));
dataSource.setUrl(environment.getProperty("database.url"));
dataSource.setUsername(environment.getProperty("database.username"));
dataSource.setPassword(environment.getProperty("database.password"));
return dataSource;
}
@Bean
public PlatformTransactionManager transactionManager(EntityManagerFactory emf){
JpaTransactionManager transactionManager = new JpaTransactionManager();
transactionManager.setEntityManagerFactory(emf);
return transactionManager;
}
Properties additionalProperties() {
Properties properties = new Properties();
properties.setProperty("hibernate.dialect", environment.getProperty("hibernate.dialect"));
properties.setProperty("hibernate.show_sql", "true");
return properties;
}
}
|
demis27/comics-blog
|
comics-blog-data/src/main/java/org/demis/comics/data/jpa/PersistenceJPAConfiguration.java
|
Java
|
mit
| 2,844
|
using Mantle.Hosting.Interfaces;
using Mantle.PhotoGallery.Processor.Worker.Workers;
using Ninject.Modules;
namespace Mantle.PhotoGallery.Processor.Console.Mantle.Profiles.Default
{
public class WorkerModule : NinjectModule
{
public override void Load()
{
Bind<IWorker>()
.To<ProcessorWorker>()
.InTransientScope();
}
}
}
|
caseywatson/Mantle
|
v1/Mantle/Mantle.PhotoGallery.Processor.Console/Mantle/Profiles/Default/WorkerModule.cs
|
C#
|
mit
| 405
|
<!DOCTYPE html>
<html lang="en">
<head>
<title>Users</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<base href="/users/" />
<link href="/desktop/libs/bootstrap/less/bootstrap.less.css/desktop/libs/bootstrap/theme/cosmo.less.css/desktop/house.less.css/users/index.less.css" rel="stylesheet">
<link rel="icon" href="/users/favicon.ico" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="apple-touch-startup-image" href="startup-splash.png" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content="initial-scale = 1.0, user-scalable = no" />
<link rel="apple-touch-icon-precomposed" href="iosicon.png"/>
</head>
<body class="loading">
<header class="navbar navbar-default navbar-fixed-top" role="banner">
<div class="">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".app-navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!--<form class="navbar-form navbar-left">-->
<!-- <button type="button" class="homeBtn glyphicon glyphicon-home btn navbar-left"> </button>-->
<!--</form>-->
<!--<a href="/posts/" class="pageTitle navbar-brand">Files</a>-->
<form class="navbar-form navbar-left">
<button type="button" class="homeBtn btn btn-link navbar-left"><span class="glyphicon glyphicon-user"></span><span class="sr-only">Files</span></button>
</form>
</div>
<nav class="collapse navbar-collapse app-navbar-collapse" role="navigation">
<form class="navbar-form navbar-left">
<fieldset id="navbar-header-form">
</fieldset>
</form>
<ul class="nav navbar-nav navbar-right" id="accountNav">
<!--- <li><a href="#">Link</a></li> -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span><b class="caret"></b></a>
<ul class="dropdown-menu" id="accountMenu"><li class="login"><a href="/join">Sign in</a></li><li class="feedback"><a href="/feedback">Feedback</a></li>
<!--- <li><a href="#">Action</a></li> -->
</ul>
</li>
</ul>
<i class="topbar-divider"></i>
<ul class="nav navbar-nav navbar-right" id="siteNav">
<!--- <li><a href="#">Link</a></li> -->
</ul>
</nav>
</div>
</header>
<div id="loading">
<div class="progress progress-striped active">
<div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
<div id="welcome"></div>
<script type="text/javascript" src="/desktop/require.js"></script>
<!--<script type="text/javascript" src="/desktop/require.js?/users/index.js/desktop/socket.io.min.js/desktop/underscore.js/desktop/backbone.js/desktop/backbone-house.js/desktop/utils.js/account/account.js/clock/clock.js/desktop/nav.js/files/backbone-files.js/desktop/swipeview.js/posts/backbone-posts.js/posts/wysihtml-parser_rules.js/posts/wysihtml5-0.4.0pre.min.js/posts/posts.js"></script>-->
<script type="text/javascript">
require(['/users/index.js'], function(index){
index.init(function(app){
window.app = app;
$('body').removeClass('loading');
});
});
</script>
</body>
</html>
|
mathiasbynens/house
|
apps/html5os/users/index.html
|
HTML
|
mit
| 4,341
|
#ifndef GLOBAL_H
#define GLOBAL_H
#include "head.h"
// open file and store the content to a string
string
textToString(string file);
// judge if it is a blank character
bool
isWhite(const char &c);
// show error message
void
error(string msg);
// string = ""
void
clear(string &s);
// int = 0
void
clear(int &a);
int
lengthOfNum(int a);
// int to string
string
intToString(int a);
#endif
|
luosch/AQL-subset-compiler
|
src/global.h
|
C
|
mit
| 431
|
<div class="commune_descr limited">
<p>
Les Autels-Saint-Bazile est
un village
situé dans le département des Calvados en Basse-Normandie. Elle totalisait 45 habitants en 2008.</p>
<p>Le parc de logements, à Les Autels-Saint-Bazile, se décomposait en 2011 en zero appartements et 42 maisons soit
un marché plutôt équilibré.</p>
<p>À proximité de Les Autels-Saint-Bazile sont positionnées géographiquement les villes de
<a href="{{VLROOT}}/immobilier/breviere_14105/">La Brévière</a> à 4 km, 117 habitants,
<a href="{{VLROOT}}/immobilier/chapelle-haute-grue_14153/">La Chapelle-Haute-Grue</a> à 3 km, 40 habitants,
<a href="{{VLROOT}}/immobilier/saint-ouen-le-houx_14638/">Saint-Ouen-le-Houx</a> située à 5 km, 77 habitants,
<a href="{{VLROOT}}/immobilier/mesnil-bacley_14414/">Le Mesnil-Bacley</a> située à 5 km, 209 habitants,
<a href="{{VLROOT}}/immobilier/crouttes_61139/">Crouttes</a> à 2 km, 285 habitants,
<a href="{{VLROOT}}/immobilier/saint-germain-de-montgommery_14583/">Saint-Germain-de-Montgommery</a> localisée à 3 km, 158 habitants,
entre autres. De plus, Les Autels-Saint-Bazile est située à seulement 23 km de <a href="{{VLROOT}}/immobilier/lisieux_14366/">Lisieux</a>.</p>
<p>Si vous pensez venir habiter à Les Autels-Saint-Bazile, vous pourrez aisément trouver une maison à acheter. </p>
</div>
|
donaldinou/frontend
|
src/Viteloge/CoreBundle/Resources/descriptions/14029.html
|
HTML
|
mit
| 1,432
|
package mcjty.rftools.blocks.builder;
import mcjty.rftools.hud.HudRenderer;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class BuilderRenderer extends TileEntitySpecialRenderer<BuilderTileEntity> {
@Override
public void render(BuilderTileEntity te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
super.render(te, x, y, z, partialTicks, destroyStage, alpha);
if (BuilderConfiguration.showProgressHud.get()) {
HudRenderer.renderHud(te, x, y, z);
}
}
public static void register() {
ClientRegistry.bindTileEntitySpecialRenderer(BuilderTileEntity.class, new BuilderRenderer());
}
}
|
McJty/RFTools
|
src/main/java/mcjty/rftools/blocks/builder/BuilderRenderer.java
|
Java
|
mit
| 902
|
/* CHANGE THESE STYLES TO FURTHER CUSTOMIZE THE DEFAULT APPEARANCE OF YOUR ROBOT*/
#robot
{
display: inline-block;
position: absolute;
bottom: 0;
left: 40px;
width: 40px;
height: 60px;
background-color: blue;
border: solid 2px black;
}
table , tr , td
{
border:1px solid #000000;
border-collapse: collapse;
padding: 3em 1em 3em 1em;
background-color: white
}
table {
width:0px;
height:100px;
margin : 10px;
color:#F1A9A0;
}
td {
width:25px;
height:25px;
}
td:hover{
background-color: #FDE3A7;
}
/* CHANGE THESE STYLES TO FURTHER CUSTOMIZE THE DEFAULT APPEARANCE OF YOUR ROBOT*/
}
h2
{
font-family:Courier;
color:white;
}
|
JamesBarnesBCX/Portfolios2016-Code4CT
|
portfolios/american-corner/saarrah/stylesheets/custom.css
|
CSS
|
mit
| 666
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0036)http://../Darwin/Coral Reefs -->
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>Coral Reefs: Title</title>
<meta content="text/html; charset=iso-8859-1" http-equiv=
"Content-Type">
<meta content="MSHTML 5.00.2919.6307" name="GENERATOR">
<style type="text/css">
body { color: blue;
background: #FFFFE0
font: Garamond, "Times New Roman", serif;
font-size: 12pt;
}
p { text-align: justify;
color: blue;
}
p.intro { margin-left: 5%;
margin-right: 5%;
font-size: 10pt;
}
p.page { color: black;
font-style: italic;
text-align: center;
}
p.capt { color: black;
font-family: arial, sans-serif;
font-size: 9pt;
margin-left: 5%;
margin-right: 5%;
}
p.fnote {
color: black;
font-size: 9pt;
}
p.fnote2 { color: black;
font-size: 8pt;
}
p.quote { color: blue;
font-size: 10pt;
}
p.rt { text-align: right; }
sup { font-size: 9pt;
color: black;
}
table { color: black;
font-size: 9pt;
}
</style>
</head>
<body>
<center>
<h1>CORAL REEFS</h1>
<br>
by<br>
<h3>CHARLES DARWIN</h3>
</center>
<p> </p>
<hr align="center" width="30%">
<p> </p>
<center>
<h4>CONTENTS</h4>
<br>
C<small>RITICAL</small> I<small>NTRODUCTION</small> <a href=
"#page 3"><i>Page 3</i></a><br>
I<small>NTRODUCTION</small> <a href="#page 11"><i>Page 11</i></a></center>
<br>
<br>
<center><b>Chapter I<br>
<br>
ATOLLS OR LAGOON-ISLANDS.</b><br>
<br>
<i>Section I</i>—DESCRIPTION OF KEELING ATOLL.</center>
<p class="intro">Corals on the outer margin.—Zone of
Nulliporæ.—Exterior
reef.—Islets.—Coral-conglomerate.—Lagoon.—Calcareous
sediment.—Scari and Holuthuriæ subsisting on
corals.—Changes in the condition of the reefs and
islets.—Probable subsidence of the atoll.—Future state
of the lagoon. <a href="#page 15"><i>Page 15</i></a></p>
<br>
<center><i>Section II</i>—GENERAL DESCRIPTION OF
ATOLLS.</center>
<p class="intro">General form and size of atolls, their reefs and
islets.—External slope.—Zone of
Nulliporæ.—Conglomerate.—Depth of lagoons.—
Sediment.—Reefs submerged wholly or in part.—Breaches
in the reef.—Ledge-formed shores round certain
lagoons.—Conversion of lagoons into land. <a href="#page 24">
<i>Page 24</i></a></p>
<br>
<center><i>Section III</i>—ATOLLS OF THE MALDIVA
ARCHIPELAGO—GREAT CHAGOS BANK.</center>
<p class="intro">Maldiva Archipelago.—Ring-formed reefs,
marginal and central.—Great depths in the lagoons of the
southern atolls.—Reefs in the lagoons all rising to the
surface.—Position of islets and breaches in the reefs, with
respect to the prevalent winds and action of the
waves.—Destruction of islets.—Connection in the
position and submarine foundation of distinct atolls.—The
apparent disseverment of large atolls.—The Great Chagos
Bank.—Its submerged condition and extraordinary structure. <a
href="#page 33"><i>Page 33</i></a></p>
<br>
<center><b>Chapter II<br>
<br>
BARRIER REEFS.</b></center>
<br>
<p class="intro">Closely resemble in general form and structure
atoll-reefs.—Width and depth of the
lagoon-channels.—Breaches through the reef in front of
valleys, and generally on the leeward side.—Checks to the
filling up of the lagoon-channels.—Size and constitution of
the encircled islands.—Number of islands within the same
reef.—Barrier-reefs of New Caledonia and
Australia.—Position of the reef relative to the slope of the
adjoining land.—Probable great thickness of barrier-reefs. <a
href="#page 38"><i>Page 38</i></a></p>
<br>
<center><b>Chapter III<br>
<br>
FRINGING OR SHORE-REEFS.</b></center>
<br>
<p class="intro">Reefs of Mauritius.—Shallow channel within
the reef.—Its slow filling up.—Currents of water formed
within it.—Upraised reefs.—Narrow fringing-reefs in
deep seas.—Reefs on the coast of E. Africa and of
Brazil.—Fringing-reefs in very shallow seas, round banks of
sediment and on worn-down islands.—Fringing-reefs affected by
currents of the sea.—Coral coating the bottom of the sea, but
not forming reefs. <a href="#page 45"><i>Page 45</i></a></p>
<br>
<center><b>Chapter IV<br>
<br>
ON THE DISTRIBUTION AND GROWTH OF CORAL-REEFS.</b></center>
<br>
<center><i>Section I</i>—ON THE DISTRIBUTION OF CORAL-REEFS,
AND ON THE CONDITIONS FAVOURABLE TO THEIR INCREASE. <a href=
"#page 50"><i>Page 50</i></a><br>
<br>
<i>Section II</i>—ON THE RATE OF GROWTH OF CORAL-REEFS. <a
href="#page 57"><i>Page 57</i></a><br>
<br>
<i>Section III</i>—ON THE DEPTHS AT WHICH REEF-BUILDING
POLYPIFERS CAN LIVE. <a href="#page 63"><i>Page 63</i></a></center>
<br>
<br>
<center><b>Chapter V<br>
<br>
THEORY OF THE FORMATION OF THE DIFFERENT CLASSES OF<br>
CORAL-REEFS.</b></center>
<br>
<p class="intro">The atolls of the larger archipelagoes are not
formed on submerged craters, or on banks of sediment.—Immense
areas interspersed with atolls.—Recent changes in their
state.—The origin of barrier-reefs and of atolls.—
Their relative forms.—The step-formed ledges and walls round
the shores of some lagoons.—The ring-formed reefs of the
Maldiva atolls.—The submerged condition of parts or of the
whole of some annular reefs.—The disseverment of large
atolls.—The union of atolls by linear reefs.—The Great
Chagos Bank.—Objections, from the area and amount of
subsidence required by the theory, considered.—The probable
composition of the lower parts of atolls. <a href="#page 69"><i>
Page 69</i></a></p>
<br>
<br>
<center><b>Chapter VI<br>
<br>
ON THE DISTRIBUTION OF CORAL-REEFS WITH REFERENCE TO THE THEORY OF
THEIR FORMATION.</b></center>
<br>
<p class="intro">Description of the coloured map.—Proximity
of atolls and barrier- reefs.—Relation in form and position
of atolls with ordinary islands.—Direct evidence of
subsidence difficult to be detected.—Proofs of recent
elevation where fringing-reefs occur.—Oscillations of
level.— Absence of active volcanoes in the areas of
subsidence.—Immensity of the areas which have been elevated
and have subsided.—Their relation to the present distribution
of the land.—Areas of subsidence elongated, their
intersection and alternation with those of elevation.—Amount
and slow rate of the subsidence.—Recapitulation. <a href=
"#page 89"><i>Page 89</i></a></p>
<br>
<br>
<center><b>Appendix</b></center>
<p>Containing a detailed description of the reefs and islands in
Plate III. <a href="#page 111"><i>Page 111</i></a></p>
<br>
<br>
<center><a href="#index"><b>Index</b></a></center>
<p> </p>
<hr>
<p> </p>
<center><font size="+1">THE STRUCTURE AND DISTRIBUTION<br>
OF CORAL REEFS.</font></center>
<p> </p>
<hr>
<p class="page"><a name="page 3">page 3</a></p>
<p> </p>
<center><b>CRITICAL INTRODUCTION</b></center>
<p>A scientific discovery is the outcome of an interesting process
of evolution in the mind of its author. When we are able to detect
the germs of thought in which such a discovery has originated, and
to trace the successive stages of the reasoning by which the crude
idea has developed into an epoch-making book, we have the materials
for reconstructing an important chapter of scientific history. Such
a contribution to the story of the "making of science" may be
furnished in respect to Darwin's famous theory of coral-reefs, and
the clearly reasoned treatise in which it was first fully set
forth.</p>
<p>The subject of corals and coral-reefs is one concerning which
much popular misconception has always prevailed. The misleading
comparison of coral-rock with the combs of bees and the nests of
wasps is perhaps responsible for much of this misunderstanding; one
writer has indeed described a coral-reef as being "built by fishes
by means of their teeth." Scarcely less misleading, however, are
the references we so frequently meet with, both in prose and verse,
to the "skill," "industry," and "perseverance" of the
"coral-insect" in "building" his "home." As well might we praise
men for their cleverness in making their own skeletons, and laud
their assiduity in filling churchyards with the same. The polyps
and other organisms, whose remains accumulate to form a coral-reef,
simply live and perform their natural functions, and then die,
leaving behind them, in the natural course of events, the hard
calcareous portions of their structures to add to the growing
reef.</p>
<p>While the forms of coral-reefs and coral-islands are sometimes
very remarkable and worthy of attentive study, there is no ground,
it need scarcely be added, for the suggestion that they afford
proofs of design on the part of the living builders, or that, in
the</p>
<p> </p>
<hr>
<p class="page"><a name="page 4">page 4</a></p>
<p> </p>
<p>words of Flinders, they constitute breastworks, defending the
workshops from whence "infant colonies might be safely sent
forth."</p>
<p>It was not till the beginning of the present century that
travellers like Beechey, Chamisso, Quoy and Gaimard, Moresby,
Nelson, and others, began to collect accurate details concerning
the forms and structure of coral- masses, and to make such
observations on the habits of reef-forming polyps, as might serve
as a basis for safe reasoning concerning the origin of coral-reefs
and islands. In the second volume of Lyell's "Principles of
Geology," published in 1832, the final chapter gives an admirable
summary of all that was then known on the subject. At that time,
the ring- form of the atolls was almost universally regarded as a
proof that they had grown up on submerged volcanic craters; and
Lyell gave his powerful support to that theory.</p>
<p>Charles Darwin was never tired of acknowledging his indebtedness
to Lyell. In dedicating to his friend the second edition of his
"Naturalist's Voyage Round the World," Darwin writes that he does
so "with grateful pleasure, as an acknowledgment that the chief
part of whatever scientific merit this journal and the other works
of the author may possess, has been derived from studying the
well-known and admirable 'Principles of Geology.'"</p>
<p>The second volume of Lyell's "Principles" appeared after Darwin
had left England; but it was doubtless sent on to him without delay
by his faithful friend and correspondent, Professor Henslow. It
appears to have reached Darwin at a most opportune moment, while,
in fact, he was studying the striking evidences of slow and
long-continued, but often interrupted movement on the west coast of
South America. Darwin's acute mind could not fail to detect the
weakness of the then prevalent theory concerning the origin of the
ring-shaped atolls—and the difficulty which he found in
accepting the volcanic theory, as an explanation of the phenomena
of coral-reefs, is well set forth in his book.</p>
<p>In an interesting fragment of autobiography, Darwin has given us
a very clear account of the way in which the leading idea of the
theory of coral-reefs originated in his mind; he writes, "No other
work of mine was begun in so deductive a spirit as this, for the
whole theory was thought out on the west coast of South America,
before I had seen a true coral-reef. I had therefore only to verify
and extend my views by a careful examination of living reefs. But
it should be observed that I had during the two previous years been
incessantly attending to the effects on the</p>
<p> </p>
<hr>
<p class="page"><a name="page 5">page 5</a></p>
<p> </p>
<p>shores of South America of the intermittent elevation of the
land, together with the denudation and deposition of sediment. This
necessarily led me to reflect much on the effects of subsidence,
and it was easy to replace in imagination the continued deposition
of sediment by the upward growth of corals. To do this was to form
my theory of the formation of barrier-reefs and atolls."</p>
<p>On her homeward voyage, the <i>Beagle</i> visited Tahiti,
Australia, and some of the coral-islands in the Indian Ocean, and
Darwin had an opportunity of testing and verifying the conclusion
at which he had arrived by studying the statements of other
observers.</p>
<p>I well recollect a remarkable conversation I had with Darwin,
shortly after the death of Lyell. With characteristic modesty, he
told me that he never fully realised the importance of his theory
of coral-reefs till he had an opportunity of discussing it with
Lyell, shortly after the return of the <i>Beagle</i>. Lyell, on
receiving from the lips of its author a sketch of the new theory,
was so overcome with delight that he danced about and threw himself
into the wildest contortions, as was his manner when excessively
pleased. He wrote shortly afterwards to Darwin as follows:—"I
could think of nothing for days after your lesson on coral-reefs,
but of the tops of submerged continents. It is all true, but do not
flatter yourself that you will be believed till you are growing
bald like me, with hard work and vexation at the incredulity of the
world." On May 24th, 1837, Lyell wrote to Sir John Herschel as
follows:—"I am very full of Darwin's new theory of
coral-islands, and have urged Whewell to make him read it at our
next meeting. I must give up my volcanic crater forever, though it
cost me a pang at first, for it accounted for so much." Dr. Whewell
was president of the Geological Society at the time, and on May
31st, 1837, Darwin read a paper entitled "On Certain Areas of
Elevation and Subsidence in the Pacific and Indian oceans, as
deduced from the Study of Coral Formations," an abstract of which
appeared in the second volume of the Society's proceedings.</p>
<p>It was about this time that Darwin, having settled himself in
lodgings at Great Marlborough Street, commenced the writing of his
book on "Coral-Reefs." Many delays from ill-health and the
interruption of other work, caused the progress to be slow, and his
journal speaks of "recommencing" the subject in February 1839,
shortly after his marriage, and again in October of the same year.
In July 1841, he states that he began once more "after more than
thirteen month's interval," and the last proof- sheet of</p>
<p> </p>
<hr>
<p class="page"><a name="page 6">page 6</a></p>
<p> </p>
<p>the book was not corrected till May 6th, 1842. Darwin writes in
his autobiography, "This book, though a small one, cost me twenty
months of hard work, as I had to read every work on the islands of
the Pacific, and to consult many charts." The task of elaborating
and writing out his books was, with Darwin, always a very slow and
laborious one; but it is clear that in accomplishing the work now
under consideration, there was a long and constant struggle with
the lethargy and weakness resulting from the sad condition of his
health at that time.</p>
<p>Lyell's anticipation that the theory of coral-reefs would be
slow in meeting with general acceptance was certainly not justified
by the actual facts. On the contrary the new book was at once
received with general assent among both geologists and zoologists,
and even attracted a considerable amount of attention from the
general public.</p>
<p>It was not long before the coral-reef theory of Darwin found an
able exponent and sturdy champion in the person of the great
American naturalist, Professor James D. Dana. Two years after the
return of the <i>Beagle</i> to England, the ships of the United
States Exploring Expedition set sail upon their four years' cruise,
under the command of Captain Wilkes, and Dana was a member of the
scientific staff. When, in 1839, the expedition arrived at Sydney,
a newspaper paragraph was found which gave the American naturalist
the first intimation of Darwin's new theory of the origin of atolls
and barrier-reefs. Writing in 1872, Dana describes the effect
produced on his mind by reading this passage:—"The paragraph
threw a flood of light over the subject, and called forth feelings
of peculiar satisfaction, and of gratefulness to Mr. Darwin, which
still come up afresh whenever the subject of coral islands is
mentioned. The Gambier Islands in the Paumotus, which gave him the
key to the theory, I had not seen; but on reaching the Feejees, six
months later, in 1840, I found there similar facts on a still
grander scale and of a more diversified character, so that I was
afterward enabled to speak of his theory as established with more
positiveness than he himself, in his philosophic caution, had been
ready to adopt. His work on coral-reefs appeared in 1842, when my
report on the subject was already in manuscript. It showed that the
conclusions on other points, which we had independently reached,
were for the most part the same. The principal points of difference
relate to the reason for the absence of corals from some coasts,
and the evidence therefrom as to changes of level, and the
distribution of the oceanic regions of</p>
<p> </p>
<hr>
<p class="page"><a name="page 7">page 7</a></p>
<p> </p>
<p>elevation and subsidence—topics which a wide range of
travel over the Pacific brought directly and constantly to my
attention."</p>
<p>Among the Reports of the United States Exploring Expedition, two
important works from the pen of Professor Dana made their
appearance;—one on "Zoophytes," which treats at length on
"Corals and Coral-Animals," and the other on "Coral-Reefs and
Islands." In 1872, Dana prepared a work of a more popular character
in which some of the chief results of his studies are described; it
bore the title of "Corals and Coral-Islands." Of this work, new and
enlarged editions appeared in 1874 and 1890 in America, while two
editions were published in this country in 1872 and 1875. In all
these works their author, while maintaining an independent judgment
on certain matters of detail, warmly defends the views of Darwin on
all points essential to the theory.</p>
<p>Another able exponent and illustrator of the theory of
coral-reefs was found in Professor J. B. Jukes, who accompanied
H.M.S. <i>Fly</i>, as naturalist, during the survey of the Great
Barrier-Reef—in the years 1842 to 1846. Jukes, who was a man
of great acuteness as well as independence of mind, concludes his
account of the great Australian reefs with the following
words:—"After seeing much of the Great Barrier-Reefs, and
reflecting much upon them, and trying if it were possible by any
means to evade the conclusions to which Mr. Darwin has come, I
cannot help adding that his hypothesis is perfectly satisfactory to
my mind, and rises beyond a mere hypothesis into the true theory of
coral-reefs."</p>
<p>As the result of the clear exposition of the subject by Darwin,
Lyell, Dana, and Jukes, the theory of coral-reefs had, by the
middle of the present century, commanded the almost universal
assent of both biologists and geologists. In 1859 Baron von
Richthofen brought forward new facts in its support, by showing
that the existence of the thick masses of dolomitic limestone in
the Tyrol could be best accounted for if they were regarded as of
coralline origin and as being formed during a period of long
continued subsidence. The same views were maintained by Professor
Mojsisovics in his "Dolomit-riffe von Südtirol und Venetien,"
which appeared in 1879.</p>
<p>The first serious note of dissent to the generally accepted
theory was heard in 1863, when a distinguished German naturalist,
Dr. Karl Semper, declared that his study of the Pelew Islands
showed that uninterrupted subsidence could not have been going on
in that region. Dr. Semper's objections were very carefully</p>
<p> </p>
<hr>
<p class="page"><a name="page 8">page 8</a></p>
<p> </p>
<p>considered by Mr. Darwin, and a reply to them appeared in the
second and revised edition of his "Coral- Reefs," which was
published in 1874. With characteristic frankness and freedom from
prejudice, Darwin admitted that the facts brought forward by Dr.
Semper proved that in certain specified cases, subsidence could not
have played the chief part in originating the peculiar forms of the
coral- islands. But while making this admission, he firmly
maintained that exceptional cases, like those described in the
Pelew Islands, were not sufficient to invalidate the theory of
subsidence as applied to the widely spread atolls, encircling
reefs, and barrier-reefs of the Pacific and Indian Oceans. It is
worthy of note that to the end of his life Darwin maintained a
friendly correspondence with Semper concerning the points on which
they were at issue.</p>
<p>After the appearance of Semper's work, Dr. J. J. Rein published
an account of the Bermudas, in which he opposed the interpretation
of the structure of the islands given by Nelson and other authors,
and maintained that the facts observed in them are opposed to the
views of Darwin. Although, so far as I am aware, Darwin had no
opportunity of studying and considering these particular
objections, it may be mentioned that two American geologists have
since carefully re-examined the district—Professor W. N. Rice
in 1884 and Professor A. Heilprin in 1889—and they have
independently arrived at the conclusion that Dr. Rein's objections
cannot be maintained.</p>
<p>The most serious opposition to Darwin's coral-reef theory,
however, was that which developed itself after the return of H.M.S.
<i>Challenger</i> from her famous voyage. Mr. John Murray, one of
the staff of naturalists on board that vessel, propounded a new
theory of coral-reefs, and maintained that the view that they were
formed by subsidence was one that was no longer tenable; these
objections have been supported by Professor Alexander Agassiz in
the United States, and by Dr. A. Geikie, and Dr. H. B. Guppy in
this country.</p>
<p>Although Mr. Darwin did not live to bring out a third edition of
his "Coral-Reefs," I know from several conversations with him that
he had given the most patient and thoughtful consideration to Mr.
Murray's paper on the subject. He admitted to me that had he known,
when he wrote his work, of the abundant deposition of the remains
of calcareous organisms on the sea floor, he might have regarded
this cause as sufficient in a few cases to raise the summits of
submerged volcanoes or other mountains</p>
<p> </p>
<hr>
<p class="page"><a name="page 9">page 9</a></p>
<p> </p>
<p>to a level at which reef-forming corals can commence to
flourish. But he did not think that the admission that under
certain favourable conditions, atolls might be thus formed without
subsidence, necessitated an abandonment of his theory in the case
of the innumerable examples of the kind which stud the Indian and
Pacific Oceans.</p>
<p>A letter written by Darwin to Professor Alexander Agassiz in May
1881 shows exactly the attitude which careful consideration of the
subject led him to maintain towards the theory propounded by Mr.
Murray:—"You will have seen," he writes, "Mr. Murray's views
on the formation of atolls and barrier-reefs. Before publishing my
book, I thought long over the same view, but only as far as
ordinary marine organisms are concerned, for at that time little
was known of the multitude of minute oceanic organisms. I rejected
this view, as from the few dredgings made in the <i>Beagle</i>, in
the south temperate regions, I concluded that shells, the smaller
corals, etc., decayed and were dissolved when not protected by the
deposition of sediment, and sediment could not accumulate in the
open ocean. Certainly, shells, etc., were in several cases
completely rotten, and crumbled into mud between my fingers; but
you will know whether this is in any degree common. I have
expressly said that a bank at the proper depth would give rise to
an atoll, which could not be distinguished from one formed during
subsidence. I can, however, hardly believe in the existence of as
many banks (there having been no subsidence) as there are atolls in
the great oceans, within a reasonable depth, on which minute
oceanic organisms could have accumulated to the depth of many
hundred feet."</p>
<p>Darwin's concluding words in the same letter written within a
year of his death, are a striking proof of the candour and openness
of mind which he preserved so well to the end, in this as in other
controversies.</p>
<p>"If I am wrong, the sooner I am knocked on the head and
annihilated so much the better. It still seems to me a marvellous
thing that there should not have been much, and long-continued,
subsidence in the beds of the great oceans. I wish some doubly rich
millionaire would take it into his head to have borings made in
some of the Pacific and Indian atolls, and bring home cores for
slicing from a depth of 500 or 600 feet."</p>
<p>It is noteworthy that the objections to Darwin's theory have for
the most part proceeded from zoologists, while those who have fully
appreciated the geological aspect of the question, have been</p>
<p> </p>
<hr>
<p class="page"><a name="page 10">page 10</a></p>
<p> </p>
<p>the staunchest supporters of the theory of subsidence. The
desirability of such boring operations in atolls has been insisted
upon by several geologists, and it may be hoped that before many
years have passed away, Darwin's hopes may be realised, either with
or without the intervention of the "doubly rich millionaire."</p>
<p>Three years after the death of Darwin, the veteran Professor
Dana re-entered the lists and contributed a powerful defence of the
theory of subsidence in the form of a reply to an essay written by
the ablest exponent of the anti-Darwinian views on this subject,
Dr. A. Geikie. While pointing out that the Darwinian position had
been to a great extent misunderstood by its opponents, he showed
that the rival theory presented even greater difficulties than
those which it professed to remove.</p>
<p>During the last five years, the whole question of the origin of
coral-reefs and islands has been re-opened, and a controversy has
arisen, into which, unfortunately, acrimonious elements have been
very unnecessarily introduced. Those who desire it, will find clear
and impartial statements of the varied and often mutually
destructive views put forward by different authors, in three works
which have made their appearance within the last year,—"The
Bermuda Islands," by Professor Angelo Heilprin; "Corals and
Coral-Islands," new edition by Professor J. D. Dana; and the third
edition of Darwin's "Coral-Reefs," with Notes and Appendix by
Professor T. G. Bonney.</p>
<p>Most readers will, I think, rise from the perusal of these works
with the conviction that, while on certain points of detail it is
clear that, through the want of knowledge concerning the action of
marine organisms in the open ocean, Darwin was betrayed into some
grave errors, yet the main foundations of his argument have not
been seriously impaired by the new facts observed in the deep-sea
researches, or by the severe criticism to which his theory has been
subjected during the last ten years. On the other hand, I think it
will appear that much misapprehension has been exhibited by some of
Darwin's critics, as to what his views and arguments really were;
so that the reprint and wide circulation of the book in its
original form is greatly to be desired, and cannot but be attended
with advantage to all those who will have the fairness to acquaint
themselves with Darwin's views at first hand, before attempting to
reply to them.</p>
<p class="rt">J<small>OHN</small> W. J<small>UDD</small>.</p>
<p> </p>
<hr>
<p class="page"><a name="page 11">page 11</a></p>
<p> </p>
<center>
<h2>CORAL-REEFS</h2>
<hr align="CENTER" width="15%">
<br>
<b>INTRODUCTION</b></center>
<p>The object of this volume is to describe from my own observation
and the works of others, the principal kinds of coral-reefs, more
especially those occurring in the open ocean, and to explain the
origin of their peculiar forms. I do not here treat of the
polypifers, which construct these vast works, except so far as
relates to their distribution, and to the conditions favourable to
their vigorous growth. Without any distinct intention to classify
coral-reefs, most voyagers have spoken of them under the following
heads: "lagoon-islands," or "atolls," "barrier" or "encircling
reefs," and "fringing" or "shore-reefs." The lagoon- islands have
received much the most attention; and it is not surprising, for
every one must be struck with astonishment, when he first beholds
one of these vast rings of coral-rock, often many leagues in
diameter, here and there surmounted by a low verdant island with
dazzling white shores, bathed on the outside by the foaming
breakers of the ocean, and on the inside surrounding a calm expanse
of water, which from reflection, is of a bright but pale green
colour. The naturalist will feel this astonishment more deeply
after having examined the soft and almost gelatinous bodies of
these apparently insignificant creatures, and when he knows that
the solid reef increases only on the outer edge, which day and
night is lashed by the breakers of an ocean never at rest. Well did
François Pyrard de Laval, in the year 1605, exclaim, "C'est
une mérueille de voir chacun de ces atollons,
enuironné d'un grand banc de pierre tout autour, n'y ayant
point d'artifice humain." The accompanying sketch of Whitsunday
island, in the South Pacific, taken from Captain Beechey's
admirable "Voyage," although excellent of its kind, gives but a
faint idea of the singular aspect of one of these
lagoon-islands.</p>
<p>Whitsunday Island is of small size, and the whole circle has
been converted into land, which is a comparatively rare
circumstance. As the reef of a lagoon-island generally supports
many separate small islands, the word "island," applied to the
whole, is often the cause of confusion; hence I have invariably
used in this volume the term "atoll," which is the name given to
these circular groups of coral-islets by their</p>
<p> </p>
<hr>
<p class="page"><a name="page 12">page 12</a></p>
<p> </p>
<p>inhabitants in the Indian Ocean, and is synonymous with "lagoon-
island."</p>
<center><img src="images/p12a.jpg" width="539" height="231" alt=
"Whitsunday Island"></center>
<p>Barrier-reefs, when encircling small islands, have been
comparatively little noticed by voyagers; but they well deserve
attention. In their structure they are little less marvellous than
atolls, and they give a singular and most picturesque character to
the scenery of the islands they surround. In the accompanying
sketch, taken from the "Voyage of the <i>Coquille</i>," the reef is
seen from within, from one of the high peaks of the island of
Bolabola.<sup>1</sup> Here, as in Whitsunday Island, the whole of
that part of the reef which is visible is converted into land. This
is a circumstance of rare occurrence; more usually a snow-white
line of great breakers, with here and there an islet crowned by
cocoa-nut trees, separates the smooth waters of the lagoon-like
channel from the waves of the open sea. The barrier-reefs of
Australia and of New Caledonia, owing to their enormous dimensions,
have excited much attention: in structure and form they resemble
those encircling many of the smaller islands in the Pacific
Ocean.</p>
<center><img src="images/p12b.jpg" width="531" height="239" alt=
"Island of Bolabola"></center>
<p>With respect to fringing, or shore-reefs, there is little in
their structure which needs explanation; and their name expresses
their comparatively</p>
<p class="fnote">1. I have taken the liberty of simplifying the
foreground, and leaving out a mountainous island in the far
distance.</p>
<p> </p>
<hr>
<p class="page"><a name="page 13">page 13</a></p>
<p> </p>
<p>small extension. They differ from barrier-reefs in not lying so
far from the shore, and in not having within a broad channel of
deep water. Reefs also occur around submerged banks of sediment and
of worn-down rock; and others are scattered quite irregularly where
the sea is very shallow; these in most respects are allied to those
of the fringing class, but they are of comparatively little
interest.</p>
<p>I have given a separate chapter to each of the above classes,
and have described some one reef or island, on which I possessed
most information, as typical; and have afterwards compared it with
others of a like kind. Although this classification is useful from
being obvious, and from including most of the coral-reefs existing
in the open sea, it admits of a more fundamental division into
barrier and atoll-formed reefs on the one hand, where there is a
great apparent difficulty with respect to the foundation on which
they must first have grown; and into fringing- reefs on the other,
where, owing to the nature of the slope of the adjoining land,
there is no such difficulty. The two blue tints and the red
colour<sup>1</sup> on the map (Plate III), represent this main
division, as explained in the beginning of the last chapter. In the
Appendix, every existing coral-reef, except some on the coast of
Brazil not included in the map, is briefly described in
geographical order, as far as I possessed information; and any
particular spot may be found by consulting the Index.</p>
<p>Several theories have been advanced to explain the origin of
atolls or lagoon-islands, but scarcely one to account for
barrier-reefs. From the limited depths at which reef-building
polypifers can flourish, taken into consideration with certain
other circumstances, we are compelled to conclude, as it will be
seen, that both in atolls and barrier-reefs, the foundation on
which the coral was primarily attached, has subsided; and that
during this downward movement, the reefs have grown upwards. This
conclusion, it will be further seen, explains most satisfactorily
the outline and general form of atolls and barrier-reefs, and
likewise certain peculiarities in their structure. The
distribution, also, of the different kinds of coral-reefs, and
their position with relation to the areas of recent elevation, and
to the points subject to volcanic eruptions, fully accord with this
theory of their origin.<sup>2</sup></p>
<p class="fnote">1. Replaced by numbers in this edition.<br>
2. A brief account of my views on coral formations, now published
in my Journal of Researches, was read May 31st, 1837, before the
Geological Society, and an abstract has appeared in the
Proceedings.</p>
<p> </p>
<hr>
<p class="page"><a name="page 14">page 14</a></p>
<p> </p>
<p>In the several original surveys, from which the small plans on
this plate have been reduced, the coral-reefs are engraved in very
different styles. For the sake of uniformity, I have adopted the
style used in the charts of the Chagos Archipelago, published by
the East Indian Company, from the survey by Captain Moresby and
Lieutenant Powell. The surface of the reef, which dries at low
water, is represented by a surface with small crosses: the
coral-islets on the reef are marked by small linear spaces, on
which a few cocoa-nut trees, out of all proportion too large, have
been introduced for the sake of clearness. The entire <i>annular
reef</i>, which when surrounding an open expanse of water, forms an
"atoll," and when surrounding one or more high islands, forms an
encircling "barrier- reef," has a nearly uniform structure. The
reefs in some of the original surveys are represented merely by a
single line with crosses, so that their breadth is not given; I
have had such reefs engraved of the width usually attained by
coral-reefs. I have not thought it worth while to introduce all
those small and very numerous reefs, which occur within the lagoons
of most atolls and within the lagoon-channels of most
barrier-reefs, and which stand either isolated, or are attached to
the shores of the reef or land. At Peros Banhos none of the
lagoon-reefs rise to the surface of the water; a few of them have
been introduced, and are marked by plain dotted circles. A few of
the deepest soundings are laid down within each reef; they are in
fathoms, of six English feet.</p>
<p class="capt"><a name="Plate I"><i>Plate I</i></a>—Map
showing the resemblance in form between barrier coral-reefs
surrounding mountainous islands, and atolls or lagoon islands.</p>
<center><img src="images/plate1a.jpg" width="361" height="291" alt=
"Map showing the resemblance in form."></center>
<br>
<p class="capt">Fig. 1—V<small>ANIKORO</small>, situated in
the western part of the South Pacific; taken from the survey by
Captain D'Urville in the <i>Astrolabe</i>; the soundings on the
southern side of the island, namely, from thirty to forty fathoms,
are given from the voyage of the Chev. Dillon; the other soundings
are laid down from the survey by D'Urville; height of the summit of
the island is 3,032 feet. The principal small detached reefs within
the lagoon-channel have in this instance been represented. The
southern shore of the island is narrowly fringed by a reef: if the
engraver had carried this reef entirely round both islands, this
figure would have served (by leaving out in imagination the
barrier-reef) as a good specimen of an abruptly-sided island,
surrounded by a reef of the fringing class.</p>
<p class="capt">Fig. 2—H<small>OGOLEU</small>, or
R<small>OUG</small>, in the Caroline Archipelago; taken from the
"Atlas of the Voyage of the <i>Astrolabe,</i>" compiled from the
surveys of Captains Duperrey and D'Urville; the depth of the
immense lagoon- like space within the reef is not known.</p>
<p class="capt">Fig. 3—R<small>AIATEA</small>, in the Society
Archipelago; from the map given in the quarto edition of "Cook's
First Voyage;" it is probably not accurate.</p>
<p class="capt">Fig. 4—B<small>OW</small>, or H<small>EYOU
ATOLL</small> (or lagoon- island), in the Low Archipelago, from the
survey by Captain Beechey, R.N.; the lagoon is choked up with
reefs, but the average greatest depth of about twenty fathoms, is
given from the published account of the voyage.</p>
<p class="capt">Fig. 5—B<small>OLABOLA</small>, in the
Society Archipelago, from the survey of Captain Duperrey in the <i>
Coquille</i>: the soundings in this and the following figures have
been altered from French feet to English fathoms; height of highest
point of the island 4,026 feet.</p>
<center><img src="images/plate1b.jpg" width="395" height="396" alt=
"Map showing the resemblance in form."></center>
<br>
<p class="capt">Fig. 6.—M<small>AURUA</small>, in the Society
Archipelago; from the survey by Captain Duperrey in the <i>
Coquille</i>: height of land about eight hundred feet.</p>
<p class="capt">Fig. 7—P<small>OUYNIPÈTE</small>, or
S<small>ENIAVINE</small>, in the Caroline Archipelago; from the
survey by Admiral Lutké.</p>
<p class="capt">Fig. 8—G<small>AMBIER</small>
I<small>SLANDS</small>, in the southern part of the Low
Archipelago; from the survey by Captain Beechey; height of highest
island, 1,246 feet; the islands are surrounded by extensive and
irregular reefs; the reef on the southern side is submerged.</p>
<p class="capt">Fig. 9—P<small>EROS</small> B<small>ANHOS
ATOLL</small> (or lagoon- island), in the Chagos group in the
Indian Ocean; from the survey by Captain Moresby and Lieutenant
Powell; not nearly all the small submerged reefs in the lagoon are
represented; the annular reef on the southern side is
submerged.</p>
<p class="capt">Fig. 10—K<small>EELING</small>, or
C<small>OCOS ATOLL</small> (or lagoon-island), in the Indian Ocean;
from the survey by Captain Fitzroy; the lagoon south of the dotted
line is very shallow, and is left almost bare at low water; the
part north of the line is choked up with irregular reefs. The
annular reef on the north-west side is broken, and blends into a
shoal sandbank, on which the sea breaks.</p>
<p> </p>
<hr>
<p class="page"><a name="page 15">page 15</a></p>
<p> </p>
<center><b>Chapter I<br>
<br>
ATOLLS OR LAGOON-ISLANDS</b><br>
<br>
<i>Section I</i>—KEELING ATOLL</center>
<br>
<p class="intro">Corals on the outer margin.—Zone of
Nulliporæ.—Exterior reef.—
Islets.—Coral-conglomerate.—Lagoon.—Calcareous
sediment.—Scari and Holuthuriæ subsisting on
corals.—Changes in the condition of the reefs and
islets.—Probable subsidence of the atoll.—Future state
of the lagoon.</p>
<p>KEELING or COCOS atoll is situated in the Indian Ocean, in
12° 5' S., and longitude 90° 55' E.: a reduced chart of it
was made from the survey of Captain Fitzroy and the Officers of
H.M.S. <i>Beagle</i>, is given in <a href="#Plate I">Plate I</a>,
Fig. 10. The greatest width of this atoll is nine miles and a half.
Its structure is in most respects characteristic of the class to
which it belongs, with the exception of the shallowness of the
lagoon. The accompanying woodcut represents a vertical section,
supposed to be drawn at low water from the outer coast across one
of the low islets (one being taken of average dimensions) to within
the lagoon.</p>
<center><img src="images/keeling.jpg" width="443" height="93" alt=
"Vertical section of one of the low islets."></center>
<br>
<p class="capt">A.—Level of the sea at low water: where the
letter A is placed, the depth is twenty-five fathoms, and the
distance rather more than one hundred and fifty yards from the edge
of the reef.<br>
B.—Outer edge of that flat part of the reef, which dries at
low water: the edge either consists of a convex mound, as
represented, or of rugged points, like those a little farther
seaward, beneath the water.<br>
C.—A flat of coral-rock, covered at high water.<br>
D.—A low projecting ledge of brecciated coral-rock washed by
the waves at high water.<br>
E.—A slope of loose fragments, reached by the sea only
during gales: the upper part, which is from six to twelve feet
high, is clothed with vegetation. The surface of the islet gently
slopes to the lagoon.<br>
F.—Level of the lagoon at low water.</p>
<p>The section is true to the scale in a horizontal line, but it
could not be made so in a vertical one, as the average greatest
height of the land is only between six and twelve feet above
high-water mark.</p>
<p> </p>
<hr>
<p class="page"><a name="page 16">page 16</a></p>
<p> </p>
<p>I will describe the section, commencing with the outer margin. I
must first observe that the reef-building polypifers, not being
tidal animals, require to be constantly submerged or washed by the
breakers. I was assured by Mr. Liesk, a very intelligent resident
on these islands, as well as by some chiefs at Tahiti (Otaheite),
that an exposure to the rays of the sun for a very short time
invariably causes their destruction. Hence it is possible only
under the most favourable circumstances, afforded by an unusually
low tide and smooth water, to reach the outer margin, where the
coral is alive. I succeeded only twice in gaining this part, and
found it almost entirely composed of a living Porites, which forms
great irregularly rounded masses (like those of an Astræa,
but larger) from four to eight feet broad, and little less in
thickness. These mounds are separated from each other by narrow
crooked channels, about six feet deep, most of which intersect the
line of reef at right angles. On the furthest mound, which I was
able to reach by the aid of a leaping-pole, and over which the sea
broke with some violence, although the day was quite calm and the
tide low, the polypifers in the uppermost cells were all dead, but
between three and four inches lower down on its side they were
living, and formed a projecting border round the upper and dead
surface. The coral being thus checked in its upward growth, extends
laterally, and hence most of the masses, especially those a little
further inwards, had broad flat dead summits. On the other hand I
could see, during the recoil of the breakers, that a few yards
further seaward, the whole convex surface of the Porites was alive;
so that the point where we were standing was almost on the exact
upward and shoreward limit of existence of those corals which form
the outer margin of the reef. We shall presently see that there are
other organic productions, fitted to bear a somewhat longer
exposure to the air and sun.</p>
<p>Next, but much inferior in importance to the Porites, is the <i>
Millepora complanata.</i><sup>1</sup></p>
<p>It grows in thick vertical plates, intersecting each other at
various angles, and forms an exceedingly strong honeycombed mass,
which generally affects a circular form, the marginal plates alone
being alive. Between these plates and in the protected crevices on
the reef, a multitude of branching zoophytes and other productions
flourish, but the Porites and Millepora alone seem able to resist
the fury of the breakers on its upper and outer edge: at the depth
of a few fathoms other kinds of stony corals live. Mr. Liesk, who
was intimately acquainted with every part of this reef, and
likewise with that of North Keeling atoll, assured me that these
corals invariably compose the outer margin. The lagoon is inhabited
by quite a distinct set of corals, generally brittle and thinly
branched; but a Porites, apparently of the same species with that
on the outside, is found there, although it does not seem to
thrive, and certainly does not attain the thousandth part in bulk
of the masses opposed to the breakers.</p>
<p class="fnote">1. This Millepora (Palmipora of Blainville), as
well as the <i>M. alcicornis</i>, possesses the singular property
of stinging the skin where it is delicate, as on the face and
arm.</p>
<p> </p>
<hr>
<p class="page"><a name="page 17">page 17</a></p>
<p> </p>
<p>The woodcut shows the form of the bottom off the reef: the water
deepens for a space between one and two hundred yards wide, very
gradually to twenty-five fathoms (A in section), beyond which the
sides plunge into the unfathomable ocean at an angle of
45°.<sup>1</sup> To the depth of ten or twelve fathoms the
bottom is exceedingly rugged, and seems formed of great masses of
living coral, similar to those on the margin. The arming of the
lead here invariably came up quite clean, but deeply indented, and
chains and anchors which were lowered, in the hopes of tearing up
the coral, were broken. Many small fragments, however, of <i>
Millepora alcicornis</i> were brought up; and on the arming from an
eight- fathom cast, there was a perfect impression of an
Astræa, apparently alive. I examined the rolled fragments
cast on the beach during gales, in order further to ascertain what
corals grew outside the reef. The fragments consisted of many
kinds, of which the Porites already mentioned and a Madrepora,
apparently the <i>M. corymbosa</i>, were the most abundant. As I
searched in vain in the hollows on the reef and in the lagoon, for
a living specimen of this Madrepore, I conclude that it is confined
to a zone outside, and beneath the surface, where it must be very
abundant. Fragments of the <i>Millepora alcicornis</i> and of an
Astræa were also numerous; the former is found, but not in
proportionate numbers, in the hollows on the reef; but the
Astræa I did not see living. Hence we may infer, that these
are the kinds of coral which form the rugged sloping surface
(represented in the woodcut by an uneven line), round and beneath
the external margin. Between twelve and twenty fathoms the arming
came up an equal number of times smoothed with sand, and indented
with coral: an anchor and lead were lost at the respective depths
of thirteen and sixteen fathoms. Out of twenty-five soundings taken
at a greater depth than twenty fathoms, every one showed that the
bottom was covered with sand; whereas, at a less depth than twelve
fathoms, every sounding showed that it was exceedingly rugged, and
free from all extraneous particles. Two soundings were obtained at
the depth of 360 fathoms, and several between two hundred and three
hundred fathoms. The sand brought up from these depths consisted of
finely triturated fragments of stony zoophytes, but not, as far as
I could distinguish, of a particle of any lamelliform genus:
fragments of shells were rare.</p>
<p>At a distance of 2,200 yards from the breakers, Captain Fitzroy
found no bottom with a line of 7,200 feet in length; hence the
submarine slope of this coral formation is steeper than that of any
volcanic cone. Off the mouth of the lagoon, and likewise off the
northern point of the atoll, where the currents act violently, the
inclination, owing to the accumulation of sediment, is less. As the
arming of the lead from</p>
<p class="fnote">1. The soundings from which this section is laid
down were taken with great care by Captain Fitzroy himself. He used
a bell-shaped lead, having a diameter of four inches, and the
armings each time were cut off and brought on board for me to
examine. The arming is a preparation of tallow, placed in the
concavity at the bottom of the lead. Sand, and even small fragments
of rock, will adhere to it; and if the bottom be of rock it brings
up an exact impression of its surface.</p>
<p> </p>
<hr>
<p class="page"><a name="page 18">page 18</a></p>
<p> </p>
<p>all the greater depths showed a smooth sandy bottom, I at first
concluded that the whole consisted of a vast conical pile of
calcareous sand, but the sudden increase of depth at some points,
and the circumstance of the line having been cut, as if rubbed,
when between five hundred and six hundred fathoms were out,
indicate the probable existence of submarine cliffs.</p>
<p>On the margin of the reef, close within the line where the upper
surface of the Porites and of the Millepora is dead, three species
of Nullipora flourish. One grows in thin sheets, like a lichen on
old trees; the second in stony knobs, as thick as a man's finger,
radiating from a common centre; and the third, which is less
common, in a moss-like reticulation of thin, but perfectly rigid
branches. The three species occur either separately or mingled
together; and they form by their successive growth a layer two or
three feet in thickness, which in some cases is hard, but where
formed of the lichen-like kind, readily yields an impression to the
hammer: the surface is of a reddish colour. These Nulliporæ,
although able to exist above the limit of true corals, seem to
require to be bathed during the greater part of each tide by
breaking water, for they are not found in any abundance in the
protected hollows on the back part of the reef, where they might be
immersed either during the whole or an equal proportional time of
each tide. It is remarkable that organic productions of such
extreme simplicity, for the Nulliporæ undoubtedly belong to
one of the lowest classes of the vegetable kingdom, should be
limited to a zone so peculiarly circumstanced. Hence the layer
composed by their growth merely fringes the reef for a space of
about twenty yards in width, either under the form of separate
mammillated projections, where the outer masses of coral are
separate, or, more commonly, where the corals are united into a
solid margin, as a continuous smooth convex mound (B in woodcut),
like an artificial breakwater. Both the mound and mammillated
projections stand about three feet higher than any other part of
the reef, by which term I do not include the islets, formed by the
accumulation of rolled fragments. We shall hereafter see that other
coral reefs are protected by a similar thick growth of
Nulliporæ on the outer margin, the part most exposed to the
breakers, and this must effectually aid in preserving it from being
worn down.</p>
<p>The woodcut represents a section across one of the islets on the
reef, but if all that part which is above the level of C were
removed, the section would be that of a simple reef, as it occurs
where no islet has been formed. It is this reef which essentially
forms the atoll. It is a ring, enclosing the lagoon on all sides
except at the northern end, where there are two open spaces,
through one of which ships can enter. The reef varies in width from
two hundred and fifty to five</p>
<p class="fnote">1. This last species is of a beautiful bright
peach-blossom colour. Its branches are about as thick as crow-
quills; they are slightly flattened and knobbed at the extremities.
The extremities only are alive and brightly coloured. The two other
species are of a dirty purplish-white. The second species is
extremely hard; its short knob- like branches are cylindrical, and
do not grow thicker at their extremities.</p>
<p> </p>
<hr>
<p class="page"><a name="page 19">page 19</a></p>
<p> </p>
<p>hundred yards, its surface is level, or very slightly inclined
towards the lagoon, and at high tide the sea breaks entirely over
it: the water at low tide thrown by the breakers on the reef, is
carried by the many narrow and shoal gullies or channels on its
surface, into the lagoon: a return stream sets out of the lagoon
through the main entrance. The most frequent coral in the hollows
on the reef is <i>Pocillopora verrucosa</i>, which grows in short
sinuous plates, or branches, and when alive is of a beautiful pale
lake-red: a Madrepora, closely allied or identical with <i>M.
pocillifera</i>, is also common. As soon as an islet is formed, and
the waves are prevented breaking entirely over the reef, the
channels and hollows in it become filled up with cemented
fragments, and its surface is converted into a hard smooth floor (C
of woodcut), like an artificial one of freestone. This flat surface
varies in width from one hundred to two hundred, or even three
hundred yards, and is strewed with a few large fragments of coral
torn up during gales: it is uncovered only at low water. I could
with difficulty, and only by the aid of a chisel, procure chips of
rock from its surface, and therefore could not ascertain how much
of it is formed by the aggregation of detritus, and how much by the
outward growth of mounds of corals, similar to those now living on
the margin. Nothing can be more singular than the appearance at low
tide of this "flat" of naked stone, especially where it is
externally bounded by the smooth convex mound of Nulliporæ,
appearing like a breakwater built to resist the waves, which are
constantly throwing over it sheets of foaming water. The
characteristic appearance of this "flat" is shown in the foregoing
woodcut of Whitsunday atoll.</p>
<p>The islets on the reef are first formed between two hundred and
three hundred yards from its outer edge, through the accumulation
of a pile of fragments, thrown together by some unusually strong
gale. Their ordinary width is under a quarter of a mile, and their
length varies from a few yards to several miles. Those on the
south-east and windward side of the atoll, increase solely by the
addition of fragments on their outer side; hence the loose blocks
of coral, of which their surface is composed, as well as the shells
mingled with them, almost exclusively consist of those kinds which
live on the outer coast. The highest part of the islets (excepting
hillocks of blown sand, some of which are thirty feet high), is
close to the outer beach (E of the woodcut), and averages from six
to ten feet above ordinary high-water mark. From the outer beach
the surface slopes gently to the shores of the lagoon, which no
doubt has been caused by the breakers the further they have rolled
over the reef, having had less power to throw up fragments. The
little waves of the lagoon heap up sand and fragments of
thinly-branched corals on the inner side of the islets on the
leeward side of the atoll; and these islets are broader than those
to windward, some being even eight hundred yards in width; but the
land thus added is very low. The fragments beneath the surface are
cemented into a solid mass, which is exposed as a ledge (D of the
woodcut), projecting some yards in front of the outer shore and
from two to four feet high. This ledge is just reached by the waves
at ordinary high-</p>
<p> </p>
<hr>
<p class="page"><a name="page 20">page 20</a></p>
<p> </p>
<p>water: it extends in front of all the islets, and everywhere has
a water-worn and scooped appearance. The fragments of coral which
are occasionally cast on the "flat" are during gales of unusual
violence swept together on the beach, where the waves each day at
high-water tend to remove and gradually wear them down; but the
lower fragments having become firmly cemented together by the
percolation of calcareous matter, resist the daily tides longer,
and hence project as a ledge. The cemented mass is generally of a
white colour, but in some few parts reddish from ferruginous
matter; it is very hard, and is sonorous under the hammer; it is
obscurely divided by seams, dipping at a small angle seaward; it
consists of fragments of the corals which grow on the outer margin,
some quite and others partially rounded, some small and others
between two and three feet across; and of masses of previously
formed conglomerate, torn up, rounded, and re-cemented; or it
consists of a calcareous sandstone, entirely composed of rounded
particles, generally almost blended together, of shells, corals,
the spines of echini, and other such organic bodies; rocks, of this
latter kind, occur on many shores, where there are no coral reefs.
The structure of the coral in the conglomerate has generally been
much obscured by the infiltration of spathose calcareous matter;
and I collected a very interesting series, beginning with fragments
of unaltered coral, and ending with others, where it was impossible
to discover with the naked eye any trace of organic structure. In
some specimens I was unable, even with the aid of a lens, and by
wetting them, to distinguish the boundaries of the altered coral
and spathose limestone. Many even of the blocks of coral lying
loose on the beach, had their central parts altered and
infiltrated.</p>
<p>The lagoon alone remains to be described; it is much shallower
than that of most atolls of considerable size. The southern part is
almost filled up with banks of mud and fields of coral, both dead
and alive, but there are considerable spaces, between three and
four fathoms, and smaller basins, from eight to ten fathoms deep.
Probably about half its area consists of sediment, and half of
coral-reefs. The corals composing these reefs have a very different
aspect from those on the outside; they are very numerous in kind,
and most of them are thinly branched. Meandrina, however, lives in
the lagoon, and great rounded masses of this coral are numerous,
lying quite or almost loose on the bottom. The other commonest
kinds consist of three closely allied species of true Madrepora in
thin branches; of <i>Seriatapora subulata</i>; two species of
Porites<sup>1</sup> with cylindrical branches, one of which forms
circular clumps, with the exterior branches only alive; and lastly,
a coral something like an Explanaria, but with stars on both
surfaces, growing in thin, brittle, stony, foliaceous expansions,
especially in the deeper basins of the lagoon. The reefs on
which</p>
<p class="fnote">1. This Porites has somewhat the habit of <i>P.
clavaria</i>, but the branches are not knobbed at their ends. When
alive it is of a yellow colour, but after having been washed in
fresh water and placed to dry, a jet-black slimy substance exuded
from the entire surface, so that the specimen now appears as if it
had been dipped in ink.</p>
<p> </p>
<hr>
<p class="page"><a name="page 21">page 21</a></p>
<p> </p>
<p>these corals grow are very irregular in form, are full of
cavities, and have not a solid flat surface of dead rock, like that
surrounding the lagoon; nor can they be nearly so hard, for the
inhabitants made with crowbars a channel of considerable length
through these reefs, in which a schooner, built on the S.E. islet,
was floated out. It is a very interesting circumstance, pointed out
to us by Mr. Liesk, that this channel, although made less than ten
years before our visit, was then, as we saw, almost choked up with
living coral, so that fresh excavations would be absolutely
necessary to allow another vessel to pass through it.</p>
<p>The sediment from the deepest parts in the lagoon, when wet,
appeared chalky, but when dry, like very fine sand. Large soft
banks of similar, but even finer grained mud, occur on the S.E.
shore of the lagoon, affording a thick growth of a Fucus, on which
turtle feed: this mud, although discoloured by vegetable matter,
appears from its entire solution in acids to be purely calcareous.
I have seen in the Museum of the Geological Society, a similar but
more remarkable substance, brought by Lieutenant Nelson from the
reefs of Bermuda, which, when shown to several experienced
geologists, was mistaken by them for true chalk. On the outside of
the reef much sediment must be formed by the action of the surf on
the rolled fragments of coral; but in the calm waters of the
lagoon, this can take place only in a small degree. There are,
however, other and unexpected agents at work here: large shoals of
two species of Scarus, one inhabiting the surf outside the reef and
the other the lagoon, subsist entirely, as I was assured by Mr.
Liesk, the intelligent resident before referred to, by browsing on
the living polypifers. I opened several of these fish, which are
very numerous and of considerable size, and I found their
intestines distended by small pieces of coral, and finely ground
calcareous matter. This must daily pass from them as the finest
sediment; much also must be produced by the infinitely numerous
vermiform and molluscous animals, which make cavities in almost
every block of coral. Dr. J. Allan, of Forres, who has enjoyed the
best means of observation, informs me in a letter that the
Holothuriæ (a family of Radiata) subsist on living coral; and
the singular structure of bone within the anterior extremity of
their bodies, certainly appears well adapted for this purpose. The
number of the species of Holothuria, and of the individuals which
swarm on every part of these coral-reefs, is extraordinarily great;
and many shiploads are annually freighted, as is well-known, for
China with the trepang, which is a species of this genus. The
amount of coral yearly consumed, and ground down into the finest
mud, by these several creatures, and probably by many other kinds,
must be immense. These facts are, however, of more importance in
another point of view, as showing us that there are living checks
to the growth of coral-reefs, and that the almost universal law of
"consumed and be consumed," holds good even with the polypifers
forming those massive bulwarks, which are able to withstand the
force of the open ocean.</p>
<p>Considering that Keeling atoll, like other coral formations, has
been entirely formed by the growth of organic beings, and the
accumulation of their detritus, one is naturally led to inquire how
long it has</p>
<p> </p>
<hr>
<p class="page"><a name="page 22">page 22</a></p>
<p> </p>
<p>continued, and how long it is likely to continue, in its present
state. Mr. Liesk informed me that he had seen an old chart in which
the present long island on the S.E. side was divided by several
channels into as many islets; and he assures me that the channels
can still be distinguished by the smaller size of the trees on
them. On several islets, also, I observed that only young cocoa-nut
trees were growing on the extremities; and that older and taller
trees rose in regular succession behind them; which shows that
these islets have very lately increased in length. In the upper and
south- eastern part of the lagoon, I was much surprised by finding
an irregular field of at least a mile square of branching corals,
still upright, but entirely dead. They consisted of the species
already mentioned; they were of a brown colour, and so rotten, that
in trying to stand on them I sank halfway up the leg, as if through
decayed brushwood. The tops of the branches were barely covered by
water at the time of lowest tide. Several facts having led me to
disbelieve in any elevation of the whole atoll, I was at first
unable to imagine what cause could have killed so large a field of
coral. Upon reflection, however, it appeared to me that the closing
up of the above-mentioned channels would be a sufficient cause; for
before this, a strong breeze by forcing water through them into the
head of the lagoon, would tend to raise its level. But now this
cannot happen, and the inhabitants observe that the tide rises to a
less height, during a high S.E. wind, at the head than at the mouth
of the lagoon. The corals, which, under the former condition of
things, had attained the utmost possible limit of upward growth,
would thus occasionally be exposed for a short time to the sun, and
be killed.</p>
<p>Besides the increase of dry land, indicated by the foregoing
facts, the exterior solid reef appears to have grown outwards. On
the western side of the atoll, the "flat" lying between the margin
of the reef and the beach, is very wide; and in front of the
regular beach with its conglomerate basis, there is, in most parts,
a bed of sand and loose fragments with trees growing out of it,
which apparently is not reached even by the spray at high water. It
is evident some change has taken place since the waves formed the
inner beach; that they formerly beat against it with violence was
evident, from a remarkably thick and water-worn point of
conglomerate at one spot, now protected by vegetation and a bank of
sand; that they beat against it in the same peculiar manner in
which the swell from windward now obliquely curls round the margin
of the reef, was evident from the conglomerate having been worn
into a point projecting from the beach in a similarly oblique
manner. This retreat in the line of action of the breakers might
result, either from the surface of the reef in front of the islets
having been submerged at one time, and afterward having grown
upwards, or from the mounds of coral on the margin having continued
to grow outwards. That an outward growth of this part is in
process, can hardly be doubted from the fact already mentioned of
the mounds of Porites with their summits apparently lately killed,
and their sides only three or four inches lower down thickened by a
fresh layer of living coral. But there is a difficulty on this
supposition which I must not pass over. If the</p>
<p> </p>
<hr>
<p class="page"><a name="page 23">page 23</a></p>
<p> </p>
<p>whole, or a large part of the "flat," had been formed by the
outward growth of the margin, each successive margin would
naturally have been coated by the Nulliporæ, and so much of
the surface would have been of equal height with the existing zone
of living Nulliporæ: this is not the case, as may be seen in
the woodcut. It is, however, evident from the abraded state of the
"flat," with its original inequalities filled up, that its surface
has been much modified; and it is possible that the hinder portions
of the zone of Nulliporæ, perishing as the reef grows
outwards, might be worn down by the surf. If this has not taken
place, the reef can in no part have increased outwards in breadth
since its formation, or at least since the Nulliporæ formed
the convex mound on its margin; for the zone thus formed, and which
stands between two and three feet above the other parts of the
reef, is nowhere much above twenty yards in width.</p>
<p>Thus far we have considered facts, which indicate, with more or
less probability, the increase of the atoll in its different parts:
there are others having an opposite tendency. On the south-east
side, Lieutenant Sulivan, to whose kindness I am indebted for many
interesting observations, found the conglomerate projecting on the
reef nearly fifty yards in front of the beach: we may infer from
what we see in all other parts of the atoll, that the conglomerate
was not originally so much exposed, but formed the base of an
islet, the front and upper part of which has since been swept away.
The degree to which the conglomerate, round nearly the whole atoll,
has been scooped, broken up, and the fragments cast on the beach,
is certainly very surprising, even on the view that it is the
office of occasional gales to pile up fragments, and of the daily
tides to wear them away. On the western side, also, of the atoll,
where I have described a bed of sand and fragments with trees
growing out of it, in front of an old beach, it struck both
Lieutenant Sulivan and myself, from the manner in which the trees
were being washed down, that the surf had lately recommenced an
attack on this line of coast. Appearances indicating a slight
encroachment of the water on the land, are plainer within the
lagoon: I noticed in several places, both on its windward and
leeward shores, old cocoa-nut trees falling with their roots
undermined, and the rotten stumps of others on the beach, where the
inhabitants assured us the cocoa-nut could not now grow. Captain
Fitzroy pointed out to me, near the settlement, the foundation
posts of a shed, now washed by every tide, but which the
inhabitants stated, had seven years before stood above high
watermark. In the calm waters of the lagoon, directly connected
with a great, and therefore stable ocean, it seems very improbable
that a change in the currents, sufficiently great to cause the
water to eat into the land on all sides, should have taken place
within a limited period. From these considerations I inferred, that
probably the atoll had lately subsided to a small amount; and this
inference was strengthened by the circumstance, that in 1834, two
years before our visit, the island had been shaken by a severe
earthquake, and by two slighter ones during the ten previous years.
If, during these subterranean disturbances, the atoll did subside,
the downward movement must have been very small, as we must</p>
<p> </p>
<hr>
<p class="page"><a name="page 24">page 24</a></p>
<p> </p>
<p>conclude from the fields of dead coral still lipping the surface
of the lagoon, and from the breakers on the western shore not
having yet regained the line of their former action. The subsidence
must, also, have been preceded by a long period of rest, during
which the islets extended to their present size, and the living
margin of the reef grew either upwards, or as I believe outwards,
to its present distance from the beach.</p>
<p>Whether this view be correct or not, the above facts are worthy
of attention, as showing how severe a struggle is in progress on
these low coral formations between the two nicely balanced powers
of land and water. With respect to the future state of Keeling
atoll, if left undisturbed, we can see that the islets may still
extend in length; but as they cannot resist the surf until broken
by rolling over a wide space, their increase in breadth must depend
on the increasing breadth of the reef; and this must be limited by
the steepness of the submarine flanks, which can be added to only
by sediment derived from the wear and tear of the coral. From the
rapid growth of the coral in the channel cut for the schooner, and
from the several agents at work in producing fine sediment, it
might be thought that the lagoon would necessarily become quickly
filled up. Some of this sediment, however, is transported into the
open sea, as appears from the soundings off the mouth of the
lagoon, instead of being deposited within it. The deposition,
moreover, of sediment, checks the growth of coral-reefs, so that
these two agencies cannot act together with full effect in filling
it up. We know so little of the habits of the many different
species of corals, which form the lagoon-reefs, that we have no
more reasons for supposing that their whole surface would grow up
as quickly as the coral did in the schooner-channel, than for
supposing that the whole surface of a peat-moss would increase as
quickly as parts are known to do in holes, where the peat has been
cut away. These agencies, nevertheless, tend to fill up the lagoon;
but in proportion as it becomes shallower, so must the polypifers
be subject to many injurious agencies, such as impure water and
loss of food. For instance, Mr. Liesk informed me, that some years
before our visit unusually heavy rain killed nearly all the fish in
the lagoon, and probably the same cause would likewise injure the
corals. The reefs also, it must be remembered, cannot possibly rise
above the level of the lowest spring-tide, so that the final
conversion of the lagoon into land must be due to the accumulation
of sediment; and in the midst of the clear water of the ocean, and
with no surrounding high land, this process must be exceedingly
slow.</p>
<br>
<center><i>Section II</i>—GENERAL DESCRIPTION OF
ATOLLS.</center>
<p class="intro">General form and size of atolls, their reefs and
islets.—External slope.—Zone of
Nulliporæ.—Conglomerate.—Depth of lagoons.—
Sediment.—Reefs submerged wholly or in part.—Breaches
in the reef.—Ledge-formed shores round certain
lagoons.—Conversion of lagoons into land.</p>
<p>I will here give a sketch of the general form and structure of
the many atolls and atoll-formed reefs which occur in the Pacific
and Indian Oceans, comparing them with Keeling atoll. The Maldiva
atolls</p>
<p> </p>
<hr>
<p class="page"><a name="page 25">page 25</a></p>
<p> </p>
<p>and the Great Chagos Bank differ in so many respects, that I
shall devote to them, besides occasional references, a third
section of this chapter. Keeling atoll may be considered as of
moderate dimensions and of regular form. Of the thirty-two islands
surveyed by Captain Beechey in the Low Archipelago, the longest was
found to be thirty miles, and the shortest less than a mile; but
Vliegen atoll, situated in another part of the same group, appears
to be sixty miles long and twenty broad. Most of the atolls in this
group are of an elongated form; thus Bow Island is thirty miles in
length, and on an average only six in width (See Fig. 4, <a href=
"#Plate I">Plate I</a>), and Clermont Tonnere has nearly the same
proportions. In the Marshall Archipelago (the Ralick and Radack
group of Kotzebue) several of the atolls are more than thirty miles
in length, and Rimsky Korsacoff is fifty-four long, and twenty
wide, at the broadest part of its irregular outline. Most of the
atolls in the Maldiva Archipelago are of great size, one of them
(which, however, bears a double name) measured in a medial and
slightly curved line, is no less than eighty-eight geographical
miles long, its greatest width being under twenty, and its least
only nine and a half miles. Some atolls have spurs projecting from
them; and in the Marshall group there are atolls united together by
linear reefs, for instance Menchikoff Island (See Fig. 3, <a href=
"#Plate II">Plate II</a>), which is sixty miles in length, and
consists of three loops tied together. In far the greater number of
cases an atoll consists of a simple elongated ring, with its
outline moderately regular.</p>
<p>The average width of the annular wreath may be taken as about a
quarter of a mile. Captain Beechey<sup>1</sup> says that in the
atolls of the Low Archipelago it exceeded in no instance half a
mile. The description given of the structure and proportional
dimensions of the reef and islets of Keeling atoll, appears to
apply perfectly to nearly all the atolls in the Pacific and Indian
Oceans. The islets are first formed some way back either on the
projecting points of the reef, especially if its form be angular,
or on the sides of the main entrances into the lagoon—that is
in both cases, on points where the breakers can act during gales of
wind in somewhat different directions, so that the matter thrown up
from one side may accumulate against that before thrown up from
another. In Lutké's chart of the Caroline atolls, we see
many instances of the former case; and the occurrence of islets, as
if placed for beacons, on the points where there is a gateway or
breach through the reef, has been noticed by several authors. There
are some atoll-formed reefs, rising to the surface of the sea and
partly dry at low water, on which from some cause islets have never
been formed; and there are others on which they have been formed,
but have subsequently been worn away. In atolls of small dimensions
the islets frequently become united into a single horse-shoe or
ring-formed strip; but Diego Garcia, although an atoll of
considerable size, being thirteen miles and a half in length, has
its lagoon entirely surrounded, except at the northern end, by a
belt of land, on an average a third of a mile in width. To show how
small the total area of the annular reef and the land is in islands
of this class,</p>
<p class="fnote">1. Beechey's "Voyage to the Pacific and Beering's
Straits," chapter viii.</p>
<p> </p>
<hr>
<p class="page"><a name="page 26">page 26</a></p>
<p> </p>
<p>I may quote a remark from the voyage of Lutké, namely,
that if the forty-three rings, or atolls, in the Caroline
Archipelago, were put one within another, and over a steeple in the
centre of St. Petersburg, the whole world would not cover that city
and its suburbs.</p>
<p>The form of the bottom off Keeling atoll, which gradually slopes
to about twenty fathoms at the distance of between one and two
hundred yards from the edge of the reef, and then plunges at an
angle of 45° into unfathomable depths, is exactly the
same<sup>1</sup> with that of the sections of the atolls in the Low
Archipelago given by Captain Beechey. The nature, however, of the
bottom seems to differ, for this officer<sup>2</sup> informs me
that all the soundings, even the deepest, were on coral, but he
does not know whether dead or alive. The slope round Christmas
atoll (Lat. 1° 4' N., 157° 45' W.), described by
Cook,<sup>3</sup> is considerably less, at about half a mile from
the edge of the reef, the average depth was about fourteen fathoms
on a fine sandy bottom, and at a mile, only between twenty and
forty fathoms. It has no doubt been owing to this gentle slope,
that the strip of land surrounding its lagoon, has increased in one
part to the extraordinary width of three miles; it is formed of
successive ridges of broken shells and corals, like those on the
beach. I know of no other instance of such width in the reef of an
atoll; but Mr. F. D. Bennett informs me that the inclination of the
bottom round Caroline atoll in the Pacific, is like that off
Christmas Island, very gentle. Off the Maldiva and Chagos atolls,
the inclination is much more abrupt; thus at Heawandoo Pholo,
Lieutenant Powell<sup>4</sup> found fifty and sixty fathoms close
to the edge of the reef, and at 300 yards distance there was no
bottom with a 300-yard line. Captain Moresby informs me, that at
100 fathoms from the mouth of the lagoon of Diego Garcia, he found
no bottom with 150 fathoms; this is the more remarkable, as the
slope is generally less abrupt in front of channels through a reef,
owing to the accumulation of sediment. At Egmont Island, also, at
150 fathoms from the reef, soundings were struck with 150 fathoms.
Lastly, at Cardoo atoll, only sixty yards from the reef, no bottom
was obtained, as I am informed by Captain Moresby, with a line of
200 fathoms! The currents run with great force round these atolls,
and where they are strongest, the inclination appears to be most
abrupt. I am informed by the same authority, that wherever
soundings were obtained off these islands, the bottom was
invariably</p>
<p class="fnote">1. The form of the bottom round the Marshall
atolls in the Northern Pacific is probably similar: Kotzebue
("First Voyage," vol. ii, p. 16) says: "We had at a small distance
from the reef, forty fathoms depth, which increased a little
further so much that we could find no bottom."<br>
2. I must be permitted to express my obligation to Captain
Beechey, for the very kind manner in which he has given me
information on several points, and to own the great assistance I
have derived from his excellent published work.<br>
3. Cook's "Third Voyage," vol. ii, chap. 10.<br>
4. This fact is taken from a MS. account of these groups lent me by
Captain Moresby. See also Captain Moresby's paper on the Maldiva
atolls in the <i>Geographical Journal</i>, vol. v, p. 401.</p>
<p> </p>
<hr>
<p class="page"><a name="page 27">page 27</a></p>
<p> </p>
<p>sandy: nor was there any reason to suspect the existence of
submarine cliffs, as there was at Keeling Island.<sup>1</sup> Here
then occurs a difficulty; can sand accumulate on a slope, which, in
some cases, appears to exceed fifty-five degrees? It must be
observed, that I speak of slopes where soundings were obtained, and
not of such cases, as that of Cardoo, where the nature of the
bottom is unknown, and where its inclination must be nearly
vertical. M. Elie de Beaumont<sup>2</sup> has argued, and there is
no higher authority on this subject, from the inclination at which
snow slides down in avalanches, that a bed of sand or mud cannot be
formed at a greater angle than thirty degrees. Considering the
number of soundings on sand, obtained round the Maldiva and Chagos
atolls, which appears to indicate a greater angle, and the extreme
abruptness of the sand-banks in the West Indies, as will be
mentioned in the Appendix, I must conclude that the adhesive
property of wet sand counteracts its gravity, in a much greater
ratio than has been allowed for by M. Elie de Beaumont. From the
facility with which calcareous sand becomes agglutinated, it is not
necessary to suppose that the bed of loose sand is thick.</p>
<p>Captain Beechey has observed, that the submarine slope is much
less at the extremities of the more elongated atolls in the Low
Archipelago, than at their sides; in speaking of Ducie's Island he
says<sup>3</sup> the buttress, as it may be called, which "has the
most powerful enemy (the S.W. swell) to oppose, is carried out much
further, and with less abruptness than the other." In some cases,
the less inclination of a certain part of the external slope, for
instance of the northern extremities of the two Keeling atolls, is
caused by a prevailing current which there accumulates a bed of
sand. Where the water is perfectly tranquil, as within a lagoon,
the reefs generally grow up perpendicularly, and sometimes even
overhang their bases; on the other hand, on the leeward side of
Mauritius, where the water is generally tranquil, although not
invariably so, the reef is very gently inclined. Hence it appears
that the exterior angle varies much; nevertheless in the close
similarity in form between the sections of Keeling atoll and of the
atolls in the Low Archipelago, in the general steepness of the
reefs of the Maldiva and Chagos atolls, and in the perpendicularity
of those rising out of water always tranquil, we may discern the
effects of uniform laws; but from the complex action of the surf
and currents, on the growing powers of the coral and on the
deposition of sediment, we can by no means follow out all the
results.</p>
<p class="fnote">1. Off some of the islands in the Low Archipelago
the bottom appears to descend by ledges. Off Elizabeth Island,
which, however, consists of raised coral, Captain Beechey (page 45,
4to ed.) describes three ledges: the first had an easy slope from
the beach to a distance of about fifty yards: the second extended
two hundred yards with twenty-five fathoms on it, and then ended
abruptly, like the first; and immediately beyond this there was no
bottom with two hundred fathoms.<br>
2. "Memoires pour servir à une description Geolog. de
France," tome iv, p. 216.<br>
3. Beechey's "Voyage," 4to ed., p. 44.</p>
<p> </p>
<hr>
<p class="page"><a name="page 28">page 28</a></p>
<p> </p>
<p>Where islets have been formed on the reef, that part which I
have sometimes called the "flat" and which is partly dry at low
water, appears similar in every atoll. In the Marshall group in the
North Pacific, it may be inferred from Chamisso's description, that
the reef, where islets have not been formed on it, slopes gently
from the external margin to the shores of the lagoon; Flinders
states that the Australian barrier has a similar inclination
inwards, and I have no doubt it is of general occurrence, although,
according to Ehrenberg, the reefs of the Red Sea offer an
exception. Chamisso observes that "the red colour of the reef (at
the Marshall atolls) under the breakers is caused by a Nullipora,
which covers the stone <i>wherever the waves beat</i>; and, under
favourable circumstances, assumes a stalactical form,"—a
description perfectly applicable to the margin of Keeling
atoll.<sup>1</sup> Although Chamisso does not state that the masses
of Nulliporæ form points or a mound, higher than the flat,
yet I believe that this is the case; for Kotzebue,<sup>2</sup> in
another part, speaks of the rocks on the edge of the reef "as
visible for about two feet at low water," and these rocks we may
feel quite certain are not formed of true coral,<sup>3</sup>
Whether a smooth convex mound of Nulliporæ, like that which
appears as if artificially constructed to protect the margin of
Keeling Island, is of frequent occurrence round atolls, I know not;
but we shall presently meet with it, under precisely the same form,
on the outer edge of the "barrier-reefs" which encircle the Society
Islands.</p>
<p>There appears to be scarcely a feature in the structure of
Keeling reef, which is not of common, if not of universal
occurrence, in other atolls. Thus Chamisso describes<sup>4</sup> a
layer of coarse conglomerate, outside the islets round the Marshall
atolls which "appears on its upper surface uneven and eaten away."
From drawings, with appended remarks, of Diego Garcia in the Chagos
group and of several of the</p>
<p class="fnote">1. Kotzebue's "First Voyage," vol. iii, p. 142.
Near Porto Praya, in the Cape de Verde Islands, some basaltic
rocks, lashed by no inconsiderable surf, were completely enveloped
with a layer of Nulliporæ. The entire surface over many
square inches, was coloured of a peach-blossomed red; the layer,
however, was of no greater thickness than paper. Another kind, in
the form of projecting knobs, grew in the same situation. These
Nulliporæ are closely related to those described on the
coral-reefs, but I believe are of different species.<br>
2. (Kotzebue, "First Voyage," vol. ii, p. 16. Lieutenant Nelson, in
his excellent memoir in the Geological Transactions (vol. ii, p.
105), alludes to the rocky points mentioned by Kotzebue, and infers
that they consist of Serpulæ, which compose incrusting masses
on the reefs of Bermudas, as they likewise do on a sandstone bar
off the coast of Brazil (which I have described in <i>London Phil.
Journal,</i> October 1841). These masses of Serpulæ hold the
same position, relatively to the action of the sea, with the
Nulliporæ on the coral-reefs in the Indian and Pacific
Oceans.<br>
3. Captain Moresby, in his valuable paper "on the Northern atolls
of Maldivas" (<i>Geographical Journal</i>, vol. v), says that the
edges of the reefs there stand above water at low spring-tides.<br>
4. Kotzebue's "First Voyage," vol. iii, p. 144.</p>
<p> </p>
<hr>
<p class="page"><a name="page 29">page 29</a></p>
<p> </p>
<p>Maldiva atolls, shown me by Captain Moresby,<sup>1</sup> it is
evident that their outer coasts are subject to the same round of
decay and renovation as those of Keeling atoll. From the
description of the atolls in the Low Archipelago, given in Captain
Beechey's "Voyage," it is not apparent that any conglomerate
coral-rock was there observed.</p>
<p>The lagoon in Keeling atoll is shallow; in the atolls of the Low
Archipelago the depth varies from 20 to 38 fathoms, and in the
Marshall Group, according to Chamisso, from 30 to 35; in the
Caroline atolls it is only a little less. Within the Maldiva atolls
there are large spaces with 45 fathoms, and some soundings are laid
down of 49 fathoms. The greater part of the bottom in most lagoons,
is formed of sediment; large spaces have exactly the same depth, or
the depth varies so insensibly, that it is evident that no other
means, excepting aqueous deposition, could have leveled the surface
so equally. In the Maldiva atolls this is very conspicuous, and
likewise in some of the Caroline and Marshall Islands. In the
former large spaces consist of sand and <i>soft clay</i>; and
Kotzebue speaks of clay having been found within one of the
Marshall atolls. No doubt this clay is calcareous mud, similar to
that at Keeling Island, and to that at Bermuda already referred to,
as undistinguishable from disintegrated chalk, and which Lieutenant
Nelson says is called there pipe- clay.<sup>2</sup></p>
<p>Where the waves act with unequal force on the two sides of an
atoll, the islets appear to be first formed, and are generally of
greater continuity on the more exposed shore. The islets, also,
which are placed to leeward, are in most parts of the Pacific
liable to be occasionally swept entirely away by gales, equalling
hurricanes in violence, which blow in an opposite direction to the
ordinary trade- wind. The absence of the islets on the leeward side
of atolls, or when present their lesser dimensions compared with
those to windward, is a comparatively unimportant fact; but in
several instances the reef itself on the leeward side, retaining
its usual defined outline, does not rise to the surface by several
fathoms. This is the case with the southern side of Peros Banhos
(<a href="#Plate I">Plate 1,</a> Fig. 9) in the Chagos group, with
Mourileu atoll,<sup>3</sup> in the Caroline Archipelago, and with
the barrier-reef (<a href="#Plate I">Plate I,</a> Fig. 8) of the
Gambier Islands. I allude to the latter reef, although belonging
to</p>
<p class="fnote">1. (See also Moresby on the Northern atolls of the
Maldivas, <i>Geographical Journal</i>, vol v, p. 400.<br>
2. I may here observe that on the coast of Brazil, where there is
much coral, the soundings near the land are described by Admiral
Roussin, in the <i>Pilote du Brésil</i>, as siliceous sand,
mingled with much finely comminuted particles of shells and coral.
Further in the offing, for a space of 1,300 miles along the coast,
from the Abrolhos Islands to Maranham, the bottom in many places is
composed of "tuf blanc, mêlé ou formé de
madrépores broyés." This white substance, probably,
is analogous to that which occurs within the above-mentioned
lagoons; it is sometimes, according to Roussin, firm, and he
compares it to mortar.<br>
3. Frederick Lutké's "Voyage autour du Monde," vol. ii, p.
291. See also his account of Namonouito, at pp. 97 and 105, and the
chart of Oulleay in the Atlas.</p>
<p> </p>
<hr>
<p class="page"><a name="page 30">page 30</a></p>
<p> </p>
<p>another class, because Captain Beechey was first led by it to
observe the peculiarity in the question. At Peros Banhos the
submerged part is nine miles in length, and lies at an average
depth of about five fathoms; its surface is nearly level, and
consists of hard stone, with a thin covering of loose sand. There
is scarcely any living coral on it, even on the outer margin, as I
have been particularly assured by Captain Moresby; it is, in fact,
a wall of dead coral-rock, having the same width and transverse
section with the reef in its ordinary state, of which it is a
continuous portion. The living and perfect parts terminate
abruptly, and abut on the submerged portions, in the same manner as
on the sides of an ordinary passage through the reef. The reef to
leeward in other cases is nearly or quite obliterated, and one side
of the lagoon is left open; for instance, at Oulleay (Caroline
Archipelago), where a crescent- formed reef is fronted by an
irregular bank, on which the other half of the annular reef
probably once stood. At Namonouito, in the same Archipelago, both
these modifications of the reef concur; it consists of a great flat
bank, with from twenty to twenty-five fathoms water on it; for a
length of more than forty miles on its southern side it is open and
without any reef, whilst on the other sides it is bounded by a
reef, in parts rising to the surface and perfectly characterised,
in parts lying some fathoms submerged. In the Chagos group there
are annular reefs, entirely submerged, which have the same
structure as the submerged and defined portions just described. The
Speaker's Bank offers an excellent example of this structure; its
central expanse, which is about twenty-two fathoms deep, is twenty-
four miles across; the external rim is of the usual width of
annular reefs, and is well-defined; it lies between six and eight
fathoms beneath the surface, and at the same depth there are
scattered knolls in the lagoon. Captain Moresby believes the rim
consists of dead rock, thinly covered with sand, and he is certain
this is the case with the external rim of the Great Chagos Bank,
which is also essentially a submerged atoll. In both these cases,
as in the submerged portion of the reef at Peros Banhos, Captain
Moresby feels sure that the quantity of living coral, even on the
outer edge overhanging the deep-sea water, is quite insignificant.
Lastly, in several parts of the Pacific and Indian Oceans there are
banks, lying at greater depths than in the cases just mentioned, of
the same form and size with the neighbouring atolls, but with their
atoll-like structure wholly obliterated. It appears from the survey
of Freycinet, that there are banks of this kind in the Caroline
Archipelago, and, as is reported, in the Low Archipelago. When we
discuss the origin of the different classes of coral formations, we
shall see that the submerged state of the whole of some
atoll-formed reefs, and of portions of others, generally but not
invariably on the leeward side, and the existence of more deeply
submerged banks now possessing little or no signs of their original
atoll-like structure, are probably the effects of a uniform
cause,—namely, the death of the coral, during the subsidence
of the area, in which the atolls or banks are situated.</p>
<p>There is seldom, with the exception of the Maldiva atolls, more
than two or three channels, and generally only one leading into the
lagoon,</p>
<p> </p>
<hr>
<p class="page"><a name="page 31">page 31</a></p>
<p> </p>
<p>of sufficient depth for a ship to enter. in small atolls, there
is usually not even one. Where there is deep water, for instance
above twenty fathoms, in the middle of the lagoon, the channels
through the reef are seldom as deep as the centre,—it may be
said that the rim only of the saucer-shaped hollow forming the
lagoon is notched. Mr. Lyell<sup>1</sup> has observed that the
growth of the coral would tend to obstruct all the channels through
a reef, except those kept open by discharging the water, which
during high tide and the greater part of each ebb is thrown over
its circumference. Several facts indicate that a considerable
quantity of sediment is likewise discharged through these channels;
and Captain Moresby informs me that he has observed, during the
change of the monsoon, the sea discoloured to a distance off the
entrances into the Maldiva and Chagos atolls. This, probably, would
check the growth of the coral in them, far more effectually than a
mere current of water. In the many small atolls without any
channel, these causes have not prevented the entire ring attaining
the surface. The channels, like the submerged and effaced parts of
the reef, very generally though not invariably occur on the leeward
side of the atoll, or on that side, according to Beechey, which,
from running in the same direction with the prevalent wind, is not
fully exposed to it. Passages between the islets on the reef,
through which boats can pass at high water, must not be confounded
with ship-channels, by which the annular reef itself is breached.
The passages between the islets occur, of course, on the windward
as well as on the leeward side; but they are more frequent and
broader to leeward, owing to the lesser dimensions of the islets on
that side.</p>
<p>At Keeling atoll the shores of the lagoon shelve gradually,
where the bottom is of sediment, and irregularly or abruptly where
there are coral-reefs; but this is by no means the universal
structure in other atolls. Chamisso,<sup>3</sup> speaking in
general terms of the lagoons in the Marshall atolls, says the lead
generally sinks "from a depth of two or three fathoms to twenty or
twenty-four, and you may pursue a line in which on one side of the
boat you may see the bottom, and on the other the azure-blue deep
water." The shores of the lagoon-like channel within the
barrier-reef at Vanikoro have a similar structure. Captain Beechey
has described a modification of this structure (and he believes it
is not uncommon) in two atolls in the Low Archipelago, in which the
shores of the lagoon descend by a few, broad, slightly inclined
ledges or steps: thus at Matilda atoll,<sup>4</sup> the great
exterior reef, the surface of which is gently inclined towards and
beneath the surface of the lagoon, ends abruptly in a little cliff
three fathoms deep; at its foot, a ledge forty yards wide extends,
shelving gently inwards</p>
<p class="fnote">1. Principles of Geology," vol. iii, p. 289.<br>
2. Beechey's "Voyage," 4to ed., vol. i, p. 189.<br>
3. Kotzebue's "First Voyage," vol. iii, p. 142.<br>
4. Beechey's "Voyage," 4to ed., vol. i, p. 160. At Whitsunday
Island the bottom of the lagoon slopes gradually towards the
centre, and then deepens suddenly, the edge of the bank being
nearly perpendicular. This bank is formed of coral and dead
shells.</p>
<p> </p>
<hr>
<p class="page"><a name="page 32">page 32</a></p>
<p> </p>
<p>like the surface-reef, and terminated by a second little cliff
five fathoms deep; beyond this, the bottom of the lagoon slopes to
twenty fathoms, which is the average depth of its centre. These
ledges seem to be formed of coral-rock; and Captain Beechey says
that the lead often descended several fathoms through holes in
them. In some atolls, all the coral reefs or knolls in the lagoon
come to the surface at low water; in other cases of rarer
occurrence, all lie at nearly the same depth beneath it, but most
frequently they are quite irregular,—some with perpendicular,
some with sloping sides,—some rising to the surface, and
others lying at all intermediate depths from the bottom upwards. I
cannot, therefore, suppose that the union of such reefs could
produce even one uniformly sloping ledge, and much less two or
three, one beneath the other, and each terminated by an abrupt
wall. At Matilda Island, which offers the best example of the
step-like structure, Captain Beechey observes that the coral-
knolls within the lagoon are quite irregular in their height. We
shall hereafter see that the theory which accounts for the ordinary
form of atolls, apparently includes this occasional peculiarity in
their structure.</p>
<p>In the midst of a group of atolls, there sometimes occur small,
flat, very low islands of coral formation, which probably once
included a lagoon, since filled up with sediment and coral-reefs.
Captain Beechey entertains no doubt that this has been the case
with the two small islands, which alone of thirty-one surveyed by
him in the Low Archipelago, did not contain lagoons. Romanzoff
Island (in lat. 15 deg S.) is described by Chamisso<sup>1</sup> as
formed by a dam of madreporitic rock inclosing a flat space, thinly
covered with trees, into which the sea on the leeward side
occasionally breaks. North Keeling atoll appears to be in a rather
less forward stage of conversion into land; it consists of a
horse-shoe shaped strip of land surrounding a muddy flat, one mile
in its longest axis, which is covered by the sea only at high
water. When describing South Keeling atoll, I endeavoured to show
how slow the final process of filling up a lagoon must be;
nevertheless, as all causes do tend to produce this effect, it is
very remarkable that not one instance, as I believe, is known of a
moderately sized lagoon being filled up even to the low water-line
at spring-tides, much less of such a one being converted into land.
It is, likewise, in some degree remarkable, how few atolls, except
small ones, are surrounded by a single linear strip of land, formed
by the union of separate islets. We cannot suppose that the many
atolls in the Pacific and Indian Oceans all have had a late origin,
and yet should they remain at their present level, subjected only
to the action of the sea and to the growing powers of the coral,
during as many centuries as must have elapsed since any of the
earlier tertiary epochs, it cannot, I think, be doubted that their
lagoons and the islets on their reef, would present a totally
different appearance from what they now do. This consideration
leads to the suspicion that some renovating agency (namely
subsidence) comes into play at intervals, and perpetuates their
original structure.</p>
<p class="fnote">1. Kotzebue's "First Voyage," vol. iii, p.
221.</p>
<p> </p>
<hr>
<p class="page"><a name="page 33">page 33</a></p>
<p> </p>
<center><i>Section III</i>—ATOLLS OF THE MALDIVA
ARCHIPELAGO—GREAT CHAGOS BANK</center>
<p class="intro">Maldiva Archipelago.—Ring-formed reefs,
marginal and central.—Great depths in the lagoons of the
southern atolls.—Reefs in the lagoons all rising to the
surface.—Position of islets and breaches in the reefs, with
respect to the prevalent winds and action of the
waves.—Destruction of islets.—Connection in the
position and submarine foundation of distinct atolls.—The
apparent disseverment of large atolls.—The Great Chagos
Bank.—Its submerged condition and extraordinary
structure.</p>
<p>Although occasional references have been made to the Maldiva
atolls, and to the banks in the Chagos group, some points of their
structure deserve further consideration. My description is derived
from an examination of the admirable charts lately published from
the survey of Captain Moresby and Lieutenant Powell, and more
especially from information which Captain Moresby has communicated
to me in the kindest manner.</p>
<p>The Maldiva Archipelago is 470 miles in length, with an average
breadth of about 50 miles. The form and dimensions of the atolls,
and their singular position in a double line, may be seen, but not
well, in the greatly reduced chart (Fig. 6) in <a href="#Plate II">
Plate II.</a> The dimensions of the longest atoll in the group
(called by the double name of Milla-dou-Madou and Tilla-dou-Matte)
have already been given; it is 88 miles in a medial and slightly
curved line, and is less than 20 miles in its broadest part.
Suadiva, also, is a noble atoll, being 44 miles across in one
direction, and 34 in another, and the great included expanse of
water has a depth of between 250 and 300 feet. The smaller atolls
in this group differ in no respect from ordinary ones; but the
larger ones are remarkable from being breached by numerous
deep-water channels leading into the lagoon; for instance, there
are 42 channels, through which a ship could enter the lagoon of
Suadiva. In the three southern large atolls, the separate portions
of reef between these channels have the ordinary structure, and are
linear; but in the other atolls, especially the more northern ones,
these portions are ring- formed, like miniature atolls. Other
ring-formed reefs rise out of the lagoons, in the place of those
irregular ones which ordinarily occur there. In the reduction of
the chart of Mahlos Mahdoo (<a href="#Plate II">Plate II,</a> Fig.
4), it was not found easy to define the islets and the little
lagoons within each reef, so that the ring-formed structure is very
imperfectly shown; in the large published charts of
Tilla-dou-Matte, the appearance of these rings, from standing
further apart from each other, is very remarkable. The rings on the
margin are generally elongated; many of them are three, and some
even five miles, in diameter; those within the lagoon are usually
smaller, few being more than two miles across, and the greater
number rather less than one. The depth of the little lagoon within
these small annular reefs is generally from five to seven fathoms,
but occasionally more; and in Ari atoll many of the central ones
are twelve, and some even more than twelve fathoms deep. These
rings rise abruptly from the platform or bank, on which they are
placed; their outer margin is</p>
<p> </p>
<hr>
<p class="page"><a name="page 34">page 34</a></p>
<p> </p>
<p>invariably bordered by living coral<sup>1</sup> within which
there is a flat surface of coral rock; of this flat, sand and
fragments have in many cases accumulated and been converted into
islets, clothed with vegetation. I can, in fact, point out no
essential difference between these little ring-formed reefs (which,
however, are larger, and contain deeper lagoons than many true
atolls that stand in the open sea), and the most perfectly
characterised atolls, excepting that the ring-formed reefs are
based on a shallow foundation, instead of on the floor of the open
sea, and that instead of being scattered irregularly, they are
grouped closely together on one large platform, with the marginal
rings arranged in a rudely formed circle.</p>
<p>The perfect series which can be traced from portions of simple
linear reef, to others including long linear lagoons, and from
these again to oval or almost circular rings, renders it probable
that the latter are merely modifications of the linear or normal
state. It is conformable with this view, that the ring-formed reefs
on the margin, even where most perfect and standing furthest apart,
generally have their longest axes directed in the line which the
reef would have held, if the atoll had been bounded by an ordinary
wall. We may also infer that the central ring-formed reefs are
modifications of those irregular ones, which are found in the
lagoons of all common atolls. It appears from the charts on a large
scale, that the ring-like structure is contingent on the marginal
channels or breaches being wide; and, consequently, on the whole
interior of the atoll being freely exposed to the waters of the
open sea. When the channels are narrow or few in number, although
the lagoon be of great size and depth (as in Suadiva), there are no
ring-formed reefs; where the channels are somewhat broader, the
marginal portions of reef, and especially those close to the larger
channels, are ring-formed, but the central ones are not so; where
they are broadest, almost every reef throughout the atoll is more
or less perfectly ring-formed. Although their presence is thus
contingent on the openness of the marginal channels, the theory of
their formation, as we shall hereafter see, is included in that of
the parent atolls, of which they form the separate portions.</p>
<p>The lagoons of all the atolls in the southern part of the
Archipelago are from ten to twenty fathoms deeper than those in the
northern part. This is well exemplified in the case of Addoo, the
southernmost atoll in the group, for although only nine miles in
its longest diameter, it has a depth of thirty-nine fathoms,
whereas all the other small atolls have comparatively shallow
lagoons; I can assign no adequate cause for this difference in
depth. In the central and deepest part of the lagoons, the bottom
consists, as I am informed by Captain Moresby, of stiff clay
(probably a calcareous mud); nearer the border it consists of sand,
and in the channels through the reef, of hard sand-banks,
sandstone, conglomerate rubble, and a little live coral. Close
outside the reef and the line joining its detached portions (where
intersected by many channels), the bottom is sandy, and it slopes
abruptly into unfathomable depths.</p>
<p class="fnote">1. Captain Moresby informs me that <i>Millepora
complanata</i> is one of the commonest kinds on the outer margin,
as it is at Keeling atoll.</p>
<p> </p>
<hr>
<p class="page"><a name="page 35">page 35</a></p>
<p> </p>
<p>In most lagoons the depth is considerably greater in the centre
than in the channels; but in Tilla-dou-Matte, where the marginal
ring- formed reefs stand far apart, the same depth is carried
across the entire atoll, from the deep-water line on one side to
that on the other. I cannot refrain from once again remarking on
the singularity of these atolls,—a great sandy and generally
concave disc rises abruptly from the unfathomable ocean, with its
central expanse studded and its border symmetrically fringed with
oval basins of coral-rock, just lipping the surface of the sea,
sometimes clothed with vegetation, and each containing a little
lake of clear water!</p>
<p>In the southern Maldiva atolls, of which there are nine large
ones, all the small reefs within the lagoons come to the surface,
and are dry at low water spring-tides; hence in navigating them,
there is no danger from submarine banks. This circumstance is very
remarkable, as within some atolls, for instance those of the
neighbouring Chagos group, not a single reef comes to the surface,
and in most other cases a few only do, and the rest lie at all
intermediate depths from the bottom upwards. When treating of the
growth of coral I shall again refer to this subject.</p>
<p>Although in the neighbourhood of the Maldiva Archipelago the
winds, during the monsoons, blow during nearly an equal time from
opposite quarters, and although, as I am informed by Captain
Moresby, the westerly winds are the strongest, yet the islets are
almost all placed on the eastern side of the northern atolls, and
on the south-eastern side of the southern atolls. That the
formation of the islets is due to detritus thrown up from the
outside, as in the ordinary manner, and not from the interior of
the lagoons, may, I think be safely inferred from several
considerations, which it is hardly worth while to detail. As the
easterly winds are not the strongest, their action probably is
aided by some prevailing swell or current.</p>
<p>In groups of atolls, exposed to a trade-wind, the ship-channels
into the lagoons are almost invariably situated on the leeward or
less exposed side of the reef, and the reef itself is sometimes
either wanting there, or is submerged. A strictly analogous, but
different fact, may be observed at the Maldiva atolls—namely,
that where two atolls stand in front of each other, the breaches in
the reef are the most numerous on their near, and therefore less
exposed, sides. Thus on the near sides of Ari and the two Nillandoo
atolls, which face S. Mãle, Phaleedoo, and Moloque atolls,
there are seventy-three deep-water channels, and only twenty-five
on their outer sides; on the near side of the three latter named
atolls there are fifty-six openings, and only thirty-seven on
their outsides. It is scarcely possible to attribute this
difference to any other cause than the somewhat different action of
the sea on the two sides, which would ensue from the protection
afforded by the two rows of atolls to each other. I may here remark
that in most cases, the conditions favourable to the greater
accumulation of fragments on the reef and to its more perfect
continuity on one side of the atoll than on the other, have
concurred, but this has not been the case with the Maldivas; for we
have seen that the islets are placed on the eastern or south-</p>
<p> </p>
<hr>
<p class="page"><a name="page 36">page 36</a></p>
<p> </p>
<p>eastern sides, whilst the breaches in the reef occur
indifferently on any side, where protected by an opposite atoll.
The reef being more continuous on the outer and more exposed sides
of those atolls which stand near each other, accords with the fact,
that the reef of the southern atolls is more continuous than that
of the northern ones; for the former, as I am informed by Captain
Moresby, are more constantly exposed than the northern atolls to a
heavy surf.</p>
<p>The date of the first formation of some of the islets in this
Archipelago is known to the inhabitants; on the other hand, several
islets, and even some of those which are believed to be very old,
are now fast wearing away. The work of destruction has, in some
instances, been completed in ten years. Captain Moresby found on
one water-washed reef the marks of wells and graves, which were
excavated when it supported an islet. In South Nillandoo atoll, the
natives say that three of the islets were formerly larger: in North
Nillandoo there is one now being washed away; and in this latter
atoll Lieutenant Prentice found a reef, about six hundred yards in
diameter, which the natives positively affirmed was lately an
island covered with cocoa-nut trees. It is now only partially dry
at low water spring-tides, and is (in Lieutenant Prentice's words)
"entirely covered with live coral and madrepore." In the northern
part, also, of the Maldiva Archipelago and in the Chagos group, it
is known that some of the islets are disappearing. The natives
attribute these effects to variations in the currents of the sea.
For my own part I cannot avoid suspecting that there must be some
further cause, which gives rise to such a cycle of change in the
action of the currents of the great and open ocean.</p>
<p>Several of the atolls in this Archipelago are so related to each
other in form and position, that at the first glance one is led to
suspect that they have originated in the disseverment of a single
one. Mãle consists of three perfectly characterised atolls,
of which the shape and relative position are such, that a line
drawn closely round all three, gives a symmetrical figure; to see
this clearly, a larger chart is required than that of the
Archipelago in Plate II; the channel separating the two northern
Male atolls is only little more than a mile wide, and no bottom was
found in it with 100 fathoms. Powell's Island is situated at the
distance of two miles and a half off the northern end of Mahlos
Mahdoo (see Fig. 4, <a href="#Plate II">Plate II</a>), at the exact
point where the two sides of the latter, if prolonged, would meet;
no bottom, however, was found in the channel with 200 fathoms; in
the wider channel between Horsburgh atoll and the southern end of
Mahlos Mahdoo, no bottom was found with 250 fathoms. In these and
similar cases, the relation consists only in the form and position
of the atolls. But in the channel between the two Nillandoo atolls,
although three miles and a quarter wide, soundings were struck at
the depth of 200 fathoms; the channel between Ross and Ari atolls
is four miles wide, and only 150 fathoms deep. Here then we have,
besides the relation of form, a submarine connection. The fact of
soundings having been obtained between two separate and perfectly
characterised atolls is in itself interesting, as it has never, I
believe, been effected in any of the many</p>
<center>
<font color="black" size="-1" face="arial"><a name="Plate II"><i>
Plate II</i></a>—Great Chagos Bank, New Caledonia, Menchikoff
Atoll, etc.</font></center>
<center><br>
<img src="images/plate2a.jpg" width="434" height="468" alt=
"Great Chagos Bank"><br>
</center>
<p class="capt">Fig. 1.—G<small>REAT</small>
C<small>HAGOS</small> B<small>ANK</small>, in the Indian Ocean;
taken from the survey by Captain Moresby and Lieutenant Powell; the
parts which are shaded, with the exception of two or three islets
on the western and northern sides, do not rise to the surface, but
are submerged from four to ten fathoms; the banks bounded by the
dotted lines lie from fifteen to twenty fathoms beneath the
surface, and are formed of sand; the central space is of mud, and
from thirty to fifty fathoms deep.</p>
<p class="capt">Fig. 2.—A vertical section, on the same
scale, in an eastern and western line across the Great Chagos Bank,
given for the sake of exhibiting more clearly its structure.</p>
<center><img src="images/plate2b.jpg" width="414" height="467" alt=
"New Caledonia, Menchikoff Atoll, etc."></center>
<p class="capt">Fig. 3.—Menchikoff Atoll (or lagoon-island),
in the Marshall Archipelago, Northern Pacific Ocean; from
Krusenstern's "Atlas of the Pacific;" originally surveyed by
Captain Hagemeister; the depth within the lagoons is unknown.</p>
<p class="capt">Fig. 4.—M<small>AHLOS</small>
M<small>AHDOO</small> A<small>TOLL</small>, together with Horsburgh
atoll, in the Maldiva Archipelago; from the survey by Captain
Moresby and Lieutenant Powell; the white spaces in the middle of
the separate small reefs, both on the margin and in the middle
part, are meant to represent little lagoons; but it was found not
possible to distinguish them clearly from the small islets, which
have been formed on these same small reefs; many of the smaller
reefs could not be introduced; the nautical mark (dot over a dash)
over the figures 250 and 200, between Mahlos Mahdoo and Horsburgh
atoll and Powell's island, signifies that soundings were not
obtained at these depths.</p>
<p class="capt">Fig. 5.—N<small>EW</small>
C<small>ALEDONIA</small>, in the western part of the Pacific; from
Krusenstern's "Atlas," compiled from several surveys; I have
slightly altered the northern point of the reef, in accordance with
the "Atlas of the Voyage of the <i>Astrolabe</i>." In Krusenstern's
"Atlas," the reef is represented by a single line with crosses; I
have for the sake of uniformity added an interior line.</p>
<p class="capt">Fig. 6.—M<small>ALDIVA</small>
A<small>RCHIPELAGO</small>, in the Indian Ocean; from the survey by
Captain Moresby and Lieutenant Powell.</p>
<p> </p>
<hr>
<p class="page"><a name="page 37">page 37</a></p>
<p> </p>
<p>other groups of atolls in the Pacific and Indian seas. In
continuing to trace the connection of adjoining atolls, if a hasty
glance be taken at the chart (Fig. 4, <a href="#Plate II">Plate
II</a>) of Mahlos Mahdoo, and the line of unfathomable water be
followed, no one will hesitate to consider it as one atoll. But a
second look will show that it is divided by a bifurcating channel,
of which the northern arm is about one mile and three-quarters in
width, with an average depth of 125 fathoms, and the southern one
three-quarters of a mile wide, and rather less deep. These channels
resemble in the slope of their sides and general form, those which
separate atolls in every respect distinct; and the northern arm is
wider than that dividing two of the Mãle atolls. The
ring-formed reefs on the sides of this bifurcating channel are
elongated, so that the northern and southern portions of Mahlos
Mahdoo may claim, as far as their external outline is concerned, to
be considered as distinct and perfect atolls. But the intermediate
portion, lying in the fork of the channel, is bordered by reefs
less perfect than those which surround any other atoll in the group
of equally small dimensions. Mahlos Mahdoo, therefore, is in every
respect in so intermediate a condition, that it may be considered
either as a single atoll nearly dissevered into three portions, or
as three atolls almost perfect and intimately connected. This is an
instance of a very early stage of the apparent disseverment of an
atoll, but a still earlier one in many respects is exhibited at
Tilla-dou-Matte. In one part of this atoll, the ring-formed reefs
stand so far apart from each other, that the inhabitants have given
different names to the northern and southern halves; nearly all the
rings, moreover, are so perfect and stand so separate, and the
space from which they rise is so level and unlike a true lagoon,
that we can easily imagine the conversion of this one great atoll,
not into two or three portions, but into a whole group of miniature
atolls. A perfect series such as we have here traced, impresses the
mind with an idea of actual change; and it will hereafter be seen,
that the theory of subsidence, with the upward growth of the coral,
modified by accidents of probable occurrence, will account for the
occasional disseverment of large atolls.</p>
<p>The Great Chagos bank alone remains to be described. In the
Chagos group there are some ordinary atolls, some annular reefs
rising to the surface but without any islets on them, and some
atoll-formed banks, either quite submerged, or nearly so. Of the
latter, the Great Chagos Bank is much the largest, and differs in
its structure from the others: a plan of it is given in <a href=
"#Plate II">Plate II,</a> Fig. 1, in which, for the sake of
clearness, I have had the parts under ten fathoms deep finely
shaded: an east and west vertical section is given in Fig. 2, in
which the vertical scale has been necessarily exaggerated. Its
longest axis is ninety nautical miles, and another line drawn at
right angles to the first, across the broadest part, is seventy.
The central part consists of a level muddy flat, between forty and
fifty fathoms deep, which is surrounded on all sides, with the
exception of some breaches, by the steep edges of a set of banks,
rudely arranged in a circle. These banks consist of sand, with a
very little live coral; they vary in breadth from five to twelve
miles, and on an average lie about sixteen fathoms beneath the
surface;</p>
<p> </p>
<hr>
<p class="page"><a name="page 38">page 38</a></p>
<p> </p>
<p>they are bordered by the steep edges of a third narrow and upper
bank, which forms the rim to the whole. This rim is about a mile in
width, and with the exception of two or three spots where islets
have been formed, is submerged between five and ten fathoms. It
consists of smooth hard rock, covered with a thin layer of sand,
but with scarcely any live coral; it is steep on both sides, and
outwards slopes abruptly into unfathomable depths. At the distance
of less than half a mile from one part, no bottom was found with
190 fathoms; and off another point, at a somewhat greater distance,
there was none with 210 fathoms. Small steep-sided banks or knolls,
covered with luxuriantly growing coral, rise from the interior
expanse to the same level with the external rim, which, as we have
seen, is formed only of dead rock. It is impossible to look at the
plan (Fig. 1, <a href="#Plate II">Plate II</a>), although reduced
to so small a scale, without at once perceiving that the Great
Chagos Bank is, in the words of Captain Moresby,<sup>1</sup>
"nothing more than a half- drowned atoll." But of what great
dimensions, and of how extraordinary an internal structure? We
shall hereafter have to consider both the cause of its submerged
condition, a state common to other banks in the group, and the
origin of the singular submarine terraces, which bound the central
expanse: these, I think, it can be shown, have resulted from a
cause analogous to that which has produced the bifurcating channel
across Mahlos Mahdoo.</p>
<hr width="30%" align="center">
<p> </p>
<center><b>Chapter II<br>
<br>
BARRIER REEFS</b></center>
<p class="intro">Closely resemble in general form and structure
atoll-reefs.—Width and depth of the
lagoon-channels.—Breaches through the reef in front of
valleys, and generally on the leeward side.—Checks to the
filling up of the lagoon-channels.—Size and constitution of
the encircled islands.— Number of islands within the same
reef.—Barrier-reefs of New Caledonia and
Australia.—Position of the reef relative to the slope of the
adjoining land.—Probable great thickness of
barrier-reefs.</p>
<p>The term "barrier" has been generally applied to that vast reef
which fronts the N.E. shore of Australia, and by most voyagers
likewise to that on the western coast of New Caledonia. At one time
I thought it convenient thus to restrict the term, but as these
reefs are similar in structure, and in position relatively to the
land, to those, which, like a wall with a deep moat within,
encircle many smaller islands, I have classed them together. The
reef, also, on the west coast of New Caledonia, circling round the
extremities of the island, is an</p>
<p class="fnote">1. This officer has had the kindness to lend me an
excellent MS. account of the Chagos Islands; from this paper, from
the published charts, and from verbal information communicated to
me by Captain Moresby, the above account of the Great Chagos Bank
is taken.</p>
<p> </p>
<hr>
<p class="page"><a name="page 39">page 39</a></p>
<p> </p>
<p>intermediate form between a small encircling reef and the
Australian barrier, which stretches for a thousand miles in nearly
a straight line.</p>
<p>The geographer Balbi has in effect described those
barrier-reefs, which encircle moderately sized islands, by calling
them atolls with high land rising from within their central
expanse. The general resemblance between the reefs of the barrier
and atoll classes may be seen in the small, but accurately reduced
charts on <a href="#Plate I">Plate I,</a><sup>1</sup> and this
resemblance can be further shown to extend to every part of the
structure. Beginning with the outside of the reef; many scattered
soundings off Gambier, Oualan, and some other encircled islands,
show that close to the breakers there exists a narrow shelving
margin, beyond which the ocean becomes suddenly unfathomable; but
off the west coast of New Caledonia, Captain Kent<sup>2</sup> found
no bottom with 150 fathoms, at two ships' length from the reef; so
that the slope here must be nearly as precipitous as off the
Maldiva atolls.</p>
<p>I can give little information regarding the kinds of corals
which live on the outer margin. When I visited the reef at Tahiti,
although it was low water, the surf was too violent for me to see
the living masses; but, according to what I heard from some
intelligent native chiefs, they resemble in their rounded and
branchless forms, those on the margin of Keeling atoll. The extreme
verge of the reef, which was visible between the breaking waves at
low water, consisted of a rounded, convex, artificial-like
breakwater, entirely coated with Nulliporæ, and absolutely
similar to that which I have described at Keeling atoll. From what
I heard when at Tahiti, and from the writings of the Revs. W. Ellis
and J. Williams, I conclude that this peculiar structure is common
to most of the encircled islands of the Society Archipelago. The
reef within this mound or breakwater, has an extremely irregular
surface, even more so than between the islets on the reef of
Keeling atoll, with which alone (as there are no islets on the reef
of Tahiti) it can properly be compared. At Tahiti, the reef is very
irregular in width; but round many other encircled islands, for
instance, Vanikoro or Gambier Islands (Figs 1 and 8, <a href=
"#Plate I">Plate I</a>), it is quite as regular, and of the same
average width, as in true atolls. Most barrier-reefs on the inner
side slope irregularly into the lagoon-channel (as the space of
deep water separating the reef from the included land may be
called), but at Vanikoro the reef slopes only for a short distance,
and then terminates abruptly in a submarine wall, forty feet
high,—a structure absolutely similar to that described by
Chamisso in the Marshall atolls.</p>
<p>In the Society Archipelago, Ellis<sup>3</sup> states, that the
reefs generally lie at the distance of from one to one and a half
miles, and, occasionally, even at more than three miles, from the
shore. The central mountains are generally bordered by a fringe of
flat, and often marshy, alluvial</p>
<p class="fnote">1. The authorities from which these charts have
been reduced, together with some remarks on them are given in a
separately appended page, descriptive of the Plates.<br>
2. Dalrymple, "Hydrog. Mem." vol. iii.<br>
3. Consult, on this and other points, the "Polynesian Researches,"
by the Rev. W. Ellis, an admirable work, full of curious
information.</p>
<p> </p>
<hr>
<p class="page"><a name="page 40">page 40</a></p>
<p> </p>
<p>land, from one to four miles in width. This fringe consists of
coral- sand and detritus thrown up from the lagoon-channel, and of
soil washed down from the hills; it is an encroachment on the
channel, analogous to that low and inner part of the islets in many
atolls which is formed by the accumulation of matter from the
lagoon. At Hogoleu (Fig. 2, <a href="#Plate I">Plate I</a>), in the
Caroline Archipelago,<sup>1</sup> the reef on the south side is no
less than twenty miles; on the east side, five; and on the north
side, fourteen miles from the encircled high islands.</p>
<p>The lagoon channels may be compared in every respect with true
lagoons. In some cases they are open, with a level bottom of fine
sand; in others they are choked up with reefs of delicately
branched corals, which have the same general character as those
within the Keeling atoll. These internal reefs either stand
separately, or more commonly skirt the shores of the included high
islands. The depth of the lagoon-channel round the Society Islands
varies from two or three to thirty fathoms; in Cook's<sup>2</sup>
chart of Ulieta, however, there is one sounding laid down of
forty-eight fathoms; at Vanikoro there are several of fifty-four
and one of fifty-six and a half fathoms (English), a depth which
even exceeds by a little that of the interior of the great Maldiva
atolls. Some barrier-reefs have very few islets on them; whilst
others are surmounted by numerous ones; and those round part of
Bolabola (<a href="#Plate I">Plate I,</a> Fig. 5) form a single
linear strip. The islets first appear either on the angles of the
reef, or on the sides of the breaches through it, and are generally
most numerous on the windward side. The reef to leeward retaining
its usual width, sometimes lies submerged several fathoms beneath
the surface; I have already mentioned Gambier Island as an instance
of this structure. Submerged reefs, having a less defined outline,
dead, and covered with sand, have been observed (see <a href=
"#Appendix">Appendix</a>) off some parts of Huaheine and Tahiti.
The reef is more frequently breached to leeward than to windward;
thus I find in Krusenstern's "Memoir on the Pacific," that there
are passages through the encircling reef on the leeward side of
each of the seven Society Islands, which possess ship-harbours; but
that there are openings to windward through the reef of only three
of them. The breaches in the reef are seldom as deep as the
interior lagoon-like channel; they generally occur in front of the
main valleys, a circumstance which can be accounted for, as will be
seen in the fourth chapter, without much difficulty. The breaches
being situated in front of the valleys, which descend indifferently
on all sides, explains their more frequent occurrence through the
windward side of barrier-reefs than through the windward side of
atolls,—for in atolls there is no included land to influence
the position of the breaches.</p>
<p>It is remarkable, that the lagoon-channels round mountainous
islands have not in every instance been long ago filled up with
coral and sediment; but it is more easily accounted for than
appears at first sight. In cases like that of Hogoleu and the
Gambier Islands, where a few</p>
<p class="fnote">1. See "Hydrographical Mem." and the "Atlas of the
Voyage of the <i>Astrolabe</i>," by Captain Dumont D'Urville, p.
428.<br>
2. See the chart in vol. i of Hawkesworth's 4to ed. of "Cook's
First Voyage."</p>
<p> </p>
<hr>
<p class="page"><a name="page 41">page 41</a></p>
<p> </p>
<p>small peaks rise out of a great lagoon, the conditions scarcely
differ from those of an atoll, and I have already shown, at some
length, that the filling up of a true lagoon must be an extremely
slow process. Where the channel is narrow, the agency, which on
unprotected coasts is most productive of sediment, namely the force
of the breakers, is here entirely excluded, and the reef being
breached in the front of the main valleys, much of the finer mud
from the rivers must be transported into the open sea. As a current
is formed by the water thrown over the edge of atoll-formed reefs,
which carries sediment with it through the deep-water breaches, the
same thing probably takes place in barrier-reefs, and this would
greatly aid in preventing the lagoon-channel from being filled up.
The low alluvial border, however, at the foot of the encircled
mountains, shows that the work of filling up is in progress; and at
Maura (<a href="#Plate I">Plate I,</a> Fig. 6), in the Society
group, it has been almost effected, so that there remains only one
harbour for small craft.</p>
<p>If we look at a set of charts of barrier-reefs, and leave out in
imagination the encircled land, we shall find that, besides the
many points already noticed of resemblance, or rather of identity
in structure with atolls, there is a close general agreement in
form, average dimensions, and grouping. Encircling barrier-reefs,
like atolls, are generally elongated, with an irregularly rounded,
though sometimes angular outline. There are atolls of all sizes,
from less than two miles in diameter to sixty miles (excluding
Tilla-dou-Matte, as it consists of a number of almost independent
atoll-formed reefs); and there are encircling barrier- reefs from
three miles and a half to forty-six miles in diameter,—Turtle
Island being an instance of the former, and Hogoleu of the latter.
At Tahiti the encircled island is thirty-six miles in its longest
axis, whilst at Maurua it is only a little more than two miles. It
will be shown, in the last chapter in this volume, that there is
the strictest resemblance in the grouping of atolls and of common
islands, and consequently there must be the same resemblance in the
grouping of atolls and of encircling barrier-reefs.</p>
<p>The islands lying within reefs of this class, are of very
various heights. Tahiti<sup>1</sup> is 7,000 feet; Maurua about
800; Aitutaki 360, and Manouai only 50. The geological nature of
the included land varies: in most cases it is of ancient volcanic
origin, owing apparently to the fact that islands of this nature
are most frequent within all great seas; some, however, are of
madreporitic limestone, and others of primary formation, of which
latter kind New Caledonia offers the best example. The central land
consists either of one island, or of several: thus, in the Society
group, Eimeo stands by itself; while Taha and Raiatea (Fig. 3, <a
href="#Plate I">Plate I</a>), both moderately large islands of
nearly equal size, are included in one reef. Within the reef of the
Gambier group there are four large and some smaller islands (Fig.
8, <a href="#Plate I">Plate I</a>); within that of</p>
<p class="fnote">1. The height of Tahiti is given from Captain
Beechey; Maurua from Mr. F. D. Bennett (<i>Geograph. Journ.</i>
vol. viii, p. 220); Aitutaki from measurements made on board the
<i>Beagle</i>; and Manouai or Harvey Island, from an estimate by
the Rev. J. Williams. The two latter islands, however, are not in
some respects well characterised examples of the encircled
class.</p>
<p> </p>
<hr>
<p class="page"><a name="page 42">page 42</a></p>
<p> </p>
<p>Hogoleu (Fig. 2, <a href="#Plate I">Plate I</a>) nearly a dozen
small islands are scattered over the expanse of one vast
lagoon.</p>
<p>After the details now given, it may be asserted that there is
not one point of essential difference between encircling
barrier-reefs and atolls: the latter enclose a simple sheet of
water, the former encircle an expanse with one or more islands
rising from it. I was much struck with this fact, when viewing,
from the heights of Tahiti, the distant island of Eimeo standing
within smooth water, and encircled by a ring of snow-white
breakers. Remove the central land, and an annular reef like that of
an atoll in an early stage of its formation is left; remove it from
Bolabola, and there remains a circle of linear coral-islets,
crowned with tall cocoa-nut trees, like one of the many atolls
scattered over the Pacific and Indian Oceans.</p>
<p>The barrier-reefs of Australia and of New Caledonia deserve a
separate notice from their great dimensions. The reef on the west
coast of New Caledonia (Fig. 5, <a href="#Plate II">Plate II</a>)
is 400 miles in length; and for a length of many leagues it seldom
approaches within eight miles of the shore; and near the southern
end of the island, the space between the reef and the land is
sixteen miles in width. The Australian barrier extends, with a few
interruptions, for nearly a thousand miles; its average distance
from the land is between twenty and thirty miles; and in some parts
from fifty to seventy. The great arm of the sea thus included, is
from ten to twenty-five fathoms deep, with a sandy bottom; but
towards the southern end, where the reef is further from the shore,
the depth gradually increases to forty, and in some parts to more
than sixty fathoms. Flinders<sup>1</sup> has described the surface
of this reef as consisting of a hard white agglomerate of different
kinds of coral, with rough projecting points. The outer edge is the
highest part; it is traversed by narrow gullies, and at rare
intervals is breached by ship-channels. The sea close outside is
profoundly deep; but, in front of the main breaches, soundings can
sometimes be obtained. Some low islets have been formed on the
reef.</p>
<p>There is one important point in the structure of barrier-reefs
which must here be considered. The accompanying diagrams represent
north and south vertical sections, taken through the highest points
of Vanikoro, Gambier, and Maurua Islands, and through their
encircling reefs. The scale both in the horizontal and vertical
direction is the same, namely, a quarter of an inch to a nautical
mile. The height and width of these islands is known; and I have
attempted to represent the form of the land from the shading of the
hills in the large published charts. It has long been remarked,
even from the time of Dampier, that considerable degree of relation
subsists between the inclination of that part of the land which is
beneath water and that above it; hence the dotted line in the three
sections, probably, does not widely differ in inclination from the
actual submarine prolongation of the land. If we now look at the
outer edge of the reef (AA), and bear in mind that the plummet on
the right hand represents a depth of 1,200 feet, we must conclude
that the vertical thickness of these barrier coral- reefs is very
great.</p>
<p class="fnote">1. Flinders' "Voyage to Terra Australis," vol. ii,
p. 88.</p>
<p> </p>
<hr>
<p class="page"><a name="page 43">page 43</a></p>
<p> </p>
<center><img src="images/vanik.jpg" width="429" height="222" alt=
"Vertical thickness of Vanikoro, Gambier and Maurua."></center>
<br>
<p class="capt">1. V<small>ANIKORO</small>, from the "Atlas of the
Voyage of the <i>Astrolabe</i>," by D. D'Urville.<br>
2. G<small>AMBIER</small> I<small>SLAND</small>, from Beechey.<br>
3. M<small>AURUA</small>, from the "Atlas of the Voyage of the <i>
Coquille</i>," by Duperrey.<br>
<br>
The horizontal line is the level of the sea, from which on the
right hand a plummet descends, representing a depth of 200 fathoms,
or 1,200 feet. The vertical shading shows the section of the land,
and the horizontal shading that of the encircling barrier-reef:
from the smallness of the scale, the lagoon-channel could not be
represented.<br>
AA.—Outer edge of the coral-reefs, where the sea breaks.<br>
BB.—The shore of the encircled islands.</p>
<p>I must observe that if the sections had been taken in any other
direction across these islands, or across other encircled
islands,<sup>1</sup> the result would have been the same. In the
succeeding chapter it will be shown that reef-building polypifers
cannot flourish at great depths,—for instance, it is highly
improbable that they could exist at a quarter of the depth
represented by the plummet on the right hand of the woodcut. Here
there is a great <i>apparent</i> difficulty—how were the
basal parts of these barrier-reef formed? It will, perhaps, occur
to some, that the actual reefs formed of coral are not of great
thickness, but that before their first growth, the coasts of these
encircled islands were deeply eaten into, and a broad but shallow
submarine ledge thus left, on the edge of which the coral grew; but
if this had been the case, the shore would have been invariably
bounded by lofty cliffs, and not have sloped down to the
lagoon-channel, as it does in many instances. On this view,
moreover, the cause of the reef springing up at such a great
distance from the land, leaving a deep and broad moat within,
remains altogether unexplained. A supposition of the same
nature,</p>
<p class="fnote">1. In the fifth chapter an east and west section
across the Island of Bolabola and its barrier-reefs is given, for
the sake of illustrating another point. The unbroken line in it
(woodcut No. 5) is the section referred to. The scale is .57 of an
inch to a mile; it is taken from the "Atlas of the Voyage of the
<i>Coquille</i>," by Duperrey. The depth of the lagoon-channel is
exaggerated.<br>
2. The Rev. D. Tyerman and Mr. Bennett ("Journal of Voyage and
Travels," vol. i, p. 215) have briefly suggested this explanation
of the origin of the encircling reefs of the Society Islands.</p>
<p> </p>
<hr>
<p class="page"><a name="page 44">page 44</a></p>
<p> </p>
<p>and appearing at first more probable is, that the reefs sprung
up from banks of sediment, which had accumulated round the shore
previously to the growth of the coral; but the extension of a bank
to the same distance round an unbroken coast, and in front of those
deep arms of the sea (as in Raiatea, see <a href="#Plate II">Plate
II</a>, Fig. 3) which penetrate nearly to the heart of some
encircled islands, is exceedingly improbable. And why, again,
should the reef spring up, in some cases steep on both sides like a
wall, at a distance of two, three or more miles from the shore,
leaving a channel often between two hundred and three hundred feet
deep, and rising from a depth which we have reason to believe is
destructive to the growth of coral? An admission of this nature
cannot possibly be made. The existence, also, of the deep channel,
utterly precludes the idea of the reef having grown outwards, on a
foundation slowly formed on its outside, by the accumulation of
sediment and coral detritus. Nor, again, can it be asserted, that
the reef-building corals will not grow, excepting at a great
distance from the land; for, as we shall soon see, there is a whole
class of reefs, which take their name from growing closely attached
(especially where the sea is deep) to the beach. At New Caledonia
(see <a href="#Plate II">Plate II</a>, Fig. 5) the reefs which run
in front of the west coast are prolonged in the same line 150 miles
beyond the northern extremity of the island, and this shows that
some explanation, quite different from any of those just suggested,
is required. The continuation of the reefs on each side of the
submarine prolongation of New Caledonia, is an exceedingly
interesting fact, if this part formerly existed as the northern
extremity of the island, and before the attachment of the coral had
been worn down by the action of the sea, or if it originally
existed at its present height, with or without beds of sediment on
each flank, how can we possibly account for the reefs, not growing
on the crest of this submarine portion, but fronting its sides, in
the same line with the reefs which front the shores of the lofty
island? We shall hereafter see, that there is one, and I believe
only one, solution of this difficulty.</p>
<p>One other supposition to account for the position of encircling
barrier-reefs remains, but it is almost too preposterous to be
mentioned; namely, that they rest on enormous submarine craters,
surrounding the included islands. When the size, height, and form
of the islands in the Society group are considered, together with
the fact that all are thus encircled, such a notion will be
rejected by almost every one. New Caledonia, moreover, besides its
size, is composed of primitive formations, as are some of the
Comoro Islands;<sup>1</sup> and Aitutaki consists of calcareous
rock. We must, therefore, reject these several explanations, and
conclude that the vertical thickness of barrier-reefs, from their
outer edges to the foundation on which they rest (from AA in the
section to the dotted lines) is really great; but in this, there is
no difficulty, for it is not necessary to suppose that the coral
has sprung up from an immense depth, as will be evident when the
theory of the upward growth of coral-reefs, during the slow
subsidence of their foundation, is discussed.</p>
<p class="fnote">1. I have been informed that this is the case by
Dr. Allan of Forres, who has visited this group.</p>
<p> </p>
<hr>
<p class="page"><a name="page 45">page 45</a></p>
<p> </p>
<center><b>Chapter III<br>
<br>
FRINGING OR SHORE-REEFS</b></center>
<p class="intro">Reefs of Mauritius.—Shallow channel within
the reef.—Its slow filling up.—Currents of water formed
within it.—Upraised reefs.—Narrow fringing-reefs in
deep seas.—Reefs on the coast of East Africa and of
Brazil.—Fringing-reefs in very shallow seas, round banks of
sediment and on worn-down islands.—Fringing-reefs affected by
currents of the sea.— Coral coating the bottom of the sea,
but not forming reefs.</p>
<p>Fringing-reefs, or, as they have been called by some voyagers,
shore- reefs, whether skirting an island or part of a continent,
might at first be thought to differ little, except in generally
being of less breadth, from barrier-reefs. As far as the
superficies of the actual reef is concerned this is the case; but
the absence of an interior deep-water channel, and the close
relation in their horizontal extension with the probable slope
beneath the sea of the adjoining land, present essential points of
difference.</p>
<p>The reefs which fringe the island of Mauritius offer a good
example of this class. They extend round its whole circumference,
with the exception of two or three parts,<sup>1</sup> where the
coast is almost precipitous, and where, if as is probable the
bottom of the sea has a similar inclination, the coral would have
no foundation on which to become attached. A similar fact may
sometimes be observed even in reefs of the barrier class, which
follow much less closely the outline of the adjoining land; as, for
instance, on the south- east and precipitous side of Tahiti, where
the encircling reef is interrupted. On the western side of the
Mauritius, which was the only part I visited, the reef generally
lies at the distance of about half a mile from the shore; but in
some parts it is distant from one to two, and even three miles. But
even in this last case, as the coast- land is gently inclined from
the foot of the mountains to the sea- beach, and as the soundings
outside the reef indicate an equally gentle slope beneath the
water, there is no reason for supposing that the basis of the reef,
formed by the prolongation of the strata of the island, lies at a
greater depth than that at which the polypifers could begin
constructing the reef. Some allowance, however, must be made for
the outward extension of the corals on a foundation of sand and
detritus, formed from their own wear, which would give to the reef
a somewhat greater vertical thickness, than would otherwise be
possible.</p>
<p>The outer edge of the reef on the western or leeward side of the
island is tolerably well defined, and is a little higher than any
other part. It chiefly consists of large strongly branched corals,
of the genus Madrepora, which also form a sloping bed some way out
to sea: the</p>
<p class="fnote">1. This fact is stated on the authority of the
Officier du Roi, in his extremely interesting "Voyage à
l'Isle de France," undertaken in 1768. According to Captain
Carmichael (Hooker's <i>Bot. Misc.</i> vol. ii, p. 316) on one part
of the coast there is a space for sixteen miles without a reef.</p>
<p> </p>
<hr>
<p class="page"><a name="page 46">page 46</a></p>
<p> </p>
<p>kinds of coral growing in this part will be described in the
ensuing chapter. Between the outer margin and the beach, there is a
flat space with a sandy bottom and a few tufts of living coral; in
some parts it is so shallow, that people, by avoiding the deeper
holes and gullies, can wade across it at low water; in other parts
it is deeper, seldom however exceeding ten or twelve feet, so that
it offers a safe coasting channel for boats. On the eastern and
windward side of the island, which is exposed to a heavy surf, the
reef was described to me as having a hard smooth surface, very
slightly inclined inwards, just covered at low-water, and traversed
by gullies; it appears to be quite similar in structure to the
reefs of the barrier and atoll classes.</p>
<p>The reef of Mauritius, in front of every river and streamlet, is
breached by a straight passage: at Grand Port, however, there is a
channel like that within a barrier-reef; it extends parallel to the
shore for four miles, and has an average depth of ten or twelve
fathoms; its presence may probably be accounted for by two rivers
which enter at each end of the channel, and bend towards each
other. The fact of reefs of the fringing class being always
breached in front of streams, even of those which are dry during
the greater part of the year, will be explained, when the
conditions unfavourable to the growth of coral are considered. Low
coral-islets, like those on barrier-reefs and atolls, are seldom
formed on reefs of this class, owing apparently in some cases to
their narrowness, and in others to the gentle slope of the reef
outside not yielding many fragments to the breakers. On the
windward side, however, of the Mauritius, two or three small islets
have been formed.</p>
<p>It appears, as will be shown in the ensuing chapter, that the
action of the surf is favourable to the vigorous growth of the
stronger corals, and that sand or sediment, if agitated by the
waves, is injurious to them. Hence it is probable that a reef on a
shelving shore, like that of Mauritius, would at first grow up, not
attached to the actual beach, but at some little distance from it;
and the corals on the outer margin would be the most vigorous. A
shallow channel would thus be formed within the reef, and as the
breakers are prevented acting on the shores of the island, and as
they do not ordinarily tear up many fragments from the outside, and
as every streamlet has its bed prolonged in a straight line through
the reef, this channel could be filled up only very slowly with
sediment. But a beach of sand and of fragments of the smaller kinds
of coral seems, in the case of Mauritius, to be slowly encroaching
on the shallow channel. On many shelving and sandy coasts, the
breakers tend to form a bar of sand a little way from the beach,
with a slight increase of depth within it; for instance, Captain
Grey<sup>1</sup> states that the west coast of Australia, in
latitude 24°, is fronted by a sand bar about two hundred yards
in width, on which there is only two feet of water; but within it
the depth increases to two fathoms. Similar bars, more or less
perfect, occur on other coasts. In these cases I suspect that the
shallow channel (which no doubt during storms is occasionally
obliterated) is scooped out by the flowing away of the</p>
<p class="fnote">1. Captain Grey's "Journal of Two Expeditions,"
vol. i, p. 369.</p>
<p> </p>
<hr>
<p class="page"><a name="page 47">page 47</a></p>
<p> </p>
<p>water thrown beyond the line, on which the waves break with the
greatest force. At Pernambuco a bar of hard sandstone,<sup>1</sup>
which has the same external form and height as a coral-reef,
extends nearly parallel to the coast; within this bar currents,
apparently caused by the water thrown over it during the greater
part of each tide, run strongly, and are wearing away its inner
wall. From these facts it can hardly be doubted, that within most
fringing-reefs, especially within those lying some distance from
the land, a return stream must carry away the water thrown over the
outer edge; and the current thus produced, would tend to prevent
the channel being filled up with sediment, and might even deepen it
under certain circumstances. To this latter belief I am led, by
finding that channels are almost universally present within the
fringing- reefs of those islands which have undergone recent
elevatory movements; and this could hardly have been the case, if
the conversion of the very shallow channel into land had not been
counteracted to a certain extent.</p>
<p>A fringing-reef, if elevated in a perfect condition above the
level of the sea, ought to present the singular appearance of a
broad dry moat within a low mound. The author<sup>2</sup> of an
interesting pedestrian tour round the Mauritius, seems to have met
with a structure of this kind: he says "J'observai que là,
où la mer étale, indépendamment des rescifs du
large, il y à terre <i>une espèce d'effoncement</i>
ou chemin couvert naturel. On y pourrait mettre du canon," etc. In
another place he adds, "Avant de passer le Cap, on remarque un gros
banc de corail élevé de plus de quinze pieds: c'est
une espèce de rescif, que la mer abandonné, il regne
au pied une longue flaque d'eau, dont on pourrait faire un bassin
pour de petits vaisseaux." But the margin of the reef, although the
highest and most perfect part, from being most exposed to the surf,
would generally during a slow rise of the land be either partially
or entirely worn down to that level, at which corals could renew
their growth on its upper edge. On some parts of the coast-land of
Mauritius there are little hillocks of coral-rock, which are either
the last remnants of a continuous reef, or of low islets formed on
it. I observed that two such hillocks between Tamarin Bay and the
Great Black River; they were nearly twenty feet high, about two
hundred yards from the present beach, and about thirty feet above
its level. They rose abruptly from a smooth surface, strewed with
worn fragments of coral. They consisted in their lower part of hard
calcareous sandstone, and in their upper of great blocks of several
species of Astræa and Madrepora, loosely aggregated; they
were divided into irregular beds, dipping seaward, in one hillock
at an angle of 8°, and in the other at 18°. I suspect that
the superficial parts of the reefs, which have been upraised
together with the islands they fringe, have generally been much
more modified by the wearing action of the sea, than those of
Mauritius.</p>
<p class="fnote">1. I have described this singular structure in the
<i>Lond. and Edin. Phil. Mag.,</i> October 1841.<br>
2. "Voyage à l'Isle de France, par un Officier du Roi,"
part i, pp. 192, 200.</p>
<p> </p>
<hr>
<p class="page"><a name="page 48">page 48</a></p>
<p> </p>
<p>Many islands<sup>1</sup> are fringed by reefs quite similar to
those of Mauritius; but on coasts where the sea deepens very
suddenly the reefs are much narrower, and their limited extension
seems evidently to depend on the high inclination of the submarine
slope; a relation, which, as we have seen, does not exist in reefs
of the barrier class. The fringing-reefs on steep coasts are
frequently not more than from fifty to one hundred yards in width;
they have a nearly smooth, hard surface, scarcely uncovered at low
water, and without any interior shoal channel, like that within
those fringing-reefs, which lie at a greater distance from the
land. The fragments torn up during gales from the outer margin are
thrown over the reef on the shores of the island. I may give as
instances, Wateeo, where the reef is described by Cook as being a
hundred yards wide; and Mauti and Elizabeth<sup>2</sup> Islands,
where it is only fifty yards in width: the sea round these islands
is very deep.</p>
<p>Fringing-reefs, like barrier-reefs, both surround islands, and
front the shores of continents. In the charts of the eastern coast
of Africa, by Captain Owen, many extensive fringing-reefs are laid
down; thus, for a space of nearly forty miles, from latitude 1°
15' to 1° 45' S., a reef fringes the shore at an average
distance of rather more than one mile, and therefore at a greater
distance than is usual in reefs of this class; but as the
coast-land is not lofty, and as the bottom shoals very gradually
(the depth being only from eight to fourteen fathoms at a mile and
a half outside the reef), its extension thus far from the land
offers no difficulty. The external margin of this reef is
described, as formed of projecting points, within which there is a
space, from six to twelve feet deep, with patches of living coral
on it. At Mukdeesha (lat. 2° 1' N.) "the port is formed," it is
said,<sup>3</sup> "by a long reef extending eastward, four or five
miles, within which there is a narrow channel, with ten to twelve
feet of water at low spring-tides;" it lies at the distance of a
quarter of a mile from the shore. Again, in the plan of Mombas
(lat. 4° S.), a reef extends for thirty-six miles, at the
distance of from half a mile to one mile and a quarter from the
shore; within it, there is a channel navigable "for canoes and
small craft," between six and fifteen feet deep: outside the reef
the depth is about thirty fathoms at the distance of nearly half a
mile. Part of this reef is very symmetrical, and has a uniform
breadth of two hundred yards.</p>
<p>The coast of Brazil is in many parts fringed by reefs. Of these,
some are not of coral formation; for instance, those near Bahia and
in front</p>
<p class="fnote">1. I may give Cuba, as another instance; Mr.
Taylor (<i>Loudon's Mag. of Nat. Hist.,</i> vol. ix, p. 449) has
described a reef several miles in length between Gibara and Vjaro,
which extends parallel to the shore at the distance of between half
and the third part of a mile, and encloses a space of shallow
water, with a sandy bottom and tufts of coral. Outside the edge of
the reef, which is formed of great branching corals, the depth is
six and seven fathoms. This coast has been upheaved at no very
distant geological period."<br>
2. Mauti is described by Lord Byron in the voyage of H.M.S. <i>
Blonde</i>, and Elizabeth Island by Captain Beechey.<br>
3. Owen's "Africa," vol. i, p. 357, from which work the foregoing
facts are likewise taken.</p>
<p> </p>
<hr>
<p class="page"><a name="page 49">page 49</a></p>
<p> </p>
<p>of Pernambuco; but a few miles south of this latter city, the
reef follows<sup>1</sup> so closely every turn of the shore, that I
can hardly doubt it is of coral; it runs at the distance of
three-quarters of a mile from the land, and within it the depth is
from ten to fifteen feet. I was assured by an intelligent pilot
that at Ports Frances and Maceio, the outer part of the reef
consists of living coral, and the inner of a white stone, full of
large irregular cavities, communicating with the sea. The bottom of
the sea off the coast of Brazil shoals gradually to between thirty
and forty fathoms, at the distance of between nine and ten leagues
from the land.</p>
<p>From the description now given, we must conclude that the
dimensions and structure of fringing-reefs depend entirely on the
greater or less inclination of the submarine slope, conjoined with
the fact that reef-building polypifers can exist only at limited
depths. It follows from this, that where the sea is very shallow,
as in the Persian Gulf and in parts of the East Indian Archipelago,
the reefs lose their fringing character, and appear as separate and
irregularly scattered patches, often of considerable area. From the
more vigorous growth of the coral on the outside, and from the
conditions being less favourable in several respects within, such
reefs are generally higher and more perfect in their marginal than
in their central parts; hence these reefs sometimes assume (and
this circumstance ought not to be overlooked) the appearance of
atolls; but they differ from atolls in their central expanse being
much less deep, in their form being less defined, and in being
based on a shallow foundation. But when in a deep sea reefs fringe
banks of sediment, which have accumulated beneath the surface,
round either islands or submerged rocks, they are distinguished
with difficulty on the one hand from encircling barrier-reefs, and
on the other from atolls. In the West Indies there are reefs, which
I should probably have arranged under both these classes, had not
the existence of large and level banks, lying a little beneath the
surface, ready to serve as the basis for the attachment of coral,
been occasionally brought into view by the entire or partial
absence of reefs on them, and had not the formation of such banks,
through the accumulation of sediment now in progress, been
sufficiently evident. Fringing-reefs sometimes coat, and thus
protect the foundations of islands, which have been worn down by
the surf to the level of the sea. According to Ehrenberg, this has
been extensively the case with the islands in the Red Sea, which
formerly ranged parallel to the shores of the mainland, with deep
water within them: hence the reefs now coating their bases are
situated relatively to the land like barrier-reefs, although not
belonging to that class; but there are, as I believe, in the Red
Sea some true barrier-reefs. The reefs of this sea and of the West
Indies will be described in the Appendix. In some cases,
fringing-reefs appear to be considerably modified in outline by the
course of the prevailing currents. Dr. J. Allan informs me that on
the east coast of Madagascar almost every headland and low point of
sand has a coral-reef extending from it in a S.W. and N.E. line,
parallel</p>
<p class="fnote">1. See Baron Roussin's "Pilote du Brésil,"
and accompanying hydrographical memoir.</p>
<p> </p>
<hr>
<p class="page"><a name="page 50">page 50</a></p>
<p> </p>
<p>to the currents on that shore. I should think the influence of
the currents chiefly consisted in causing an extension, in a
certain direction, of a proper foundation for the attachment of the
coral. Round many intertropical islands, for instance the Abrolhos
on the coast of Brazil surveyed by Captain Fitzroy, and, as I am
informed by Mr. Cuming, round the Philippines, the bottom of the
sea is entirely coated by irregular masses of coral, which although
often of large size, do not reach the surface and form proper
reefs. This must be owing, either to insufficient growth, or to the
absence of those kinds of corals which can withstand the breaking
of the waves.</p>
<p>The three classes, atoll-formed, barrier, and fringing-reefs,
together with the modifications just described of the latter,
include all the most remarkable coral formations anywhere existing.
At the commencement of the last chapter in the volume, where I
detail the principles on which the map (<a href="#Plate III">Plate
III</a>) is coloured, the exceptional cases will be enumerated.</p>
<hr width="30%" align="center">
<p> </p>
<center><b>Chapter IV<br>
<br>
ON THE DISTRIBUTION AND GROWTH OF CORAL-REEFS</b></center>
<p>In this chapter I will give all the facts which I have
collected, relating to the distribution of coral-reefs,—to
the conditions favourable to their increase,—to the rate of
their growth,—and to the depth at which they are formed.</p>
<p>These subjects have an important bearing on the theory of the
origin of the different classes of coral-reefs.</p>
<br>
<center><i>Section I</i>—ON THE DISTRIBUTION OF CORAL-REEFS,
AND ON THE CONDITIONS FAVOURABLE TO THEIR INCREASE</center>
<p>With regard to the limits of latitude, over which coral-reefs
extend, I have nothing new to add. The Bermuda Islands, in 32°
15' N., is the point furthest removed from the equator, in which
they appear to exist; and it has been suggested that their
extension so far northward in this instance is owing to the warmth
of the Gulf Stream. In the Pacific, the Loo Choo Islands, in
latitude 27° N., have reefs on their shores, and there is an
atoll in 28° 30', situated N.W. of the Sandwich Archipelago. In
the Red Sea there are coral-reefs in latitude 30°. In the
southern hemisphere coral-reefs do not extend so far from the
equatorial sea. In the Southern Pacific there are only a few reefs
beyond the line of the tropics, but Houtmans Abrolhos, on the
western shores of Australia in latitude 29° S., are of coral
formation.</p>
<p>The proximity of volcanic land, owing to the lime generally
evolved from it, has been thought to be favourable to the increase
of coral- reefs.</p>
<p> </p>
<hr>
<p class="page"><a name="page 51">page 51</a></p>
<p> </p>
<p>There is, however, not much foundation for this view; for
nowhere are coral-reefs more extensive than on the shores of New
Caledonia, and of north-eastern Australia, which consist of primary
formations; and in the largest groups of atolls, namely the
Maldiva, Chagos, Marshall, Gilbert, and Low Archipelagoes, there is
no volcanic or other kind of rock, excepting that formed of
coral.</p>
<p>The entire absence of coral-reefs in certain large areas within
the tropical seas, is a remarkable fact. Thus no coral-reefs were
observed, during the surveying voyages of the <i>Beagle</i> and her
tender on the west coast of South America south of the equator, or
round the Galapagos Islands. It appears, also, that there are
none<sup>1</sup> north of the equator; Mr. Lloyd, who surveyed the
Isthmus of Panama, remarked to me, that although he had seen corals
living in the Bay of Panama, yet he had never observed any reefs
formed by them. I at first attributed this absence of reefs on the
coasts of Peru and of the Galapagos Islands,<sup>2</sup> to the
coldness of the currents from the south, but the Gulf of Panama is
one of the hottest pelagic districts in the world.<sup>3</sup> In
the central parts of the Pacific there are islands entirely free
from reefs; in some few of these cases I have thought that this was
owing to recent volcanic action; but the existence of reefs round
the greater part of Hawaii, one of the Sandwich Islands, shows that
recent volcanic action does not necessarily prevent their
growth.</p>
<p>In the last chapter I stated that the bottom of the sea round
some islands is thickly coated with living corals, which
nevertheless do not form reefs, either from insufficient growth, or
from the species not being adapted to contend with the breaking
waves.</p>
<p>I have been assured by several people, that there are no
coral-reefs on the west coast of Africa,<sup>4</sup> or round the
islands in the Gulf of Guinea. This perhaps may be attributed, in
part, to the sediment brought down by the many rivers debouching on
that coast, and to the extensive mud-</p>
<p class="fnote">1. I have been informed that this is the case, by
Lieutenant Ryder, R.N., and others who have had ample opportunities
for observation.<br>
2. The mean temperature of the surface sea from observations made
by the direction of Captain Fitzroy on the shores of the Galapagos
Islands, between the 16th of September and the 20th of October,
1835, was 68° Fahr. The lowest temperature observed was
58.5° at the south-west end of Albemarle Island; and on the
west coast of this island, it was several times 62° and
63°. The mean temperature of the sea in the Low Archipelago of
atolls, and near Tahiti, from similar observations made on board
the <i>Beagle</i>, was (although further from the equator)
77.5°, the lowest any day being 76.5°. Therefore we have
here a difference of 9.5° in mean temperature, and 18° in
extremes; a difference doubtless quite sufficient to affect the
distribution of organic beings in the two areas.<br>
3. Humboldt's "Personal Narrative," vol. vii, p. 434.<br>
4. It might be concluded, from a paper by Captain Owen
(<i>Geograph. Journ.</i>, vol. ii, p. 89), that the reefs off Cape
St. Anne and the Sherboro' Islands were of coral, although the
author states that they are not purely coralline. But I have been
assured by Lieutenant Holland, R.N., that these reefs are not of
coral, or at least that they do not at all resemble those in the
West Indies.</p>
<p> </p>
<hr>
<p class="page"><a name="page 52">page 52</a></p>
<p> </p>
<p>banks, which line great part of it. But the islands of St.
Helena, Ascension, the Cape Verdes, St. Paul's, and Fernando
Noronha, are, also, entirely without reefs, although they lie far
out at sea, are composed of the same ancient volcanic rocks, and
have the same general form, with those islands in the Pacific, the
shores of which are surrounded by gigantic walls of coral-rock.
With the exception of Bermuda, there is not a single coral-reef in
the central expanse of the Atlantic Ocean. It will, perhaps, be
suggested that the quantity of carbonate of lime in different parts
of the sea, may regulate the presence of reefs. But this cannot be
the case, for at Ascension, the waves charged to excess precipitate
a thick layer of calcareous matter on the tidal rocks; and at St.
Jago, in the Cape Verdes, carbonate of lime not only is abundant on
the shores, but it forms the chief part of some upraised
post-tertiary strata. The apparently capricious distribution,
therefore, of coral-reefs, cannot be explained by any of these
obvious causes; but as the study of the terrestrial and better
known half of the world must convince every one that no station
capable of supporting life is lost,—nay more, that there is a
struggle for each station, between the different orders of
nature,— we may conclude that in those parts of the
intertropical sea, in which there are no coral-reefs, there are
other organic bodies supplying the place of the reef-building
polypifers. It has been shown in the chapter on Keeling atoll that
there are some species of large fish, and the whole tribe of
Holothuriæ which prey on the tenderer parts of the corals. On
the other hand, the polypifers in their turn must prey on some
other organic beings; the decrease of which from any cause would
cause a proportionate destruction of the living coral. The
relations, therefore, which determine the formation of reefs on any
shore, by the vigorous growth of the efficient kinds of coral, must
be very complex, and with our imperfect knowledge quite
inexplicable. From these considerations, we may infer that changes
in the condition of the sea, not obvious to our senses, might
destroy all the coral-reefs in one area, and cause them to appear
in another: thus, the Pacific or Indian Ocean might become as
barren of coral-reefs as the Atlantic now is, without our being
able to assign any adequate cause for such a change.</p>
<p>It has been a question with some naturalists, which part of a
reef is most favourable to the growth of coral. The great mounds of
living Porites and of Millepora round Keeling atoll occur
exclusively on the extreme verge of the reef, which is washed by a
constant succession of breakers; and living coral nowhere else
forms solid masses. At the Marshall islands the larger kinds of
coral (chiefly species of Astræa, a genus closely allied to
Porites) "which form rocks measuring several fathoms in thickness,"
prefer, according to Chamisso,<sup>1</sup> the most violent surf. I
have stated that the outer margin of the Maldiva atolls consists of
living corals (some of which, if not all, are of the same species
with those at Keeling atoll), and here the surf is so tremendous,
that even large ships have been thrown, by a single heave of the
sea, high and dry on the reef, all on board thus escaping with
their lives.</p>
<p class="fnote">1. Kotzebue's "First Voyage" (Eng. Trans.), vol.
iii, pp. 142, 143, 331.</p>
<p> </p>
<hr>
<p class="page"><a name="page 53">page 53</a></p>
<p> </p>
<p>Ehrenberg<sup>1</sup> remarks, that in the Red Sea the strongest
corals live on the outer reefs, and appear to love the surf; he
adds, that the more branched kinds abound a little way within, but
that even these in still more protected places, become smaller.
Many other facts having a similar tendency might be
adduced.<sup>2</sup> It has, however, been doubted by MM. Quoy and
Gaimard, whether any kind of coral can even withstand, much less
flourish in, the breakers of an open sea:<sup>3</sup> they affirm
that the saxigenous lithophytes flourish only where the water is
tranquil, and the heat intense. This statement has passed from one
geological work to another; nevertheless, the protection of the
whole reef undoubtedly is due to those kinds of coral, which cannot
exist in the situations thought by these naturalists to be most
favourable to them. For should the outer and living margin perish,
of any one of the many low coral-islands, round which a line of
great breakers is incessantly foaming, the whole, it is scarcely
possible to doubt, would be washed away and destroyed, in less than
half a century. But the vital energies of the corals conquer the
mechanical power of the waves; and the large fragments of reef torn
up by every storm, are replaced by the slow but steady growth of
the innumerable polypifers, which form the living zone on its outer
edge.</p>
<p>From these facts, it is certain, that the strongest and most
massive corals flourish, where most exposed. The less perfect state
of the reef of most atolls on the leeward and less exposed side,
compared with its state to windward; and the analogous case of the
greater number of breaches on the near sides of those atolls in the
Maldiva Archipelago, which afford some protection to each other,
are obviously explained by this circumstance. If the question had
been, under what conditions the greater number of species of coral,
not regarding their bulk and strength, were developed, I should
answer,—probably in the situations described by MM. Quoy and
Gaimard, where the water is tranquil and the heat intense. The
total number of species of coral in the circumtropical seas must be
very great: in the Red Sea alone, 120 kinds, according to
Ehrenberg,<sup>4</sup> have been observed.</p>
<p>The same author has observed that the recoil of the sea from a
steep shore is injurious to the growth of coral, although waves
breaking over a bank are not so. Ehrenberg also states, that where
there is much sediment, placed so as to be liable to be moved by
the waves there is little or no coral; and a collection of living
specimens placed by him on a sandy shore died in the course of a
few days.<sup>5</sup> An experiment,</p>
<p class="fnote">1. Ehrenberg, "Über die Nätur und
Bildung der Corallen Bänke im rothen Meere," p. 49.<br>
2. In the West Indies, as I am informed by Captain Bird Allen,
R.N., it is the common belief of those, who are best acquainted
with the reefs, that the coral flourishes most, where freely
exposed to the swell of the open sea.<br>
3. "Annales des Sciences Naturelles," tome vi, pp. 276,
278.— "Là où les ondes sont agitées, les
Lytophytés ne peuvent travailler, parce qu'elles
détruiraient leurs fragiles édifices," etc.<br>
4. Ehrenberg, "Über die Nätur," etc., p. 46.<br>
5. <i>Ibid</i>., p. 49.</p>
<p> </p>
<hr>
<p class="page"><a name="page 54">page 54</a></p>
<p> </p>
<p>however, will presently be related in which some large masses of
living coral increased rapidly in size, after having been secured
by stakes on a sandbank. That loose sediment should be injurious to
the living polypifers, appears, at first sight, probable; and
accordingly, in sounding off Keeling atoll, and (as will hereafter
be shown) off Mauritius, the arming of the lead invariably came up
clean, where the coral was growing vigorously. This same
circumstance has probably given rise to a strange belief, which,
according to Captain Owen,<sup>1</sup> is general amongst the
inhabitants of the Maldiva atolls, namely that corals have roots,
and therefore that if merely broken down to the surface, they grow
up again; but, if rooted out, they are permanently destroyed. By
this means the inhabitants keep their harbours clear; and thus the
French Governor of St. Mary's in Madagascar, "cleared out and made
a beautiful little port at that place." For it is probable that
sand would accumulate in the hollows formed by tearing out the
corals, but not on the broken and projecting stumps, and therefore,
in the former case, the fresh growth of the coral might be thus
prevented.</p>
<p>In the last chapter I remarked that fringing-reefs are almost
universally breached, where streams enter the sea.<sup>2</sup> Most
authors have attributed this fact to the injurious effects of the
fresh water, even where it enters the sea only in small quantity,
and during a part of the year. No doubt brackish water would
prevent or retard the growth of coral; but I believe that the mud
and sand which is deposited, even by rivulets when flooded, is a
much more efficient check. The reef on each side of the channel
leading into Port Louis at Mauritius, ends abruptly in a wall, at
the foot of which I sounded and found a bed of thick mud. This
steepness of the sides appears to be a general character in such
breaches. Cook,<sup>3</sup> speaking of one at Raiatea, says, "like
all the rest, it is very steep on both sides." Now, if it were the
fresh water mingling with the salt which prevented the growth of
coral, the reef certainly would not terminate abruptly, but as the
polypifers nearest the impure stream would grow less vigorously
than those farther off, so would the reef gradually thin away. On
the other hand, the sediment brought down from the land would only
prevent the growth of the coral in the line of its deposition, but
would not check it on the side, so that the reefs might increase
till they overhung the bed of the channel. The breaches are much
fewer in number, and front only the larger valleys in reefs of the
encircling barrier class. They probably are kept open in the same
manner as those into the lagoon of an atoll, namely, by the</p>
<p class="fnote">1. Captain Owen on the Geography of the Maldiva
Islands, <i>Geograph. Journal</i>, vol. ii, p. 88.<br>
2. Lieutenant Wellstead and others have remarked that this is the
case in the Red Sea; Dr. Rüppell ("Reise in Abyss." Band. i,
p. 142) says that there are pear-shaped harbours in the upraised
coral- coast, into which periodical streams enter. From this
circumstance, I presume, we must infer that before the upheaval of
the strata now forming the coast-land, fresh water and sediment
entered the sea at these points; and the coral being thus prevented
growing, the pear- shaped harbours were produced.<br>
3. Cook's "First Voyage," vol. ii, p. 271 (Hawkesworth's
edit.)</p>
<p> </p>
<hr>
<p class="page"><a name="page 55">page 55</a></p>
<p> </p>
<p>force of the currents and the drifting outwards of fine
sediment. Their position in front of valleys, although often
separated from the land by deep water lagoon-channels, which it
might be thought would entirely remove the injurious effects both
of the fresh water and the sediment, will receive a simple
explanation when we discuss the origin of barrier-reefs.</p>
<p>In the vegetable kingdom every different station has its
peculiar group of plants, and similar relations appear to prevail
with corals. We have already described the great difference between
the corals within the lagoon of an atoll and those on its outer
margin. The corals, also, on the margin of Keeling Island occurred
in zones; thus the <i>Porites</i> and <i>Millepora complanata</i>
grow to a large size only where they are washed by a heavy sea, and
are killed by a short exposure to the air; whereas, three species
of Nullipora also live amidst the breakers, but are able to survive
uncovered for a part of each tide; at greater depths, a strong
Madrepora and <i>Millepora alcicornis</i> are the commonest kinds,
the former appearing to be confined to this part, beneath the zone
of massive corals, minute encrusting corallines and other organic
bodies live. If we compare the external margin of the reef at
Keeling atoll with that on the leeward side of Mauritius, which are
very differently circumstanced, we shall find a corresponding
difference in the appearance of the corals. At the latter place,
the genus Madrepora is preponderant over every other kind, and
beneath the zone of massive corals there are large beds of
Seriatopora. There is also a marked difference, according to
Captain Moresby,<sup>1</sup> between the great branching corals of
the Red Sea, and those on the reefs of the Maldiva atolls.</p>
<p>These facts, which in themselves are deserving of notice, bear,
perhaps, not very remotely, on a remarkable circumstance which has
been pointed out to me by Captain Moresby, namely, that with very
few exceptions, none of the coral-knolls within the lagoons of
Peros Banhos, Diego Garcia, and the Great Chagos Bank (all situated
in the Chagos group), rise to the surface of the water; whereas all
those, with equally few exceptions, within Solomon and Egmont
atolls in the same group, and likewise within the large southern
Maldiva atolls, reach the surface. I make these statements, after
having examined the charts of each atoll. In the lagoon of Peros
Banhos, which is nearly twenty miles across, there is only one
single reef which rises to the surface; in Diego Garcia there are
seven, but several of these lie close to the margin of the lagoon,
and need scarcely have been reckoned; in the Great Chagos Bank
there is not one. On the other hand, in the lagoons of some of the
great southern Maldiva atolls, although thickly studded with reefs,
every one without exception rises to the surface; and on an average
there are less than two submerged reefs in each atoll; in the
northern atolls, however, the submerged lagoon-reefs are not quite
so rare. The submerged reefs in the Chagos atolls generally have
from one to seven fathoms water on them, but some have from seven
to ten. Most of them are small with</p>
<p class="fnote">1. Captain Moresby on the Northern Maldiva atolls,
<i>Geograph. Journal</i>, vol. v, p. 401.</p>
<p> </p>
<hr>
<p class="page"><a name="page 56">page 56</a></p>
<p> </p>
<p>very steep sides;<sup>1</sup> at Peros Banhos they rise from a
depth of about thirty fathoms, and some of them in the Great Chagos
Bank from above forty fathoms; they are covered, Captain Moresby
informs me, with living and healthy coral, two and three feet high,
consisting of several species. Why then have not these lagoon-reefs
reached the surface, like the innumerable ones in the atolls above
named? If we attempt to assign any difference in their external
conditions, as the cause of this diversity, we are at once baffled.
The lagoon of Diego Garcia is not deep, and is almost wholly
surrounded by its reef; Peros Banhos is very deep, much larger,
with many wide passages communicating with the open sea. On the
other hand, of those atolls, in which all or nearly all the
lagoon-reefs have reached the surface, some are small, others
large, some shallow, others deep, some well-enclosed, and others
open.</p>
<p>Captain Moresby informs me that he has seen a French chart of
Diego Garcia made eighty years before his survey, and apparently
very accurate; and from it he infers, that during this interval
there has not been the smallest change in the depth on any of the
knolls within the lagoon. It is also known that during the last
fifty-one years, the eastern channel into the lagoon has neither
become narrower, nor decreased in depth; and as there are numerous
small knolls of living coral within it, some change might have been
anticipated. Moreover, as the whole reef round the lagoon of this
atoll has been converted into land—an unparalleled case, I
believe, in an atoll of such large size,—and as the strip of
land is for considerable spaces more than half a mile
wide—also a very unusual circumstance,- -we have the best
possible evidence, that Diego Garcia has remained at its present
level for a very long period. With this fact, and with the
knowledge that no sensible change has taken place during eighty
years in the coral-knolls, and considering that every single reef
has reached the surface in other atolls, which do not present the
smallest appearance of being older than Diego Garcia and Peros
Banhos, and which are placed under the same external conditions
with them, one is led to conclude that these submerged reefs,
although covered with luxuriant coral, have no tendency to grow
upwards, and that they would remain at their present levels for an
almost indefinite period.</p>
<p>From the number of these knolls, from their position, size, and
form, many of them being only one or two hundred yards across, with
a rounded outline, and precipitous sides,—it is indisputable
that they have been formed by the growth of coral; and this makes
the case much more remarkable. In Peros Banhos and in the Great
Chagos Bank, some of these almost columnar masses are 200 feet
high, and their summits lie only from two to eight fathoms beneath
the surface; therefore, a small proportional amount more of growth
would cause them to attain the surface, like those numerous knolls,
which rise from an equally great depth within the Maldiva atolls.
We can hardly suppose that time has been wanting for the upward
growth of</p>
<p class="fnote">1. Some of these statements were not communicated
to me verbally by Captain Moresby, but are taken from the MS.
account before alluded to, of the Chagos Group.</p>
<p> </p>
<hr>
<p class="page"><a name="page 57">page 57</a></p>
<p> </p>
<p>the coral, whilst in Diego Garcia, the broad annular strip of
land, formed by the continued accumulation of detritus, shows how
long this atoll has remained at its present level. We must look to
some other cause than the rate of growth; and I suspect it will be
found in the reefs being formed of different species of corals,
adapted to live at different depths. The Great Chagos Bank is
situated in the centre of the Chagos Group, and the Pitt and
Speaker Banks at its two extreme points. These banks resemble
atolls, except in their external rim being about eight fathoms
submerged, and in being formed of dead rock, with very little
living coral on it: a portion nine miles long of the annular reef
of Peros Banhos atoll is in the same condition. These facts, as
will hereafter be shown, render it very probable that the whole
group at some former period subsided seven or eight fathoms; and
that the coral perished on the outer margin of those atolls which
are now submerged, but that it continued alive, and grew up to the
surface on those which are now perfect. If these atolls did
subside, and if from the suddenness of the movement or from any
other cause, those corals which are better adapted to live at a
certain depth than at the surface, once got possession of the
knolls, supplanting the former occupants, they would exert little
or no tendency to grow upwards. To illustrate this, I may observe,
that if the corals of the upper zone on the outer edge of Keeling
atoll were to perish, it is improbable that those of the lower zone
would grow to the surface, and thus become exposed to conditions
for which they do not appear to be adapted. The conjecture, that
the corals on the submerged knolls within the Chagos atolls have
analogous habits with those of the lower zone outside Keeling
atoll, receives some support from a remark by Captain Moresby,
namely, that they have a different appearance from those on the
reefs in the Maldiva atolls, which, as we have seen, all rise to
the surface: he compares the kind of difference to that of the
vegetation under different climates. I have entered at considerable
length into this case, although unable to throw much light on it,
in order to show that an equal tendency to upward growth ought not
to be attributed to all coral-reefs,—to those situated at
different depths,—to those forming the ring of an atoll or
those on the knolls within a lagoon,—to those in one area and
those in another. The inference, therefore, that one reef could not
grow up to the surface within a given time, because another, not
known to be covered with the same species of corals, and not known
to be placed under conditions exactly the same, has not within the
same time reached the surface, is unsound.</p>
<br>
<br>
<center><i>Section II</i>—ON THE RATE OF GROWTH OF
CORAL-REEFS</center>
<p>The remark made at the close of the last section, naturally
leads to this division of our subject, which has not, I think,
hitherto been considered under a right point of view.
Ehrenberg<sup>1</sup> has stated, that in</p>
<p class="fnote">1. Ehrenberg, as before cited, pp. 39, 46, and
50.</p>
<p> </p>
<hr>
<p class="page"><a name="page 58">page 58</a></p>
<p> </p>
<p>the Red Sea, the corals only coat other rocks in a layer from
one to two feet in thickness, or at most to a fathom and a half;
and he disbelieves that, in any case, they form, by their own
proper growth, great masses, stratum over stratum. A nearly similar
observation has been made by MM. Quoy and Gaimard,<sup>1</sup> with
respect to the thickness of some upraised beds of coral, which they
examined at Timor and some other places. Ehrenberg<sup>2</sup> saw
certain large massive corals in the Red Sea, which he imagines to
be of such vast antiquity, that they might have been beheld by
Pharaoh; and according to Mr. Lyell<sup>3</sup> there are certain
corals at Bermuda, which are known by tradition, to have been
living for centuries. To show how slowly coral-reefs grow upwards,
Captain Beechey<sup>4</sup> has adduced the case of the Dolphin
Reef off Tahiti, which has remained at the same depth beneath the
surface, namely about two fathoms and a half, for a period of
sixty-seven years. There are reefs in the Red Sea, which certainly
do not appear<sup>5</sup> to have increased in dimensions during
the last half-century, and from the comparison of old charts with
recent surveys, probably not during the last two hundred years.
These, and other similar facts, have so strongly impressed many
with the belief of the extreme slowness of the growth of corals,
that they have even doubted the possibility of islands in the great
oceans having been formed by their agency. Others, again, who have
not been overwhelmed by this difficulty, have admitted that it
would require thousands, and tens of thousands of years, to form a
mass, even of inconsiderable thickness; but the subject has not, I
believe, been viewed in the proper light.</p>
<p>That masses of considerable thickness have been formed by the
growth of coral, may be inferred with certainty from the following
facts. In the deep lagoons of Peros Banhos and of the Great Chagos
Bank, there are, as already described, small steep-sided knolls
covered with living coral. There are similar knolls in the southern
Maldiva atolls, some of which, as Captain Moresby assures me, are
less than a hundred yards in diameter, and rise to the surface from
a depth of between two hundred and fifty and three hundred feet.
Considering their number, form, and position, it would be
preposterous to suppose that they are based on pinnacles of any
rock, not of coral formation; or that sediment could have been
heaped up into such small and steep isolated cones. As no kind of
living coral grows above the height of a few feet, we are compelled
to suppose that these knolls have been formed by the successive
growth and death of many individuals,—first one being broken
off or killed by some accident, and then another, and one set of
species being replaced by another set with different habits, as the
reef rose nearer the surface, or as other changes supervened. The
spaces between the corals would become filled up with fragments and
sand, and such matter would probably soon be consolidated, for we
learn from</p>
<p class="fnote">1. "Annales des Sciences Nat." tom. vi, p. 28.<br>
2. Ehrenberg, <i>ut sup.</i>, p. 42.<br>
3. Lyell's "Principles of Geology," book iii, ch. xviii.<br>
4. Beechey's "Voyage to the Pacific," ch. viii.<br>
5. Ehrenberg, <i>ut sup.</i>, p. 43.</p>
<p> </p>
<hr>
<p class="page"><a name="page 59">page 59</a></p>
<p> </p>
<p>Lieutenant Nelson,<sup>1</sup> that at Bermuda a process of this
kind takes place beneath water, without the aid of evaporation. In
reefs, also, of the barrier class, we may feel sure, as I have
shown, that masses of great thickness have been formed by the
growth of the coral; in the case of Vanikoro, judging only from the
depth of the moat between the land and the reef, the wall of
coral-rock must be at least three hundred feet in vertical
thickness.</p>
<p>It is unfortunate that the upraised coral-islands in the Pacific
have not been examined by a geologist. The cliffs of Elizabeth
Island, in the Low Archipelago, are eighty feet high, and appear,
from Captain Beechey's description, to consist of a homogeneous
coral- rock. From the isolated position of this island, we may
safely infer that it is an upraised atoll, and therefore that it
has been formed by masses of coral, grown together. Savage Island
seems, from the description of the younger Forster,<sup>2</sup> to
have a similar structure, and its shores are about forty feet high:
some of the Cook Islands also appear<sup>3</sup> to be similarly
composed. Captain Belcher, R.N., in a letter which Captain Beaufort
showed me at the admiralty, speaking of Bow atoll, says, "I have
succeeded in boring forty-five feet through coral-sand, when the
auger became jammed by the falling in of the surrounding <i>
creamy</i> matter." On one of the Maldiva atolls, Captain Moresby
bored to a depth of twenty-six feet, when his auger also broke: he
has had the kindness to give me the matter brought up; it is
perfectly white, and like finely triturated coral-rock.</p>
<p>In my description of Keeling atoll, I have given some facts,
which show that the reef probably has grown outwards; and I have
found, just within the outer margin, the great mounds of Porites
and of Millepora, with their summits lately killed, and their sides
subsequently thickened by the growth of the coral: a layer, also,
of Nullipora had already coated the dead surface. As the external
slope of the reef is the same round the whole of this atoll, and
round many other atolls, the angle of inclination must result from
an adaption between the growing powers of the coral, and the force
of the breakers, and their action on the loose sediment. The reef,
therefore, could not increase outwards, without a nearly equal
addition to every part of the slope, so that the original
inclination might be preserved, and this would require a large
amount of sediment, all derived from the wear of corals and shells,
to be added to the lower part. Moreover, at Keeling atoll, and
probably in many other cases, the different kinds of corals would
have to encroach on each other; thus the Nulliporæ cannot
increase outwards without encroaching on the Porites and <i>
Millepora complanata,</i> as is now taking place; nor these latter
without encroaching on the strongly branched Madreporet, the <i>
Millepora alcicornis,</i> and some Astræas; nor these again
without a foundation being formed for them within the requisite
depth, by the accumulation of sediment. How slow, then, must be the
ordinary lateral or outward growth of such reefs. But off</p>
<p class="fnote">1. "Geological Transactions," vol. v, p. 113.<br>
2. Forster's "Voyage round the World with Cook," vol. ii, pp. 163,
167.<br>
3. Williams's "Narrative of Missionary Enterprise," p. 30.</p>
<p> </p>
<hr>
<p class="page"><a name="page 60">page 60</a></p>
<p> </p>
<p>Christmas atoll, where the sea is much more shallow than is
usual, we have good reason to believe that, within a period not
very remote, the reef has increased considerably in width. The land
has the extraordinary breadth of three miles; it consists of
parallel ridges of shells and broken corals, which furnish "an
incontestable proof," as observed by Cook,<sup>1</sup> "that the
island has been produced by accessions from the sea, and is in a
state of increase." The land is fronted by a coral-reef, and from
the manner in which islets are known to be formed, we may feel
confident that the reef was not three miles wide, when the first,
or most backward ridge, was thrown up; and, therefore, we must
conclude that the reef has grown outwards during the accumulation
of the successive ridges. Here then, a wall of coral-rock of very
considerable breadth has been formed by the outward growth of the
living margin, within a period during which ridges of shells and
corals, lying on the bare surface, have not decayed. There can be
little doubt, from the account given by Captain Beechey, that
Matilda atoll, in the Low Archipelago, has been converted in the
space of thirty-four years, from being, as described by the crew of
a wrecked whaling vessel, a "reef of rocks" into a lagoon-island,
fourteen miles in length, with "one of its sides covered nearly the
whole way with high trees."<sup>2</sup> The islets, also, on
Keeling atoll, it has been shown, have increased in length, and
since the construction of an old chart, several of them have become
united into one long islet; but in this case, and in that of
Matilda atoll, we have no proof, and can only infer as probable,
that the reef, that is the foundation of the islets, has increased
as well as the islets themselves.</p>
<p>After these considerations, I attach little importance, as
indicating the ordinary and still less the possible rate of <i>
outward</i> growth of coral-reefs, to the fact that certain reefs
in the Red Sea have not increased during a long interval of time;
or to other such cases, as that of Ouluthy atoll in the Caroline
group, where every islet, described a thousand years before by
Cantova was found in the same state by
Lutké,<sup>3</sup>—without it could be shown that, in
these cases, the conditions were favourable to the vigorous and
unopposed growth of the corals living in the different zones of
depth, and that a proper basis for the extent of the reef was
present. The former conditions must depend on many contingencies,
and in the deep oceans where coral formations most abound, a basis
within the requisite depth can rarely be present.</p>
<p>Nor do I attach any importance to the fact of certain submerged
reefs, as those off Tahiti, or those within Diego Garcia not now
being nearer the surface than they were many years ago, as an
indication of the rate</p>
<p class="fnote">1. Cook's "Third Voyage," book III, ch. x.<br>
2. Beechey's "Voyage to the Pacific," ch. vii and viii.<br>
3. F. Lutké's "Voyage autour du Monde." In the group Elato,
however, it appears that what is now the islet Falipi, is called in
Cantova's Chart, the Banc de Falipi. It is not stated whether this
has been caused by the growth of coral, or by the accumulation of
sand.</p>
<p> </p>
<hr>
<p class="page"><a name="page 61">page 61</a></p>
<p> </p>
<p>under favourable circumstances of the <i>upward</i> growth of
reefs; after it has been shown, that all the reefs have grown to
the surface in some of the Chagos atolls, but that in neighbouring
atolls which appear to be of equal antiquity and to be exposed to
the same external conditions, every reef remains submerged; for we
are almost driven to attribute this to a difference, not in the
rate of growth, but in the habits of the corals in the two
cases.</p>
<p>In an old-standing reef, the corals, which are so different in
kind on different parts of it, are probably all adapted to the
stations they occupy, and hold their places, like other organic
beings, by a struggle one with another, and with external nature;
hence we may infer that their growth would generally be slow,
except under peculiarly favourable circumstances. Almost the only
natural condition, allowing a quick upward growth of the whole
surface of a reef, would be a slow subsidence of the area in which
it stood; if, for instance, Keeling atoll were to subside two or
three feet, can we doubt that the projecting margin of live coral,
about half an inch in thickness, which surrounds the dead upper
surfaces of the mounds of Porites, would in this case form a
concentric layer over them, and the reef thus increase upwards,
instead of, as at present, outwards? The Nulliporæ are now
encroaching on the Porites and Millepora, but in this case might we
not confidently expect that the latter would, in their turn,
encroach on the Nulliporæ? After a subsidence of this kind,
the sea would gain on the islets, and the great fields of dead but
upright corals in the lagoon, would be covered by a sheet of clear
water; and might we not then expect that these reefs would rise to
the surface, as they anciently did when the lagoon was less
confined by islets, and as they did within a period of ten years in
the schooner-channel, cut by the inhabitants? In one of the Maldiva
atolls, a reef, which within a very few years existed as an islet
bearing cocoa-nut trees, was found by Lieutenant Prentice
"<i>entirely covered with live coral and Madrepore.</i>" The
natives believe that the islet was washed away by a change in the
currents, but if, instead of this, it had quietly subsided, surely
every part of the island which offered a solid foundation, would in
a like manner have become coated with living coral.</p>
<p>Through steps such as these, any thickness of rock, composed of
a singular intermixture of various kinds of corals, shells, and
calcareous sediment, might be formed; but without subsidence, the
thickness would necessarily be determined by the depth at which the
reef-building polypifers can exist. If it be asked, at what rate in
years I suppose a reef of coral favourably circumstanced could grow
up from a given depth; I should answer, that we have no precise
evidence on this point, and comparatively little concern with it.
We see, in innumerable points over wide areas, that the rate has
been sufficient, either to bring up the reefs from various depths
to the surface, or, as is more probable, to keep them at the
surface, during progressive subsidences; and this is a much more
important standard of comparison than any cycle of years.</p>
<p>It may, however, be inferred from the following facts, that the
rate</p>
<p> </p>
<hr>
<p class="page"><a name="page 62">page 62</a></p>
<p> </p>
<p>in years under favourable circumstances would be very far from
slow. Dr. Allan, of Forres, has, in his MS. Thesis deposited in the
library of the Edinburgh University (extracts from which I owe to
the kindness of Dr. Malcolmson), the following account of some
experiments, which he tried during his travels in the years 1830 to
1832 on the east coast of Madagascar. "To ascertain the rise and
progress of the coral-family, and fix the number of species met
with at Foul Point (latitude 17° 40') twenty species of coral
were taken off the reef and planted apart on a sand-bank <i>three
feet deep at low water.</i> Each portion weighed ten pounds, and
was kept in its place by stakes. Similar quantities were placed in
a clump and secured as the rest. This was done in December 1830. In
July following, each detached mass was nearly level with the sea at
low water, quite immovable, and several feet long, stretching as
the parent reef, with the coast current from north to south. The
masses accumulated in a clump were found equally increased, but
some of the species in such unequal ratios, as to be growing over
each other." The loss of Dr. Allan's magnificent collection by
shipwreck, unfortunately prevents its being known to what genera
these corals belonged; but from the numbers experimented on, it is
certain that all the more conspicuous kinds must have been
included. Dr. Allan informs me, in a letter, that he believes it
was a Madrepora, which grew most vigorously. One may be permitted
to suspect that the level of the sea might possibly have been
somewhat different at the two stated periods; nevertheless, it is
quite evident that the growth of the ten-pound masses, during the
six or seven months, at the end of which they were found immovably
fixed<sup>1</sup> and several feet in length, must have been very
great. The fact of the different kinds of coral, when placed in one
clump, having increased in extremely unequal ratios, is very
interesting, as it shows the manner in which a reef, supporting
many species of coral, would probably be affected by a change in
the external conditions favouring one kind more than another. The
growth of the masses of coral in N. and S. lines parallel to the
prevailing currents, whether due to the drifting of sediment or to
the simple movement of the water, is, also, a very interesting
circumstance.</p>
<p>A fact, communicated to me by Lieutenant Wellstead, I.N., in
some degree corroborates the result of Dr. Allan's experiments: it
is, that in the Persian Gulf a ship had her copper bottom encrusted
in the course of twenty months with a layer of coral, <i>two
feet</i> in thickness, which it required great force to remove,
when the vessel was docked: it was not ascertained to what order
this coral belonged. The case of the schooner-channel choked up
with coral in an interval of less than ten years, in the lagoon of
Keeling atoll, should be here borne</p>
<p class="fnote">1. It is stated by De la Beche ("Geological
Manual," p. 143), on the authority of Mr. Lloyd, who surveyed the
Isthmus of Panama, that some specimens of Polypifers, placed by him
in a sheltered pool of water, were found in the course of a few
days firmly fixed by the secretion of a stony matter, to the
bottom.</p>
<p> </p>
<hr>
<p class="page"><a name="page 63">page 63</a></p>
<p> </p>
<p>in mind. We may also infer, from the trouble which the
inhabitants of the Maldiva atolls take to root out, as they express
it, the coral- knolls from their harbours, that their growth can
hardly be very slow.<sup>1</sup></p>
<p>From the facts given in this section, it may be concluded,
first, that considerable thicknesses of rock have certainly been
formed within the present geological area by the growth of coral
and the accumulation of its detritus; and, secondly, that the
increase of individual corals and of reefs, both outwards or
horizontally and upwards or vertically, under the peculiar
conditions favourable to such increase, is not slow, when referred
either to the standard of the average oscillations of level in the
earth's crust, or to the more precise but less important one of a
cycle of years.</p>
<br>
<br>
<center><i>Section III</i>—ON THE DEPTHS AT WHICH
REEF-BUILDING<br>
POLYPIFERS CAN LIVE</center>
<p>I have already described in detail, which might have appeared
trivial, the nature of the bottom of the sea immediately
surrounding Keeling atoll; and I will now describe with almost
equal care the soundings off the fringing-reefs of Mauritius. I
have preferred this arrangement, for the sake of grouping together
facts of a similar nature. I sounded with the wide bell-shaped lead
which Captain Fitzroy used at Keeling Island, but my examination of
the bottom was confined to a few miles of coast (between Port Louis
and Tomb Bay) on the leeward side of the island. The edge of the
reef is formed of great shapeless masses</p>
<p class="fnote">1. Mr. Stutchbury (<i>West of England Journal</i>,
No. I, p. 50.) has described a specimen of Agaricia, "weighing 2
lbs. 9 oz., which surrounds a species of oyster, whose age could
not be more than two years, and yet is completely enveloped by this
dense coral." I presume that the oyster was living when the
specimen was procured; otherwise the fact tells nothing. Mr.
Stutchbury also mentions an anchor, which had become entirely
encrusted with coral in fifty years; other cases, however, are
recorded of anchors which have long remained amidst coral-reefs
without having become coated. The anchor of the <i>Beagle</i>, in
1832, after having been down exactly one month at Rio de Janeiro,
was so thickly coated by two species of Tubularia, that large
spaces of the iron were entirely concealed; the tufts of this horny
zoophyte were between two and three inches in length. It has been
attempted to compute, but I believe erroneously, the rate of growth
of a reef, from the fact mentioned by Captain Beechey, of the <i>
Chama gigas</i> being embedded in coral-rock. But it should be
remembered, that some species of this genus invariably live, both
whilst young and old, in cavities, which the animal has the power
of enlarging with its growth. I saw many of these shells thus
embedded in the outer "flat" of Keeling atoll, which is composed of
dead rock; and therefore the cavities in this case had no relation
whatever with the growth of coral. M. Lesson, also, speaking of
this shell (Partie Zoolog. "Voyage de la <i>Coquille</i>"), has
remarked, "que constamment ses valves étaient engagés
complétement dans la masse des Madrepores."</p>
<p> </p>
<hr>
<p class="page"><a name="page 64">page 64</a></p>
<p> </p>
<p>of branching Madrepores, which chiefly consist of two
species,— apparently <i>M. corymbosa</i> and <i>
pocillifera</i>,— mingled with a few other kinds of coral.
These masses are separated from each other by the most irregular
gullies and cavities, into which the lead sinks many feet. Outside
this irregular border of Madrepores, the water deepens gradually to
twenty fathoms, which depth generally is found at the distance of
from half to three-quarters of a mile from the reef. A little
further out the depth is thirty fathoms, and thence the bank slopes
rapidly into the depths of the ocean. This inclination is very
gentle compared with that outside Keeling and other atolls, but
compared with most coasts it is steep. The water was so clear
outside the reef, that I could distinguish every object forming the
rugged bottom. In this part, and to a depth of eight fathoms, I
sounded repeatedly, and at each cast pounded the bottom with the
broad lead, nevertheless the arming invariably came up perfectly
clean, but deeply indented. From eight to fifteen fathoms a little
calcareous sand was occasionally brought up, but more frequently
the arming was simply indented. In all this space the two
Madrepores above mentioned, and two species of Astræa, with
rather large<sup>1</sup> stars, seemed the commonest kinds; and it
must be noticed that twice at the depth of fifteen fathoms, the
arming was marked with a clean impression of an Astræa.
Besides these lithophytes, some fragments of the <i>Millepora
alcicornis,</i> which occurs in the same relative position at
Keeling Island, were brought up; and in the deeper parts there were
large beds of a Seriatopora, different from <i>S. subulata</i>, but
closely allied to it. On the beach within the reef, the rolled
fragments consisted chiefly of the corals just mentioned, and of a
massive Porites, like that at Keeling atoll, of a Meandrina, <i>
Pocillopora verrucosa</i>, and of numerous fragments of Nullipora.
From fifteen to twenty fathoms the bottom was, with few exceptions,
either formed of sand, or thickly covered with Seriatopora: this
delicate coral seems to form at these depths extensive beds
unmingled with any other kind. At twenty fathoms, one sounding
brought up a fragment of Madrepora apparently <i>M.
pocillifera</i>, and I believe it is the same species (for I
neglected to bring specimens from both stations) which mainly forms
the upper margin of the reef; if so, it grows in depths varying
from</p>
<p class="fnote">1. Since the preceding pages were printed off, I
have received from Mr. Lyell a very interesting pamphlet, entitled
"Remarks upon Coral Formations," etc., by J. Couthouy, Boston,
United States, 1842. There is a statement (p. 6), on the authority
of the Rev. J. Williams, corroborating the remarks made by
Ehrenberg and Lyell (p. 71 of this volume), on the antiquity of
certain individual corals in the Red Sea and at Bermuda; namely,
that at Upolu, one of the Navigator Islands, "particular clumps of
coral are known to the fishermen by name, derived from either some
particular configuration or tradition attached to them, and handed
down from time immemorial." With respect to the thickness of masses
of coral-rock, it clearly appears, from the descriptions given by
Mr. Couthouy (pp. 34, 58) that Mangaia and Aurora Islands are
upraised atolls, composed of coral rock: the level summit of the
former is about three hundred feet, and that of Aurora Island is
two hundred feet above the sea-level.</p>
<p> </p>
<hr>
<p class="page"><a name="page 65">page 65</a></p>
<p> </p>
<p>0 to 20 fathoms. Between 20 and 23 fathoms I obtained several
soundings, and they all showed a sandy bottom, with one exception
at 30 fathoms, when the arming came up scooped out, as if by the
margin of a large Caryophyllia. Beyond 33 fathoms I sounded only
once; and from 86 fathoms, at the distance of one mile and a third
from the edge of the reef, the arming brought up calcareous sand
with a pebble of volcanic rock. The circumstance of the arming
having invariably come up quite clean, when sounding within a
certain number of fathoms off the reefs of Mauritius and Keeling
atoll (eight fathoms in the former case, and twelve in the latter)
and of its having always come up (with one exception) smoothed and
covered with sand, when the depth exceeded twenty fathoms, probably
indicates a criterion, by which the limits of the vigorous growth
of coral might in all cases be readily ascertained. I do not,
however, suppose that if a vast number of soundings were obtained
round these islands, the limit above assigned would be found never
to vary, but I conceive the facts are sufficient to show, that the
exceptions would be few. The circumstance of a <i>gradual</i>
change, in the two cases, from a field of clean coral to a smooth
sandy bottom, is far more important in indicating the depth at
which the larger kinds of coral flourish than almost any number of
separate observations on the depth, at which certain species have
been dredged up. For we can understand the gradation, only as a
prolonged struggle against unfavourable conditions. If a person
were to find the soil clothed with turf on the banks of a stream of
water, but on going to some distance on one side of it, he observed
the blades of grass growing thinner and thinner, with intervening
patches of sand, until he entered a desert of sand, he would safely
conclude, especially if changes of the same kind were noticed in
other places, that the presence of the water was absolutely
necessary to the formation of a thick bed of turf: so may we
conclude, with the same feeling of certainty, that thick beds of
coral are formed only at small depths beneath the surface of the
sea.</p>
<p>I have endeavoured to collect every fact, which might either
invalidate or corroborate this conclusion. Captain Moresby, whose
opportunities for observation during his survey of the Maldiva and
Chagos Archipelagoes have been unrivalled, informs me, that the
upper part or zone of the steep-sided reefs, on the inner and outer
coasts of the atolls in both groups, invariably consists of coral,
and the lower parts of sand. At seven or eight fathoms depth, the
bottom is formed, as could be seen through the clear water, of
great living masses of coral, which at about ten fathoms generally
stand some way apart from each other, with patches of white sand
between them, and at a little greater depth these patches become
united into a smooth steep slope, without any coral. Captain
Moresby, also, informs me in support of his statement, that he
found only decayed coral on the Padua Bank (northern part of the
Laccadive group) which has an average depth between twenty-five and
thirty-five fathoms, but that on some other banks in the same group
with only ten or twelve fathoms water on them (for instance, the
Tillacapeni bank), the coral was living.</p>
<p> </p>
<hr>
<p class="page"><a name="page 66">page 66</a></p>
<p> </p>
<p>With regard to the coral-reefs in the Red Sea, Ehrenberg has the
following passage:—"The living corals do not descend there
into great depths. On the edges of islets and near reefs, where the
depth was small, very many lived; but we found no more even at six
fathoms. The pearl-fishers at Yemen and Massaua asserted that there
was no coral near the pearl-banks at nine fathoms depth, but only
sand. We were not able to institute any more special
researches."<sup>1</sup> I am, however, assured both by Captain
Moresby and Lieutenant Wellstead, that in the more northern parts
of the Red Sea, there are extensive beds of living coral at a depth
of twenty-five fathoms, in which the anchors of their vessels were
frequently entangled. Captain Moresby attributes the less depth, at
which the corals are able to live in the places mentioned by
Ehrenberg, to the greater quantity of sediment there; and the
situations, where they were flourishing at the depth of twenty-five
fathoms, were protected, and the water was extraordinarily limpid.
On the leeward side of Mauritius where I found the coral growing at
a somewhat greater depth than at Keeling atoll, the sea, owing
apparently to its tranquil state, was likewise very clear. Within
the lagoons of some of the Marshall atolls, where the water can be
but little agitated, there are, according to Kotzebue, living beds
of coral in twenty-five fathoms. From these facts, and considering
the manner in which the beds of clean coral off Mauritius, Keeling
Island, the Maldiva and Chagos atolls, graduated into a sandy
slope, it appears very probable that the depth, at which
reef-building polypifers can exist, is partly determined by the
extent of inclined surface, which the currents of the sea and the
recoiling waves have the power to keep free from sediment.</p>
<p>MM. Quoy and Gaimard<sup>2</sup> believe that the growth of
coral is confined within very limited depths; and they state that
they never found any fragment of an Astræa (the genus they
consider most efficient in forming reefs) at a depth above
twenty-five or thirty feet. But we have seen that in several places
the bottom of the sea is paved with massive corals at more than
twice this depth; and at fifteen fathoms (or twice this depth) off
the reefs of Mauritius, the arming was marked with the distinct
impression of a living Astræa. <i>Millepora alcicornis</i>
lives in from 0 to 12 fathoms, and the genera Madrepora and
Seriatopora from 0 to 20 fathoms. Captain Moresby has given me a
specimen of <i>Sideropora scabra</i> (Porites of Lamarck) brought
up alive from 17 fathoms. Mr. Couthouy<sup>3</sup> states that he
has dredged up on the Bahama banks considerable masses of Meandrina
from 16 fathoms, and he has seen this coral growing in 20 fathoms.
A Caryophyllia, half an inch in diameter, was dredged up alive from
80 fathoms off Juan Fernandez (latitude 33° S.) by Captain P.
P. King:<sup>4</sup> this is the most remarkable fact with which I
am acquainted, showing the depth at which a genus of</p>
<p class="fnote">1. Ehrenberg, "Über die Nätur," etc., p.
50.<br>
2. "Annales des Sci. Nat." tom. vi.<br>
3. "Remarks on Coral Formations," p. 12.<br>
4. I am indebted to Mr. Stokes for having kindly communicated this
fact to me, together with much other valuable information.</p>
<p> </p>
<hr>
<p class="page"><a name="page 67">page 67</a></p>
<p> </p>
<p>corals often found on reefs, can exist.<sup>1</sup> We ought,
however, to feel less</p>
<p class="fnote">I will record in the form of a note all the facts
that I have been able to collect on the depths, both within and
without the tropics, at which those corals and corallines can live,
which there is no reason to suppose ever materially aid in the
construction of a reef.</p>
<table width="100%" border="1" align="center" cellspacing="0"
cellpadding="4" summary=
"Name of Zoophyte, Depth in fathoms, Country and S. Latitute, Authority.">
<tr valign="bottom">
<td align="center">Name of Zoophyte</td>
<td align="center">Depth in<br>
Fathoms</td>
<td align="center">Country and<br>
S. Latitude</td>
<td align="center">Authority</td>
</tr>
<tr valign="top">
<td>Sertularia</td>
<td align="center">40</td>
<td align="center">Cape Horn 66°</td>
<td>(Where none is given, the observation is my own.)</td>
</tr>
<tr>
<td>Cellaria</td>
<td align="center">Ditto</td>
<td align="center">Ditto</td>
<td> </td>
</tr>
<tr valign="top">
<td>Cellaria. A minute scarlet encrusted species, found living</td>
<td align="center">190</td>
<td align="center">Keeling Atoll 12°</td>
<td> </td>
</tr>
<tr valign="top">
<td>Cellaria. An allied, small stony sub-generic form</td>
<td align="center">48</td>
<td align="center">S. Cruz River 50°</td>
<td> </td>
</tr>
<tr valign="top">
<td>A coral allied to Vincularia, with eight rows of cells</td>
<td align="center">40</td>
<td align="center">Cape Horn</td>
<td> </td>
</tr>
<tr>
<td>Tubulipora, near to T. patima</td>
<td align="center">Ditto</td>
<td align="center">Ditto</td>
<td> </td>
</tr>
<tr valign="top">
<td>Ditto</td>
<td align="center">94</td>
<td align="center">East Chiloe 43°</td>
<td> </td>
</tr>
<tr valign="top">
<td>Cellepora, several species, and allied sub-generic forms</td>
<td align="center">40</td>
<td align="center">Cape Horn</td>
<td> </td>
</tr>
<tr valign="top">
<td>Ditto</td>
<td align="center">40 and 57</td>
<td align="center">Chonos Arch. 45°</td>
<td> </td>
</tr>
<tr valign="top">
<td>Ditto</td>
<td align="center">48</td>
<td align="center">S. Cruz 50°</td>
<td> </td>
</tr>
<tr valign="top">
<td>Eschara</td>
<td align="center">30</td>
<td align="center">Tierra del Fuego 53°</td>
<td> </td>
</tr>
<tr valign="top">
<td>Ditto</td>
<td align="center">48</td>
<td align="center">S. Cruz R. 50°</td>
<td> </td>
</tr>
<tr>
<td>Retepora</td>
<td align="center">40</td>
<td align="center">Cape Horn</td>
<td> </td>
</tr>
<tr valign="top">
<td>Ditto</td>
<td align="center">100</td>
<td align="center">C. Good Hope 34°</td>
<td>Quoy and Gaimard, <i>Ann. Scien. Nat.,</i> t. vi, p. 284.</td>
</tr>
<tr valign="top">
<td>Millepora, a strong coral with cylindrical branches, of a pink
colour, abut two inches high, resembling in the form of its
orifices M. aspera of Lamarck</td>
<td align="center">94 and 30</td>
<td align="center">E. Chiloe 43°<br>
Tierra del Fuego 53°</td>
<td> </td>
</tr>
<tr valign="top">
<td>Coralium</td>
<td align="center">120</td>
<td align="center">Barbary 33° N.</td>
<td>Peyssonel in paper read to Royal society May 1752.</td>
</tr>
<tr>
<td>Antipathes</td>
<td align="center">16</td>
<td align="center">Chonos 45°</td>
<td> </td>
</tr>
<tr valign="top">
<td>Gorgonia (or an allied form)</td>
<td align="center">160</td>
<td align="center">Abrolhos on the coast of Brazil 18°</td>
<td>Capt. Beechey informed me of this fact in a letter.</td>
</tr>
</table>
<p class="fnote">Ellis ("Nat. Hist. of Coralline," p. 96) states
that Ombellularia was procured in latitude 79° N. <i>
sticking</i> to a <i>line</i> from the depth of 236 fathoms; hence
this coral either must have been floating loose, or was entangled
in stray line at the bottom. Off Keeling atoll a compound Ascidia
(Sigillina) was brought up from 39 fathoms, and a piece of sponge,
apparently living, from 70, and a fragment of Nullipora also
apparently living from 92 fathoms. At a greater depth than 90
fathoms off this coral island, the bottom was thickly strewed with
joints of Halimeda and small fragments of other Nulliporæ,
but all dead. Captain B. Allen, R.N., informs me that in the</p>
<p> </p>
<hr>
<p class="page"><a name="page 68">page 68</a></p>
<p> </p>
<p>surprise at this fact, as Caryophyllia alone of the lamelliform
genera, ranges far beyond the tropics; it is found in
Zetland<sup>1</sup> in Lat. 60° N. in deep water, and I
procured a small species from Tierra del Fuego in Lat. 53° S.
Captain Beechey informs me, that branches of pink and yellow coral
were frequently brought up from between twenty and twenty-five
fathoms off the Low atolls; and Lieutenant Stokes, writing to me
from the N.W. coast of Australia, says that a strongly branched
coral was procured there from thirty fathoms; unfortunately it is
not known to what genera these corals belong.</p>
<p>Although the limit of depth, at which each particular kind of
coral ceases to exist, is far from being accurately known; yet when
we bear in mind the manner in which the clumps of coral gradually
became infrequent at about the same depth, and wholly disappeared
at a greater depth than twenty fathoms, on the slope round Keeling
atoll, on the leeward side of the Mauritius, and at rather less
depth, both without and within the atolls of the Maldiva and Chagos
Archipelagoes; and when we know that the reefs round these islands
do not differ from other coral formations in their form and
structure, we may, I think, conclude that in ordinary cases, reef-
building polypifers do not flourish at greater depths than between
twenty and thirty fathoms.</p>
<p>It has been argued<sup>2</sup> that reefs may possibly rise from
very great depths through the means of small corals, first making a
platform for the growth of the stronger kinds. This, however, is an
arbitrary supposition: it is not always remembered, that in such
cases there is an antagonist power in action, namely, the decay of
organic bodies, when not protected by a covering of sediment, or by
their own rapid growth. We have, moreover, no right to calculate on
unlimited time for the accumulation of small organic bodies into
great masses. Every fact in geology proclaims that neither the
land, nor the bed of the sea retain for indefinite periods the same
level. As well might it be imagined that the British Seas would in
time become choked up with beds of oysters, or that the numerous
small corallines off the inhospitable shores of Tierra del Fuego
would in time form a solid and extensive coral-reef.</p>
<p class="fnote">survey of the West Indies it was noticed that
between the depth of 10 and 200 fathoms, the sounding lead very
generally came up coated with the dead joints of a Halimeda, of
which he showed me specimens. Off Pernambuco, in Brazil, in about
twelve fathoms, the bottom was covered with fragments dead and
alive of a dull red Nullipora, and I infer from Roussin's chart,
that a bottom of this kind extends over a wide area. On the beach,
within the coral-reefs of Mauritius, vast quantities of fragments
of Nulliporæ were piled up. From these facts it appears, that
these simply organized bodies are amongst the most abundant
productions of the sea.<br>
1. Fleming's "British Animals," genus Caryophyllia.<br>
2. <i>Journal of the Royal Geographical Society,</i> 1831, p.
218.</p>
<p> </p>
<hr>
<p class="page"><a name="page 69">page 69</a></p>
<p> </p>
<center><b>Chapter V<br>
<br>
THEORY OF THE FORMATION OF THE DIFFERENT<br>
CLASSES OF CORAL-REEFS</b></center>
<p class="intro">The atolls of the larger archipelagoes are not
formed on submerged craters, or on banks of sediment.—Immense
areas interspersed with atolls.— Their subsidence.—The
effects of storms and earthquakes on atolls.—Recent changes
in their state.—The origin of barrier-reefs and of
atolls.— Their relative forms.—The step-formed ledges
and walls round the shores of some lagoons.—The ring-formed
reefs of the Maldiva atolls.—The submerged condition of parts
or of the whole of some annular reefs.—The disseverment of
large atolls.—The union of atolls by linear reefs.—The
Great Chagos Bank.—Objections from the area and amount of
subsidence required by the theory, considered.—The probable
composition of the lower parts of atolls.</p>
<p>The naturalists who have visited the Pacific, seem to have had
their attention riveted by the lagoon-islands, or
atolls,—those singular rings of coral-land which rise
abruptly out of the unfathomable ocean—and have passed over,
almost unnoticed, the scarcely less wonderful encircling
barrier-reefs. The theory most generally received on the formation
of atolls, is that they are based on submarine craters; but where
can we find a crater of the shape of Bow atoll, which is five times
as long as it is broad (<a href="#Plate I">Plate I</a>, Fig. 4); or
like that of Menchikoff Island (<a href="#Plate II">Plate II</a>,
Fig. 3), with its three loops, together sixty miles in length; or
like Rimsky Korsacoff, narrow, crooked, and fifty-four miles long;
or like the northern Maldiva atolls, made up of numerous
ring-formed reefs, placed on the margin of a disc,—one of
which discs is eighty-eight miles in length, and only from ten to
twenty in breadth? It is, also, not a little improbable, that there
should have existed as many craters of immense size crowded
together beneath the sea, as there are now in some parts atolls.
But this theory lies under a greater difficulty, as will be
evident, when we consider on what foundations the atolls of the
larger archipelagoes rest: nevertheless, if the rim of a crater
afforded a basis at the proper depth, I am far from denying that a
reef like a perfectly characterised atoll might not be formed; some
such, perhaps, now exist; but I cannot believe in the possibility
of the greater number having thus originated.</p>
<p>An earlier and better theory was proposed by
Chamisso;<sup>1</sup> he supposes that as the more massive kinds of
corals prefer the surf, the outer portions, in a reef rising from a
submarine basis, would first reach the surface and consequently
form a ring. But on this view it must be assumed, that in every
case the basis consists of a flat bank; for if it were conically
formed, like a mountainous mass, we can see no reason why the coral
should spring up from the flanks, instead of from the central and
highest parts: considering the number of the atolls in the Pacific
and Indian Oceans, this assumption is very improbable. As the</p>
<p class="fnote">1. Kotzebue's "First Voyage," vol. iii, p.
331.</p>
<p> </p>
<hr>
<p class="page"><a name="page 70">page 70</a></p>
<p> </p>
<p>lagoons of atolls are sometimes even more than forty fathoms
deep, it must, also, be assumed on this view, that at a depth at
which the waves do not break, the coral grows more vigorously on
the edges of a bank than on its central part; and this is an
assumption without any evidence in support of it. I remarked, in
the third chapter, that a reef, growing on a detached bank, would
tend to assume an atoll-like structure; if, therefore, corals were
to grow up from a bank, with a level surface some fathoms
submerged, having steep sides and being situated in a deep sea, a
reef not to be distinguished from an atoll, might be formed: I
believe some such exist in the West Indies. But a difficulty of the
same kind with that affecting the crater theory, runners, as we
shall presently see, this view inapplicable to the greater number
of atolls.</p>
<p>No theory worthy of notice has been advanced to account for
those barrier-reefs, which encircle islands of moderate dimensions.
The great reef which fronts the coast of Australia has been
supposed, but without any special facts, to rest on the edge of a
submarine precipice, extending parallel to the shore. The origin of
the third class or of fringing- reefs presents, I believe, scarcely
any difficulty, and is simply consequent on the polypifers not
growing up from great depths, and their not flourishing close to
gently shelving beaches where the water is often turbid.</p>
<p>What cause, then, has given to atolls and barrier-reefs their
characteristic forms? Let us see whether an important deduction
will not follow from the consideration of these two circumstances,
first, the reef-building corals flourishing only at limited depths;
and secondly, the vastness of the areas interspersed with
coral-reefs and coral- islets, none of which rise to a greater
height above the level of the sea, than that attained by matter
thrown up by the waves and winds. I do not make this latter
statement vaguely; I have carefully sought for descriptions of
every island in the intertropical seas; and my task has been in
some degree abridged by a map of the Pacific, corrected in 1834 by
MM. D'Urville and Lottin, in which the low islands are
distinguished from the high ones (even from those much less than a
hundred feet in height) by being written without a capital letter;
I have detected a few errors in this map, respecting the height of
some of the islands, which will be noticed in the Appendix, where I
treat of coral formations in geographical order. To the Appendix,
also, I must refer for a more particular account of the data on
which the statements on the next page are grounded. I have
ascertained, and chiefly from the writings of Cook, Kotzebue,
Bellinghausen, Duperrey, Beechey, and Lutké, regarding the
Pacific; and from Moresby<sup>1</sup> with respect to the Indian
Ocean, that in the following cases the term "low island" strictly
means land of the height commonly attained by matter thrown up by
the winds and the</p>
<p class="fnote">1. See also Captain Owen's and Lieutenant Wood's
papers in the <i>Geographical Journal</i>, on the Maldiva and
Laccadive Archipelagoes. These officers particularly refer to the
lowness of the islets; but I chiefly ground my assertion respecting
these two groups, and the Chagos group, from information
communicated to me by Captain Moresby.</p>
<p> </p>
<hr>
<p class="page"><a name="page 71">page 71</a></p>
<p> </p>
<p>waves of an open sea. If we draw a line (the plan I have always
adopted) joining the external atolls of that part of the Low
Archipelago in which the islands are numerous, the figure will be a
pointed ellipse (reaching from Hood to Lazaref Island), of which
the longer axis is 840 geographical miles, and the shorter 420
miles; in this space<sup>1</sup> none of the innumerable islets
united into great rings rise above the stated level. The Gilbert
group is very narrow, and 300 miles in length. In a prolonged line
from this group, at the distance of 240 miles, is the Marshall
Archipelago, the figure of which is an irregular square, one end
being broader than the other; its length is 520 miles, with an
average width of 240; these two groups together are 1,040 miles in
length, and all their islets are low. Between the southern end of
the Gilbert and the northern end of Low Archipelago, the ocean is
thinly strewed with islands, all of which, as far as I have been
able to ascertain, are low; so that from nearly the southern end of
the Low Archipelago, to the northern end of the Marshall
Archipelago, there is a narrow band of ocean, more than 4,000 miles
in length, containing a great number of islands, all of which are
low. In the western part of the Caroline Archipelago, there is a
space of 480 miles in length, and about 100 broad, thinly
interspersed with low islands. Lastly, in the Indian Ocean, the
archipelago of the Maldivas is 470 miles in length, and 60 in
breadth; that of the Laccadives is 150 by 100 miles; as there is a
low island between these two groups, they may be considered as one
group of 1,000 miles in length. To this may be added the Chagos
group of low islands, situated 280 miles distant, in a line
prolonged from the southern extremity of the Maldivas. This group,
including the submerged banks, is 170 miles in length and 80 in
breadth. So striking is the uniformity in direction of these three
archipelagoes, all the islands of which are low, that Captain
Moresby, in one of his papers, speaks of them as parts of one great
chain, nearly 1,500 miles long. I am, then, fully justified in
repeating, that enormous spaces, both in the Pacific and Indian
Oceans, are interspersed with islands, of which not one rises above
that height, to which the waves and winds in an open sea can heap
up matter. On what foundations, then, have these reefs and islets
of coral been constructed? A foundation must originally have been
present beneath each atoll at that limited depth, which is
indispensable for the first growth of the reef-building polypifers.
A conjecture will perhaps be hazarded, that the requisite bases
might have been afforded by the accumulation of great banks of
sediment, which owing to the action of superficial currents (aided
possibly by the undulatory movement of the</p>
<p class="fnote">1. I find from Mr. Couthouy's pamphlet (p. 58)
that Aurora Island is about two hundred feet in height; it consists
of coral-rock, and seems to have been formed by the elevation of an
atoll. It lies north- east of Tahiti, close without the line
bounding the space coloured dark blue in the map appended to this
volume. Honden Island, which is situated in the extreme north-west
part of the Low Archipelago, according to measurements made on
board the <i>Beagle</i>, whilst sailing by, is 114 feet from the
<i>summit of the trees</i> to the water's edge. This island
appeared to resemble the other atolls of the group.</p>
<p> </p>
<hr>
<p class="page"><a name="page 72">page 72</a></p>
<p> </p>
<p>sea) did not quite reach the surface,—as actually appears
to have been the case in some parts of the West Indian Sea. But in
the form and disposition of the groups of atolls, there is nothing
to countenance this notion; and the assumption without any proof,
that a number of immense piles of sediment have been heaped on the
floor of the great Pacific and Indian Oceans, in their central
parts far remote from land, and where the dark blue colour of the
limpid water bespeaks its purity, cannot for one moment be
admitted.</p>
<p>The many widely-scattered atolls must, therefore, rest on rocky
bases. But we cannot believe that the broad summit of a mountain
lies buried at the depth of a few fathoms beneath every atoll, and
nevertheless throughout the immense areas above-named, with not one
point of rock projecting above the level of the sea; for we may
judge with some accuracy of mountains beneath the sea, by those on
the land; and where can we find a single chain several hundred
miles in length and of considerable breadth, much less several such
chains, with their many broad summits attaining the same height,
within from 120 to 180 feet? If the data be thought insufficient,
on which I have grounded my belief, respecting the depth at which
the reef-building polypifers can exist, and it be assumed that they
can flourish at a depth of even one hundred fathoms, yet the weight
of the above argument is but little diminished, for it is almost
equally improbable, that as many submarine mountains, as there are
low islands in the several great and widely separated areas above
specified, should all rise within six hundred feet of the surface
of the sea and not one above it, as that they should be of the same
height within the smaller limit of one or two hundred feet. So
highly improbable is this supposition, that we are compelled to
believe, that the bases of the many atolls did never at any one
period all lie submerged within the depth of a few fathoms beneath
the surface, but that they were brought into the requisite position
or level, some at one period and some at another, through movements
in the earth's crust. But this could not have been effected by
elevation, for the belief that points so numerous and so widely
separated were successively uplifted to a certain level, but that
not one point was raised above that level, is quite as improbable
as the former supposition, and indeed differs little from it. It
will probably occur to those who have read Ehrenberg's account of
the Reefs of the Red Sea, that many points in these great areas may
have been elevated, but that as soon as raised, the protuberant
parts were cut off by the destroying action of the waves: a
moment's reflection, however, on the basin-like form of the atolls,
will show that this is impossible; for the upheaval and subsequent
abrasion of an island would leave a flat disc, which might become
coated with coral, but not a deeply concave surface; moreover, we
should expect to see, in some parts at least, the rock of the
foundation brought to the surface. If, then, the foundations of the
many atolls were not uplifted into the requisite position, they
must of necessity have subsided into it; and this at once solves
every difficulty,<sup>1</sup></p>
<p class="fnote">1. The additional difficulty on the crater
hypothesis before alluded to, will now be evident; for on this view
the volcanic action must be supposed to</p>
<p> </p>
<hr>
<p class="page"><a name="page 73">page 73</a></p>
<p> </p>
<p>for we may safely infer, from the facts given in the last
chapter, that during a gradual subsidence the corals would be
favourably circumstanced for building up their solid frame works
and reaching the surface, as island after island slowly
disappeared. Thus areas of immense extent in the central and most
profound parts of the great oceans, might become interspersed with
coral-islets, none of which would rise to a greater height than
that attained by detritus heaped up by the sea, and nevertheless
they might all have been formed by corals, which absolutely
required for their growth a solid foundation within a few fathoms
of the surface.</p>
<p>It would be out of place here to do more than allude to the many
facts, showing that the supposition of a gradual subsidence over
large areas is by no means improbable. We have the clearest proof
that a movement of this kind is possible, in the upright trees
buried under the strata many thousand feet in thickness; we have
also every reason for believing that there are now large areas
gradually sinking, in the same manner as others are rising. And
when we consider how many parts of the surface of the globe have
been elevated within recent geological periods, we must admit that
there have been subsidences on a corresponding scale, for otherwise
the whole globe would have swollen. It is very remarkable that Mr.
Lyell,<sup>1</sup> even in the first edition of his "Principles of
Geology," inferred that the amount of subsidence in the Pacific
must have exceeded that of elevation, from the area of land being
very small relatively to the agents there tending to form it,
namely, the growth of coral and volcanic action. But it will be
asked, are there any direct proofs of a subsiding movement in those
areas, in which subsidence will explain a phenomenon otherwise
inexplicable? This, however, can hardly be expected, for it must
ever be most difficult, excepting in countries long civilised, to
detect a movement, the tendency of which is to conceal the part
affected. In barbarous and semi-</p>
<p class="fnote">have formed within the areas specified a vast
number of craters, all rising within a few fathoms of the surface,
and not one above it. The supposition that the craters were at
different times upraised above the surface, and were there abraded
by the surf and subsequently coated by corals, is subject to nearly
the same objections with those given above in this paragraph; but I
consider it superfluous to detail all the arguments opposed to such
a notion. Chamisso's theory, from assuming the existence of so many
banks, all lying at the proper depth beneath the water, is also
vitally defective. The same observation applies to an hypothesis of
Lieutenant Nelson's ("Geolog. Trans." vol. v, p. 122), who supposes
that the ring-formed structure is caused by a greater number of
germs of corals becoming attached to the declivity, than to the
central plateau of a submarine bank: it likewise applies to the
notion formerly entertained (Forster's "Observ.," p. 151), that
lagoon-islands owe their peculiar form to the instinctive
tendencies of the polypifers. According to this latter view, the
corals on the outer margin of the reef instinctively expose
themselves to the surf in order to afford protection to corals
living in the lagoon, which belong to other genera, and to other
families!<br>
1. "Principles of Geology," sixth edition, vol. iii, p. 386.</p>
<p> </p>
<hr>
<p class="page"><a name="page 74">page 74</a></p>
<p> </p>
<p>civilised nations how long might not a slow movement, even of
elevation such as that now affecting Scandinavia, have escaped
attention!</p>
<p>Mr. Williams<sup>1</sup> insists strongly that the traditions of
the natives, which he has taken much pains in collecting, do not
indicate the appearance of any new islands: but on the theory of a
gradual subsidence, all that would be apparent would be, the water
sometimes encroaching slowly on the land, and the land again
recovering by the accumulation of detritus its former extent, and
perhaps sometimes the conversion of an atoll with coral islets on
it, into a bare or into a sunken annular reef. Such changes would
naturally take place at the periods when the sea rose above its
usual limits, during a gale of more than ordinary strength; and the
effects of the two causes would be hardly distinguishable. In
Kotzebue's "Voyage" there are accounts of islands, both in the
Caroline and Marshall Archipelagoes, which have been partly washed
away during hurricanes; and Kadu, the native who was on board one
of the Russian vessels, said "he saw the sea at Radack rise to the
feet of the cocoa-nut trees; but it was conjured in
time."<sup>2</sup> A storm lately entirely swept away two of the
Caroline islands, and converted them into shoals; it partly, also,
destroyed two other islands.<sup>3</sup> According to a tradition
which was communicated to Captain Fitzroy, it is believed in the
Low Archipelago, that the arrival of the first ship caused a great
inundation, which destroyed many lives. Mr. Stutchbury relates,
that in 1825, the western side of Chain Atoll, in the same group,
was completely devastated by a hurricane, and not less than 300
lives lost: "in this instance it was evident, even to the natives,
that the hurricane alone was not sufficient to account for the
violent agitation of the ocean."<sup>4</sup> That considerable
changes have taken place recently in some of the atolls in the Low
Archipelago, appears certain from the case already given of Matilda
Island: with respect to Whitsunday and Gloucester Islands in this
same group, we must either attribute great inaccuracy to their
discoverer, the famous circumnavigator Wallis, or believe that they
have undergone a considerable change in the period of fifty-nine
years, between his voyage and that of Captain Beechey's. Whitsunday
Island is described by Wallis as "about four miles long, and three
wide," now it is only one mile and a half long. The appearance of
Gloucester Island, in Captain Beechey's words,<sup>5</sup> has been
accurately described by its discoverer, but its present form and
extent differ materially." Blenheim reef, in the Chagos group,
consists of a water-washed annular reef, thirteen miles in
circumference, surrounding a lagoon ten fathoms deep: on its
surface there were a few worn patches of conglomerate coral-rock,
of about the size of hovels; and these Captain Moresby</p>
<p class="fnote">1. Williams's "Narrative of Missionary
Enterprise," p. 31.<br>
2. Kotzebue's "First Voyage," vol. iii, p. 168.<br>
3. M. Desmoulins in "Comptes Rendus," 1840, p. 837.<br>
4. <i>West of England Journal</i>, No. I, p. 35.<br>
5. Beechey's "Voyage to the Pacific," chap. vii, and Wallis's
"Voyage in the <i>Dolphin</i>," chap. iv.</p>
<p> </p>
<hr>
<p class="page"><a name="page 75">page 75</a></p>
<p> </p>
<p>considered as being, without doubt, the last remnants of islets;
so that here an atoll has been converted into an atoll-formed reef.
The inhabitants of the Maldiva Archipelago, as long ago as 1605,
declared, "that the high tides and violent currents were
diminishing the number of the islands:"<sup>1</sup> and I have
already shown, on the authority of Captain Moresby, that the work
of destruction is still in progress; but that on the other hand the
first formation of some islets is known to the present inhabitants.
In such cases, it would be exceedingly difficult to detect a
gradual subsidence of the foundation, on which these mutable
structures rest.</p>
<p>Some of the archipelagoes of low coral-islands are subject to
earthquakes: Captain Moresby informs me that they are frequent,
though not very strong, in the Chagos group, which occupies a very
central position in the Indian Ocean, and is far from any land not
of coral formation. One of the islands in this group was formerly
covered by a bed of mould, which, after an earthquake, disappeared,
and was believed by the residents to have been washed by the rain
through the broken masses of underlying rock; the island was thus
rendered unproductive. Chamisso<sup>2</sup> states, that
earthquakes are felt in the Marshall atolls, which are far from any
high land, and likewise in the islands of the Caroline Archipelago.
On one of the latter, namely Oulleay atoll, Admiral Lutké,
as he had the kindness to inform me, observed several straight
fissures about a foot in width, running for some hundred yards
obliquely across the whole width of the reef. Fissures indicate a
stretching of the earth's crust, and, therefore, probably changes
in its level; but these coral-islands, which have been shaken and
fissured, certainly have not been elevated, and, therefore,
probably they have subsided. In the chapter on Keeling atoll, I
attempted to show by direct evidence, that the island underwent a
movement of subsidence, during the earthquakes lately felt
there.</p>
<p>The facts stand thus;—there are many large tracts of
ocean, without any high land, interspersed with reefs and islets,
formed by the growth of those kinds of corals, which cannot live at
great depths; and the existence of these reefs and low islets, in
such numbers and at such distant points, is quite inexplicable,
excepting on the theory, that the bases on which the reefs first
became attached, slowly and successively sank beneath the level of
the sea, whilst the corals continued to grow upwards. No positive
facts are opposed to this view, and some general considerations
render it probable. There is evidence of change in form, whether or
not from subsidence, on some of these coral-islands; and there is
evidence of subterranean disturbances beneath them. Will then the
theory, to which we have thus been led, solve the curious
problem,—what has given to each class of reef its peculiar
form?</p>
<p>Let us in imagination place within one of the subsiding areas,
an island surrounded by a "fringing-reef,"—that kind, which
alone offers no difficulty in the explanation of its origin. Let
the unbroken lines,</p>
<p class="fnote">1. See an extract from Pyrard's Voyage in Captain
Owen's paper on the Maldiva Archipelago, in the <i>Geographical
Journal</i>, vol. ii, p. 84.<br>
2. See Chamisso, in Kotzebue's "First Voyage," vol. iii, p. 182
and 136.</p>
<p> </p>
<hr>
<p class="page"><a name="page 76">page 76</a></p>
<p> </p>
<p>and the oblique shading in the woodcut (No. 4) represent a
vertical section through such an island; and the horizontal shading
will represent the section of the reef. Now, as the island sinks
down, either a few feet at a time or quite insensibly, we may
safely infer from what we know of the conditions favourable to the
growth of coral, that the living masses bathed by the surf on the
margin of the reef, will soon regain the surface. The water,
however, will encroach, little by little, on the shore, the island
becoming lower and smaller, and the space between the edge of the
reef and the beach proportionately broader. A section of the reef
and island in this state, after a subsidence of several hundred
feet, is given by the dotted lines: coral-islets are supposed to
have been formed on the new reef, and a ship is anchored in the
lagoon-channel. This section is in every respect that of an
encircling barrier-reef; it is, in fact, a section
taken<sup>1</sup> east and west through the highest point of the
encircled island of Bolabola; of which a plan is given in <a href=
"#Plate I">Plate I</a>, Fig. 5. The same section is more clearly
shown in the following woodcut (No. 5) by the unbroken lines. The
width of the reef, and its slope, both on the outer and inner side,
will have been determined by the growing powers of the coral, under
the conditions (for instance the force of the breakers and of the
currents) to which it has been exposed; and the lagoon-channel will
be deeper or shallower, in proportion to the growth of the
delicately branched corals within the reef, and to the accumulation
of sediment, relatively, also, to the rate of subsidence and the
length of the intervening stationary periods.</p>
<img src="images/no4.jpg" width="472" height="141" alt=
"Vertical section of an island of Bolabola."><br>
<p class="capt">AA—Outer edge of the reef at the level of the
sea.<br>
BB—Shores of the island.<br>
A'A'—Outer edge of the reef, after its upward growth during a
period of subsidence.<br>
CC—The lagoon-channel between the reef and the shores of the
now encircled land.<br>
B'B'—The shores of the encircled island.<br>
<br>
N.B.—In this, and the following woodcut, the subsidence of
the land could only be represented by an apparent rise in the level
of the sea.</p>
<p>It is evident in this section, that a line drawn perpendicularly
down from the outer edge of the new reef to the foundation of solid
rock,</p>
<p class="fnote">1. The section has been made from the chart given
in the "Atlas of the Voyage of the <i>Coquille</i>." The scale is
.57 of an inch to a mile. The height of the island, according to M.
Lesson, is 4,026 feet. The deepest part of the lagoon-channel is
162 feet; its depth is exaggerated in the woodcut for the sake of
clearness.</p>
<p> </p>
<hr>
<p class="page"><a name="page 77">page 77</a></p>
<p> </p>
<p>exceeds by as many feet as there have been feet of subsidence,
that small limit of depth at which the effective polypifers can
live—the corals having grown up, as the whole sank down, from
a basis formed of other corals and their consolidated fragments.
Thus the difficulty on this head, which before seemed so great,
disappears.</p>
<p>As the space between the reef and the subsiding shore continued
to increase in breadth and depth, and as the injurious effects of
the sediment and fresh water borne down from the land were
consequently lessened, the greater number of the channels, with
which the reef in its fringing state must have been breached,
especially those which fronted the smaller streams, will have
become choked up with the growth of coral: on the windward side of
the reef, where the coral grows most vigorously, the breaches will
probably have first been closed. In barrier-reefs, therefore, the
breaches kept open by draining the tidal waters of the
lagoon-channel, will generally be placed on the leeward side, and
they will still face the mouths of the larger streams, although
removed beyond the influence of their sediment and fresh
water;—and this, it has been shown, is commonly the case.</p>
<img src="images/no5.jpg" width="446" height="179" alt=
"Vertical section of an island of Bolabola."><br>
<p class="capt">A'A'—Outer edges of the barrier-reef at the
level of the sea. The cocoa-nut trees represent coral-islets formed
on the reef.<br>
CC—The lagoon-channel.<br>
B'B'—The shores of the island, generally formed of low
alluvial land and of coral detritus from the lagoon-channel.<br>
A"A"—The outer edges of the reef now forming an atoll.<br>
C'—The lagoon of the newly formed atoll. According to the
scale, the depth of the lagoon and of the lagoon-channel is
exaggerated.</p>
<p>Referring to the diagram shown above, in which the newly formed
barrier-reef is represented by unbroken lines, instead of by dots
as in the former woodcut, let the work of subsidence go on, and the
doubly pointed hill will form two small islands (or more, according
to the number of the hills) included within one annular reef. Let
the island continue subsiding, and the coral-reef will continue
growing up on its own foundation, whilst the water gains inch by
inch on the land, until the last and highest pinnacle is covered,
and there remains a perfect atoll. A vertical section of this atoll
is shown in the woodcut by the dotted lines;—a ship is
anchored in its lagoon, but islets are not supposed yet to have
been formed on the reef. The depth of the lagoon and the</p>
<p> </p>
<hr>
<p class="page"><a name="page 78">page 78</a></p>
<p> </p>
<p>width and slope of the reef, will depend on the circumstances
just referred to under barrier-reefs. Any further subsidence will
produce no change in the atoll, except perhaps a diminution in its
size, from the reef not growing vertically upwards; but should the
currents of the sea act violently upon it, and should the corals
perish on part or on the whole of its margin, changes would result
during subsidence which will be presently noticed. I may here
observe, that a bank either of rock or of hardened sediment, level
with the surface of the sea, and fringed with living coral, would
(if not so small as to allow the central space to be quickly filled
up with detritus) by subsidence be converted immediately into an
atoll, without passing, as in the case of a reef fringing the shore
of an island, through the intermediate form of a barrier-reef. If
such a bank lay a few fathoms submerged, the simple growth of the
coral (as remarked in the third chapter) without the aid of
subsidence, would produce a structure scarcely to be distinguished
from a true atoll; for in all cases the corals on the outer margin
of a reef, from having space and being freely exposed to the open
sea, will grow vigorously and tend to form a continuous ring whilst
the growth of the less massive kinds on the central expanse, will
be checked by the sediment formed there, and by that washed inwards
by the breakers; and as the space becomes shallower, their growth
will, also, be checked by the impurities of the water, and probably
by the small amount of food brought by the enfeebled currents, in
proportion to the surface of living reefs studded with innumerable
craving mouths: the subsidence of a reef based on a bank of this
kind, would give depth to its central expanse or lagoon, steepness
to its flanks, and through the free growth of the coral, symmetry
to its outline:—I may here repeat that the larger groups of
atolls in the Pacific and Indian Oceans cannot be supposed to be
founded on banks of this nature.</p>
<p>If, instead of the island in the diagram, the shore of a
continent fringed by a reef had subsided, a great barrier-reef,
like that on the north- east coast of Australia, would have
necessarily resulted; and it would have been separated from the
main land by a deep-water channel, broad in proportion to the
amount of subsidence, and to the less or greater inclination of the
neighbouring coast-line. The effect of the continued subsidence of
a great barrier-reef of this kind, and its probable conversion into
a chain of separate atolls, will be noticed, when we discuss the
apparent progressive disseverment of the larger Maldiva atolls.</p>
<p>We now are able to perceive that the close similarity in form,
dimensions, structure, and relative position (which latter point
will hereafter be more fully noticed) between fringing and
encircling barrier-reefs, and between these latter and atolls, is
the necessary result of the transformation, during subsidence of
the one class into the other. On this view, the three classes of
reefs ought to graduate into each other. Reefs having intermediate
character between those of the fringing and barrier classes do
exist; for instance, on the south-west coast of Madagascar, a reef
extends for several miles, within which there is a broad channel
from seven to eight fathoms deep, but the sea does not deepen
abruptly outside the reef. Such cases, however, are open to</p>
<p> </p>
<hr>
<p class="page"><a name="page 79">page 79</a></p>
<p> </p>
<p>some doubts, for an old fringing-reef, which had extended itself
a little on a basis of its own formation, would hardly be
distinguishable from a barrier-reef, produced by a small amount of
subsidence, and with its lagoon-channel nearly filled up with
sediment during a long stationary period. Between barrier-reefs,
encircling either one lofty island or several small low ones, and
atolls including a mere expanse of water, a striking series can be
shown: in proof of this, I need only refer to the first plate in
this volume, which speaks more plainly to the eye, than any
description could to the ear. The authorities from which the charts
have been engraved, together with some remarks on them and
descriptive of the plates, are given above. At New Caledonia (<a
href="#Plate II">Plate II</a>, Fig. 5.) the barrier-reefs extend
for 150 miles on each side of the submarine prolongation of the
island; and at their northern extremity they appear broken up and
converted into a vast atoll- formed reef, supporting a few low
coral-islets: we may imagine that we here see the effects of
subsidence actually in progress, the water always encroaching on
the northern end of the island, towards which the mountains slope
down, and the reefs steadily building up their massive fabrics in
the lines of their ancient growth.</p>
<p>We have as yet only considered the origin of barrier-reefs and
atolls in their simplest form; but there remain some peculiarities
in structure and some special cases, described in the two first
chapters, to be accounted for by our theory. These consist—in
the inclined ledge terminated by a wall, and sometimes succeeded by
a second ledge with a wall, round the shores of certain lagoons and
lagoon-channels; a structure which cannot, as I endeavoured to
show, be explained by the simple growing powers of the
corals,—in the ring or basin-like forms of the central reefs,
as well as of the separate marginal portions of the northern
Maldiva atolls,— in the submerged condition of the whole, or
of parts of certain barrier and atoll-formed reefs; where only a
part is submerged, this being generally to leeward,—in the
apparent progressive disseverment of some of the Maldiva
atolls,—in the existence of irregularly formed atolls, some
being tied together by linear reefs, and others with spurs
projecting from them,—and, lastly, in the structure and
origin of the Great Chagos Bank.</p>
<p><i>Step-formed ledges round certain lagoons.</i>—If we
suppose an atoll to subside at an extremely slow rate, it is
difficult to follow out the complex results. The living corals
would grow up on the outer margin; and likewise probably in the
gullies and deeper parts of the bare surface of the annular reef;
the water would encroach on the islets, but the accumulation of
fresh detritus might possibly prevent their entire submergence.
After a subsidence of this very slow nature, the surface of the
annular reef sloping gently into the lagoon, would probably become
united with the irregular reefs and banks of sand, which line the
shores of most lagoons. Should, however, the atoll be carried down
by a more rapid movement, the whole surface of the annular reef,
where there was a foundation of solid matter, would be favourably
circumstanced for the fresh growth of coral; but as the corals grew
upwards on its exterior margin, and the waves broke heavily on
this</p>
<p> </p>
<hr>
<p class="page"><a name="page 80">page 80</a></p>
<p> </p>
<p>part, the increase of the massive polypifers on the inner side
would be checked from the want of water. Consequently, the exterior
parts would first reach the surface, and the new annular reef thus
formed on the old one, would have its summit inclined inwards, and
be terminated by a subaqueous wall, formed by the upward growth of
the coral (before being much checked), from the inner edge of the
solid parts of the old reef. The inner portion of the new reef,
from not having grown to the surface, would be covered by the
waters of the lagoon. Should a subsidence of the same kind be
repeated, the corals would again grow up in a wall, from all the
solid parts of the resunken reef, and, therefore, not from within
the sandy shores of the lagoon; and the inner part of the new
annular reef would, from being as before checked in its upward
growth, be of less height than the exterior parts, and therefore
would not reach the surface of the lagoon. In this case the shores
of the lagoon would be surrounded by two inclined ledges, one
beneath the other, and both abruptly terminated by subaqueous
cliffs.<sup>1</sup></p>
<p><i>The ring or basin-formed reefs of the northern Maldiva
atolls.</i>—I may first observe, that the reefs within the
lagoons of atolls and within lagoon-channels, would, if favourably
circumstanced, grow upwards during subsidence in the same manner as
the annular rim; and, therefore, we might expect that such lagoon-
reefs, when not surrounded and buried by an accumulation of
sediment more rapid than the rate of subsidence, would rise
abruptly from a greater depth than that at which the efficient
polypifers can flourish: we see this well exemplified in the small
abruptly-sided reefs, with which the deep lagoons of the Chagos and
Southern Maldiva atolls are studded. With respect to the ring or
basin-formed reefs of the Northern Maldiva atolls, it is evident,
from the perfectly continuous series which exists that the marginal
rings, although wider than the exterior or bounding reef of
ordinary atolls, are only modified portions of such a reef; it is
also evident that the central rings, although wider than the knolls
or reefs which commonly occur in lagoons, occupy their place. The
ring-like structure has been shown to be contingent on the breaches
into the lagoon being broad and numerous, so that all the reefs
which are bathed by the waters of the lagoon are placed under
nearly the same conditions with the outer coast of an atoll
standing in the open sea. Hence the exterior and living margins of
these reefs must have been favourably circumstanced for growing
outwards, and increasing beyond the usual breadth; and they must
likewise have been favourably circumstanced for growing</p>
<p class="fnote">1. According to Mr. Couthouy (p. 26) the external
reef round many atolls descends by a succession of ledges or
terraces. He attempts, I doubt whether successfully, to explain
this structure somewhat in the same manner as I have attempted,
with respect to the internal ledges round the lagoons of some
atolls. More facts are wanted regarding the nature both of the
interior and exterior step-like ledges: are all the ledges, or only
the upper ones, covered with living coral? If they are all covered,
are the kinds different on the ledges according to the depth? Do
the interior and exterior ledges occur together in the same atolls;
if so, what is their total width, and is the intervening
surface-reef narrow, etc.?</p>
<p> </p>
<hr>
<p class="page"><a name="page 81">page 81</a></p>
<p> </p>
<p>vigorously upwards, during the subsiding movements, to which by
our theory the whole archipelago has been subjected; and subsidence
with this upward growth of the margins would convert the central
space of each little reef into a small lagoon. This, however, could
only take place with those reefs, which had increased to a breadth
sufficient to prevent their central spaces from being almost
immediately filled up with the sand and detritus driven inwards
from all sides: hence it is that few reefs, which are less than
half a mile in diameter, even in the atolls where the basin-like
structure is most strikingly exhibited, include lagoons. This
remark, I may add, applies to all coral-reefs wherever found. The
basin-formed reefs of the Maldiva Archipelago may, in fact, be
briefly described, as small atolls formed during subsidence over
the separate portions of large and broken atolls, in the same
manner as these latter were formed over the barrier-reefs, which
encircled the islands of a large archipelago now wholly
submerged.</p>
<p><i>Submerged and dead reefs.</i>—In the second section of
the first chapter, I have shown that there are in the neighbourhood
of atolls, some deeply submerged banks, with level surfaces; that
there are others, less deeply but yet wholly submerged, having all
the characters of perfect atolls, but consisting merely of dead
coral- rock; that there are barrier-reefs and atolls with merely a
portion of their reef, generally on the leeward side, submerged;
and that such portions either retain their perfect outline, or they
appear to be quite effaced, their former place being marked only by
a bank, conforming in outline with that part of the reef which
remains perfect. These several cases are, I believe, intimately
related together, and can be explained by the same means. There,
perhaps, exist some submerged reefs, covered with living coral and
growing upwards, but to these I do not here refer. As we see that
in those parts of the ocean, where coral-reefs are most abundant,
one island is fringed and another neighbouring one is not fringed;
as we see in the same archipelago, that all the reefs are more
perfect in one part of it than in another, for instance, in the
southern half compared with the northern half of the Maldiva
Archipelago, and likewise on the outer coasts compared with the
inner coasts of the atolls in this same group, which are placed in
a double row; as we know that the existence of the innumerable
polypifers forming a reef, depends on their sustenance, and that
they are preyed on by other organic beings; and, lastly, as we know
that some inorganic causes are highly injurious to the growth of
coral, it cannot be expected that during the round of change to
which earth, air, and water are exposed, the reef-building
polypifers should keep alive for perpetuity in any one place; and
still less can this be expected, during the progressive
subsidences, perhaps at some periods more rapid than at others, to
which by our theory these reefs and islands have been subjected and
are liable. It is, then, not improbable that the corals should
sometimes perish either on the whole or on part of a reef; if on
part, the dead portion, after a small amount of subsidence, would
still retain its proper outline and position beneath the water.
After a more prolonged</p>
<p> </p>
<hr>
<p class="page"><a name="page 82">page 82</a></p>
<p> </p>
<p>subsidence, it would probably form, owing to the accumulation of
sediment, only the margin of a flat bank, marking the limits of the
former lagoon. Such dead portions of reef would generally lie on
the leeward side,<sup>1</sup> for the impure water and fine
sediment would more easily flow out from the lagoon over this side
of the reef, where the force of the breakers is less than to
windward; and therefore the corals would be less vigorous on this
side, and be less able to resist any destroying agent. It is
likewise owing to this same cause, that reefs are more frequently
breached to leeward by narrow channels, serving as by
ship-channels, than to windward. If the corals perished entirely,
or on the greater part of the circumference of an atoll, an
atoll-shaped bank of dead rock, more or less entirely submerged,
would be produced; and further subsidence, together with the
accumulation of sediment, would often obliterate its atoll-like
structure, and leave only a bank with a level surface.</p>
<p>In the Chagos group of atolls, within an area of 160 miles by
60, there are two atoll-formed banks of dead rock (besides another
very imperfect one), entirely submerged; a third, with merely two
or three very small pieces of living reef rising to the surface;
and a fourth, namely, Peros Banhos (<a href="#Plate I">Plate I</a>,
Fig. 9), with a portion nine miles in length dead and submerged. As
by our theory this area has subsided, and as there is nothing
improbable in the death, either from changes in the state of the
surrounding sea or from the subsidence being great or sudden, of
the corals on the whole, or on portions of some of the atolls, the
case of the Chagos group presents no difficulty. So far indeed are
any of the above- mentioned cases of submerged reefs from being
inexplicable, that their occurrence might have been anticipated on
our theory, and as fresh atolls are supposed to be in progressive
formation by the subsidence of encircling barrier-reefs, a weighty
objection, namely that the number of atolls must be increasing
infinitely, might even have been raised, if proofs of the
occasional destruction and loss of atolls could not have been
adduced.</p>
<p><i>The disseverment of the larger Maldiva atolls.</i>—The
apparent progressive disseverment in the Maldiva Archipelago of
large atolls into smaller ones, is, in many respects, an important
consideration, and requires an explanation. The graduated series
which marks, as I</p>
<p class="fnote">1. Mr. Lyell, in the first edition of his
"Principles of Geology," offered a somewhat different explanation
of this structure. He supposes that there has been subsidence; but
he was not aware that the submerged portions of reef were in most
cases, if not in all, dead; and he attributes the difference in
height in the two sides of most atolls, chiefly to the greater
accumulation of detritus to windward than to leeward. But as matter
is accumulated only on the backward part of the reef, the front
part would remain of the same height on both sides. I may here
observe that in most cases (for instance, at Peros Banhos, the
Gambier group and the Great Chagos Bank), and I suspect in all
cases, the dead and submerged portions do not blend or slope into
the living and perfect parts, but are separated from them by an
abrupt line. In some instances small patches of living reef rise to
the surface from the middle of the submerged and dead parts.</p>
<p> </p>
<hr>
<p class="page"><a name="page 83">page 83</a></p>
<p> </p>
<p>believe, this process, can be observed only in the northern half
of the group, where the atolls have exceedingly imperfect margins,
consisting of detached basin-formed reefs. The currents of the sea
flow across these atolls, as I am informed by Captain Moresby, with
considerable force, and drift the sediment from side to side during
the monsoons, transporting much of it seaward; yet the currents
sweep with greater force round their flanks. It is historically
known that these atolls have long existed in their present state;
and we can believe, that even during a very slow subsidence they
might thus remain, the central expanse being kept at nearly its
original depth by the accumulation of sediment. But in the action
of such nicely balanced forces during a progressive subsidence
(like that, to which by our theory this archipelago has been
subjected), it would be strange if the currents of the sea should
never make a direct passage across some one of the atolls, through
the many wide breaches in their margins. If this were once
effected, a deep-water channel would soon be formed by the removal
of the finer sediment, and the check to its further accumulation;
and the sides of the channel would be worn into a slope like that
on the outer coasts, which are exposed to the same force of the
currents. In fact, a channel precisely like that bifurcating one
which divides Mahlos Mahdoo (<a href="#Plate II">Plate II</a>, Fig.
4), would almost necessarily be formed. The scattered reefs
situated near the borders of the new ocean-channel, from being
favourably placed for the growth of coral, would, by their
extension, tend to produce fresh margins to the dissevered
portions; such a tendency is very evident (as may be seen in the
large published chart) in the elongated reefs on the borders of the
two channels intersecting Mahlos Mahdoo. Such channels would become
deeper with continued subsidence, and probably from the reefs not
growing up perpendicularly, somewhat broader. In this case, and
more especially if the channels had been formed originally of
considerable breadth, the dissevered portions would become perfect
and distinct atolls, like Ari and Ross atolls (<a href=
"#Plate II">Plate II</a>, Fig. 6), or like the two Nillandoo
atolls, which must be considered as distinct, although related in
form and position, and separated from each other by channels, which
though deep have been sounded. Further subsidence would render such
channels unfathomable, and the dissevered portions would then
resemble Phaleedoo and Moluque atolls, or Mahlos Mahdoo and
Horsburgh atolls (<a href="#Plate II">Plate II</a>, Fig. 4), which
are related to each other in no respect except in proximity and
position. Hence, on the theory of subsidence, the disseverment of
large atolls, which have imperfect margins (for otherwise their
disseverment would be scarcely possible), and which are exposed to
strong currents, is far from being an improbable event; and the
several stages, from close relation to entire isolation in the
atolls of the Maldiva Archipelago, are readily explicable.</p>
<p>We might go even further, and assert as not improbable, that the
first formation of the Maldiva Archipelago was due to a
barrier-reef, of nearly the same dimensions with that of New
Caledonia (<a href="#Plate II">Plate II</a>, Fig. 5), for if, in
imagination, we complete the subsidence of that great island, we
might anticipate from the present broken condition of the</p>
<p> </p>
<hr>
<p class="page"><a name="page 84">page 84</a></p>
<p> </p>
<p>northern portion of the reef, and from the almost entire absence
of reefs on the eastern coast, that the barrier-reef after repeated
subsidences, would become during its upward growth separated into
distinct portions; and these portions would tend to assume an
atoll- like structure, from the coral growing with vigour round
their entire circumferences, when freely exposed to an open sea. As
we have some large islands partly submerged with barrier-reefs
marking their former limits, such as New Caledonia, so our theory
makes it probable that there should be other large islands wholly
submerged; and these, we may now infer, would be surmounted, not by
one enormous atoll, but by several large elongated ones, like the
atolls in the Maldiva group; and these again, during long periods
of subsidence, would sometimes become dissevered into smaller
atolls. I may add, that both in the Marshall and Caroline
Archipelagoes, there are atolls standing close together, which have
an evident relationship in form: we may suppose, in such cases,
either that two or more encircled islands originally stood close
together, and afforded bases for two or more atolls, or that one
atoll has been dissevered. From the position, as well as form, of
three atolls in the Caroline Archipelago (the Namourrek and Elato
group), which are placed in an irregular circle, I am strongly
tempted to believe that they have originated by the process of
disseverment.<sup>1</sup></p>
<p><i>Irregularly formed atolls.</i>—In the Marshall group,
Musquillo atoll consists of two loops united in one point; and
Menchikoff atoll is formed of three loops, two of which (as may be
seen in Fig. 3, <a href="#Plate II">Plate II</a>) are connected by
a mere ribbon-shaped reef, and the three together are sixty miles
in length. In the Gilbert group some of the atolls have narrow
strips of reef, like spurs, projecting from them. There occur also
in parts of the open sea, a few linear and straight reefs, standing
by themselves; and likewise some few reefs in the form of
crescents, with their extremities more or less curled inwards. Now,
the upward growth of a barrier-reef which fronted only one side of
an island, or one side of an elongated island with its extremities
(of which cases exist), would produce after the complete subsidence
of the land, mere strips or crescent or hook-formed reefs: if the
island thus partially fronted became divided during subsidence into
two or more islands, these islands would be united together by
linear reefs; and from the further growth of the coral along their
shores together with subsidence, reefs of various forms might
ultimately be produced, either atolls united together by linear
reefs, or atolls with spurs projecting from them. Some, however, of
the more simple forms above specified, might, as we have seen, be
equally well produced by the coral perishing during</p>
<p class="fnote">1. The same remark is, perhaps, applicable to the
islands of Ollap, Fanadik, and Tamatam in the Caroline Archipelago,
of which charts are given in the atlas of Duperrey's voyage: a line
drawn through the linear reefs and lagoons of these three islands
forms a semicircle. Consult also, the atlas of Lutké's
voyage; and for the Marshall group that of Kotzebue; for the
Gilbert group consult the atlas of Duperrey's voyage. Most of the
points here referred to may, however, be seen in Krusenstern's
general Atlas of the Pacific.</p>
<p> </p>
<hr>
<p class="page"><a name="page 85">page 85</a></p>
<p> </p>
<p>subsidence on part of the circumference of an atoll, whilst on
the other parts it continued to grow up till it reached the
surface.</p>
<p><i>The Great Chagos Bank.</i>—I have already shown that
the submerged condition of the Great Chagos Bank (<a href=
"#Plate II">Plate II</a>, Fig. 1, with its section Fig. 2), and of
some other banks in the Chagos group, may in all probability be
attributed to the coral having perished before or during the
movements of subsidence, to which this whole area by our theory has
been subjected. The external rim or upper ledge (shaded in the
chart), consists of dead coral-rock thinly covered with sand; it
lies at an average depth of between five and eight fathoms, and
perfectly resembles in form the annular reef of an atoll. The banks
of the second level, the boundaries of which are marked by dotted
lines in the chart, lie from about fifteen to twenty fathoms
beneath the surface; they are several miles broad, and terminate in
a very steep slope round the central expanse. This central expanse
I have already described, as consisting of a level muddy flat
between thirty and forty fathoms deep. The banks of the second
level, might at first sight be thought analogous to the internal
step-like ledge of coral- rock which borders the lagoons of some
atolls, but their much greater width, and their being formed of
sand, are points of essential difference. On the eastern side of
the atoll some of the banks are linear and parallel, resembling
islets in a great river, and pointed directly towards a great
breach on the opposite side of the atoll; these are best seen in
the large published chart. I inferred from this circumstance, that
strong currents sometimes set directly across this vast bank; and I
have since heard from Captain Moresby that this is the case. I
observed, also, that the channels or breaches through the rim, were
all of the same depth as the central lagoon-like space into which
they lead; whereas the channels into the other atolls of the Chagos
group, and as I believe into most other large atolls, are not
nearly as deep as their lagoons: for instance at Peros Banhos, the
channels are only of the same depth, namely between ten and twenty
fathoms, as the bottom of the lagoon for a space about a mile and a
half in width round its shores, whilst the central expanse of the
lagoon is from thirty-five to forty fathoms deep. Now, if an atoll
during a gradual subsidence once became entirely submerged, like
the Great Chagos Bank, and therefore no longer exposed to the surf,
very little sediment could be formed from it; and consequently the
channels leading into the lagoon from not being filled up with
drifted sand and coral detritus, would continue increasing in
depth, as the whole sank down. In this case, we might expect that
the currents of the open sea, instead of any longer sweeping round
the submarine flanks, would flow directly through the breaches
across the lagoon, removing in their course the finer sediment, and
preventing its further accumulation. We should then have the
submerged reef forming an external and upper rim of rock, and
beneath this portion of the sandy bottom of the old lagoon,
intersected by deep-water channels or breaches, and thus formed
into separate marginal banks; and these would be cut off by steep
slopes, overhanging the central space, worn down by the passage of
the oceanic currents.</p>
<p> </p>
<hr>
<p class="page"><a name="page 86">page 86</a></p>
<p> </p>
<p>By these means, I have scarcely any doubt that the Great Chagos
Bank has originated,—a structure which at first appeared to
me far more anomalous than any I had met with. The process of
formation is nearly the same with that, by which Mahlos Mahdoo had
been trisected; but in the Chagos Bank the channels of the oceanic
currents entering at several different quarters, have united in a
central space.</p>
<p>This great atoll-formed bank appears to be in an early stage of
disseverment; should the work of subsidence go on, from the
submerged and dead condition of the whole reef, and the
imperfection of the south- east quarter a mere wreck would probably
be left. The Pitt's Bank, situated not far southward, appears to be
precisely in this state; it consists of a moderately level, oblong
bank of sand, lying from 10 to 20 fathoms beneath the surface, with
two sides protected by a narrow ledge of rock which is submerged
between 5 and 8 fathoms. A little further south, at about the same
distance as the southern rim of the Great Chagos Bank is from the
northern rim, there are two other small banks with from 10 to 20
fathoms on them; and not far eastward soundings were struck on a
sandy bottom, with between 110 and 145 fathoms. The northern
portion with its ledge-like margin, closely resembles any one
segment of the Great Chagos Bank, between two of the deep-water
channels, and the scattered banks, southward appear to be the last
wrecks of less perfect portions.</p>
<p>I have examined with care the charts of the Indian and Pacific
Oceans, and have now brought before the reader all the examples,
which I have met with, of reefs differing from the type of the
class to which they belong; and I think it has been satisfactorily
shown, that they are all included in our theory, modified by
occasional accidents which might have been anticipated as probable.
In this course we have seen, that in the lapse of ages encircling
barrier-reefs are occasionally converted into atolls, the name of
atoll being properly applicable, at the moment when the last
pinnacle of encircled land sinks beneath the surface of the sea. We
have, also, seen that large atolls during the progressive
subsidence of the areas in which they stand, sometimes become
dissevered into smaller ones; at other times, the reef-building
polypifers having entirely perished, atolls are converted into
atoll-formed banks of dead rock; and these again through further
subsidence and the accumulation of sediment modified by the force
of the oceanic currents, pass into level banks with scarcely any
distinguishing character. Thus may the history of an atoll be
followed from its first origin, through the occasional accidents of
its existence, to its destruction and final obliteration.</p>
<p><i>Objections to the theory of the formation of atolls and
barrier- reefs.</i>—The vast amount of subsidence, both
horizontally or in area, and vertically or in depth, necessary to
have submerged every mountain, even the highest, throughout the
immense spaces of ocean interspersed with atolls, will probably
strike most people as a formidable objection to my theory. But as
continents, as large as the spaces supposed to have subsided, have
been raised above the level of the sea,—as whole regions are
now rising, for instance, in Scandinavia and South
America,—and as</p>
<p> </p>
<hr>
<p class="page"><a name="page 87">page 87</a></p>
<p> </p>
<p>no reason can be assigned, why subsidences should not have
occurred in some parts of the earth's crust on as great a scale
both in extent and amount as those of elevation, objections of this
nature strike me as of little force. The remarkable point is that
movements to such an extent should have taken place within a
period, during which the polypifers have continued adding matter on
and above the same reefs. Another and less obvious objection to the
theory will perhaps be advanced from the circumstance, of the
lagoons within atolls and within barrier-reefs never having become
in any one instance during prolonged subsidences of a greater depth
than sixty fathoms, and seldom more than forty fathoms; but we
already admit, if the theory be worth considering, that the rate of
subsidence has not exceeded that of the upward growth of the coral
on the exterior margin; we are, therefore, only further required to
admit, that the subsidence has not exceeded in rate the filling up
of the interior spaces by the growth of the corals living there,
and by the accumulation of sediment. As this filling up must take
place very slowly within barrier-reefs lying far from the land, and
within atolls which are of large dimensions and which have open
lagoons with very few reefs, we are led to conclude that the
subsidence thus counter-balanced, must have been slow in an
extraordinary degree; a conclusion which accords with our only
means, namely, with what is known of the rate and manner of recent
elevatory movements, of judging by analogy what is the probable
rate of subsidence.</p>
<p>In this chapter it has, I think, been shown, that the theory of
subsidence, which we were compelled to receive from the necessity
of giving to the corals, in certain large areas, foundations at the
requisite depth, explains both the normal structure and the less
regular forms of those two great classes of reefs, which have
justly excited the astonishment of all persons who have sailed
through the Pacific and Indian Oceans. But further to test the
truth of the theory, a crowd of questions will occur to the reader:
Do the different kinds of reefs, which have been produced by the
same kind of movement, generally lie within the same areas? What is
their relation of form and position,—for instance, do
adjoining groups of atolls, and the separate atolls in these
groups, bear the same relation to each other which islands do in
common archipelagoes? Have we reason to believe, that where there
are fringing-reefs, there has not lately been subsidence; or, for
it is almost our only way of ascertaining this point, are there
frequently proofs of recent elevation? Can we by this means account
for the presence of certain classes of reefs in some large areas,
and their entire absence in others? Do the areas which have
subsided, as indicated by the presence of atolls and barrier-reefs,
and the areas which have remained stationary or have been upraised,
as shown by fringing- reefs, bear any determinate relation to each
other; and are the dimensions of these areas such as harmonise with
the greatness of the subterranean changes, which, it must be
supposed, have lately taken place beneath them? Is there any
connection between the movements thus indicated, and recent
volcanic action? All these questions ought to receive answers in
accordance with the theory; and if this can be satisfactorily
shown, not only is the theory</p>
<p> </p>
<hr>
<p class="page"><a name="page 88">page 88</a></p>
<p> </p>
<p>confirmed, but as deductions, the answers are in themselves
important. Under this latter point of view, these questions will be
chiefly considered in the following chapter.<sup>1</sup></p>
<p class="fnote">I may take this opportunity of briefly considering
the appearances, which would probably be presented by a vertical
and deep section across a coral formation (referring chiefly to an
atoll), formed by the upward growth of coral during successive
subsidences. This is a subject worthy of attention, as a means of
comparison with ancient coral-strata. The circumferential parts
would consist of massive species, in a vertical position, with
their interstices filled up with detritus; but this would be the
part most subject to subsequent denudation and removal. It is
useless to speculate how large a portion of the exterior annular
reef would consist of upright coral, and how much of fragmentary
rock, for this would depend on many contingencies,—such as on
the rate of subsidence, occasionally allowing a fresh growth of
coral to cover the whole surface, and on the breakers having force
sufficient to throw fragments over this same space. The
conglomerate which composes the base of the islets, would (if not
removed by denudation together with the exterior reef on which it
rests) be conspicuous from the size of the fragments,—the
different degrees in which they have been rounded,—the
presence of fragments of conglomerate torn up, rounded, and
recemented,—and from the oblique stratification. The corals
which lived in the lagoon-reefs at each successive level, would be
preserved upright, and they would consist of many kinds, generally
much branched. In this part, however, a very large proportion of
the rock (and in some cases nearly all of it) would be formed of
sedimentary matter, either in an excessively fine, or in a
moderately coarse state, and with the particles almost blended
together. The conglomerate which was formed of rounded pieces of
the branched corals, on the shores of the lagoon, would differ from
that formed on the islets and derived from the outer coast; yet
both might have accumulated very near each other. I have seen a
conglomerate limestone from Devonshire like a conglomerate now
forming on the shores of the Maldiva atolls. The stratification
taken as a whole, would be horizontal; but the conglomerate beds
resting on the exterior reef, and the beds of sandstone on the
shores of the lagoon (and no doubt on the external flanks) would
probably be divided (as at Keeling atoll and at Mauritius) by
numerous layers dipping at considerable angles in different
directions. The calcareous sandstone and coral-rock would almost
necessarily contain innumerable shells, echini, and the bones of
fish, turtle, and perhaps of birds; possibly, also, the bones of
small saurians, as these animals find their way to the islands far
remote from any continent. The large shells of some species of
Tridacna would be found vertically imbedded in the solid rock, in
the position in which they lived. We might expect also to find a
mixture of the remains of pelagic and littoral animals in the
strata formed in the lagoon, for pumice and the seeds of plants are
floated from distant countries into the lagoons of many atolls: on
the outer coast of Keeling atoll, near the mouth of the lagoon, the
case of a pelagic Pteropodous animal was brought up on the arming
of the sounding lead. All the loose blocks of coral on Keeling
atoll were burrowed by vermiform animals; and as every cavity, no
doubt, ultimately becomes filled with spathose limestone, slabs of
the rock taken from a considerable depth, would, if polished,
probably exhibit the excavations of such burrowing animals. The
conglomerate and fine-grained beds of coral-rock would be hard,
sonorous, white and composed of nearly pure calcareous</p>
<p> </p>
<hr>
<p class="page"><a name="insert">insert</a></p>
<p> </p>
<center><font color="black" face="arial"><a name="Plate III"><i>
Plate III</i></a>—Map showing the distribution of coral-reefs
and active volcanoes.</font></center>
<br>
<center><img src="images/plate3a.jpg" width="457" height="473" alt=
"Map showing distribution of coral-reefs and active volcanoes.">
<br>
<img src="images/plate3b.jpg" width="464" height="476" alt=
"Map showing distribution of coral-reefs and active volcanoes.">
<br>
<img src="images/plate3c.jpg" width="490" height="478" alt=
"Map showing distribution of coral-reefs and active volcanoes.">
</center>
<br>
<p class="capt">The principles, on which this map was coloured, are
explained in the beginning of Chapter VI; and the authorities for
each particular spot are detailed in the Appendix to <i>Coral
Reefs.</i> The names not printed in upper case in the Index refer
to the Appendix.</p>
<p> </p>
<hr>
<p class="page"><a name="page 89">page 89</a></p>
<p> </p>
<center><b>Chapter VI<br>
<br>
ON THE DISTRIBUTION OF CORAL-REEFS WITH REFERENCE TO<br>
THE THEORY OF THEIR FORMATION</b></center>
<p class="intro">Description of the coloured map.—Proximity
of atolls and barrier- reefs.— Relation in form and position
of atolls with ordinary islands.—Direct evidence of
subsidence difficult to be detected.—Proofs of recent
elevation where fringing-reefs occur.—Oscillations of
level.— Absence of active volcanoes in the areas of
subsidence.—Immensity of the areas which have been elevated
and have subsided.—Their relation to the present distribution
of the land.—Areas of subsidence elongated, their
intersection and alternation with those of elevation.—Amount
and slow rate of the subsidence.—Recapitulation.</p>
<p>It will be convenient to give here a short account of the
appended map (Plate III):<sup>1</sup> a fuller one, with the data
for colouring each spot, is reserved</p>
<p class="fnote">matter; in some few parts, judging from the
specimens at Keeling atoll, they would probably contain a small
quantity of iron. Floating pumice and scoriæ, and
occasionally stones transported in the root of trees (see my
"Journal of Researches," page 549) appear the only sources, through
which foreign matter is brought to coral-formations standing in the
open ocean. The area over which sediment is transported from
coral-reefs must be considerable: Captain Moresby informs me that
during the change of monsoons the sea is discoloured to a
considerable distance off the Maldiva and Chagos atolls. The
sediment of fringing and barrier coral-reefs must be mingled with
the mud, which is brought down from the land, and is transported
seaward through the breaches, which occur in front of almost every
valley. If the atolls of the larger archipelagoes were upraised,
the bed of the ocean being converted into land, they would form
flat- topped mountains, varying in diameter from a few miles (the
smallest atolls being worn away) to sixty miles; and from being
horizontally stratified and of similar composition, they would, as
Mr. Lyell has remarked, falsely appear as if they had originally
been united into one vast continuous mass. Such great strata of
coral-rock would rarely be associated with erupted volcanic matter,
for this could only take place, as may be inferred from what
follows in the next chapter, when the area, in which they were
situated, commenced to rise, or at least ceased to subside. During
the enormous period necessary to effect an elevation of the kind
just alluded to, the surface would necessarily be denuded to a
great thickness; hence it is highly improbable that any
fringing-reef, or even any barrier-reef, at least of those
encircling small islands, would be preserved. From this same cause,
the strata which were formed within the lagoons of atolls and
lagoon-channels of barrier-reefs, and which must consist in a large
part of sedimentary matter, would more often be preserved to future
ages, than the exterior solid reef, composed of massive corals in
an upright position; although it is on this exterior part that the
present existence and further growth of atolls and barrier-reefs
entirely depend.<br>
<br>
1. Inasmuch as the coloured map would have proved too costly to be
given in this series, the indications of colour have been replaced
by numbers referring to the dotted groups of reefs, etc. The
author's original wording, however, is retained in full, as it will
be easy to refer to the map by the numbers, and thus the flow of
the narrative is undisturbed.</p>
<p> </p>
<hr>
<p class="page"><a name="page 90">page 90</a></p>
<p> </p>
<p>for the Appendix; and every place there referred to may be found
in the Index. A larger chart would have been desirable; but, small
as the adjoined one is, it is the result of many months' labour. I
have consulted, as far as I was able, every original voyage and
map; and the colours were first laid down on charts on a larger
scale. The same blue colour, with merely a difference in the depth
of tint, is used for atolls or lagoon-islands, and barrier-reefs,
for we have seen, that as far as the actual coral-formation is
concerned, they have no distinguishing character. Fringing-reefs
have been coloured red, for between them on the one hand, and
barrier-reefs and atolls on the other, there is an important
distinction with respect to the depth beneath the surface, at which
we are compelled to believe their foundations lie. The two distinct
colours, therefore, mark two great types of structure.</p>
<p>The <i>dark blue colour</i> [represented by (3) in our plate]
represents atolls and submerged annular reefs, with deep water in
their centres. I have coloured as atolls, a few low and small
coral-islands, without lagoons; but this has been done only when it
clearly appeared that they originally contained lagoons, since
filled up with sediment: when there were not good grounds for this
belief, they have been left uncoloured.</p>
<p>The <i>pale blue colour</i> [represented by (2)] represents
barrier- reefs. The most obvious character of reefs of this class
is the broad and deep- water moat within the reef: but this, like
the lagoons of small atolls, is liable to become filled up with
detritus and with reefs of delicately branched corals: when,
therefore, a reef round the entire circumference of an island
extends very far into a profoundly deep sea, so that it can hardly
be confounded with a fringing-reef which must rest on a foundation
of rock within a small depth, it has been coloured pale blue,
although it does not include a deep-water moat: but this has only
been done rarely, and each case is distinctly mentioned in the
Appendix.</p>
<p>The <i>red colour</i> (4) represents reefs fringing the land
quite closely where the sea is deep, and where the bottom is gently
inclined extending to a moderate distance from it, but not having a
deep-water moat or lagoon-like space parallel to the shore. It must
be remembered that fringing- reefs are frequently <i>breached</i>
in front of rivers and valleys by deepish channels, where mud has
been deposited. A space of thirty miles in width has been coloured
round or in front of the reefs of each class, in order that the
colours might be conspicuous on the appended map, which is reduced
to so small a scale.</p>
<p>The <i>vermillion spots</i>, and streaks (1) represent volcanoes
now in action, or historically known to have been so. They are
chiefly laid down from Von Buch's work on the Canary Islands; and
my reasons for making a few alterations are given in the note
below.<sup>1</sup></p>
<p class="fnote">1. I have also made considerable use of the
geological part of Berghaus' "Physical Atlas." Beginning at the
eastern side of the Pacific, I have added to the number of the
volcanoes in the southern part of the Cordillera, and have coloured
Juan Fernandez according to observations collected during the
voyage of the <i>Beagle</i> ("Geol. Trans.," vol. v, p. 601). I
have added a volcano to Albemarle Island, one of the Galapagos
Archipelago (the author's "Journal of Researches," p. 457). In the
Sandwich group there are no active</p>
<p> </p>
<hr>
<p class="page"><a name="page 91">page 91</a></p>
<p> </p>
<p>The uncoloured coasts consist, first and chiefly, of those,
where there are no coral-reefs, or such small portions as to be
quite insignificant. Secondly, of those coasts where there are
reefs, but where the sea is very shallow, for in this case the
reefs generally lie far from the land, and become very irregular,
in their forms: where they have not become irregular, they have
been coloured. thirdly, if I had the means of ascertaining the
fact, I should not colour a reef merely coating the edges of a
submarine crater, or of a level submerged bank; for such
superficial</p>
<p class="fnote">volcanoes, except at Hawaii; but the Rev. W. Ellis
informs me, there are streams of lava apparently modern on Maui,
having a very recent appearance, which can be traced to the craters
whence they flowed. The same gentleman informs me, that there is no
reason to believe that any active volcano exists in the Society
Archipelago; nor are there any known in the Samoa or Navigator
group, although some of the streams of lava and craters there
appear recent. In the Friendly group, the Rev. J. Williams says
("Narrative of Missionary Enterprise," p. 29) that Toofoa and Proby
Islands are active volcanoes. I infer from Hamilton's "Voyage in
the <i>Pandora</i>" (p. 95), that Proby Island is synonymous with
Onouafou, but I have not ventured to colour it. There can be no
doubt respecting Toofoa, and Captain Edwards (Von Buch, p. 386)
found the lava of recent eruption at Amargura still smoking.
Berghaus marks four active volcanoes actually within the Friendly
group; but I do not know on what authority: I may mention that
Maurelle describes Latte as having a burnt-up appearance: I have
marked only Toofoa and Amargura. South of the New Hebrides lies
Matthews Rock, which is drawn and described as an active crater in
the "Voyage of the <i>Astrolabe</i>." Between it and the volcano on
the eastern side of New Zealand, lies Brimstone Island, which from
the high temperature of the water in the crater, may be ranked as
active (Berghaus "Vorbemerk," II Lief. S. 56). Malte Brun, vol.
xii, p. 231, says that there is a volcano near port St. Vincent in
New Caledonia. I believe this to be an error, arising from a smoke
seen on the <i>opposite</i> coast by Cook ("Second Voyage," vol.
ii, p. 23) which smoke went out at night. The Mariana Islands,
especially the northern ones, contain many craters (see Freycinet's
"Hydrog. Descript.") which are not active. Von Buch, however,
states (p. 462) on the authority of La Peyrouse, that there are no
less than seven volcanoes between these islands and Japan. Gemelli
Creri (Churchill's "Collect." vol. iv, p. 458), says there are two
active volcanoes in latitude 23° 30', and in latitude 24°:
but I have not coloured them. From the statements in Beechey's
"Voyage" (p. 518, 4to edit.) I have coloured one in the northern
part of the Bonin group. M. S. Julien has clearly made out from
Chinese manuscripts not very ancient ("Comptes Rendus," 1840, p.
832), that there are two active volcanoes on the eastern side of
Formosa. In Torres Straits, on Cap Island (9° 48' S., 142°
39' E.) a volcano was seen burning with great violence in 1793 by
Captain Bampton (see Introduction to Flinders' "Voyage," p. 41).
Mr. M'Clelland (Report of Committee for investigating Coal in
India, p. 39) has shown that the volcanic band passing through
Barren Island must be extended northwards. It appears by an old
chart, that Cheduba was once an active volcano (see also <i>
Silliman's North American Journal</i>, vol. xxxviii, p. 385). In
Berghaus' "Phys. Atlas," 1840, No. 7 of Geological Part, a volcano
on the coast of Pondicherry is said to have burst forth in 1757.
Ordinaire ("Hist. Nat. des Volcans," p. 218) says that there is one
at the mouth of the Persian Gulf, but I have not coloured it,</p>
<p> </p>
<hr>
<p class="page"><a name="page 92">page 92</a></p>
<p> </p>
<p>formations differ essentially, even when not in external
appearance, from reefs whose foundations as well as superficies
have been wholly formed by the growth of coral. Fourthly, in the
Red Sea, and within some parts of the East Indian Archipelago (if
the imperfect charts of the latter can be trusted), there are many
scattered reefs, of small size, represented in the chart by mere
dots, which rise out of deep water: these cannot be arranged under
either of the three classes: in the Red Sea, however, some of these
little reefs, from their position, seem once to have formed parts
of a continuous barrier. There exist, also, scattered in the open
ocean, some linear and irregularly formed strips of coral-reef,
which, as shown in the last chapter, are probably allied in their
origin to atolls; but as they do not belong to that class, they
have not been coloured; they are very few in number and of
insignificant dimensions. Lastly, some reefs are left uncoloured
from the want of information respecting them, and some because they
are of an intermediate structure between the barrier and fringing
classes. The value of the map is lessened, in proportion to the
number of reefs which I have been obliged to leave uncoloured,
although, in a theoretical point of view, few of them present any
great difficulty: but their number is not very great, as will be
found by comparing the map with the statements in the Appendix. I
have experienced more difficulty in colouring fringing-reefs than
in colouring barrier-reefs, as the former, from their much less
dimensions, have less attracted the attention of navigators. As I
have had to seek my information from all kinds of sources, and
often from indirect ones, I do not venture to hope that the map is
free from many errors. Nevertheless, I trust it will give an
approximately correct view of the general distribution of the
coral- reefs over the whole world (with the exception of some
fringing-reefs on the coast of Brazil, not included within the
limits of the map), and of their arrangement into the three great
classes, which, though necessarily very imperfect from the nature
of the objects classified, have been adopted by most voyagers. I
may further remark, that the dark blue colour represents land
entirely composed of coral-rock; the pale blue, land with a wide
and thick border of coral-rock; and the red, a mere narrow fringe
of coral-rock.</p>
<p>Looking now at the map under the theoretical point of view
indicated in the last chapter, the two blue tints signify that the
foundations of the reefs thus coloured have subsided to a
considerable amount, at a slower rate than that of the upward
growth of the corals, and that probably in many cases they are
still subsiding. The red signifies that the shores which support
fringing-reefs have not subsided (at least to any considerable</p>
<p class="fnote">as he gives no particulars. A volcano in
Amsterdam, or St. Paul's, in the southern part of the Indian Ocean,
has been seen (<i>Naut. Mag.</i> 1838, p. 842) in action. Dr. J.
Allan, of Forres, informs me in a letter, that when he was at
Joanna, he saw at night flames apparently volcanic, issuing from
the chief Comoro Island, and that the Arabs assured him that they
were volcanic, adding that the volcano burned more during the wet
season. I have marked this as a volcano, though with some
hesitation, on account of the possibility of the flame arising from
gaseous sources.</p>
<p> </p>
<hr>
<p class="page"><a name="page 93">page 93</a></p>
<p> </p>
<p>amount, for the effects of a subsidence on a small scale would
in no case be distinguishable); but that they have remained nearly
stationary since the period when they first became fringed by
reefs; or that they are now rising or have been upraised, with new
lines of reefs successively formed on them: these latter
alternatives are obviously implied, as newly formed lines of shore,
after elevations of the land, would be in the same state with
respect to the growth of fringing-reefs, as stationary coasts. If
during the prolonged subsidence of a shore, coral-reefs grew for
the first time on it, or if an old barrier-reef were destroyed and
submerged, and new reefs became attached to the land, these would
necessarily at first belong to the fringing class, and, therefore,
be coloured red, although the coast was sinking: but I have no
reason to believe, that from this source of error, any coast has
been coloured wrongly with respect to movement indicated. Well
characterised atolls and encircling barrier- reefs, where several
occur in a group, or a single barrier-reef if of large dimensions,
leave scarcely any doubt on the mind respecting the movement by
which they have been produced; and even a small amount of
subsequent elevation is soon betrayed. The evidence from a single
atoll or a single encircling barrier-reef, must be received with
some caution, for the former may possibly be based upon a submerged
crater or bank, and the latter on a submerged margin of sediment,
or of worn- down rock. From these remarks we may with greater
certainty infer that the spaces, especially the larger ones, tinted
blue in the map, have subsided, than that the red spaces have
remained stationary, or have been upraised.</p>
<p><i>On the grouping of the different classes of
reefs.</i>—Having made these preliminary remarks, I will
consider first how far the grouping of the different kinds of
coral- islands and reefs is corroborative of the truth of the
theory. A glance at the map shows that the reefs, coloured blue and
red, produced under widely different conditions, are not
indiscriminately mixed together. Atolls and barrier-reefs, on the
other hand, as may be seen by the two blue tints, generally lie
near each other; and this would be the natural result of both
having been produced during the subsidence of the areas in which
they stand. Thus, the largest group of encircled islands is that of
the Society Archipelago; and these islands are surrounded by
atolls, and only separated by a narrow space from the large group
of Low atolls. In the midst of the Caroline atolls, there are three
fine encircled islands. The northern point of the barrier-reef of
New Caledonia seems itself, as before remarked, to form a complete
large atoll. The great Australian barrier is described as including
both atolls and small encircled islands. Captain King<sup>1</sup>
mentions many atoll-formed and encircling coral-reefs, some of
which lie within the barrier, and others may be said (for instance
between lat. 16° and 13°) to form part of it.
Flinders<sup>2</sup> has described an atoll-formed reef in lat.
10°, seven miles long and from one to three broad, resembling a
boot in shape, with apparently very deep water</p>
<p class="fnote">1. Sailing directions, appended to vol. ii of his
"Surveying Voyage to Australia."<br>
2. "Voyage to Terra Australis," vol. ii, p. 336.</p>
<p> </p>
<hr>
<p class="page"><a name="page 94">page 94</a></p>
<p> </p>
<p>within. Eight miles westward of this, and forming part of the
barrier, lie the Murray Islands, which are high and are encircled.
In the Corallian Sea, between the two great barriers of Australia
and New Caledonia, there are many low islets and coral- reefs, some
of which are annular, or horse-shoe shaped. Observing the smallness
of the scale of the map, the parallels of latitude being nine
hundred miles apart, we see that none of the large groups of reefs
and islands supposed to have been produced by long-continued
subsidence, lie near extensive lines of coast coloured red, which
are supposed to have remained stationary since the growth of their
reefs, or to have been upraised and new lines of reefs formed on
them. Where the red and blue circles do occur near each other, I am
able, in several instances, to show that there have been
oscillations of level, subsidence having preceded the elevation of
the red spots; and elevation having preceded the subsidence of the
blue spots: and in this case the juxtaposition of reefs belonging
to the two great types of structure is little surprising. We may,
therefore, conclude that the proximity in the same areas of the two
classes of reefs, which owe their origin to the subsidence of the
earth's crust, and their separation from those formed during its
stationary or uprising condition, holds good to the full extent,
which might have been anticipated by our theory.</p>
<p>As groups of atolls have originated in the upward growth, at
each fresh sinking of the land, of those reefs which primarily
fringed the shores of one great island, or of several smaller ones;
so we might expect that these rings of coral-rock, like so many
rude outline charts, will still retain some traces of the general
form, or at least general range, of the land, round which they were
first modelled. That this is the case with the atolls in the
Southern Pacific as far as their range is concerned, seems highly
probable, when we observe that the three principal groups are
directed in north-west and south-east lines, and that nearly all
the land in the S. Pacific ranges in this same direction; namely,
N. Western Australia, New Caledonia, the northern half of New
Zealand, the New Hebrides, Saloman, Navigator, Society, Marquesas,
and Austral archipelagoes: in the Northern Pacific, the Caroline
atolls abut against the north-west line of the Marshall atolls,
much in the same manner as the east and west line of islands from
Ceram to New Britain do on New Ireland: in the Indian Ocean the
Laccadive and Maldiva atolls extend nearly parallel to the western
and mountainous coast of India. In most respects, there is a
perfect resemblance with ordinary islands in the grouping of atolls
and in their form: thus the outline of all the larger groups is
elongated; and the greater number of the individual atolls are
elongated in the same direction with the group, in which they
stand. The Chagos group is less elongated than is usual with other
groups, and the individual atolls in it are likewise but little
elongated; this is strikingly seen by comparing them with the
neighbouring Maldiva atolls. In the Marshall and Maldiva
archipelagoes, the atolls are ranged in two parallel lines, like
the mountains in a great double mountain-chain. Some of the atolls,
in the larger archipelagoes, stand so near to each other, and have
such an evident relationship in</p>
<p> </p>
<hr>
<p class="page"><a name="page 95">page 95</a></p>
<p> </p>
<p>form, that they compose little sub-groups: in the Caroline
Archipelago, one such sub-group consists of Pouynipete, a lofty
island encircled by a barrier-reef, and separated by a channel only
four miles and a half wide from Andeema atoll, with a second atoll
a little further off. In all these respects an examination of a
series of charts will show how perfectly groups of atolls resemble
groups of common islands.</p>
<p><i>On the direct evidence of the blue spaces in the map having
subsided during the upward growth of the reefs so coloured, and of
the red spaces having remained stationary, or having been
upraised.</i>—With respect to subsidence, I have shown in the
last chapter, that we cannot expect to obtain in countries
inhabited only by semi-civilised races, demonstrative proofs of a
movement, which invariably tends to conceal its own evidence. But
on the coral-islands supposed to have been produced by subsidence,
we have proofs of changes in their external appearance—of a
round of decay and renovation—of the last vestiges of land on
some—of its first commencement on others: we hear of storms
desolating them to the astonishment of their inhabitants: we know
by the great fissures with which some of them are traversed, and by
the earthquakes felt under others, that subterranean disturbances
of some kind are in progress. These facts, if not directly
connected with subsidence, as I believe they are, at least show how
difficult it would be to discover proofs of such movement by
ordinary means. At Keeling atoll, however, I have described some
appearances, which seem directly to show that subsidence did take
place there during the late earthquakes. Vanikoro, according to
Chevalier Dillon,<sup>1</sup> is often violently shaken by
earthquakes, and there, the unusual depth of the channel between
the shore and the reef,—the almost entire absence of islets
on the reef,—its wall-like structure on the inner side, and
the small quantity of low alluvial land at the foot of the
mountains, all seem to show that this island has not remained long
at its present</p>
<p class="fnote">1. See Captain Dillon's "Voyage in search of La
Peyrouse." M. Cordier in his "Report on the Voyage of the
'Astrolabe'" (p. cxi, vol. i), speaking of Vanikoro, says the
shores are surrounded by reefs of madrepore, "qu'on assure etre de
formation tout-a-fait moderne." I have in vain endeavoured to learn
some further particulars about this remarkable passage. I may here
add, that according to our theory, the island of Pouynipete (<a
href="#Plate I">Plate I</a>, Fig. 7), in the Caroline Archipelago,
being encircled by a barrier-reef, must have subsided. In the <i>
New S. Wales Lit. Advert.</i> February 1835 (which I have seen
through the favour of Dr. Lloghtsky), there is an account of this
island (subsequently confirmed by Mr. Campbell), in which it is
said, "At the N.E. end, at a place called Tamen, there are ruins of
a town, <i>now only</i> accessible by boats, the waves <i>reaching
to the steps of the houses.</i>" Judging from this passage, one
would be tempted to conclude that the island must have subsided,
since these houses were built. I may, also, here append a statement
in Malte Brun (vol. ix, p. 775, given without any authority), that
the sea gains in an extraordinary manner on the coast of Cochin
China, which lies in front and near the subsiding coral-reefs in
the China Sea: as the coast is granitic, and not alluvial, it is
scarcely possible that the encroachment of the sea can be owing to
the washing away of the land; and if so, it must be due to
subsidence.</p>
<p> </p>
<hr>
<p class="page"><a name="page 96">page 96</a></p>
<p> </p>
<p>level, with the lagoon-channel subjected to the accumulation of
sediment, and the reef to the wear and tear of the breakers. At the
Society Archipelago, on the other hand, where a slight tremor is
only rarely felt, the shoaliness of the lagoon-channels round some
of the islands, the number of islets formed on the reefs of others,
and the broad belt of low land at the foot of the mountains,
indicate that, although there must have been great subsidence to
have produced the barrier-reefs, there has since elapsed a long
stationary period.<sup>1</sup></p>
<p class="quote">1. Mr. Couthouy states ("Remarks," p. 44) that at
Tahiti and Eimeo the space between the reef and the shore has been
nearly filled up by the extension of those coral-reefs, which
within most barrier-reefs merely fringe the land. From this
circumstance, he arrives at the same conclusion as I have done,
that the Society Islands since their subsidence, have remained
stationary during a long period; but he further believes that they
have recently commenced rising, as well as the whole area of the
Low Archipelago. He does not give any detailed proofs regarding the
elevation of the Society Islands, but I shall refer to this subject
in another part of this chapter. Before making some further
comments, I may observe how satisfactory it is to me, to find Mr.
Couthouy affirming, that "having personally examined a large number
of coral-islands, and also residing eight months among the volcanic
class, having shore and partially encircling reefs, I may be
permitted to state that my own observations have impressed a
conviction of the correctness of the theory of Mr. Darwin."</p>
<p class="quote">This gentleman believes, that subsequently to the
subsidence by which the atolls in the Low Archipelago were
produced, the whole area has been elevated to the amount of a few
feet; this would indeed be a remarkable fact; but as far as I am
able to judge, the grounds of his conclusion are not sufficiently
strong. He states that he found in almost every atoll which he
visited, the shores of the lagoon raised from eighteen to thirty
inches above the sea-level, and containing imbedded Tridacnæ
and corals standing as they grew; some of the corals were dead in
their upper parts, but below a certain line they continued to
flourish. In the lagoons, also, he frequently met with clusters of
Madrepore, with their extremities standing from one inch to a foot
above the surface of the water. Now, these appearances are exactly
what I should have expected, without any subsequent elevation
having taken place; and I think Mr. Couthouy has not borne in mind
the indisputable fact, that corals, when constantly bathed by the
surf, can exist at a higher level than in quite tranquil water, as
in a lagoon. As long, therefore, as the waves continued at low
water to break entirely over parts of the annular reef of an atoll,
submerged to a small depth, the corals and shells attached on these
parts might continue living at a level above the smooth surface of
the lagoon, into which the waves rolled; but as soon as the outer
edge of the reef grew up to its utmost possible height, or if the
reef were very broad nearly to that height, the force of the
breakers would be checked, and the corals and shells on the inner
parts near the lagoon would occasionally be left dry, and thus be
partially or wholly destroyed. Even in atolls, which have not
lately subsided, if the outer margin of the reef continued to
increase in breadth seaward (each fresh zone of corals rising to
the same vertical height as at Keeling atoll), the line where the
waves broke most heavily would advance outwards, and therefore the
corals, which when living near the margin, were washed by</p>
<p> </p>
<hr>
<p class="page"><a name="page 97">page 97</a></p>
<p> </p>
<p>Turning now to the red colour; as on our map, the areas which
have sunk slowly downwards to great depths are many and large, we
might naturally have been led to conjecture, that with such great
changes of level in progress, the coasts which have been fringed
probably for ages (for we have no reason to believe that
coral-reefs are of short duration), would not have remained all
this time stationary, but would frequently</p>
<p class="quote">the breaking waves during the whole of each tide,
would cease being so, and would therefore be left on the backward
part of the reef standing exposed and dead. The case of the
madrepores in the lagoons with the tops of their branches exposed,
seems to be an analogous fact, to the great fields of dead but
upright corals in the lagoon of Keeling atoll; a condition of
things which I have endeavoured to show, has resulted from the
lagoon having become more and more enclosed and choked up with
reefs, so that during high winds, the rising of the tide (as
observed by the inhabitants) is checked, and the corals, which had
formerly grown to the greatest possible height, are occasionally
exposed, and thus are killed: and this is a condition of things,
towards which almost every atoll in the intervals of its subsidence
must be tending. Or if we look to the state of an atoll directly
after a subsidence of some fathoms, the waves would roll heavily
over the entire circumference of the reef, and the surface of the
lagoon would, like the ocean, never be quite at rest, and therefore
the corals in the lagoon, from being constantly laved by the
rippling water, might extend their branches to a little greater
height than they could, when the lagoon became enclosed and
protected. Christmas atoll (2° N. lat.) which has a very
shallow lagoon, and differs in several respects from most atolls,
possibly may have been elevated recently; but its highest part
appears (Couthouy, p. 46) to be only ten feet above the sea- level.
The facts of a second class, adduced by Mr. Couthouy, in support of
the alleged recent elevation of the Low Archipelago, are not all
(especially those referring to a shelf of rock) quite intelligible
to me; he believes that certain enormous fragments of rock on the
reef, must have been moved into their present position, when the
reef was at a lower level; but here again the force of the breakers
on any inner point of the reef being diminished by its outward
growth without any change in its level, has not, I think, been
borne in mind. We should, also, not overlook the occasional agency
of waves caused by earthquakes and hurricanes. Mr. Couthouy further
argues, that since these great fragments were deposited and fixed
on the reef, they have been elevated; he infers this from the
greatest amount of erosion not being near their bases, where they
are unceasingly washed by the reflux of the tides, but at some
height on their sides, near the line of high-water mark, as shown
in an accompanying diagram. My former remark again applies here,
with this further observation, that as the waves have to roll over
a wide space of reef before they reach the fragments, their force
must be greatly increased with the increasing depth of water as the
tide rises, and therefore I should have expected that the chief
line of present erosion would have coincided with the line of
high-water mark; and if the reef had grown outwards, that there
would have been lines of erosion at greater heights. The
conclusion, to which I am finally led by the interesting
observations of Mr. Couthouy is, that the atolls in the Low
Archipelago have, like the Society Islands, remained at a
stationary level for a long period: and this probably is the
ordinary course of events, subsidence supervening after long
intervals of rest.</p>
<p> </p>
<hr>
<p class="page"><a name="page 98">page 98</a></p>
<p> </p>
<p>have undergone movements of elevation. This supposition, we
shall immediately see, holds good to a remarkable extent; and
although a stationary condition of the land can hardly ever be open
to proof, from the evidence being only negative, we are, in some
degree, enabled to ascertain the correctness of the parts coloured
red on the map, by the direct testimony of upraised organic remains
of a modern date. Before going into the details on this head
(printed in small type), I may mention, that when reading a memoir
on coral formations by MM. Quoy and Gaimard* I was astonished to
find, for I knew that they had crossed both the Pacific and Indian
Oceans, that their descriptions were applicable only to reefs of
the fringing class; but my astonishment ended satisfactorily, when
I discovered that, by a strange chance, all the islands which these
eminent naturalists had visited, though several in number, namely,
the Mauritius, Timor, New Guinea, the Mariana, and Sandwich
Archipelagoes, could be shown by their own statements to have been
elevated within a recent geological era.</p>
<p class="fnote">* "Annales des Sciences Nat." tom. vi, p. 279,
etc.</p>
<p class="quote">In the eastern half of the Pacific, the <i>
Sandwich Islands</i> are all fringed, and almost every naturalist
who has visited them, has remarked on the abundance of elevated
corals and shells, apparently identical with living species. The
Rev. W. Ellis informs me, that he has noticed round several parts
of Hawaii, beds of coral-detritus, about twenty feet above the
level of the sea, and where the coast is low they extend far
inland. Upraised coral-rock forms a considerable part of the
borders of Oahu; and at Elizabeth Island<sup>1</sup> it composes
three strata, each about ten feet thick. Nihau, which forms the
northern, as Hawaii does the southern end of the group (350 miles
in length), likewise seems to consist of coral and volcanic rocks.
Mr. Couthouy<sup>2</sup> has lately described with interesting
details, several upraised beaches, ancient reefs with their
surfaces perfectly preserved, and beds of recent shells and corals,
at the islands of Maui, Morokai, Oahu, and Tauai (or Kauai) in this
group. Mr. Pierce, an intelligent resident at Oahu, is convinced,
from changes which have taken place within his memory, during the
last sixteen years, "that the elevation is at present going forward
at a very perceptible rate." The natives at Kauai state that the
land is there gaining rapidly on the sea, and Mr. Couthouy has no
doubt, from the nature of the strata, that this has been effected
by an elevation of the land.</p>
<p class="quote">In the southern part of the Low Archipelago,
Elizabeth Island is described by Captain Beechey,<sup>3</sup> as
being quite flat, and about eighty feet in height; it is entirely
composed of dead corals, forming a honeycombed, but compact rock.
In cases like this, of an island having exactly the appearance,
which the elevation of any one of the smaller surrounding atolls
with a shallow lagoon would present, one is led to conclude (with
little better reason, however, than the improbability of such small
and low fabrics lasting, for an immense period, exposed to the many
destroying agents of nature), that the elevation has taken place at
an epoch not geologically remote. When merely the surface of an
island of ordinary formation is strewed with marine</p>
<p class="fnote2">1. "Zoology of Captain Beechey's Voyage," p. 176.
See also MM. Quoy and Gaimard in "Annales de Scien. Nat." tom.
vi.<br>
2. "Remarks on Coral Formations," p. 51.<br>
3. Beechey's "Voyage in the Pacific," p. 46, 4to ed.</p>
<p> </p>
<hr>
<p class="page"><a name="page 99">page 99</a></p>
<p> </p>
<p class="quote">bodies, and that continuously, or nearly so, from
the beach to a certain height, and not above that height, it is
exceedingly improbable that such organic remains, although they may
not have been specially examined, should belong to any ancient
period. It is necessary to bear these remarks in mind, in
considering the evidence of the elevatory movements in the Pacific
and Indian Oceans, as it does not often rest on specific
determinations, and therefore should be received with caution. Six
of the <i>Cook and Austral Islands</i> (S.W. of the Society group),
are fringed; of these, five were described to me by the Rev. J.
Williams, as formed of coral-rock, associated with some basalt in
Mangaia), and the sixth as lofty and basaltic. Mangaia is nearly
three hundred feet high, with a level summit; and according to Mr.
S. Wilson<sup>1</sup> it is an upraised reef; "and there are in the
central hollow, formerly the bed of the lagoon, many scattered
patches of coral- rock, some of them raised to a height of forty
feet." These knolls of coral- rock were evidently once separate
reefs in the lagoon of an atoll. Mr. Martens, at Sydney, informed
me that this island is surrounded by a terrace-like plain at about
the height of a hundred feet, which probably marks a pause in its
elevation. From these facts we may infer, perhaps, that the Cook
and Austral Islands have been upheaved at a period probably not
very remote.</p>
<p class="quote"><i>Savage Island</i> (S.E. of the Friendly group),
is about forty feet in height. Forster<sup>2</sup> describes the
plants as already growing out of the dead, but still upright and
spreading trees of coral; and the younger Forster<sup>3</sup>
believes that an ancient lagoon is now represented by a central
plain; here we cannot doubt that the elevatory forces have recently
acted. The same conclusion may be extended, though with somewhat
less certainty, to the islands of the <i>friendly group</i>, which
have been well described in the second and third voyages of Cook.
The surface of Tongatabou is low and level, but with some parts a
hundred feet high; the whole consists of coral-rock, "which yet
shows the cavities and irregularities worn into it by the action of
the tides."<sup>4</sup> On Eoua the same appearances were noticed
at an elevation of between two hundred and three hundred feet.
Vavao, also, at the opposite or northern end of the group,
consists, according to the Rev. J. Williams, of coral-rock.
Tongatabou, with its northern extensive reefs, resembles either an
upraised atoll with one half originally imperfect, or one unequally
elevated; and Anamouka, an atoll equally elevated. This latter
island contains<sup>5</sup> in its centre a salt-water lake, about
a mile-and-a-half in diameter, without any communication with the
sea, and around it the land rises gradually like a bank; the
highest part is only between twenty and thirty feet; but on this
part, as well as on the rest of the land (which, as Cook observes,
rises above the height of true lagoon-islands), coral-rock, like
that on the beach, was found. In the <i>Navigator Archipelago</i>,
Mr. Couthouy<sup>6</sup> found on Manua many and very large
fragments of coral at the height of eighty feet, "on a steep
hill-side, rising half a mile inland from a low sandy plain
abounding in marine remains." The fragments were embedded in a
mixture of decomposed lava and sand. It is not stated whether they
were accompanied by shells, or whether the corals resembled recent
species; as these</p>
<p class="fnote2">1. Couthouy's "Remarks," p. 34.<br>
2. "Observations made during Voyage round the World," p. 147.<br>
3. "Voyage," vol. ii, p. 163.<br>
4. Cook's "Third Voyage" (4to ed.), vol. i, p. 314.<br>
5. <i>Ibid</i>., vol. i, p. 235.<br>
6. "Remarks on Coral-Formations," p. 50.</p>
<p> </p>
<hr>
<p class="page"><a name="page 100">page 100</a></p>
<p> </p>
<p class="quote">remains were embedded they possibly may belong to
a remote epoch; but I presume this was not the opinion of Mr.
Couthouy. Earthquakes are very frequent in this archipelago.</p>
<p class="quote">Still proceeding westward we come to the <i>New
Hebrides</i>; on these islands, Mr. G. Bennett (author of
"Wanderings in New South Wales"), informs me he found much coral at
a great altitude, which he considered of recent origin. Respecting
<i>Santa Cruz</i>, and the <i>Solomon Archipelago</i>, I have no
information; but at New Ireland, which forms the northern point of
the latter chain, both Labillardiere and Lesson have described
large beds of an apparently very modern madreporitic rock, with the
form of the corals little altered. The latter author<sup>1</sup>
states that this formation composes a newer line of coast, modelled
round an ancient one. There only remains to be described in the
Pacific, that curved line of fringed islands, of which the <i>
Marianas</i> form the main part. Of these Guam, Rota, Tiniam,
Saypan, and some islets farther north, are described by Quoy and
Gaimard,<sup>2</sup> and Chamisso,<sup>3</sup> as chiefly composed
of madreporitic limestone, which attains a considerable elevation,
and is in several cases worn into successively rising cliffs: the
two former naturalists seem to have compared the corals and shells
with the existing ones, and state that they are of recent species.
<i>Fais</i>, which lies in the prolonged line of the Marianas, is
the only island in this part of the sea which is fringed; it is
ninety feet high, and consists entirely of madreporitic
rock.<sup>4</sup></p>
<p class="quote">In the <i>East Indian Archipelago</i>, many
authors have recorded proofs of recent elevation. M.
Lesson<sup>5</sup> states, that near Port Dory, on the north coast
of New Guinea, the shores are flanked, to the height of 150 feet,
by madreporitic strata of modern date. He mentions similar
formations at Waigiou, Amboina, Bourou, Ceram, Sonda, and Timor: at
this latter place, MM. Quoy and Gaimard<sup>6</sup> have likewise
described the primitive rocks, as coated to a considerable height
with coral. Some small islets eastward of Timor are said in Kolff's
"Voyage,"<sup>7</sup> to resemble small coral islets upraised some
feet above the sea. Dr. Malcolmson informs me that Dr. Hardie found
in JAVA an extensive formation, containing an abundance of shells,
of which the greater part appear to be of existing species. Dr.
Jack<sup>8</sup> has described some upraised shells and corals,
apparently recent, on Pulo Nias off <i>Sumatra</i>; and Marsden
relates in his history of this great island, that the names of many
promontories, show that they were originally islands. On part of
the west</p>
<p class="fnote2">1. "Voyage de la <i>Coquille</i>," Part.
Zoolog.<br>
2. Freycinet's "Voyage autour du Monde." See also the
"Hydrographical Memoir," p. 215.<br>
3. Kotzebue's "First Voyage."<br>
4. Lutké's "Voyage," vol. ii, p. 304.<br>
5. Partie Zoolog., "Voyage de la <i>Coquille</i>."<br>
6. "Ann. des Scien. Nat." tom. vi, p. 281.<br>
7. Translated by Windsor Earl, chapters vi, vii.<br>
8. "Geolog. Transact." 2nd series, vol. i, p. 403. On the
Peninsula of Malacca, in front of Pinang, 5° 30' N., Dr. Ward
collected some shells, which Dr. Malcolmson informs me, although
not compared with existing species, had a recent appearance. Dr.
Ward describes in this neighbourhood ("Trans. Asiat. Soc." vol.
xviii, part ii, p. 166) a single water-worn rock, with a
conglomerate of sea-shells at its base, situated six miles inland,
which, according to the traditions of the natives, was once
surrounded by the sea. Captain Low has also described
(<i>Ibid</i>., part i, p. 131) mounds of shells lying two miles
inland on this line of coast.</p>
<p> </p>
<hr>
<p class="page"><a name="page 101">page 101</a></p>
<p> </p>
<p class="quote">coast of <i>Borneo</i> and at the <i>Sooloo
Islands</i>, the form of the land, the nature of the soil, and the
water-washed rocks, present appearances<sup>1</sup> (although it is
doubtful whether such vague evidence is worthy of mention), of
having recently been covered by the sea; and the inhabitants of the
Sooloo Islands believe that this has been the case. Mr. Cuming, who
has lately investigated, with so much success, the natural history
of the <i>Philippines</i>, found near Cabagan, in Luzon, about
fifty feet above the level of the R. Cagayan, and seventy miles
from its mouth, a large bed of fossil shells: these, he informs me,
are of the same species with those now existing on the shores of
the neighbouring islands. From the accounts given us by Captain
Basil Hall and Captain Beechey<sup>2</sup> of the lines of inland
reefs, and walls of coral-rock worn into caves, above the present
reach of the waves, at the <i>Loo Choo</i> Islands, there can be
little doubt that they have been upraised at no very remote
period.</p>
<p class="quote">Dr. Davy<sup>3</sup> describes the northern
province of <i>Ceylon</i> as being very low, and consisting of a
limestone with shells and corals of very recent origin; he adds,
that it does not admit of a doubt that the sea has retired from
this district even within the memory of man. There is also some
reason for believing that the western shores of India, north of
Ceylon, have been upraised within the recent period.<sup>4</sup>
<i>Mauritius</i> has certainly been upraised within the recent
period, as I have stated in the chapter on fringing-reefs. The
northern extremity of <i>Madagascar</i> is described by Captain
Owen<sup>5</sup> as formed of madreporitic rock, as likewise are
the shores and outlying islands along an immense space of <i>
Eastern Africa</i>, from a little north of the equator for nine
hundred miles southward. Nothing can be more vague than the
expression "madreporitic rock;" but at the same time it is, I
think, scarcely possible to look at the chart of the linear islets,
which rise to a greater height than can be accounted for by the
growth of coral, in front of the coast, from the equator to 2°
S., without feeling convinced that a line of fringing-reefs has
been elevated at a period so recent, that no great changes have
since taken place on the surface of this part of the globe. Some,
also, of the</p>
<p class="fnote2">1. "Notices of the East Indian Arch." Singapore,
1828, p. 6, and Append., p. 43.<br>
2. Captain B. Hall, "Voyage to Loo Choo," Append., pp. xxi and
xxv. Captain Beechey's "Voyage," p. 496.<br>
3. "Travels in Ceylon," p. 13. This madreporitic formation is
mentioned by M. Cordier in his report to the Institute (May 4th,
1839), on the voyage of the <i>Chevrette</i>, as one of immense
extent, and belonging to the latest tertiary period.<br>
4. Dr. Benza, in his "Journey through the N. Circars" (the <i>
Madras Lit. and Scient. Journ.</i> vol. v.) has described a
formation with recent fresh-water and marine shells, occurring at
the distance of three or four miles from the present shore. Dr.
Benza, in conversation with me, attributed their position to a rise
of the land. Dr. Malcolmson, however (and there cannot be a higher
authority on the geology of India) informs me that he suspects that
these beds may have been formed by the mere action of the waves and
currents accumulating sediment. From analogy I should much incline
to Dr. Benza's opinion.<br>
5. Owen's "Africa," vol. ii, p. 37, for Madagascar; and for S.
Africa, vol. i, pp. 412 and 426. Lieutenant Boteler's narrative
contains fuller particulars regarding the coral-rock, vol. i, p.
174, and vol. ii, pp. 41 and 54. See also Ruschenberger's "Voyage
round the World," vol. i, p. 60.</p>
<p> </p>
<hr>
<p class="page"><a name="page 102">page 102</a></p>
<p> </p>
<p class="quote">higher islands of madreporitic rock on this coast,
for instance Pemba, have very singular forms, which seem to show
the combined effect of the growth of coral round submerged banks,
and their subsequent upheaval. Dr. Allan informs me that he never
observed any elevated organic remains on the <i>Seychelles</i>,
which come under our fringed class.</p>
<p class="quote">The nature of the formations round the shores of
the <i>Red Sea</i>, as described by several authors, shows that the
whole of this large area has been elevated within a very recent
tertiary epoch. A part of this space in the appended map, is
coloured blue, indicating the presence of barrier-reefs: on which
circumstance I shall presently make some remarks.
Rüppell<sup>1</sup> states that the tertiary formation, of
which he has examined the organic remains, forms a fringe along the
shores with a uniform height of from thirty and forty feet from the
mouth of the Gulf of Suez to about latitude 26°; but that south
of 26°, the beds attain only the height of from twelve to
fifteen feet. This, however, can hardly be quite accurate; although
possibly there may be a decrease in the elevation of the shores in
the middle parts of the Red Sea, for Dr. Malcolmson (as he informs
me) collected from the cliffs of Camaran Island (lat. 15° 30'
S.) shells and corals, apparently recent, at a height between
thirty and forty feet; and Mr. Salt ("Travels in Abyssinia")
describes a similar formation a little southward on the opposite
shore at Amphila. Moreover, near the mouth of the Gulf of Suez,
although on the coast opposite to that on which Dr. Rüppell
says that the modern beds attain a height of only thirty to forty
feet, Mr. Burton<sup>2</sup> found a deposit replete with existing
species of shells, at the height of 200 feet. In an admirable
series of drawings by Captain Moresby, I could see how continuously
the cliff-bounded low plains of this formation extended with a
nearly equable height, both on the eastern and western shores. The
southern coast of Arabia seems to have been subjected to the same
elevatory movement, for Dr. Malcolmson found at Sahar low cliffs
containing shells and corals, apparently of recent species.</p>
<p class="quote">The <i>Persian Gulf</i> abounds with coral-reefs;
but as it is difficult to distinguish them from sand-banks in this
shallow sea, I have coloured only some near the mouth; towards the
head of the gulf Mr. Ainsworth<sup>3</sup> says that the land is
worn into terraces, and that the beds contain organic remains of
existing forms. The <i>West Indian Archipelago</i> of "fringed"
islands, alone remains to be mentioned; evidence of an elevation
within a late tertiary epoch of nearly the whole of this great
area, may be found in the works of almost all the naturalists who
have visited it. I will give some of the principal references in a
note.<sup>4</sup></p>
<p class="fnote2">1. Ruppell, "Reise in Abyssinien," Band i., s.
141.<br>
2. Lyell's "Principles of Geology," 5th ed., vol. iv, p. 25.<br>
3. Ainsworth's "Assyria and Babylon," p. 217.<br>
4. On Florida and the north shores of the Gulf of Mexico, Rogers'
"Report to Brit. Assoc." vol. iii, p. 14.—On the shores of
Mexico, Humboldt, "Polit. Essay on New Spain," vol. i, p. 62. (I
have also some corroborative facts with respect to the shores of
Mexico.)— Honduras and the Antilles, Lyell's "Principles,"
5th ed., vol. iv, p. 22.—Santa Cruz and Barbadoes, Prof.
Hovey, "Silliman's Journal", vol. xxxv, p. 74.—St. Domingo,
Courrojolles, "Journ de Phys." tom. liv., p. 106.—Bahamas,
"United Service Journal", No. lxxi, pp. 218 and 224. Jamaica, De la
Beche, "Geol. Man." p. 142.—Cuba, Taylor in "Lond. and Edin.
Mag." vol. xi, p. 17. Dr. Daubeny also, at a meeting of the Geolog.
Soc., orally described some very modern beds lying on the N.W.
parts of Cuba. I might have added many other less important
references.</p>
<p> </p>
<hr>
<p class="page"><a name="page 103">page 103</a></p>
<p> </p>
<p>It is very remarkable on reviewing these details, to observe in
how many instances fringing-reefs round the shores, have coincided
with the existence on the land of upraised organic remains, which
seem, from evidence more or less satisfactory, to belong to a late
tertiary period. It may, however, be objected, that similar proofs
of elevation, perhaps, occur on the coasts coloured blue in our
map: but this certainly is not the case with the few following and
doubtful exceptions.</p>
<p>The entire area of the Red Sea appears to have been upraised
within a modern period; nevertheless I have been compelled (though
on unsatisfactory evidence, as given in the Appendix) to class the
reefs in the middle part, as barrier-reefs; should, however, the
statements prove accurate to the less height of the tertiary bed in
this middle part, compared with the northern and southern
districts, we might well suspect that it had subsided subsequently
to the general elevation by which the whole area has been upraised.
Several authors<sup>1</sup> have stated that they have observed
shells and corals high up on the mountains of the Society
Islands,—a group encircled by barrier-reefs, and, therefore,
supposed to have subsided: at Tahiti Mr. Stutchbury found on the
apex of one of the highest mountains, between 5,000 and 7,000 feet
above the level of the sea, "a distinct and regular stratum of
semi-fossil coral." At Tahiti, however, other naturalists, as well
as myself, have searched in vain at a low level near the coast, for
upraised shells or masses of coral-reef, where if present they
could hardly have been overlooked. From this fact, I concluded that
probably the organic remains strewed high up on the surface of the
land, had originally been embedded in the volcanic strata, and had
subsequently been washed out by the rain. I have since heard from
the Rev. W. Ellis, that the remains which he met with, were (as he
believes) interstratified with an argillaceous tuff; this likewise
was the case with the shells observed by the Rev. D. Tyerman at
Huaheine. These remains have not been specifically examined; they
may, therefore, and especially the stratum observed by Mr.
Stutchbury at an immense height, be contemporaneous with the first
formation of the Society Islands, and be of any degree of
antiquity; or they may have been deposited at some subsequent, but
probably not very recent, period of elevation; for if the period
had been recent, the entire surface of the coast land of these
islands, where the reefs are so extensive, would have been coated
with upraised coral,</p>
<p class="fnote">1. Ellis, in his "Polynesian Researches," was the
first to call attention to these remains (vol. i, p. 38), and the
tradition of the natives concerning them. See also Williams, "Nar.
of Missionary Enterprise," p. 21; also Tyerman and G. Bennett,
"Journal of Voyage," vol. i, p. 213; also Mr. Couthouy's "Remarks,"
p. 51; but this principal fact, namely, that there is a mass of
upraised coral on the narrow peninsula of Tiarubu, is from hearsay
evidence; also Mr. Stutchbury, <i>West of England Journal</i>, No.
i, p. 54. There is a passage in Von Zach, "Corres. Astronom." vol.
x, p. 266, inferring an uprising at Tahiti, from a footpath now
used, which was formerly impassable; but I particularly inquired
from several native chiefs, whether they knew of any change of this
kind, and they were unanimous in giving me an answer in the
negative.</p>
<p> </p>
<hr>
<p class="page"><a name="page 104">page 104</a></p>
<p> </p>
<p>which certainly is not the case. Two of the Harvey, or Cook
Islands, namely, Aitutaki and Manouai, are encircled by reefs,
which extend so far from the land, that I have coloured them blue,
although with much hesitation, as the space within the reef is
shallow, and the outline of the land is not abrupt. These two
islands consist of coral-rock; but I have no evidence of their
recent elevation, besides, the improbability of Mangaia, a fringed
island in the same group (but distant 170 miles), having retained
its nearly perfect atoll-like structure, during any immense lapse
of time after its upheaval. The Red Sea, therefore, is the only
area in which we have clear proofs of the recent elevation of a
district, which, by our theory (although the barrier-reefs are
there not well characterised), has lately subsided. But we have no
reason to be surprised at oscillation, of level of this kind having
occasionally taken place. There can be scarcely any doubt that
Savage, Aurora,<sup>1</sup> and Mangaia Islands, and several of the
islands in the Friendly group, existed originally as atolls, and
these have undoubtedly since been upraised to some height above the
level of the sea; so that by our theory, there has here, also, been
an oscillation of level, —elevation having succeeded
subsidence, instead of, as in the middle part of the Red Sea and at
the Harvey Islands, subsidence having probably succeeded recent
elevation.</p>
<p>It is an interesting fact, that Fais, which, from its
composition, form, height, and situation at the western end of the
Caroline Archipelago, one is strongly induced to believe existed
before its upheaval as an atoll, lies exactly in the prolongation
of the curved line of the Mariana group, which we know to be a line
of recent elevation. I may add, that Elizabeth Island, in the
southern part of the Low Archipelago, which seems to have had the
same kind of origin as Fais, lies near Pitcairn Island, the only
one in this part of the ocean which is high, and at the same time
not surrounded by an encircling barrier-reef.</p>
<p><i>On the absence of active volcanoes in the areas of
subsidence, and on their frequent presence in the areas of
elevation.</i>—Before making some concluding remarks on the
relations of the spaces coloured blue and red, it will be
convenient to consider the position on our map of the volcanoes
historically known to have been in action. It is impossible not to
be struck, first with the absence of volcanoes in the great areas
of subsidence tinted pale and dark blue,—namely, in the
central parts of the Indian Ocean, in the China Sea, in the sea
between the barriers</p>
<p class="fnote">1. Aurora Island is described by Mr. Couthouy
("Remarks," p. 58); it lies 120 miles north-east of Tahiti; it is
not coloured in the appended map, because it does not appear to be
fringed by living reefs. Mr. Couthouy describes its summit as
"presenting a broad table- land which declines a few feet towards
the centre, where we may suppose the lagoon to have been placed."
It is about two hundred feet in height, and consists of reef-rock
and conglomerate, with existing species of coral embedded in it.
The island has been elevated at two successive periods; the cliffs
being marked halfway up with a horizontal water-worn line of deep
excavations. Aurora Island seems closely to resemble in structure
Elizabeth Island, at the southern end of the Low Archipelago.</p>
<p> </p>
<hr>
<p class="page"><a name="page 105">page 105</a></p>
<p> </p>
<p>of Australia and New Caledonia, in the Caroline, Marshall,
Gilbert, and Low Archipelagoes; and, secondly, with the coincidence
of the principal volcanic chains with the parts coloured red, which
indicates the presence of fringing-reefs; and, as we have just
seen, the presence in most cases of upraised organic remains of a
modern date. I may here remark that the reefs were all coloured
before the volcanoes were added to the map, or indeed before I knew
of the existence of several of them.</p>
<p>The volcano in Torres Strait, at the northern point of
Australia, is that which lies nearest to a large subsiding area,
although situated 125 miles within the outer margin of the actual
barrier-reef. The Great Comoro Island, which probably contains a
volcano, is only twenty miles distant from the barrier-reef of
Mohila; Ambil volcano, in the Philippines, is distant only a little
more than sixty miles from the atoll-formed Appoo reef: and there
are two other volcanoes in the map within ninety miles of circles
coloured blue. These few cases, which thus offer partial exceptions
to the rule, of volcanoes being placed remote from the areas of
subsidence, lie either near single and isolated atolls, or near
small groups of encircled islands; and these by our theory can
have, in few instances, subsided to the same amount in depth or
area, as groups of atolls. There is not one active volcano within
several hundred miles of an archipelago, or even a small group of
atolls. It is, therefore, a striking fact that in the Friendly
Archipelago, which owes its origin to the elevation of a group of
atolls, two volcanoes, and, perhaps, others are known to be in
action: on the other hand, on several of the encircled islands in
the Pacific, supposed by our theory to have subsided, there are old
craters and streams of lava, which show the effects of past and
ancient eruptions. In these cases, it would appear as if the
volcanoes had come into action, and had become extinguished on the
same spots, according as the elevating or subsiding movements
prevailed.</p>
<p>There are some other coasts on the map, where volcanoes in a
state of action concur with proofs of recent elevation, besides
those coloured red from being fringed by coral-reefs. Thus I hope
to show in a future volume, that nearly the whole line of the west
coast of South America, which forms the greatest volcanic chain in
the world, from near the equator for a space of between 2,000 and
3,000 miles southward, has undergone an upward movement during a
late geological period. The islands on the north-western shores of
the Pacific, which form the second greatest volcanic chain, are
very imperfectly known; but Luzon, in the Philippines, and the Loo
Choo Islands, have been recently elevated; and at
Kamtschatka<sup>1</sup> there are extensive tertiary beds of modern
date. Evidence of the same nature, but not very satisfactory, may
be detected in Northern New Zealand where there are two volcanoes.
The co-existence in other parts of the world of active volcanoes,
with upraised beds of a modern tertiary origin, will occur to</p>
<p class="fnote">1. At Sedanka, in latitude 58° N. (Von Buch's
"Descrip. des Isles Canaries," p. 455). In a forthcoming part, I
shall give the evidence referred to with respect to the elevation
of New Zealand.</p>
<p> </p>
<hr>
<p class="page"><a name="page 106">page 106</a></p>
<p> </p>
<p>every geologist.<sup>1</sup> Nevertheless, until it could be
shown that volcanoes were inactive, or did not exist in subsiding
areas, the conclusion that their distribution depended on the
nature of the subterranean movements in progress, would have been
hazardous. But now, viewing the appended map, it may, I think, be
considered as almost established, that volcanoes are often (not
necessarily always) present in those areas where the subterranean
motive power has lately forced, or is now forcing outwards, the
crust of the earth, but that they are invariably absent in those,
where the surface has lately subsided or is still
subsiding.<sup>2</sup></p>
<p><i>On the relations of the areas of subsidence and
elevation.</i>—The immense surfaces on the map, which, both
by our theory and by the plain evidence of upraised marine remains,
have undergone a change of level either downwards or upwards during
a late period, is a most remarkable fact. The existence of
continents shows that the areas have been immense which at some
period have been upraised; in South America we may feel sure, and
on the north-western shores of the Indian Ocean we may suspect,
that this rising is either now actually in progress, or has taken
place quite recently. By our theory, we may conclude that the areas
are likewise immense which have lately subsided, or, judging from
the earthquakes occasionally felt and from other appearances, are
now subsiding. The smallness of the scale of our map should not be
overlooked: each of the squares on it contains (not allowing for
the curvature of the earth) 810,000 square miles. Look at the space
of ocean from near the southern end of the Low Archipelago to the
northern end of the Marshall Archipelago, a length of 4,500 miles,
in which, as far as is known, every island, except Aurora which
lies just without the Low Archipelago, is atoll-formed. The eastern
and western boundaries of our map are continents, and they are
rising areas: the central spaces of the great Indian and Pacific
Oceans, are mostly subsiding; between them, north of Australia,
lies the most broken land on the globe, and there the rising parts
are surrounded and penetrated by areas of subsidence,<sup>3</sup>
so that the prevailing movements now in progress, seem to accord
with the actual states of surface of the great divisions of the
world.</p>
<p>The blue spaces on the map are nearly all elongated; but it does
not necessarily follow from this (a caution, for which I am
indebted to Mr. Lyell), that the areas of subsidence were likewise
elongated; for</p>
<p class="fnote">1. During the subterranean disturbances which took
place in Chile, in 1835, I have shown ("Geolog. Trans." 2nd Ser.,
vol. v, p. 606) that at the same moment that a large district was
upraised, volcanic matter burst forth at widely separated points,
through both new and old vents.<br>
2. We may infer from this rule, that in any old deposit, which
contains interstratified beds of erupted matter, there was at the
period, and in the area of its formation, a <i>tendency</i> to an
upward movement in the earth's surface, and certainly no movement
of subsidence.<br>
3. I suspect that the Arru and Timor-laut Islands present an
included small area of subsidence, like that of the China Sea, but
I have not ventured to colour them from my imperfect information,
as given in the Appendix.</p>
<p> </p>
<hr>
<p class="page"><a name="page 107">page 107</a></p>
<p> </p>
<p>the subsidence of a long, narrow space of the bed of the ocean,
including in it a transverse chain of mountains, surmounted by
atolls, would only be marked on the map by a transverse blue band.
But where a chain of atolls and barrier-reefs lies in an elongated
area, between spaces coloured red, which therefore have remained
stationary or have been upraised, this must have resulted either
from the area of subsidence having originally been elongated (owing
to some tendency in the earth's crust thus to subside), or from the
subsiding area having originally been of an irregular figure, or as
broad as long, and having since been narrowed by the elevation of
neighbouring districts. Thus the areas, which subsided during the
formation of the great north and south lines of atolls in the
Indian Ocean,—of the east and west line of the Caroline
atolls,—and of the north-west and south-east line of the
barrier-reefs of New Caledonia and Louisiade, must have originally
been elongated, or if not so, they must have since been made
elongated by elevations, which we know to belong to a recent
period.</p>
<p>I infer from Mr. Hopkins' researches,<sup>1</sup> that for the
formation of a long chain of mountains, with few lateral spurs, an
area elongated in the same direction with the chain, must have been
subjected to an elevatory movement. Mountain-chains, however, when
already formed, although running in very different directions, it
seems<sup>2</sup> may be raised together by a widely-acting force:
so, perhaps, mountain-chains may subside together. Hence, we cannot
tell, whether the Caroline and Marshall Archipelagoes, two groups
of atolls running in different directions and meeting each other,
have been formed by the subsidence of two areas, or of one large
area, including two distinct lines of mountains. We have, however,
in the southern prolongation of the Mariana Islands, probable
evidence of a line of recent elevation having intersected one of
recent subsidence. A view of the map will show that, generally,
there is a tendency to alternation in the parallel areas undergoing
opposite kinds of movement; as if the sinking of one area balanced
the rising of another.</p>
<p>The existence in many parts of the world of high table-land,
proves that large surfaces have been upraised in mass to
considerable heights above the level of the ocean; although the
highest points in almost every country consist of upturned strata,
or erupted matter: and from</p>
<p class="fnote">1. "Researches in Physical Geology," Transact.
Cambridge Phil. Soc., vol. vi, part i.<br>
2. For instance in S. America from lat. 34°, for very many
degrees southward there are upraised beds containing recent species
of shells, on both the Atlantic and Pacific side of the continent,
and from the gradual ascent of the land, although with very unequal
slopes, on both sides towards the Cordillera, I think it can hardly
be doubted that the entire width has been upraised in mass within
the recent period. In this case the two W.N.W. and E.S.E.
mountain-lines, namely the Sierra Ventana and the S. Tapalguen, and
the great north and south line of the Cordillera have been together
raised. In the West Indies the N. and S. line of the Eastern
Antilles, and the E. and W. line of Jamaica, appear both to have
been upraised within the latest geological period.</p>
<p> </p>
<hr>
<p class="page"><a name="page 108">page 108</a></p>
<p> </p>
<p>the immense spaces scattered with atolls, which indicate that
land originally existed there, although not one pinnacle now
remains above the level of the sea, we may conclude that wide areas
have subsided to an amount, sufficient to bury not only any
formerly existing table- land, but even the heights formed by
fractured strata, and erupted matter. The effects produced on the
land by the later elevatory movements, namely, successively rising
cliffs, lines of erosion, and beds of literal shells and pebbles,
all requiring time for their production, prove that these movements
have been very slow; we can, however, infer this with safety, only
with respect to the few last hundred feet of rise. But with
reference to the whole vast amount of subsidence, necessary to have
produced the many atolls widely scattered over immense spaces, it
has already been shown (and it is, perhaps, the most interesting
conclusion in this volume), that the movements must either have
been uniform and exceedingly slow, or have been effected by small
steps, separated from each other by long intervals of time, during
which the reef-constructing polypifers were able to bring up their
solid frameworks to the surface. We have little means of judging
whether many considerable oscillations of level have generally
occurred during the elevation of large tracts; but we know, from
clear geological evidence, that this has frequently taken place;
and we have seen on our map, that some of the same islands have
both subsided and been upraised. I conclude, however, that most of
the large blue spaces, have subsided without many and great
elevatory oscillations, because only a few upraised atolls have
been observed: the supposition that such elevations have taken
place, but that the upraised parts have been worn down by the surf,
and thus have escaped observation, is overruled by the very
considerable depth of the lagoons of all the larger atolls; for
this could not have been the case, if they had suffered repeated
elevations and abrasion. From the comparative observations made in
these latter pages, we may finally conclude, that the subterranean
changes which have caused some large areas to rise, and others to
subside, have acted in a very similar manner.</p>
<p><i>Recapitulation.</i>—In the three first chapters, the
principal kinds of coral-reefs were described in detail, and they
were found to differ little, as far as relates to the actual
surface of the reef. An atoll differs from an encircling
barrier-reef only in the absence of land within its central
expanse; and a barrier-reef differs from a fringing-reef, in being
placed at a much greater distance from the land with reference to
the probable inclination of its submarine foundation, and in the
presence of a deep-water lagoon- like space or moat within the
reef. In the fourth chapter the growing powers of the
reef-constructing polypifers were discussed; and it was shown, that
they cannot flourish beneath a very limited depth. In accordance
with this limit, there is no difficulty respecting the foundations
on which fringing-reefs are based; whereas, with barrier- reefs and
atolls, there is a great apparent difficulty on this head; in
barrier-reefs from the improbability of the rock of the coast or of
banks of sediment extending, in every instance, so far seaward
within the required depth;—and in atolls, from the immensity
of the</p>
<p> </p>
<hr>
<p class="page"><a name="page 109">page 109</a></p>
<p> </p>
<p>spaces over which they are interspersed, and the apparent
necessity for believing that they are all supported on
mountain-summits, which although rising very near to the
surface-level of the sea, in no one instance emerge above it. To
escape this latter most improbable admission, which implies the
existence of submarine chains of mountains of almost the same
height, extending over areas of many thousand square miles, there
is but one alternative; namely, the prolonged subsidence of the
foundations, on which the atolls were primarily based, together
with the upward growth of the reef- constructing corals. On this
view every difficulty vanishes; fringing reefs are thus converted
into barrier-reefs; and barrier-reefs, when encircling islands, are
thus converted into atolls, the instant the last pinnacle of land
sinks beneath the surface of the ocean.</p>
<p>Thus the ordinary forms and certain peculiarities in the
structure of atolls and barrier-reefs can be
explained;—namely, the wall-like structure on their inner
sides, the basin or ring-like shape both of the marginal and
central reefs in the Maldiva atolls—the union of some atolls
as if by a ribbon—the apparent disseverment of others—
and the occurrence, in atolls as well as in barrier-reefs, of
portions of reef, and of the whole of some reefs, in a dead and
submerged state, but retaining the outline of living reefs. Thus
can be explained the existence of breaches through barrier-reefs in
front of valleys, though separated from them by a wide space of
deep water; thus, also, the ordinary outline of groups of atolls
and the relative forms of the separate atolls one to another; thus
can be explained the proximity of the two kinds of reefs formed
during subsidence, and their separation from the spaces where
fringing-reefs abound. On searching for other evidence of the
movements supposed by our theory, we find marks of change in atolls
and in barrier-reefs, and of subterranean disturbances under them;
but from the nature of things, it is scarcely possible to detect
any direct proofs of subsidence, although some appearances are
strongly in favour of it. On the fringed coasts, however, the
presence of upraised marine bodies of a recent epoch, plainly show,
that these coasts, instead of having remained stationary, which is
all that can be directly inferred from our theory, have generally
been elevated.</p>
<p>Finally, when the two great types of structure, namely
barrier-reefs and atolls on the one hand, and fringing-reefs on the
other, were laid down in colours on our map, a magnificent and
harmonious picture of the movements, which the crust of the earth
has within a late period undergone, is presented to us. We there
see vast areas rising, with volcanic matter every now and then
bursting forth through the vents or fissures with which they are
traversed. We see other wide spaces slowly sinking without any
volcanic outburst, and we may feel sure, that this sinking must
have been immense in amount as well as in area, thus to have buried
over the broad face of the ocean every one of those mountains,
above which atolls now stand like monuments, marking the place of
their former existence. Reflecting how powerful an agent with
respect to denudation, and consequently to the nature and thickness
of the deposits in accumulation, the sea must ever be, when
acting</p>
<p> </p>
<hr>
<p class="page"><a name="page 110">page 110</a></p>
<p> </p>
<p>for prolonged periods on the land, during either its slow
emergence or subsidence; reflecting, also, on the final effects of
these movements in the interchange of land and ocean-water on the
climate of the earth, and on the distribution of organic beings, I
may be permitted to hope, that the conclusions derived from the
study of coral-formations, originally attempted merely to explain
their peculiar forms, may be thought worthy of the attention of
geologists.</p>
<p> </p>
<hr>
<p class="page"><a name="page 111">page 111</a></p>
<p> </p>
<center><b>Appendix<br>
<br>
CONTAINING A DETAILED DESCRIPTION OF THE REEFS AND ISLANDS IN <a
href="#PLATE III">PLATE III</a></b></center>
<p>In the beginning of the last chapter I stated the principles on
which the map is coloured. There only remains to be said, that it
is an exact copy of one by M. C. Gressier, published by the
Dépôt Général de la Marine, in 1835. The
names have been altered into English, and the longitude has been
reduced to that of Greenwich. The colours were first laid down on
accurate charts, on a large scale. The data, on which the volcanoes
historically known to have been in action, have been marked with
vermillion, were given in a note to the last chapter. I will
commence my description on the eastern side of the map, and will
describe each group of islands consecutively, proceeding westward
across the Pacific and Indian Oceans, but ending with the West
Indies.</p>
<p>The W<small>ESTERN</small> S<small>HORES</small> <small>
OF</small> A<small>MERICA</small> appear to be entirely without
coral-reefs; south of the equator the survey of the <i>Beagle</i>,
and north of it, the published charts show that this is the case.
Even in the Bay of <i>Panama</i>, where corals flourish, there are
no true coral- reefs, as I have been informed by Mr. Lloyd. There
are no coral-reefs in the <i>Galapagos</i> Archipelago, as I know
from personal inspection; and I believe there are none on the <i>
Cocos, Revilla- gigedo</i>, and other neighbouring islands. <i>
Clipperton</i> rock, 10° N., 109° W., has lately been
surveyed by Captain Belcher; in form it is like the crater of a
volcano. From a drawing appended to the MS. plan in the Admiralty,
it evidently is not an atoll. The eastern parts of the Pacific
present an enormous area, without any islands, except <i>E</i>, and
<i>Sala</i>, and <i>Gomez</i> Islands, which do not appear to be
surrounded by reefs.</p>
<p>The L<small>OW</small> A<small>RCHIPELAGO</small>.—This
group consists of about eighty atolls: it will be quite superfluous
to refer to descriptions of each. In D'Urville and Lottin's chart,
one island (<i>Wolchonsky</i>) is written with a capital letter,
signifying, as explained in a former chapter, that it is a high
island; but this must be a mistake, as the original chart by
Bellinghausen shows that it is a true atoll. Captain Beechey says
of the thirty-two groups which he examined (of the greater number
of which</p>
<p> </p>
<hr>
<p class="page"><a name="page 112">page 112</a></p>
<p> </p>
<p>I have seen beautiful MS. charts in the Admiralty), that
twenty-nine now contain lagoons, and he believes the other three
originally did. Bellinghausen (see an account of his Russian
voyage, in the "Biblioth. des Voyages," 1834, p. 443) says, that
the seventeen islands which he discovered resembled each other in
structure, and he has given charts on a large scale of all of them.
Kotzebue has given plans of several; Cook and Bligh mention others;
a few were seen during the voyage of the <i>Beagle</i>; and notices
of other atolls are scattered through several publications. The <i>
Actæon</i> group in this archipelago has lately been
discovered (<i>Geograph. Journ.</i>, vol. vii, p. 454); it consists
of three small and low islets, one of which has a lagoon. Another
lagoon-island has been discovered (<i>Naut. Mag.</i>, 1839, p.
770), in 22° 4' S., and 136° 20' W. Towards the S.E. part
of the group, there are some islands of different formation: <i>
Elizabeth</i> Island is described by Beechey (p. 46, 4to ed.) as
fringed by reefs, at the distance of between two and three hundred
yards; coloured red. <i>Pitcairn</i> Island, in the immediate
neighbourhood, according to the same authority, has no reefs of any
kind, although numerous pieces of coral are thrown up on the beach;
the sea close to its shore is very deep (see "Zool. of Beechey's
Voyage," p. 164); it is left uncoloured. <i>Gambier</i> Islands
(see <a href="#Plate I">Plate I</a> Fig. 8), are encircled by a
barrier-reef; the greatest depth within is thirty-eight fathoms;
coloured pale blue. <i>Aurora</i> Island, which lies N.E. of Tahiti
close to the large space coloured dark blue in the map, has been
already described in a note (<a href="#page 71">page 71</a>), on
the authority of Mr. Couthouy; it is an upraised atoll, but as it
does not appear to be fringed by living reefs, it is left
uncoloured.</p>
<p>The S<small>OCIETY</small> Arch. is separated by a narrow space
from the Low Archipelago; and in their parallel direction they
manifest some relation to each other. I have already described the
general character of the reefs of these fine encircled islands. In
the "Atlas of the <i>Coquille's</i> Voyage" there is a good general
chart of the group, and separate plans of some of the islands. <i>
Tahiti</i>, the largest island in the group, is almost surrounded,
as seen in Cook's chart, by a reef from half a mile to a mile and a
half from the shore, with from ten to thirty fathoms within it.
Some considerable submerged reefs lying parallel to the shore, with
a broad and deep space within, have lately been discovered
(<i>Naut. Mag.</i>, 1836, p. 264) on the N.E. coast of the island,
where none are laid down by Cook. At <i>Eimeo</i> the reef "which
like a ring surrounds it, is in some places one or two miles
distant from the shore, in others united to the beach" (Ellis,
"Polynesian Researches," vol. i, p. 18, 12mo edition). Cook found
deep water (twenty fathoms) in some of the harbours within the
reef. Mr. Couthouy, however, states ("Remarks," p. 45) that both at
Tahiti and Eimeo, the space between the barrier- reef and the
shore, has been almost filled up,—"a nearly continuous
fringing-reef surrounding the island, and varying from a few yards
to rather more than a mile in width, the lagoons merely forming
canals between this and the sea-reef," that is the barrier-reef.
<i>Tapamanoa</i> is surrounded by a reef at a considerable distance
from the shore; from the island being small it is breached, as I am
informed by the Rev. W.</p>
<p> </p>
<hr>
<p class="page"><a name="page 113">page 113</a></p>
<p> </p>
<p>Ellis, only by a narrow and crooked boat channel. This is the
lowest island in the group, its height probably not exceeding 500
feet. A little way north of Tahiti, the low coral-islets of <i>
Teturoa</i> are situated; from the description of them given me by
the Rev. J. Williams (the author of the "Narrative of Missionary
Enterprise"), I should have thought they had formed a small atoll,
and likewise from the description given by the Rev. D. Tyerman and
G. Bennett ("Journal of Voyage and Travels," vol. i, p. 183), who
say that ten low coral- islets "are comprehended within one general
reef, and separated from each other by interjacent lagoons;" but as
Mr. Stutchbury (<i>West of England Journal</i>, vol. i, p. 54)
describes it as consisting of a mere narrow ridge, I have left it
uncoloured. <i>Maitea</i>, eastward of the group, is classed by
Forster as a high encircled island; but from the account given by
the Rev. D. Tyerman and G. Bennett (vol. i, p. 57) it appears to be
an exceedingly abrupt cone, rising from the sea without any reef; I
have left it uncoloured. It would be superfluous to describe the
northern islands in this group, as they may be well seen in the
chart accompanying the 4to edition of Cook's "Voyages," and in the
"Atlas of the <i>Coquille's</i> Voyage." <i>Maurua</i> is the only
one of the northern islands, in which the water within the reef is
not deep, being only four and a half fathoms; but the great width
of the reef, stretching three miles and a half southward of the
land (which is represented in the drawing in the "Atlas of the <i>
Coquille's</i> Voyage" as descending abruptly to the water) shows,
on the principle explained in the beginning of the last chapter,
that it belongs to the barrier class. I may here mention, from
information communicated to me by the Rev. W. Ellis, that on the
N.E. side of <i>Huaheine</i> there is a bank of sand, about a
quarter of a mile wide, extending parallel to the shore, and
separated from it by an extensive and deep lagoon; this bank of
sand rests on coral-rock, and undoubtedly was originally a living
reef. North of Bolabola lies the atoll of <i>Toubai</i> (Motou-iti
of the "<i>Coquille's</i> Atlas") which is coloured dark blue; the
other islands, surrounded by barrier-reefs, are pale blue; three of
them are represented in Figs 3, 4, and 5, in <a href="#Plate I">
Plate I.</a> There are three low coral-groups lying a little E. of
the Society Archipelago, and almost forming part of it, namely <i>
Bellinghausen</i>, which is said by Kotzebue ("Second Voyage," vol.
ii, p. 255), to be a lagoon-island; <i>Mopeha</i>, which, from
Cook's description ("Second Voyage," book iii, chap. i), no doubt
is an atoll; and the <i>Scilly</i> Islands, which are said by
Wallis ("Voyage," chap. ix) to form a <i>group</i> of <i>low</i>
islets and shoals, and, therefore, probably, they compose an atoll:
the two former have been coloured blue, but not the latter.</p>
<p>M<small>ENDANA</small> <small>OR</small>
M<small>ARQUESAS</small> Group.—These islands are entirely
without reefs, as may be seen in Krusenstern's Atlas, making a
remarkable contrast with the adjacent group of the Society Islands.
Mr. F. D. Bennett has given some account of this group, in the
seventh volume of the <i>Geograph. Journ.</i> He informs me that
all the islands have the same general character, and that the water
is very deep close to their shores. He visited three of them,
namely, <i>Dominicana, Christiana,</i> and <i>Roapoa</i>; their
beaches are strewed with rounded masses of coral, and</p>
<p> </p>
<hr>
<p class="page"><a name="page 114">page 114</a></p>
<p> </p>
<p>although no regular reefs exist, yet the shore is in many places
lined by coral-rock, so that a boat grounds on this formation.
Hence these islands ought probably to come within the class of
fringed islands and be coloured red; but as I am determined to err
on the cautious side, I have left them uncoloured.</p>
<p>C<small>OOK</small> or H<small>ARVEY</small> and
A<small>USTRAL</small>
I<small>SLAND</small>.—<i>Palmerston</i> Island is minutely
described as an atoll by Captain Cook during his voyage in 1774;
coloured blue. <i>Aitutaki</i> was partially surveyed by the <i>
Beagle</i> (see map accompanying "Voyages of <i>Adventure</i> and
<i>Beagle</i>"); the land is hilly, sloping gently to the beach;
the highest point is 360 feet; on the southern side the reef
projects five miles from the land: off this point the <i>Beagle</i>
found no bottom with 270 fathoms: the reef is surmounted by many
low coral-islets. Although within the reef the water is exceedingly
shallow, not being more than a few feet deep, as I am informed by
the Rev. J. Williams, nevertheless, from the great extension of
this reef into a profoundly deep ocean, this island probably
belongs, on the principle lately adverted to, to the barrier class,
and I have coloured it pale blue; although with much
hesitation.—<i>Manouai</i> or <i>Harvey</i> Island. The
highest point is about fifty feet: the Rev. J. Williams informs me
that the reef here, although it lies far from the shore, is less
distant than at Aitutaki, but the water within the reef is rather
deeper: I have also coloured this pale blue with many
doubts.—Round <i>Mitiaro</i> Island, as I am informed by Mr.
Williams, the reef is attached to the shore; coloured
red.—<i>Mauki</i> or Maouti; the reef round this island
(under the name of Parry Island, in the "Voyage of H.M.S. <i>
Blonde</i>," p. 209) is described as a coral-flat, only fifty yards
wide, and two feet under water. This statement has been
corroborated by Mr. Williams, who calls the reef attached; coloured
red.—<i>Aitu</i>, or Wateeo; a moderately elevated hilly
island, like the others of this group. The reef is described in
Cook's "Voyage," as attached to the shore, and about one hundred
yards wide; coloured red.—<i>Fenoua-iti</i>; Cook describes
this island as very low, not more than six or seven feet high (vol.
i, book ii, chap. iii, 1777); in the chart published in the
"<i>Coquille's</i> Atlas," a reef is engraved close to the shore:
this island is not mentioned in the list given by Mr. Williams
(page 16) in the "Narrative of Missionary Enterprise;" nature
doubtful. As it is so near Atiu, it has been unavoidably coloured
red.—<i>Rarotonga</i>; Mr. Williams informs me that it is a
lofty basaltic island with an attached reef; coloured
red.—There are three islands, <i>Rourouti, Roxburgh</i>, and
<i>Hull</i>, of which I have not been able to obtain any account,
and have left them uncoloured. Hull Island, in the French chart, is
written with small letters as being low.—<i>Mangaia</i>;
height about three hundred feet; "the surrounding reef joins the
shore" (Williams, "Narrative," p. 18); coloured
red.—<i>Rimetara</i>; Mr. Williams informs me that the reef
is rather close to the shore; but, from information given me by Mr.
Ellis, the reef does not appear to be quite so closely attached to
it as in the foregoing cases: the island is about three hundred
feet high (<i>Naut. Mag.</i>, 1839, p. 738); coloured
red.—<i>Rurutu</i>; Mr. Williams and Mr. Ellis inform me that
this island has an attached reef; coloured red. It is described by
Cook under the name of Oheteroa: he says it is not</p>
<p> </p>
<hr>
<p class="page"><a name="page 115">page 115</a></p>
<p> </p>
<p>surrounded, like the neighbouring islands by a reef; he must
have meant a distant reef.—<i>Toubouai</i>; in Cook's chart
("Second Voyage," vol. ii, p. 2) the reef is laid down in part one
mile, and in part two miles from the shore. Mr. Ellis ("Polynes.
Res." vol. iii, p. 381) says the low land round the base of the
island is very extensive; and this gentleman informs me that the
water within the reef appears deep; coloured
blue.—<i>Raivaivai</i>, or Vivitao; Mr. Williams informs me
that the reef is here distant: Mr. Ellis, however, says that this
is certainly not the case on one side of the island; and he
believes that the water within the reef is not deep; hence I have
left it uncoloured.—<i>Lancaster</i> Reef, described in <i>
Naut. Mag.</i>, 1833 (p. 693), as an extensive crescent-formed
coral-reef. I have not coloured it.—<i>Rapa</i>, or Oparree;
from the accounts given of it by Ellis and Vancouver, there does
not appear to be any reef.—<i>I. de Bass</i> is an adjoining
island, of which I cannot find any account.—<i>Kemin</i>
Island; Krusenstern seems hardly to know its position, and gives no
further particulars.</p>
<center>I<small>SLANDS</small> <small>BETWEEN</small> <i>the Low
and Gilbert Archipelagoes.</i></center>
<p><i>Caroline</i> Island (10° S., 150 deg W.) is described by
Mr. F. D. Bennett (<i>Geograph. Journ.</i>, vol. vii, p. 225) as
containing a fine lagoon; coloured blue.—<i>Flint</i> Island
(11° S., 151° W.); Krusenstern believes that it is the same
with Peregrino, which is described by Quiros (Burney's "Chron.
Hist.," vol. ii, p. 283) as "a cluster of small islands connected
by a reef, and forming a lagoon in the middle;" coloured
blue.—<i>Wostock</i> is an island a little more than half a
mile in diameter, and apparently quite flat and low, and was
discovered by Bellinghausen; it is situated a little west of
Caroline Island, but it is not placed on the French charts; I have
not coloured it, although I entertain little doubt from the chart
of Bellinghausen, that it originally contained a small
lagoon.—<i>Penrhyn</i> Island (9° S., 158° W.); a
plan of it in the "Atlas of the First Voyage" of Kotzebue, shows
that it is an atoll; blue.—<i>Slarbuck</i> Island (5° S.,
156° W.) is described in Byron's "Voyage in the <i>Blonde</i>"
(p. 206) as formed of a flat coral-rock, with no trees; the height
not given; not coloured.—<i>Malden</i> Island (4° S.,
154° W.); in the same voyage (p. 205) this island is said to be
of coral formation, and no part above forty feet high; I have not
ventured to colour it, although, from being of coral-formation, it
is probably fringed; in which case it should be
red.—<i>Jarvis</i>, or <i>Bunker</i> Island (0° 20' S.,
160° W.) is described by Mr. F. D. Bennett (<i>Geograph.
Journ.</i>, vol. vii, p. 227) as a narrow, low strip of
coral-formation; not coloured.—<i>Brook</i>, is a small low
island between the two latter; the position, and perhaps even the
existence of it is doubtful; not coloured.—<i>Pescado</i> and
<i>Humphrey</i> Islands; I can find out nothing about these
islands, except that the latter appears to be small and low; not
coloured.—<i>Rearson</i>, or Grand Duke Alexander's (10°
S., 161° W.); an atoll, of which a plan is given by
Bellinghausen; blue.—<i>Souvoroff</i> Islands (13° S.,
163° W.); Admiral Krusenstern, in the most obliging manner,
obtained for me an account of these islands from Admiral Lazareff,
who discovered them. They consist of five very low</p>
<p> </p>
<hr>
<p class="page"><a name="page 116">page 116</a></p>
<p> </p>
<p>islands of coral-formation, two of which are connected by a
reef, with deep water close to it. They do not surround a lagoon,
but are so placed that a line drawn through them includes an oval
space, part of which is shallow; these islets, therefore, probably
once (as is the case with some of the islands in the Caroline
Archipelago) formed a single atoll; but I have not coloured
them.—<i>Danger</i> Island (10° S., 166° W.);
described as low by Commodore Byron, and more lately surveyed by
Bellinghausen; it is a small atoll with three islets on it;
blue.—<i>Clarence</i> Island (9° S., 172° W.);
discovered in the <i>Pandora</i> (G. Hamilton's "Voyage," p. 75):
it is said, "in running along the land, we saw several canoes
crossing the <i>lagoons</i>;" as this island is in the close
vicinity of other low islands, and as it is said, that the natives
make reservoirs of water in old cocoa-nut trees (which shows the
nature of the land), I have no doubt it is an atoll, and have
coloured it blue. <i>York</i> Island (8° S., 172° W.) is
described by Commodore Byron (chap. x of his "Voyage") as an atoll;
blue.— <i>Sydney</i> Island (4° S., 172° W.) is about
three miles in diameter, with its interior occupied by a lagoon
(Captain Tromelin, "Annal. Marit." 1829, p. 297);
blue.—<i>Phoenix</i> Island (4° S., 171° W.) is
nearly circular, low, sandy, not more than two miles in diameter,
and very steep outside (Tromelin, "Annal. Marit." 1829, p. 297); it
may be inferred that this island originally contained a lagoon, but
I have not coloured it.—<i>New Nantucket</i> (0° 15' N.,
174° W.). From the French chart it must be a low island; I can
find nothing more about it or about <i>Mary</i> Island; both
uncoloured.—<i>Gardner</i> Island (5° S., 174° W.)
from its position is certainly the same as <i>Kemin</i> Island
described (Krusenstern, p. 435, Appen. to Mem., published 1827) as
having a lagoon in its centre; blue.</p>
<center>I<small>SLANDS</small> <small>SOUTH</small> <i>of the
Sandwich Archipelago.</i></center>
<p><i>Christmas</i> Island (2° N., 157° W.). Captain Cook,
in his "Third Voyage" (vol. ii, chap. x), has given a detailed
account of this atoll. The breadth of the islets on the reef is
unusually great, and the sea near it does not deepen so suddenly as
is generally the case. It has more lately been visited by Mr. F. D.
Bennett (<i>Geograph. Journ.</i>, vol. vii, p. 226); and he assures
me that it is low and of coral-formation: I particularly mention
this, because it is engraved with a capital letter, signifying a
high island, in D'Urville and Lottin's chart. Mr. Couthouy, also,
has given some account of it ("Remarks," p. 46) from the Hawaiian
"Spectator"; he believes it has lately undergone a small elevation,
but his evidence does not appear to me satisfactory; the deepest
part of the lagoon is said to be only ten feet; nevertheless, I
have coloured it blue.—<i>Fanning</i> Island (4° N.,
158° W.) according to Captain Tromelin ("Ann. Maritim.," 1829,
p. 283), is an atoll: his account as observed by Krusenstern,
differs from that given in Fanning's "Voyage" (p. 224), which,
however, is far from clear; coloured blue.—<i>Washington</i>
Island (4° N., 159° W.) is engraved as a low island in
D'Urville's chart, but is described by Fanning (p. 226) as having a
much greater elevation than Fanning Island, and hence I presume it
is not an atoll; not coloured.—<i>Palmyra</i> Island (6°
N., 162° W.) is an atoll divided into two parts (Krusenstern's
"Mem. Suppl.," p. 50, also Fanning's "Voyage," p. 233);
blue.—<i>Smyth's</i> or Johnston's</p>
<p> </p>
<hr>
<p class="page"><a name="page 117">page 117</a></p>
<p> </p>
<p>Islands (17° N., 170° W.). Captain Smyth, R.N., has had
the kindness to inform me that they consist of two very low, small
islands, with a dangerous reef off the east end of them. Captain
Smyth does not recollect whether these islets, together with the
reef, surrounded a lagoon; uncoloured.</p>
<p>S<small>ANDWICH</small>
A<small>RCHIPELAGO</small>.—<i>Hawaii</i>; in the chart in
Freycinet's "Atlas," small portions of the coast are fringed by
reefs; and in the accompanying "Hydrog. Memoir," reefs are
mentioned in several places, and the coral is said to injure the
cables. On one side of the islet of Kohaihai there is a bank of
sand and coral with five feet water on it, running parallel to the
shore, and leaving a channel of about fifteen feet deep within. I
have coloured this island red, but it is very much less perfectly
fringed than others of the group.—<i>Maui</i>; in Freycinet's
chart of the anchorage of Raheina, two or three miles of coast are
seen to be fringed; and in the "Hydrog. Memoir," "banks of coral
along shore" are spoken of. Mr. F. D. Bennett informs me that the
reefs, on an average, extend about a quarter of a mile from the
beach; the land is not very steep, and outside the reefs the sea
does not become deep very suddenly; coloured
red.—<i>Morotoi</i>, I presume, is fringed: Freycinet speaks
of the breakers extending along the shore at a little distance from
it. From the chart, I believe it is fringed; coloured
red.—<i>Oahu</i>; Freycinet, in his "Hydrog. Memoir,"
mentions some of the reefs. Mr. F. D. Bennett informs me that the
shore is skirted for forty or fifty miles in length. There is even
a harbour for ships formed by the reefs, but it is at the mouth of
a valley; red.—<i>Atooi</i>, in La Peyrouse's charts, is
represented as fringed by a reef, in the same manner as Oahu and
Morotoi; and this, as I have been informed by Mr. Ellis, on part at
least of the shore, is of coral-formation: the reef does not leave
a deep channel within; red.—<i>Oneehow</i>; Mr. Ellis
believes that this island is also fringed by a coral-reef:
considering its close proximity to the other islands, I have
ventured to colour it red. I have in vain consulted the works of
Cook, Vancouver, La Peyrouse, and Lisiansky, for any satisfactory
account of the small islands and reefs, which lie scattered in a
N.W. line prolonged from the Sandwich group, and hence have left
them uncoloured, with one exception; for I am indebted to Mr. F. D.
Bennett for informing me of an atoll-formed reef, in latitude
28° 22', longitude 178° 30' W., on which the <i>
Gledstanes</i> was wrecked in 1837. It is apparently of large size,
and extends in a N.W. and S.E. line: very few islets have been
formed on it. The lagoon seems to be shallow; at least, the deepest
part which was surveyed was only three fathoms. Mr. Couthouy
("Remarks," p. 38) describes this island under the name of <i>
Ocean</i> island. Considerable doubts should be entertained
regarding the nature of a reef of this kind, with a very shallow
lagoon, and standing far from any other atoll, on account of the
possibility of a crater or flat bank of rock lying at the proper
depth beneath the surface of the water, thus affording a foundation
for a ring-formed coral-reef. I have, however, thought myself
compelled, from its large size and symmetrical outline, to colour
it blue.</p>
<p>S<small>AMOA</small> or N<small>AVIGATOR</small>
G<small>ROUP</small>.—Kotzebue, in his "Second Voyage,"</p>
<p> </p>
<hr>
<p class="page"><a name="page 118">page 118</a></p>
<p> </p>
<p>contrasts the structure of these islands with many others in the
Pacific, in not being furnished with harbours for ships, formed by
distant coral-reefs. The Rev. J. Williams, however, informs me,
that coral-reefs do occur in irregular patches on the shores of
these islands; but that they do not form a continuous band, as
round Mangaia, and other such perfect cases of fringed islands.
From the charts accompanying La Peyrouse's "Voyage," it appears
that the north shore of <i>Savaii, Maouna, Orosenga</i>, and <i>
Manua</i>, are fringed by reefs. La Peyrouse, speaking of Maouna
(p. 126), says that the coral-reef surrounding its shores, almost
touches the beach; and is breached in front of the little coves and
streams, forming passages for canoes, and probably even for boats.
Further on (p. 159), he extends the same observation to all the
islands which he visited. Mr. Williams in his "Narrative," speaks
of a reef going round a small island attached to <i>Oyolava</i>,
and returning again to it: all these islands have been coloured
red.—A chart of <i>Rose</i> Island, at the extreme west end
of the group, is given by Freycinet, from which I should have
thought that it had been an atoll; but according to Mr. Couthouy
("Remarks," p. 43), it consists of a reef, only a league in
circuit, surmounted by a very few low islets; the lagoon is very
shallow, and is strewed with numerous large boulders of volcanic
rock. This island, therefore, probably consists of a bank of rock,
a few feet submerged, with the outer margin of its upper surface
fringed with reefs; hence it cannot be properly classed with
atolls, in which the foundations are always supposed to lie at a
depth, greater than that at which the reef-constructing polypifers
can live; not coloured.</p>
<p><i>Beveridge</i> Reef, 20° S., 167° W., is described in
the <i>Naut. Mag.</i> (May 1833, p. 442) as ten miles long in a N.
and S. line, and eight wide; "in the inside of the reef there
appears deep water;" there is a passage near the S.W. corner: this
therefore seems to be a submerged atoll, and is coloured blue.</p>
<p><i>Savage</i> Island, 19° S., 170° W., has been
described by Cook and Forster. The younger Forster (vol. ii, p.
163) says it is about forty feet high: he suspects that it contains
a low plain, which formerly was the lagoon. The Rev. J. Williams
informs me that the reef fringing its shores, resembles that round
Mangaia; coloured red.</p>
<p>F<small>RIENDLY</small>
A<small>RCHIPELAGO</small>.—<i>Pylstaart</i> Island. Judging
from the chart in Freycinet's "Atlas," I should have supposed that
it had been regularly fringed; but as nothing is said in the
"Hydrog. Memoir" (or in the "Voyage" of Tasman, the discoverer)
about coral-reefs, I have left it
uncoloured.—<i>Tongatabou</i>: In the "Atlas of the Voyage of
the <i>Astrolabe</i>," the whole south side of the island is
represented as narrowly fringed by the same reef which forms an
extensive platform on the northern side. The origin of this latter
reef, which might have been mistaken for a barrier-reef, has
already been attempted to be explained, when giving the proofs of
the recent elevation of this island.— In Cook's charts the
little outlying island also of <i>Eoaigee</i>, is represented as
fringed; coloured red.—<i>Eoua.</i> I cannot make out from
Captain Cook's charts and descriptions, that this island has any
reef, although the bottom of the neighbouring sea seems to be
corally, and the island itself is formed of coral-rock.</p>
<p> </p>
<hr>
<p class="page"><a name="page 119">page 119</a></p>
<p> </p>
<p>Forster, however, distinctly ("Observations," p. 14) classes it
with high islands having reefs, but it certainly is not encircled
by a barrier-reef and the younger Forster ("Voyage," vol. i, p.
426) says, that "a bed of coral-rocks surrounded the coast towards
the landing-place." I have therefore classed it with the fringed
islands and coloured it red. The several islands lying N.W. of
Tongatabou, namely <i>Anamouka, Komango, Kotou, Lefouga, Foa</i>,
etc., are seen in Captain Cook's chart to be fringed by reefs, in
several of them are connected together. From the various statements
in the first volume of Cook's "Third Voyage," and especially in the
fourth and sixth chapters, it appears that these reefs are of
coral-formation, and certainly do not belong to the barrier class;
coloured red.—<i>Toufoa and Kao</i>, forming the western part
of the group, according to Forster have no reefs; the former is an
active volcano.—<i>Vavao.</i> There is a chart of this
singularly formed island, by Espinoza: according to Mr. Williams it
consists of coral-rock: the Chevalier Dillon informs me that it is
not fringed; not coloured. Nor are the islands of <i>Latte</i> and
<i>Amargura</i>, for I have not seen plans on a large scale of
them, and do not know whether they are fringed.</p>
<p><i>Niouha</i>, 16° S., 174° W., or <i>Keppel</i> Island
of Wallis, or <i>Cocos</i> Island. From a view and chart of this
island given in Wallis's "Voyage" (4to ed.) it is evidently
encircled by a reef; coloured blue: it is however remarkable that
<i>Boscawen</i> Island, immediately adjoining, has no reef of any
kind; uncoloured.</p>
<p><i>Wallis</i> Island, 13° S., 176° W., a chart and view
of this island in Wallis's "Voyage" (4to ed.) shows that it is
encircled. A view of it in the <i>Naut. Mag.</i>, July 1833, p.
376, shows the same fact; blue.</p>
<p><i>Alloufatou</i>, or <i>Horn</i> Island, <i>Onouafu</i>, or <i>
Proby</i> Island, and <i>Hunter</i> Islands, lie between the
Navigator and Fidji groups. I can find no distinct accounts of
them.</p>
<p>F<small>IDJI</small> or V<small>ITI</small>
G<small>ROUP</small>.—The best chart of the numerous islands
of this group, will be found in the "Atlas of the <i>
Astrolabe's</i> Voyage." From this, and from the description given
in the "Hydrog. Memoir," accompanying it, it appears that many of
these islands are bold and mountainous, rising to the height of
between 3,000 and 4,000 feet. Most of the islands are surrounded by
reefs, lying far from the land, and outside of which the ocean
appears very deep. The <i>Astrolabe</i> sounded with ninety fathoms
in several places about a mile from the reefs, and found no bottom.
Although the depth within the reef is not laid down, it is evident
from several expressions, that Captain D'Urville believes that
ships could anchor within, if passages existed through the outer
barriers. The Chevallier Dillon informs me that this is the case:
hence I have coloured this group blue. In the S.E. part lies <i>
Batoa</i>, or <i>Turtle</i> Island of Cook ("Second Voyage," vol.
ii, p. 23, and chart, 4to ed.) surrounded by a coral-reef, "which
in some places extends two miles from the shore;" within the reef
the water appears to be deep, and outside it is unfathomable;
coloured pale blue. At the distance of a few miles, Captain Cook
(<i>Ibid</i>., p. 24) found a circular coral-reef, four or five
leagues in circuit, with deep water within; "in short, the bank
wants only a few little islets to make it exactly like one of the
half-drowned isles so</p>
<p> </p>
<hr>
<p class="page"><a name="page 120">page 120</a></p>
<p> </p>
<p>often mentioned,"—namely, atolls. South of Batoa, lies the
high island of ONO, which appears in Bellinghausen's "Atlas" to be
encircled; as do some other small islands to the south; coloured
pale blue; near Ono, there is an annular reef, quite similar to the
one just described in the words of Captain Cook; coloured dark
blue.</p>
<p><i>Rotoumah</i>, 13° S., 179° E.—From the chart in
Duperrey's "Atlas," I thought this island was encircled, and had
coloured it blue, but the Chevallier Dillon assures me that the
reef is only a shore or fringing one; red.</p>
<p><i>Independence</i> Island, 10° S., 179° E., is
described by Mr. G. Bennett, (<i>United Service Journ.</i>," 1831,
part ii, p. 197) as a low island of coral-formation, it is small,
and does not appear to contain a lagoon, although an opening
through the reef is referred to. A lagoon probably once existed,
and has since been filled up; left uncoloured.</p>
<p>E<small>LLICE</small> G<small>ROUP</small>.—<i>Oscar,
Peyster</i>, and <i>Ellice</i> Islands are figured in Arrowsmith's
"Chart of the Pacific" (corrected to 1832) as atolls, and are said
to be very low; blue.—<i>Nederlandisch</i> Island. I am
greatly indebted to the kindness of Admiral Krusenstern, for
sending me the original documents concerning this island. From the
plans given by Captains Eeg and Khremtshenko, and from the detailed
account given by the former, it appears that it is a narrow
coral-island, about two miles long, containing a small lagoon. The
sea is very deep close to the shore, which is fronted by sharp
coral-rocks. Captain Eeg compares the lagoon with that of other
coral-islands; and he distinctly says, the land is "very low." I
have therefore coloured it blue. Admiral Krusenstern ("Memoir on
the Pacific," Append., 1835) states that its shores are eighty feet
high; this probably arose from the height of the cocoa-nut trees,
with which it is covered, being mistaken for land.—<i>Gran
Cocal</i> is said in Krusenstern's "Memoir," to be low, and to be
surrounded by a reef; it is small, and therefore probably once
contained a lagoon; uncoloured.—<i>St. Augustin.</i> From a
chart and view of it, given in the "Atlas of the <i>Coquille's</i>
Voyage," it appears to be a small atoll, with its lagoon partly
filled up; coloured blue.</p>
<p>G<small>ILBERT</small> G<small>ROUP</small>.—The chart of
this group, given in the "Atlas of the <i>Coquille's</i> Voyage,"
at once shows that it is composed of ten well characterised atolls.
In D'Urville and Lottin's chart, <i>Sydenham</i> is written with a
capital letter, signifying that it is high; but this certainly is
not the case, for it is a perfectly characterised atoll, and a
sketch, showing how low it is, is given in the "<i>Coquille's</i>
Atlas." Some narrow strip-like reefs project from the southern side
of <i>Drummond</i> atoll, and render it irregular. The southern
island of the group is called <i>Chase</i> (in some charts, <i>
Rotches</i>); of this I can find no account, but Mr. F. D. Bennett
discovered (<i>Geograph. Journ.</i>", vol. vii, p. 229), a low
extensive island in nearly the same latitude, about three degrees
westward of the longitude assigned to Rotches, but very probably it
is the same island. Mr. Bennett informs me that the man at the
masthead reported an appearance of lagoon-water in the centre; and,
therefore, considering its position, I have coloured it
blue.—<i>Pitt</i> Island, at the extreme northern point of
the group, is left uncoloured, as its exact position and nature</p>
<p> </p>
<hr>
<p class="page"><a name="page 121">page 121</a></p>
<p> </p>
<p>is not known.—<i>Byron</i> Island, which lies a little to
the eastward, does not appear to have been visited since Commodore
Byron's voyage, and it was then seen only from a distance of
eighteen miles; it is said to be low; uncoloured.</p>
<p><i>Ocean, Pleasant</i>, and <i>Atlantic</i> Islands all lie
considerably to the west of the Gilbert group: I have been unable
to find any distinct account of them. Ocean Island is written with
small letters in the French chart, but in Krusenstern's "Memoir" it
is said to be high.</p>
<p>M<small>ARSHALL</small> G<small>ROUP</small>.—We are well
acquainted with this group from the excellent charts of the
separate islands, made during the two voyages of Kotzebue: a
reduced one of the whole group may be easily seen in Krusenstern's
"Atlas," and in Kotzebue's "Second Voyage." The group consists
(with the exception of two <i>little</i> islands which probably
have had their lagoon filled up) of a double row of twenty-three
large and well-characterised atolls, from the examination of which
Chamisso has given us his well-known account of coral-formations. I
include <i>Gaspar Rico</i>, or <i>Cornwallis</i> Island in this
group, which is described by Chamisso (Kotzebue's "First Voyage,"
vol. iii, p. 179) "as a low sickle-formed group, with mould only on
the windward side." Gaspard Island is considered by some
geographers as a distinct island lying N.E. of the group, but it is
not entered in the chart by Krusenstern; left uncoloured. In the
S.W. part of this group lies <i>Baring</i> Island, of which little
is known (see Krusenstern's "Appendix," 1835, p. 149). I have left
it uncoloured; but <i>Boston</i> Island I have coloured blue, as it
is described (<i>Ibid</i>.) as consisting of fourteen small
islands, which, no doubt, enclose a lagoon, as represented in a
chart in the "'Coquille's' Atlas."—Two islands, <i>Aur
Kawen</i> and <i>Gaspar Rico</i>, are written in the French chart
with capital letters; but this is an error, for from the account
given by Chamisso in Kotzebue's "First Voyage," they are certainly
low. The nature, position, and even existence, of the shoals and
small islands north of the Marshall group, are doubtful.</p>
<p>N<small>EW</small> H<small>EBRIDES</small>.—Any chart, on
even a small scale, of these islands, will show that their shores
are almost without reefs, presenting a remarkable contrast with
those of New Caledonia on the one hand, and the Fidji group on the
other. Nevertheless, I have been assured by Mr. G. Bennett, that
coral grows vigorously on their shores; as indeed, will be further
shown in some of the following notices. As, therefore, these
islands are not encircled, and as coral grows vigorously on their
shores, we might almost conclude, without further evidence, that
they were fringed, and hence I have applied the red colour with
rather greater freedom than in other instances.—<i>Matthew's
Rock</i>, an active volcano, some way south of the group (of which
a plan is given in the "Atlas of the <i>Astrolabe's</i> Voyage")
does not appear to have reefs of any kind about
it.—<i>Annatom</i>, the southernmost of the Hebrides; from a
rough woodcut given in the <i>United Service Journal</i> (1831,
part iii, p. 190), accompanying a paper by Mr. Bennett, it appears
that the shore is fringed; coloured red.—<i>Tanna.</i>
Forster, in his "Observations" (p. 22), says Tanna has on its
shores coral-rock and madrepores; and the younger Forster, in his
account (vol. ii, p. 269) speaking of the harbour</p>
<p> </p>
<hr>
<p class="page"><a name="page 122">page 122</a></p>
<p> </p>
<p>says, the whole S.E. side consists of coral-reefs, which are
overflowed at high-water; part of the southern shore in Cook's
chart is represented as fringed; coloured red.—<i>Immer</i>
is described (<i>United Service Journal,</i> 1831, part iii, p.
192) by Mr. Bennett as being of moderate elevation, with cliffs
appearing like sandstone: coral grows in patches on its shore, but
I have not coloured it; and I mention these facts, because Immer
might have been thought from Forster's classification
("Observations," p. 14), to have been a low island or even an
atoll.—<i>Erromango</i> Island; Cook ("Second Voyage," vol.
ii, p. 45, 4to ed.) speaks of rocks everywhere <i>lining</i> the
coast, and the natives offered to haul his boat over the breakers
to the sandy beach: Mr. Bennett, in a letter to the Editor of the
<i>Singapore Chron.</i>, alludes to the <i>reefs</i> on its shores.
It may, I think, be safely inferred from these passages that the
shore is fringed in parts by coral-reefs; coloured
red.—<i>Sandwich</i> Island. The east coast is said (Cook's
"Second Voyage," vol. ii, p. 41) to be low, and to be guarded by a
chain of breakers. In the accompanying chart it is seen to be
fringed by a reef; coloured red.—<i>Mallicollo.</i> Forster
speaks of the reef-bounded shore: the reef is about thirty yards
wide, and so shallow that a boat cannot pass over it. Forster also
("Observations," p. 23) says, that the rocks of the sea-shore
consist of madrepore. In the plan of Sandwich harbour, the
headlands are represented as fringed; coloured
red.—<i>Aurora</i> and <i>Pentecost</i> Islands, according to
Bougainville, apparently have no reefs; nor has the large island of
<i>S. Espiritu</i>, nor <i>Bligh</i> Island or <i>Banks'</i>
Islands, which latter lie to the N.E. of the Hebrides. But in none
of these cases, have I met with any detailed account of their
shores, or seen plans on a large scale; and it will be evident,
that a fringing-reef of only thirty or even a few hundred yards in
width, is of so little importance to navigation, that it will
seldom be noticed, excepting by chance; and hence I do not doubt
that several of these islands, now left uncoloured, ought to be
red.</p>
<p>S<small>ANTA</small> C<small>RUZ</small>
G<small>ROUP</small>.—<i>Vanikoro</i> (Fig. 1, <a href=
"#Plate I">Plate I</a>) offers a striking example of a barrier-
reef: it was first described by the Chevalier Dillon, in his
voyage, and was surveyed in the <i>Astrolabe</i>; coloured pale
blue.—<i>Tikopia</i> and <i>Fataka</i> Islands appear, from
the descriptions of Dillon and D'Urville, to have no reefs; <i>
Anouda</i> is a low, flat island, surrounded by cliffs
("<i>Astrolabe</i> Hydrog." and Krusenstern, "Mem." vol. ii, p.
432); these are uncoloured. <i>Toupoua</i> (<i>Otooboa</i> of
Dillon) is stated by Captain Tromelin ("Annales Marit." 1829, p.
289) to be almost entirely included in a reef, lying at the
distance of two miles from the shore. There is a space of three
miles without any reef, which, although indented with bays, offers
no anchorage from the extreme depth of the water close to the
shore: Captain Dillon also speaks of the reefs fronting this
island; coloured blue.—<i>Santa-Cruz.</i> I have carefully
examined the works of Carteret, D'Entrecasteaux, Wilson, and
Tromelin, and I cannot discover any mention of reefs on its shores;
left uncoloured.—<i>Tinakoro</i> is a constantly active
volcano without reefs.—<i>Mendana Isles</i> (mentioned by
Dillon under the name of <i>Mammee</i>, etc.); said by Krusenstern
to be low, and intertwined with reefs. I do not believe they
include a lagoon; I have left them uncoloured.—<i>Duff's</i>
Islands compose a small group</p>
<p> </p>
<hr>
<p class="page"><a name="page 123">page 123</a></p>
<p> </p>
<p>directed in a N.W. and S.E. band; they are described by Wilson
(p. 296, "Miss. Voy." 4to ed.), as formed by bold-peaked land, with
the islands surrounded by coral-reefs, extending about half a mile
from the shore; at a distance of a mile from the reefs he found
only seven fathoms. As I have no reason for supposing there is deep
water within these reefs, I have coloured them red. <i>Kennedy</i>
Island, N.E. of Duff's. I have been unable to find any account of
it.</p>
<p>N<small>EW</small> C<small>ALEDONIA</small>.—The great
barrier-reefs on the shores of this island have already been
described (Fig. 5, <a href="#Plate II">Plate II</a>). They have
been visited by Labillardiere, Cook, and the northern point by
D'Urville; this latter part so closely resembles an atoll that I
have coloured it dark blue. The <i>Loyalty</i> group is situated
eastward of this island; from the chart and description given in
the "Voyage of the <i>Astrolabe</i>," they do not appear to have
any reefs; north of this group, there are some extensive low reefs
(called <i>Astrolabe</i> and <i>Beaupré</i>,) which do not
seem to be atoll-formed; these are left uncoloured.</p>
<p>A<small>USTRALIAN</small>
B<small>ARRIER</small>-R<small>EEF</small>.— The limits of
this great reef, which has already been described, have been
coloured from the charts of Flinders and King. In the northern
parts, an atoll-formed reef, lying outside the barrier, has been
described by Bligh, and is coloured dark blue. In the space between
Australia and New Caledonia, called by Flinders the Corallian Sea,
there are numerous reefs. Of these, some are represented in
Krusenstern's "Atlas" as having an atoll-like structure; namely,
<i>Bampton</i> shoal, <i>Frederic, Vine</i> or Horse-shoe, and <i>
Alert</i> reefs; these have been coloured dark blue.</p>
<p>L<small>OUISIADE</small>.—The dangerous reefs which front
and surround the western, southern, and northern coasts of this
so-called peninsula and archipelago, seem evidently to belong to
the barrier class. The land is lofty, with a low fringe on the
coast; the reefs are distant, and the sea outside them profoundly
deep. Nearly all that is known of this group is derived from the
labours of D'Entrecasteaux and Bougainville: the latter has
represented one continuous reef ninety miles long, parallel to the
shore, and in places as much as ten miles from it; coloured pale
blue. A little distance northward we have the <i>Laughlan</i>
Islands, the reefs round which are engraved in the "Atlas of the
Voyage of the <i>Astrolabe</i>," in the same manner as in the
encircled islands of the Caroline Archipelago, the reef is, in
parts, a mile and a half from the shore, to which it does not
appear to be attached; coloured blue. At some little distance from
the extremity of the Louisiade lies the <i>Wells</i> reef,
described in G. Hamilton's "Voyage in H.M.S. <i>Pandora</i>" (p.
100): it is said, "We found we had got embayed in a double reef,
which will soon be an island." As this statement is only
intelligible on the supposition of the reef being crescent or
horse- shoe formed, like so many other submerged annular reefs, I
have ventured to colour it blue.</p>
<p>S<small>OLOMON</small> A<small>RCHIPELAGO</small>.—The
chart in Krusenstern's "Atlas" shows that these islands are not
encircled, and as coral appears from the works of Surville,
Bougainville, and Labillardiere, to grow on their shores, this
circumstance, as in the case of the New Hebrides, is a presumption
that they are fringed. I cannot find out anything from
D'Entrecasteaux's</p>
<p> </p>
<hr>
<p class="page"><a name="page 124">page 124</a></p>
<p> </p>
<p>"Voyage," regarding the southern islands of the group, so have
left them uncoloured.—<i>Malayta</i> Island in a rough MS.
chart in the Admiralty has its northern shore
fringed.—<i>Ysabel</i> Island, the N.E. part of this island,
in the same chart, is also fringed: Mendana, speaking (Burney, vol.
i, p. 280) of an islet adjoining the northern coast, says it is
surrounded by reefs; the shores, also of Port Praslin appear
regularly fringed.—<i>Choiseul</i> Island. In Bougainville's
"Chart of Choiseul Bay," parts of the shores are fringed by
coral-reefs.—<i>Bougainville</i> Island. According to
D'Entrecasteaux the western shore abounds with coral-reefs, and the
smaller islands are said to be attached to the larger ones by
reefs; all the before-mentioned islands have been coloured
red.—<i>Bouka</i> Islands. Captain Duperrey has kindly
informed me in a letter that he passed close round the northern
side of this island (of which a plan is given in his "Atlas of the
<i>Coquille's</i> Voyage"), and that it was "garnie d'une bande de
récifs à fleur d'eau adherentes au rivage;" and he
infers, from the abundance of coral on the islands north and south
of Bouka, that the reef probably is of coral; coloured red.</p>
<p>Off the north coast of the Solomon Archipelago there are several
small groups which are little known; they appear to be low, and of
coral-formation; and some of them probably have an atoll-like
structure; the Chevallier Dillon, however, informs me that this is
not the case with the B. de <i>Candelaria.—Outong Java</i>,
according to the Spanish navigator, Maurelle, is thus
characterised; but this is the only one which I have ventured to
colour blue.</p>
<p>N<small>EW</small> I<small>RELAND</small>.—The shores of
the S.W. point of this island and some adjoining islets, are
fringed by reefs, as may be seen in the "Atlases of the Voyages of
the <i>Coquille</i> and <i>Astrolabe</i>." M. Lesson observes that
the reefs are open in front of each streamlet. The <i>Duke of
York's</i> Island is also fringed; but with regard to the other
parts of <i>New Ireland, New Hanover</i>, and the small islands
lying northward, I have been unable to obtain any information. I
will only add that no part of New Ireland appears to be fronted by
distant reefs. I have coloured red only the above specified
portions.</p>
<p>N<small>EW</small> B<small>RITAIN AND THE</small>
N<small>ORTHERN</small> S<small>HORE OF</small> N<small>EW</small>
G<small>UINEA</small>.—From the charts in the "Voyage of the
<i>Astrolabe</i>," and from the "Hydrog. Memoir," it appears that
these coasts are entirely without reefs, as are the <i>Schouten</i>
Islands, lying close to the northern shore of New Guinea. The
western and south-western parts of New Guinea, will be treated of
when we come to the islands of the East Indian Archipelago.</p>
<p>A<small>DMIRALTY</small> G<small>ROUP</small>.—From the
accounts by Bougainville, Maurelle, D'Entrecasteaux, and the
scattered notices collected by Horsburgh, it appears, that some of
the many islands composing it, are high, with a bold outline; and
others are very low, small and interlaced with reefs. All the high
islands appear to be fronted by distant reefs rising abruptly from
the sea, and within some of which there is reason to believe that
the water is deep. I have therefore little doubt they are of the
barrier class.—In the southern part of the group we have <i>
Elizabeth</i> Island, which is surrounded by a reef at the distance
of a mile; and two miles eastward of it (Krusenstern, "Append."
1835, p. 42) there is a little island</p>
<p> </p>
<hr>
<p class="page"><a name="page 125">page 125</a></p>
<p> </p>
<p>containing a lagoon.—Near here, also lies <i>
Circular-reef</i> (Horsburgh, "Direct.," vol. i, p. 691, 4th ed.),
"three or four miles in diameter having deep water inside with an
opening at the N.N.W. part, and on the outside steep to." I have
from these data, coloured the group pale blue, and <i>
Circular-reef</i> dark blue.—The <i>Anachorites,
Echequier</i>, and <i>Hermites</i>, consist of innumerable low
islands of coral-formation, which probably have atoll-like forms;
but not being able to ascertain this, I have not coloured them, nor
<i>Durour</i> Island, which is described by Carteret as low.</p>
<p>The C<small>AROLINE</small> A<small>RCHIPELAGO</small> is now
well-known, chiefly from the hydrographical labours of
Lutké; it contains about forty groups of atolls, and three
encircled islands, two of which are engraved in Figs 2 and 7, <a
href="#Plate I">Plate I.</a> Commencing with the eastern part; the
encircling reef round <i>Ualen</i> appears to be only about half a
mile from the shore; but as the land is low and covered with
mangroves ("Voyage autour du Monde," par F. Lutké, vol. i,
p. 339), the real margin has not probably been ascertained. The
extreme depth in one of the harbours within the reef is
thirty-three fathoms (see charts in "Atlas of <i>Coquille's</i>
Voyage"), and outside at half a mile distant from the reef, no
bottom was obtained with two hundred and fifty fathoms. The reef is
surmounted by many islets, and the lagoon-like channel within is
mostly shallow, and appears to have been much encroached on by the
low land surrounding the central mountains; these facts show that
time has allowed much detritus to accumulate; coloured pale
blue.—<i>Pouynipète</i>, or Seniavine. In the greater
part of the circumference of this island, the reef is about one
mile and three quarters distant; on the north side it is five miles
off the included high islets. The reef is broken in several places;
and just within it, the depth in one place is thirty fathoms, and
in another, twenty-eight, beyond which, to all appearance, there
was "un porte vaste et sur" (Lutké, vol. ii, p. 4); coloured
pale blue.—<i>Hogoleu</i> or <i>Roug</i>. This wonderful
group contains at least sixty-two islands, and its reef is one
hundred and thirty-five miles in circuit. Of the islands, only a
few, about six or eight (see "Hydrog. Descrip." p. 428, of the
"Voyage of the <i>Astrolabe</i>," and the large accompanying chart
taken chiefly from that given by Duperrey) are high, and the rest
are all small, low, and formed on the reef. The depth of the great
interior lake has not been ascertained; but Captain D'Urville
appears to have entertained no doubt about the possibility of
taking in a frigate. The reef lies no less than fourteen miles
distant from the northern coasts of the interior high islands,
seven from their western sides, and twenty from the southern; the
sea is deep outside. This island is a likeness on a grand scale to
the Gambier group in the Low Archipelago. Of the groups of
low<sup>1</sup> islands forming the chief part of the Caroline
Archipelago, all those of larger size, have the true
atoll-structure (as may be seen in the "Atlas" by Captain
Lutké), and some even of the very small ones, as <i>
Macaskill</i> and <i>Duperrey</i>, of which plans are given in
the</p>
<p class="fnote">1. In D'Urville and Lottin's chart, Peserare is
written with capital letters; but this evidently is an error, for
it is one of the low islets on the reef of Namonouyto (see
Lutké's charts)—a regular atoll.</p>
<p> </p>
<hr>
<p class="page"><a name="page 126">page 126</a></p>
<p> </p>
<p>"Atlas of the <i>Coquille's</i> Voyage." There are, however,
some low small islands of coral-formation, namely <i>Ollap,
Tamatam, Bigali, Satahoual</i>, which do not contain lagoons; but
it is probable that lagoons originally existed, but have since
filled up: Lutké (vol. ii, p. 304) seems to have thought
that all the low islands, with only one exception, contained
lagoons. From the sketches, and from the manner in which the
margins of these islands are engraved in the "Atlas of the Voyage
of the <i>Coquille</i>," it might have been thought that they were
not low; but by a comparison with the remarks of Lutké (vol.
ii, p. 107, regarding Bigali) and of Freycinet ("Hydrog. Memoir <i>
L'Uranie</i> Voyage," p. 188, regarding Tamatam, Ollap, etc.), it
will be seen that the artist must have represented the land
incorrectly. The most southern island in the group, namely <i>
Piguiram</i>, is not coloured, because I have found no account of
it. <i>Nougouor</i>, or <i>Monte Verdison</i>, which was not
visited by Lutké, is described and figured by Mr. Bennett
(<i>United Service Journal</i>, January 1832) as an atoll. All the
above-mentioned islands have been coloured blue.</p>
<p>W<small>ESTERN</small> P<small>ART OF THE</small>
C<small>AROLINE</small>
A<small>RCHIPELAGO</small>.—<i>Fais</i> Island is ninety feet
high, and is surrounded, as I have been informed by Admiral
Lutké, by a narrow reef of living coral, of which the
broadest part, as represented in the charts, is only 150 yards;
coloured red.—<i>Philip</i> Island., I believe, is low; but
Hunter, in his "Historical Journal," gives no clear account of it;
uncoloured.—<i>Elivi</i>; from the manner in which the islets
on the reefs are engraved, in the "Atlas of the <i>Astrolabe's</i>
Voyage," I should have thought they were above the ordinary height,
but Admiral Lutké assures me this is not the case: they form
a regular atoll; coloured blue.—<i>Gouap</i> (<i>Eap</i> of
Chamisso), is a high island with a reef (see chart in "Voyage of
the <i>Astrolabe</i>"), more than a mile distant in most parts from
the shore, and two miles in one part. Captain D'Urville thinks that
there would be anchorage ("Hydrog. Descript. <i>Astrolabe</i>
Voyage," p. 436) for ships within the reef, if a passage could be
found; coloured pale blue.—<i>Goulou</i>, from the chart in
the "<i>Astrolabe's</i> Atlas," appears to be an atoll. D'Urville
("Hydrog. Descript." p. 437) speaks of the low islets on the reef;
coloured dark blue.</p>
<p>P<small>ELEW</small> I<small>SLANDS</small>.—Krusenstern
speaks of some of the islands being mountainous; the reefs are
distant from the shore, and there are spaces within them, and not
opposite valleys, with from ten to fifteen fathoms. According to a
MS. chart of the group by Lieutenant Elmer in the Admiralty, there
is a large space within the reef with deepish water; although the
high land does not hold a central position with respect to the
reefs, as is generally the case, I have little doubt that the reefs
of the Pelew Islands ought to be ranked with the barrier class, and
I have coloured them pale blue. In Lieutenant Elmer's chart there
is a horseshoe-formed shoal, laid down thirteen miles N.W. of
Pelew, with fifteen fathoms within the reef, and some dry banks on
it; coloured dark blue.—<i>Spanish, Martires, Sanserot, Pulo
Anna</i> and <i>Mariere</i> Islands are not coloured, because I
know nothing about them, excepting that according to Krusenstern,
the second, third, and fourth mentioned, are</p>
<p> </p>
<hr>
<p class="page"><a name="page 127">page 127</a></p>
<p> </p>
<p>low, placed on coral-reefs, and therefore, perhaps, contain
lagoons; but Pulo Mariere is a little higher.</p>
<p>M<small>ARIANA</small> A<small>RCHIPELAGO</small>, or
L<small>ADRONES</small>.—<i>Guahan.</i> Almost the whole of
this island is fringed by reefs, which extend in most parts about a
third of a mile from the land. Even where the reefs are most
extensive, the water within them is shallow. In several parts there
is a navigable channel for boats and canoes within the reefs. In
Freycinet's "Hydrog. Mem." there is an account of these reefs, and
in the "Atlas," a map on a large scale; coloured
red.—<i>Rota</i>. "L'ile est presque entièrement
entourée des récifs" (p. 212, Freycinet's "Hydrog.
Mem."). These reefs project about a quarter of a mile from the
shore; coloured red.—<i>Tinian. The eastern</i> coast is
precipitous, and is without reefs; but the western side is fringed
like the last island; coloured red.—<i>Saypan</i>. The N.E.
coast, and likewise the western shores appear to be fringed; but
there is a great, irregular, horn-like reef projecting far from
this side; coloured red.—<i>Farallon de Medinilla</i>,
appears so regularly and closely fringed in Freycinet's charts,
that I have ventured to colour it red, although nothing is said
about reefs in the "Hydrographical Memoir." The several islands
which form the northern part of the group are volcanic (with the
exception perhaps of Torres, which resembles in form the
madreporitic island of Medinilla), and appear to be without
reefs.—<i>Mangs</i>, however, is described (by Freycinet, p.
219, "Hydrog.") from some Spanish charts, as formed of small
islands placed "au milieu des nombreux récifs;" and as these
reefs in the general chart of the group do not project so much as a
mile; and as there is no appearance from a double line, of the
existence of deep water within, I have ventured, although with much
hesitation, to colour them red. Respecting <i>Folger</i> and <i>
Marshall</i> Islands which lie some way east of the Marianas, I can
find out nothing, excepting that they are probably low. Krusenstern
says this of Marshall Island; and Folger Island is written with
small letters in D'Urville's chart; uncoloured.</p>
<p>B<small>ONIN OR</small> A<small>RZOBISPO</small>
G<small>ROUP</small>.—<i>Peel</i> Island has been examined by
Captain Beechey, to whose kindness I am much indebted for giving me
information regarding it: "At Port Lloyd there is a great deal of
coral; and the inner harbour is entirely formed by coral-reefs,
which extend outside the port along the coast." Captain Beechey, in
another part of his letter to me, alludes to the reefs fringing the
island in all directions; but at the same time it must be observed
that the surf washes the volcanic rocks of the coast in the greater
part of its circumference. I do not know whether the other islands
of the Archipelago are fringed; I have coloured Peel Island
red.—<i>Grampus</i> Island to the eastward, does not appear
(Meare's "Voyage," p. 95) to have any reefs, nor does <i>
Rosario</i> Island (from Lutké's chart), which lies to the
westward. Respecting the few other islands in this part of the sea,
namely the <i>Sulphur</i> Islands, with an active volcano, and
those lying between Bonin and Japan (which are situated near the
extreme limit in latitude, at which reefs are formed), I have not
been able to find any clear account.</p>
<p>W<small>EST</small> E<small>ND OF</small> N<small>EW</small>
G<small>UINEA</small>.—<i>Port Dory.</i> From the charts in
the "Voyage of the <i>Coquille</i>," it would appear that the coast
in this part</p>
<p> </p>
<hr>
<p class="page"><a name="page 128">page 128</a></p>
<p> </p>
<p>is fringed by coral-reefs; M. Lesson, however, remarks that the
coral is sickly; coloured red.—<i>Waigiou.</i> A considerable
portion of the northern shores of these islands is seen in the
charts (on a large scale) in Freycinet's "Atlas" to be fringed by
coral-reefs. Forrest (p. 21, "Voyage to New Guinea") alludes to the
coral-reefs lining the heads of Piapis Bay; and Horsburgh (vol. ii,
p. 599, 4th edit.), speaking of the islands in Dampier Strait, says
"sharp coral-rocks line their shores;" coloured red.—In the
sea north of these islands, we have <i>Guedes</i> (or <i>
Freewill</i>, or <i>St. David's</i>), which from the chart given in
the 4to edit. of Carteret's "Voyage," must be an atoll. Krusenstern
says the islets are very low; coloured blue.—<i>Carteret's
Shoals</i>, in 2° 53' N., are described as circular, with stony
points showing all round, with deeper water in the middle; coloured
blue.—<i>Aiou</i>; the plan of this group, given in the
"Atlas of the Voyage of the <i>Astrolabe</i>," shows that it is an
atoll; and, from a chart in Forrest's "Voyage," it appears that
there is twelve fathoms within the circular reef; coloured
blue.—The S.W. coast of New Guinea appears to be low, muddy,
and devoid of reefs. The <i>Arru, Timor-laut</i>, and <i>
Tenimber</i> groups have lately been examined by Captain Kolff, the
MS. translation of which, by Mr. W. Earl, I have been permitted to
read, through the kindness of Captain Washington, R.N. These
islands are mostly rather low, and are surrounded by distant reefs
(the Ki Islands, however, are lofty, and, from Mr. Stanley's
survey, appear without reefs); the sea in some parts is shallow, in
others profoundly deep (as near Larrat). From the imperfection of
the published charts, I have been unable to decide to which class
these reefs belong. From the distance to which they extend from the
land, where the sea is very deep, I am strongly inclined to believe
they ought to come within the barrier class, and be coloured blue;
but I have been forced to leave them uncoloured.—The
last-mentioned groups are connected with the east end of Ceram by a
chain of small islands, of which the small groups of <i>Ceram-laut,
Goram</i> and <i>Keffing</i> are surrounded by very extensive
reefs, projecting into deep water, which, as in the last case, I
strongly suspect belong to the barrier class; but I have not
coloured them. From the south side of Keffing, the reefs project
five miles (Windsor Earl's "Sailing Direct. for the Arafura Sea,"
p. 9).</p>
<p>C<small>ERAM</small>.—In various charts which I have
examined, several parts of the coast are represented as fringed by
reefs.—<i>Manipa</i> Island, between Ceram and Bourou, in an
old MS. chart in the Admiralty, is fringed by a very irregular
reef, partly dry at low water, which I do not doubt is of
coral-formation; both islands coloured red.—<i>Bourou</i>;
parts of this island appear fringed by coral-reefs, namely, the
eastern coast, as seen in Freycinet's chart; and <i>Cajeli Bay</i>,
which is said by Horsburgh (vol. ii, p. 630) to be lined by
coral-reefs, that stretch out a little way, and have only a few
feet water on them. In several charts, portions of the islands
forming the A<small>MBOINA</small> G<small>ROUP</small> are fringed
by reefs; for instance, <i>Noessa, Harenca</i>, and <i>Ucaster</i>,
in Freycinet's charts. The above-mentioned islands have been
coloured red, although the evidence is not very
satisfactory.—North of Bourou the parallel line of the <i>
Xulla</i> Isles extends: I have not been able to find out anything
about them, excepting</p>
<p> </p>
<hr>
<p class="page"><a name="page 129">page 129</a></p>
<p> </p>
<p>that Horsburgh (vol. ii, p. 543) says that the northern shore is
surrounded by a reef at the distance of two or three miles;
uncoloured.—<i>Mysol Group</i>; the Kanary Islands are said
by Forrest ("Voyage," p. 130) to be divided from each other by deep
straits, and are lined with coral-rocks; coloured
red.—<i>Guebe</i>, lying between Waigiou and Gilolo, is
engraved as if fringed; and it is said by Freycinet, that all the
soundings under five fathoms were on coral; coloured
red.—<i>Gilolo</i>. In a chart published by Dalrymple, the
numerous islands on the western, southern (<i>Batchian</i> and the
<i>Strait of Patientia</i>), and eastern sides appear fringed by
narrow reefs; these reefs, I suppose, are of coral, for it is said
in "Malte Brun" (vol. xii, p. 156), "Sur les côtes (of
Batchian) comme <i>dans les plupart</i> des iles de cet archipel,
il y a de rocs de médrepores d'une beauté et d'une
variété infimies." Forrest, also (p. 50), says
Seland, near Batchian, is a little island with reefs of coral;
coloured red.—<i>Morty</i> Island (north of Gilolo).
Horsburgh (vol. ii, p. 506) says the northern coast is lined by
reefs, projecting one or two miles, and having no soundings close
to them; I have left it uncoloured, although, as in some former
cases, it ought probably to be pale blue.—<i>Celebes.</i> The
western and northern coasts appear in the charts to be bold and
without reefs. Near the extreme northern point, however, an islet
in the <i>Straits of Limbe</i>, and parts of the adjoining shore,
appear to be fringed: the east side of the bay of <i>Manado</i>,
has deep water, and is fringed by sand and coral ("<i>Astrol.</i>
Voyage," Hydrog. Part, pp. 453-4); this extreme point, therefore, I
have coloured red.— Of the islands leading from this point to
Magindanao, I have not been able to find any account, except of <i>
Serangani</i>, which appears surrounded by narrow reefs; and
Forrest ("Voyage," p. 164) speaks of coral on its shores; I have,
therefore, coloured this island red. To the eastward of this chain
lie several islands; of which I cannot find any account, except of
<i>Karkalang</i>, which is said by Horsburgh (vol. ii, p. 504) to
be lined by a dangerous reef, projecting several miles from the
northern shore; not coloured.</p>
<p>I<small>SLANDS NEAR</small> T<small>IMOR</small>.—The
account of the following islands is taken from Captain D. Kolff's
"Voyage," in 1825, translated by Mr. W. Earl, from the
Dutch.—<i>Lette</i> has "reefs extending along shore at the
distance of half a mile from the land."—<i>Moa</i> has reefs
on the S.W. part.—<i>Lakor</i> has a reef lining its shore;
these islands are coloured red.—Still more eastward, <i>
Luan</i> has, differently from the last-mentioned islands, an
extensive reef; it is steep outside, and within there is a depth of
twelve feet; from these facts, it is impossible to decide to which
class this island belongs.—<i>Kissa</i>, off the point of
Timor, has its "shore fronted by a reef, steep too on the outer
side, over which small proahs can go at the time of high water;"
coloured red.—<i>Timor</i>; most of the points, and some
considerable spaces of the northern shore, are seen in Freycinet's
chart to be fringed by coral- reefs; and mention is made of them in
the accompanying "Hydrog. Memoir;" coloured red.—<i>Savu</i>,
S.E. of Timor, appears in Flinders' chart to be fringed; but I have
not coloured it, as I do not know that the reefs are of
coral.— <i>Sandalwood</i> Island has, according to Horsburgh
(vol. ii, p. 607), a reef on its southern shore, four miles distant
from the land; as the neighbouring sea is deep,</p>
<p> </p>
<hr>
<p class="page"><a name="page 130">page 130</a></p>
<p> </p>
<p>and generally bold, this probably is a barrier-reef, but I have
not ventured to colour it.</p>
<p>N.W. C<small>OAST OF</small> A<small>USTRALIA</small>.—It
appears, in Captain King's Sailing Directions ("Narrative of
Survey," vol. ii, pp. 325-369), that there are many extensive
coral-reefs skirting, often at considerable distances, the N.W.
shores, and encompassing the small adjoining islets. Deep water, in
no instance, is represented in the charts between these reefs and
the land; and, therefore, they probably belong to the fringing
class. But as they extend far into the sea, which is generally
shallow, even in places where the land seems to be somewhat
precipitous; I have not coloured them. Houtman's Abrolhos (lat.
28° S. on west coast) have lately been surveyed by Captain
Wickham (as described in <i>Naut. Mag.</i> 1841, p. 511): they lie
on the edge of a steeply shelving bank, which extends about thirty
miles seaward, along the whole line of coast. The two southern
reefs, or islands, enclose a lagoon-like space of water, varying in
depth from five to fifteen fathoms, and in one spot with
twenty-three fathoms. The greater part of the island has been
formed on their inland sides, by the accumulation of fragments of
coral; the seaward face consisting of nearly bare ledges of rock.
Some of the specimens, brought home by Captain Wickham, contained
fragments of marine shells, but others did not; and these closely
resembled a formation at King George's Sound, principally due to
the action of the wind on calcareous dust, which I shall describe
in a forthcoming part. From the extreme irregularity of these reefs
with their lagoons, and from their position on a bank, the usual
depth of which is only thirty fathoms, I have not ventured to class
them with atolls, and hence have left them
uncoloured.—<i>Rowley Shoals.</i> These lie some way from the
N.W. coast of Australia: according to Captain King ("Narrative of
Survey," vol. i, p. 60), they are of coral-formation. They rise
abruptly from the sea, and Captain King had no bottom with 170
fathoms close to them. Three of them are crescent-shaped; they are
mentioned by Mr. Lyell, on the authority of Captain King, with
reference to the direction of their open sides. "A third oval reef
of the same group is entirely submerged" ("Principles of Geology,"
book iii, chap. xviii); coloured blue.—<i>Scott's Reefs</i>,
lying north of Rowley Shoals, are briefly described by Captain
Wickham (<i>Naut. Mag.</i> 1841, p. 440): they appear to be of
great size, of a circular form, and "with smooth water within,
forming probably a lagoon of great extent." There is a break on the
western side, where there probably is an entrance: the water is
very deep off these reefs; coloured blue.</p>
<p>Proceeding westward along the great volcanic chain of the East
Indian Archipelago, <i>Solor Strait</i> is represented in a chart
published by Dalrymple from a Dutch MS., as fringed; as are parts
of <i>Flores</i>, of <i>Adenara</i>, and of <i>Solor.</i> Horsburgh
speaks of coral growing on these shores; and therefore I have no
doubt that the reefs are of coral, and accordingly have coloured
them red. We hear from Horsburgh (vol. ii, p. 602) that a
coral-flat bounds the shores of <i>Sapy</i> Bay. From the same
authority it appears (p. 610) that reefs fringe the island of <i>
Timor-Young</i>, on the N. shore of Sumbawa; and, likewise (p.
600),</p>
<p> </p>
<hr>
<p class="page"><a name="page 131">page 131</a></p>
<p> </p>
<p>that <i>Bally</i> town in <i>Lombock</i>, is fronted by a reef,
stretching along the shore at a distance of a hundred fathoms, with
channels through it for boats; these places, therefore, have been
coloured red.—<i>Bally</i> Island. In a Dutch MS. chart on a
large scale of Java, which was brought from that island by Dr.
Horsfield, who had the kindness to show it me at the India House,
its western, northern, and southern shores appear very regularly
fringed by a reef (see also Horsburgh, vol. ii, p. 593); and as
coral is found abundantly there, I have not the least doubt that
the reef is of coral, and therefore have coloured it red.</p>
<p>J<small>AVA</small>.—My information regarding the reefs of
this great island is derived from the chart just mentioned. The
greater part of <i>Maduara</i> is represented in it as regularly
fringed, and likewise portions of the coast of Java immediately
south of it. Dr. Horsfield informs me that coral is very abundant
near <i>Sourabaya.</i> The islets and parts of the N. coast of
Java, west of <i>Point Buang</i>, or <i>Japara</i>, are fringed by
reefs, said to be of coral. <i>Lubeck</i>, or <i>Bavian</i>
Islands, lying at some distance from the shore of Java, are
regularly fringed by coral-reefs. <i>Carimon Java</i> appears
equally so, though it is not directly said that the reefs are of
coral; there is a depth between thirty and forty fathoms round
these islands. Parts of the shores of <i>Sunda Strait</i>, where
the water is from forty to eighty fathoms deep, and the islets near
<i>Batavia</i> appear in several charts to be fringed. In the Dutch
chart the southern shore, in the narrowest part of the island, is
in two places fringed by reefs of coral. West of <i>
Segorrowodee</i> Bay, and the extreme S.E. and E. portions are
likewise fringed by coral-reefs; all the above-mentioned places
coloured red.</p>
<p><i>Macassar Strait</i>; the east coast of Borneo appears, in
most parts, free from reefs, and where they occur, as on the east
coast of <i>Pamaroong</i>, the sea is very shallow; hence no part
is coloured. In <i>Macassar</i> Strait itself, in about lat. 2°
S., there are many small islands with coral-shoals projecting far
from them. There are also (old charts by Dalrymple) numerous little
flats of coral, not rising to the surface of the water, and
shelving suddenly from five fathoms to no bottom with fifty
fathoms; they do not appear to have a lagoon-like structure. There
are similar coral-shoals a little farther south; and in lat. 4°
55' there are two, which are engraved from modern surveys, in a
manner which might represent an annular reef with deep water
inside: Captain Moresby, however, who was formerly in this sea,
doubts this fact, so that I have left them uncoloured: at the same
time I may remark, that these two shoals make a nearer approach to
the atoll-like structure than any other within the E. Indian
Archipelago. Southward of these shoals there are other low islands
and irregular coral-reefs; and in the space of sea, north of the
great volcanic chain, from Timor to Java, we have also other
islands, such as the <i>Postillions, Kalatoa, Tokan- Bessees</i>,
etc., which are chiefly low, and are surrounded by very irregular
and distant reefs. From the imperfect charts I have seen, I have
not been able to decide whether they belong to the atoll or
barrier-classes, or whether they merely fringe submarine banks, and
gently sloping land. In the Bay of <i>Bonin</i>, between the two
southern arms of Celebes, there are numerous coral-</p>
<p> </p>
<hr>
<p class="page"><a name="page 132">page 132</a></p>
<p> </p>
<p>reefs; but none of them seem to have an atoll-like structure. I
have, therefore, not coloured any of the islands in this part of
the sea; I think it, however, exceedingly probable that some of
them ought to be blue. I may add that there is a harbour on the
S.E. coast of <i>Bouton</i> which, according to an old chart, is
formed by a reef, parallel to the shore, with deep water within;
and in the "Voyage of the <i>Coquille</i>," some neighbouring
islands are represented with reefs a good way distant, but I do not
know whether with deep water within. I have not thought the
evidence sufficient to permit me to colour them.</p>
<p>S<small>UMATRA</small>.—Commencing with the west coast and
outlying islands, <i>Engano Island</i> is represented in the
published chart as surrounded by a narrow reef, and Napier, in his
"Sailing Directions," speaks of the reef being of coral (also
Horsburgh, vol. ii, p. 115); coloured red.—<i>Rat Island</i>
(3° 51' S.) is surrounded by reefs of coral, partly dry at low
water, (Horsburgh, vol. ii, p. 96).—<i>Trieste Island</i>
(4° 2' S.). The shore is represented in a chart which I saw at
the India House, as fringed in such a manner, that I feel sure the
fringe consists of coral; but as the island is so low, that the sea
sometimes flows quite over it (Dampier, "Voyage," vol. i, p. 474),
I have not coloured it.—<i>Pulo Dooa</i> (lat. 3°). In an
old chart it is said there are chasms in the reefs round the
island, admitting boats to the watering-place, and that the
southern islet consists of a mass of sand and coral.—<i>Pulo
Pisang</i>; Horsburgh (vol. ii, p. 86) says that the rocky
coral-bank, which stretches about forty yards from the shore, is
steep to all round: in a chart, also, which I have seen, the island
is represented as regularly fringed.—<i>Pulo Mintao</i> is
lined with reefs on its west side (Horsburgh, vol. ii, p.
107).—<i>Pulo Baniak</i>; the same authority (vol. ii, p.
105), speaking of a part, says it is faced with
coral-rocks.—<i>Minguin</i> (3° 36' N.). A coral-reef
fronts this place, and projects into the sea nearly a quarter of a
mile ("Notices of the Indian Arch." published at Singapore, p.
105).—<i>Pulo Brassa</i> (5° 46' N.). A reef surrounds it
at a cable's length (Horsburgh, vol. ii, p. 60). I have coloured
all the above-specified points red. I may here add, that both
Horsburgh and Mr. Moor (in the "Notices" just alluded to)
frequently speak of the numerous reefs and banks of coral on the
west coast of Sumatra; but these nowhere have the structure of a
barrier-reef, and Marsden ("History of Sumatra") states, that where
the coast is flat, the fringing-reefs extend furthest from it. The
northern and southern points, and the greater part of the east
coast, are low, and faced with mud banks, and therefore without
coral.</p>
<p>N<small>ICOBAR</small> I<small>SLANDS</small>.—The chart
represents the islands of this group as fringed by reefs. With
regard to <i>Great Nicobar</i>, Captain Moresby informs me, that it
is fringed by reefs of coral, extending between two and three
hundred yards from the shore. The <i>Northern Nicobars</i> appear
so regularly fringed in the published charts, that I have no doubt
the reefs are of coral. This group, therefore, is coloured red.</p>
<p>A<small>NDAMAN</small> I<small>SLANDS</small>.—From an
examination of the MS. chart, on a large scale, of this island, by
Captain Arch. Blair, in the Admiralty, several portions of the
coast appear fringed; and as Horsburgh speaks of coral-reefs being
numerous in the vicinity of these islands, I should have</p>
<p> </p>
<hr>
<p class="page"><a name="page 133">page 133</a></p>
<p> </p>
<p>coloured them red, had not some expressions in a paper in the
"Asiatic Researches" (vol. iv, p. 402) led me to doubt the
existence of reefs; uncoloured.</p>
<p>The coast of <i>Malacca, Tenasserim</i> and the coasts
northward, appear in the greater part to be low and muddy: where
reefs occur, as in parts of <i>Malacca Straits</i>, and near <i>
Singapore</i>, they are of the fringing kind; but the water is so
shoal, that I have not coloured them. In the sea, however, between
Malacca and the west coast of Borneo, where there is a greater
depth from forty to fifty fathoms, I have coloured red some of the
groups, which are regularly fringed. The northern <i>Natunas</i>
and the <i>Anambas</i> Islands are represented in the charts on a
large scale, published in the "Atlas of the Voyage of the <i>
Favourite</i>," as fringed by reefs of coral, with very shoal water
within them.—<i>Tumbelan</i> and <i>Bunoa</i> Islands (1°
N.) are represented in the English charts as surrounded by a very
regular fringe.—<i>St. Barbes</i> (0° 15' N.) is said by
Horsburgh (vol. ii, p. 279) to be fronted by a reef, over which
boats can land only at high water.—The shore of <i>Borneo</i>
at <i>Tunjong Apee</i> is also fronted by a reef, extending not far
from the land (Horsburgh, vol. ii, p. 468). These places I have
coloured red; although with some hesitation, as the water is
shallow. I might perhaps have added <i>Pulo Leat</i>, in Gaspar
Strait, <i>Lucepara</i>, and <i>Carimata</i>; but as the sea is
confined and shallow, and the reefs not very regular, I have left
them uncoloured.</p>
<p>The water shoals gradually towards the whole west coast of <i>
Borneo</i>: I cannot make out that it has any reefs of coral. The
islands, however, off the northern extremity, and near the S.W. end
of <i>Palawan</i>, are fringed by very distant coral-reefs; thus
the reefs in the case of <i>Balabac</i> are no less than five miles
from the land; but the sea, in the whole of this district, is so
shallow, that the reefs might be expected to extend very far from
the land. I have not, therefore, thought myself authorised to
colour them. The N.E. point of Borneo, where the water is very
shoal, is connected with Magindanao by a chain of islands called
the <i>Sooloo Archipelago</i>, about which I have been able to
obtain very little information; <i>Pangootaran</i>, although ten
miles long, entirely consists of a bed of coral-rock ("Notices of
E. Indian Arch." p. 58): I believe from Horsburgh that the island
is low; not coloured.—<i>Tahow Bank</i>, in some old charts,
appears like a submerged atoll; not coloured. Forrest ("Voyage," p.
21) states that one of the islands near Sooloo is surrounded by
coral-rocks; but there is no distant reef. Near the S. end of <i>
Basselan</i>, some of the islets in the chart accompanying
Forrest's "Voyage," appear fringed with reefs; hence I have
coloured, though unwillingly, parts of the Sooloo group red. The
sea between Sooloo and Palawan, near the shoal coast of Borneo, is
interspersed with irregular reefs and shoal patches; not coloured:
but in the northern part of this sea, there are two low islets, <i>
Cagayanes</i> and <i>Cavilli</i>, surrounded by extensive
coral-reefs; the breakers round the latter (Horsburgh, vol. ii, p.
513) extend five or six miles from a sandbank, which forms the only
dry part; these breakers are steep to outside; there appears to be
an opening through them on one side, with four or five fathoms
within: from this description, I strongly suspect that Cavilli</p>
<p> </p>
<hr>
<p class="page"><a name="page 134">page 134</a></p>
<p> </p>
<p>ought to be considered an atoll; but, as I have not seen any
chart of it, on even a moderately large scale, I have not coloured
it. The islets off the northern end of <i>Palawan</i>, are in the
same case as those off the southern end, namely they are fringed by
reefs, some way distant from the shore, but the water is
exceedingly shallow; uncoloured. The western shore of Palawan will
be treated of under the head of China Sea.</p>
<p>P<small>HILIPPINE</small> A<small>RCHIPELAGO</small>.—A
chart on a large scale of <i>Appoo Shoal</i>, which lies near the
S.E. coast of Mindoro, has been executed by Captain D. Ross: it
appears atoll-formed, but with rather an irregular outline; its
diameter is about ten miles; there are two well-defined passages
leading into the interior lagoon, which appears open; close outside
the reef all round, there is no bottom with seventy fathoms;
coloured blue.—<i>Mindoro</i>: the N.W. coast is represented
in several charts, as fringed by a reef, and <i>Luban Island</i> is
said, by Horsburgh (vol. ii, p. 436), to be "lined by a
reef."—<i>Luzon</i>: Mr. Cuming, who has lately investigated
with so much success the Natural History of the Philippines,
informs me, that about three miles of the shore north of Point St.
Jago, is fringed by a reef; as are (Horsburgh, vol. ii, p. 437) the
Three Friars off Silanguin Bay. Between Point Capones and Playa
Honda, the coast is "lined by a coral-reef, stretching out nearly a
mile in some places," (Horsburgh); and Mr. Cuming visited some
fringing-reefs on parts of this coast, namely, near Puebla, Iba,
and Mansinglor. In the neighbourhood of Solon-solon Bay, the shore
is lined (Horsburgh, ii, p. 439) by coral-reefs, stretching out a
great way: there are also reefs about the islets off Solamague; and
as I am informed by Mr. Cuming, near St. Catalina, and a little
north of it. The same gentleman informs me there are reefs on the
S.E. point of this island in front of Samar, extending from
Malalabon to Bulusan. These appear to be the principal
fringing-reefs on the coasts of Luzon; and they have all been
coloured red. Mr. Cuming informs me that none of them have deep
water within; although it appears from Horsburgh that some few
extend to a considerable distance from the shore. Within the
Philippine Archipelago, the shores of the islands do not appear to
be commonly fringed, with the exception of the S. shore of <i>
Masbate</i>, and nearly the whole of <i>Bohol</i>; which are both
coloured red. On the S. shore of <i>Magindanao</i>, Bunwoot Island
is surrounded (according to Forrest, "Voyage," p. 253), by a
coral-reef, which in the chart appears one of the fringing class.
With respect to the eastern coasts of the whole Archipelago, I have
not been able to obtain any account.</p>
<p>B<small>ABUYAN</small> I<small>SLANDS</small>.—Horsburgh
says (vol. ii, p. 442), coral-reefs line the shores of the harbour
in Fuga; and the charts show there are other reefs about these
islands. Camiguin has its shore in parts lined by coral-rock
(Horsburgh, p. 443); about a mile off shore there is between thirty
and thirty-five fathoms. The plan of Port San Pio Quinto shows that
its shores are fringed with coral; coloured
red.—B<small>ASHEE</small> I<small>SLANDS</small>: Horsburgh,
speaking of the southern part of the group (vol. ii, p. 445) says
the shores of both islands are fortified by a reef, and through
some of the gaps in it, the natives can pass in their</p>
<p> </p>
<hr>
<p class="page"><a name="page 135">page 135</a></p>
<p> </p>
<p>boats in fine weather; the bottom near the land is coral-rock.
From the published charts, it is evident that several of these
islands are most regularly fringed; coloured red. The northern
islands are left uncoloured, as I have been unable to find any
account of them.—F<small>ORMOSA</small>. The shores,
especially the western one, seem chiefly composed of mud and sand,
and I cannot make out that they are anywhere lined by reefs; except
in a harbour (Horsburgh, vol. ii, p. 449) at the extreme northern
point: hence, of course, the whole of this island is left
uncoloured. The small adjoining islands are in the same
case.—P<small>ATCHOW, OR</small>
M<small>ADJIKO</small>-S<small>IMA</small> G<small>ROUPS</small>.
<i>Patchuson</i> has been described by Captain Broughton ("Voy. to
the N. Pacific," p. 191); he says, the boats, with some difficulty,
found a passage through the coral-reefs, which extend along the
coast, nearly half a mile off it. The boats were well sheltered
within the reef; but it does not appear that the water is deep
there. Outside the reef the depth is very irregular, varying from
five to fifty fathoms; the form of the land is not very abrupt;
coloured red.—<i>Taypin-san</i>; from the description given
(p. 195) by the same author, it appears that a very irregular reef
extends, to the distance of several miles, from the southern
island; but whether it encircles a space of deep water is not
evident; nor, indeed, whether these outlying reefs are connected
with those more immediately adjoining the land; left uncoloured. I
may here just add that the shore of <i>Kumi</i> (lying west of
Patchow), has a narrow reef attached to it in the plan of it, in La
Peyrouse's "Atlas;" but it does not appear in the account of the
voyage that it is of coral; uncoloured.—L<small>OO</small>
C<small>HOO</small>. The greater part of the coast of this
moderately hilly island, is skirted by reefs, which do not extend
far from the shore, and which do not leave a channel of deep water
within them, as may be seen in the charts accompanying Captain B.
Hall's voyage to Loo Choo (see also remarks in Appendix, pp. xxi.
and xxv.). There are, however, some ports with deep water, formed
by reefs in front of valleys, in the same manner as happens at
Mauritius. Captain Beechey, in a letter to me, compares these reefs
with those encircling the Society Islands; but there appears to me
a marked difference between them, in the less distance at which the
Loo Choo reefs lie from the land with relation to the probable
submarine inclination, and in the absence of an interior deep
water-moat or channel, parallel to the land. Hence, I have classed
these reefs with fringing-reefs, and coloured them
red.—P<small>ESCADORES</small> (west of Formosa). Dampier
(vol. i, p. 416), has compared the appearance of the land to the
southern parts of England. The islands are interlaced with
coral-reefs; but as the water is very shoal, and as spits of sand
and gravel (Horsburgh, vol. ii, p. 450) extend far out from them,
it is impossible to draw any inferences regarding the nature of the
reefs.</p>
<p>C<small>HINA</small> S<small>EA</small>.—Proceeding from
north to south, we first meet the <i>Pratas Shoal</i> (lat. 20°
N.) which, according to Horsburgh (vol. ii, p. 335), is composed of
coral, is of a circular form, and has a low islet on it. The reef
is on a level with the water's edge, and when the sea runs high,
there are breakers mostly all round, "but the water within seems
pretty deep in some places; although steep-to in most parts
outside,</p>
<p> </p>
<hr>
<p class="page"><a name="page 136">page 136</a></p>
<p> </p>
<p>there appear to be several parts where a ship might find
anchorage outside the breakers;" coloured blue.—The <i>
Paracells</i> have been accurately surveyed by Captain D. Ross, and
charts on a large scale published: but few low islets have been
formed on these shoals, and this seems to be a general circumstance
in the China Sea; the sea close outside the reefs is very deep;
several of them have a lagoon-like structure; or separate islets
(<i>Prattle, Robert, Drummond</i>, etc.) are so arranged round a
moderately shallow space, as to appear as if they had once formed
one large atoll.—<i>Bombay Shoal</i> (one of the Paracells)
has the form of an annular reef, and is "apparently deep within;"
it seems to have an entrance (Horsburgh, vol. ii, p. 332) on its
west side; it is very steep outside.—<i>Discovery Shoal</i>,
also is of an oval form, with a lagoon-like space within, and three
openings leading into it, in which there is a depth from two to
twenty fathoms. Outside, at the distance (Horsburgh, vol. ii, p.
333) of only twenty yards from the reef, soundings could not be
obtained. The Paracells are coloured blue.—<i>Macclesfield
Bank</i>: this is a coral-bank of great size, lying east of the
Paracells; some parts of the bank are level, with a sandy bottom,
but, generally, the depth is very irregular. It is intersected by
deep cuts or channels. I am not able to perceive in the published
charts (its limits, however, are not very accurately known) whether
the central part is deeper, which I suspect is the case, as in the
Great Chagos Bank, in the Indian Ocean; not
coloured.—<i>Scarborough Shoal</i>: this coral-shoal is
engraved with a double row of crosses, forming a circle, as if
there was deep water within the reef: close outside there was no
bottom, with a hundred fathoms; coloured blue.—The sea off
the west coast of Palawan and the northern part of Borneo is
strewed with shoals: <i>Swallow Shoal</i>, according to Horsburgh
(vol. ii, p. 431) "is formed, <i>like most</i> of the shoals
hereabouts, of a belt of coral-rocks, "with a basin of deep water
within."—<i>Half-Moon Shoal</i> has a similar structure;
Captain D. Ross describes it, as a narrow belt of coral-rock, "with
a basin of deep water in the centre," and deep sea close
outside.—<i>Bombay Shoal</i> appears (Horsburgh, vol. ii, p.
432) "to be a basin of smooth water surrounded by breakers." These
three shoals I have coloured blue.—The <i>Paraquas Shoals</i>
are of a circular form, with deep gaps running through them; not
coloured.—A bank gradually shoaling to the depth of thirty
fathoms, extends to a distance of about twenty miles from the
northern part of <i>Borneo</i>, and to thirty miles from the
northern part of <i>Palawan.</i> Near the land this bank appears
tolerably free from danger, but a little further out it is thickly
studded with coral-shoals, which do not generally rise quite to the
surface; some of them are very steep-to, and others have a fringe
of shoal-water round them. I should have thought that these shoals
had level surfaces, had it not been for the statement made by
Horsburgh "that most of the shoals hereabouts are formed of a belt
of coral." But, perhaps that expression was more particularly
applied to the shoals further in the offing. If these reefs of
coral have a lagoon-like structure, they should have been coloured
blue, and they would have formed an imperfect barrier in front of
Palawan and the northern part of Borneo. But, as the water</p>
<p> </p>
<hr>
<p class="page"><a name="page 137">page 137</a></p>
<p> </p>
<p>is not very deep, these reefs may have grown up from
inequalities on the bank: I have not coloured them.—The coast
of <i>China, Tonquin</i>, and <i>Cochin-China</i>, forming the
western boundary of the China Sea, appear to be without reefs: with
regard to the two last-mentioned coasts, I speak after examining
the charts on a large scale in the "Atlas of the Voyage of the <i>
Favourite</i>."</p>
<p>I<small>NDIAN</small> O<small>CEAN</small>.—<i>South
Keeling</i> atoll has been specially described. Nine miles north of
it lies North Keeling, a very small atoll, surveyed by the <i>
Beagle</i>, the lagoon of which is dry at low
water.—<i>Christmas Island</i>, lying to the east, is a high
island, without, as I have been informed by a person who passed it,
any reefs at all.—C<small>EYLON</small>: a space about eighty
miles in length of the south-western and southern shores of these
islands has been described by Mr. Twynam (<i>Naut. Mag.</i> 1836,
pp. 365 and 518); parts of this space appear to be very regularly
fringed by coral-reefs, which extend from a quarter to half a mile
from the shore. These reefs are in places breached, and afford safe
anchorage for the small trading craft. Outside, the sea gradually
deepens; there is forty fathoms about six miles off shore: this
part I have coloured red. In the published charts of Ceylon there
appear to be fringing-reefs in several parts of the south-eastern
shores, which I have also coloured red.—At Venloos Bay the
shore is likewise fringed. North of Trincomalee there are also
reefs of the same kind. The sea off the northern part of Ceylon is
exceedingly shallow; and therefore I have not coloured the reefs
which fringe portions of its shores, and the adjoining islets, as
well as the Indian promontory of <i>Madura.</i></p>
<p>C<small>HAGOS</small>, M<small>ALDIVA</small>, <small>
AND</small> L<small>ACCADIVE</small>
A<small>RCHIPELAGOES</small>.—These three great groups which
have already been often noticed, are now well-known from the
admirable surveys of Captain Moresby and Lieutenant Powell. The
published charts, which are worthy of the most attentive
examination, at once show that the <i>Chagos</i> and <i>Maldiva</i>
groups are entirely formed of great atolls, or lagoon-formed reefs,
surmounted by islets. In the <i>Laccadive</i> group, this structure
is less evident; the islets are low, not exceeding the usual height
of coral-formations (see Lieutenant Wood's account, <i>Geograph.
Journ.</i>, vol. vi, p. 29), and most of the reefs are circular, as
may be seen in the published charts; and within several of them, as
I am informed by Captain Moresby, there is deepish water; these,
therefore, have been coloured blue. Directly north, and almost
forming part of this group, there is a long, narrow, slightly
curved bank, rising out of the depths of the ocean, composed of
sand, shells, and decayed coral, with from twenty-three to thirty
fathoms on it. I have no doubt that it has had the same origin with
the other Laccadive banks; but as it does not deepen towards the
centre I have not coloured it. I might have referred to other
authorities regarding these three archipelagoes; but after the
publication of the charts by Captain Moresby, to whose personal
kindness in giving me much information I am exceedingly indebted,
it would have been superfluous.</p>
<p><i>Sahia de Malha</i> bank consists of a series of narrow banks,
with from eight to sixteen fathoms on them; they are arranged in a
semicircular manner, round a space about forty fathoms deep, which
slopes on the</p>
<p> </p>
<hr>
<p class="page"><a name="page 138">page 138</a></p>
<p> </p>
<p>S.E. quarter to unfathomable depths; they are steep-to on both
sides, but more especially on the ocean-side. Hence this bank
closely resembles in structure, and I may add from Captain
Moresby's information in composition, the Pitt's Bank in the Chagos
group; and the Pitt's Bank, must, after what has been shown of the
Great Chagos Bank, be considered as a sunken, half-destroyed atoll;
hence coloured blue.—<i>Cargados Carajos Bank.</i> Its
southern portion consists of a large, curved, coral-shoal, with
some low islets on its eastern edge, and likewise some on the
western side, between which there is a depth of about twelve
fathoms. Northward, a great bank extends. I cannot (probably owing
to the want of perfect charts) refer this reef and bank to any
class;—therefore not coloured.—<i>Ile de Sable</i> is a
little island, lying west of C. Carajos, only some toises in height
("Voyage of the <i>Favourite</i>," vol. i, p. 130); it is
surrounded by reefs; but its structure is unintelligible to me.
There are some small banks north of it, of which I can find no
clear account.—<i>Mauritius.</i> The reefs round this island
have been described in the chapter on fringing-reefs; coloured
red.—<i>Rodriguez.</i> The coral-reefs here are exceedingly
extensive; in one part they project even five miles from the shore.
As far as I can make out, there is no deep-water moat within them;
and the sea outside does not deepen very suddenly. The outline,
however, of the land appears to be ("Life of Sir J. Makintosh,"
vol. ii, p. 165) hilly and rugged. I am unable to decide whether
these reefs belong to the barrier class; as seems probable from
their great extension, or to the fringing class;
uncoloured.—<i>Bourbon.</i> The greater part of the shores of
this island are without reefs; but Captain Carmichael (Hooker's
"Bot. Misc.") states that a portion, fifteen miles in length, on
the S.E. side, is imperfectly fringed with coral reefs: I have not
thought this sufficient to colour the island.</p>
<p>S<small>EYCHELLES</small>.—The rocky islands of primary
formation, composing this group, rise from a very extensive and
tolerably level bank, having a depth between twenty and forty
fathoms. In Captain Owen's chart, and in that in the "Atlas of the
Voyage of the <i>Favourite</i>," it appears that the east side of
<i>Mahe</i> and the adjoining islands of <i>St. Anne</i> and <i>
Cerf</i>, are regularly fringed by coral-reefs. A portion of the
S.E. part of <i>Curieuse Island</i>, the N., and part of the S.W.
shore of <i>Praslin Island</i>, and the whole west side of <i>Digue
Island</i>, appear fringed. From a MS. account of these islands by
Captain F. Moresby, in the Admiralty, it appears that <i>
Silhouette</i> is also fringed; he states that all these islands
are formed of granite and quartz, that they rise abruptly from the
sea, and that "coral-reefs have grown round them, and project for
some distance." Dr. Allan, of Forres, who visited these islands,
informs me that there is no deep water between the reefs and the
shore. The above specified points have been coloured red. <i>
Amirantes Islands</i>: The small islands of this neighbouring
group, according to the MS. account of them by Captain F. Moresby,
are situated on an extensive bank; they consist of the debris of
corals and shells; are only about twenty feet in height, and are
environed by reefs, some attached to the shore, and some rather
distant from it.—I have taken great pains to procure plans
and</p>
<p> </p>
<hr>
<p class="page"><a name="page 139">page 139</a></p>
<p> </p>
<p>information regarding the several islands lying between S.E. and
S.W. of the Amirantes, and the Seychelles; relying chiefly on
Captain F. Moresby and Dr. Allan, it appears that the greater
number, namely—<i>Platte, Alphonse, Coetivi, Galega,
Providence, St. Pierre, Astova, Assomption</i>, and <i>
Glorioso</i>, are low, formed of sand or coral-rock, and
irregularly shaped; they are situated on very extensive banks, and
are connected with great coral-reefs. Galega is said by Dr. Allan,
to be rather higher than the other islands; and St. Pierre is
described by Captain F. Moresby, as being cavernous throughout, and
as not consisting of either limestone or granite. These islands, as
well as the Amirantes, certainly are not atoll-formed, and they
differ as a group from every other group with which I am
acquainted; I have not coloured them; but probably the reefs belong
to the fringing class. Their formation is attributed, both by Dr.
Allan and Captain F. Moresby, to the action of the currents, here
exceedingly violent, on banks, which no doubt have had an
independent geological origin. They resemble in many respects some
islands and banks in the West Indies, which owe their origin to a
similar agency, in conjunction with an elevation of the entire
area. In close vicinity to the several islands, there are three
others of an apparently different nature: first, <i>Juan de
Nova</i>, which appears from some plans and accounts to be an
atoll; but from others does not appear to be so; not coloured.
Secondly <i>Cosmoledo</i>; "this group consists of a ring of coral,
ten leagues in circumference, and a quarter of a mile broad in some
places, enclosing a magnificent lagoon, into which there did not
appear a single opening" (Horsburgh, vol. i, p. 151); coloured
blue. Thirdly, <i>Aldabra</i>; it consists of three islets, about
twenty-five feet in height, with red cliffs (Horsburgh, vol. i, p.
176) surrounding a very shallow basin or lagoon. The sea is
profoundly deep close to the shore. Viewing this island in a chart,
it would be thought an atoll; but the foregoing description shows
that there is something different in its nature; Dr. Allan also
states that it is cavernous, and that the coral-rock has a
vitrified appearance. Is it an upheaved atoll, or the crater of a
volcano?—uncoloured.</p>
<p>C<small>OMORO</small>
G<small>ROUP</small>.—<i>Mayotta</i>, according to Horsburgh
(vol. i, p. 216, 4th ed.), is completely surrounded by a reef,
which runs at the distance of three, four, and in some places even
five miles from the land; in an old chart, published by Dalrymple,
a depth in many places of thirty-six and thirty-eight fathoms is
laid down within the reef. In the same chart, the space of open
water within the reef in some parts is even more than three miles
wide: the land is bold and peaked; this island, therefore, is
encircled by a well-characterised barrier-reef, and is coloured
pale blue.—<i>Johanna</i>; Horsburgh says (vol. i, p. 217)
this island from the N.W. to the S.W. point, is bounded by a reef,
at the distance of two miles from the shore; in some parts,
however, the reef must be attached, since Lieutenant Boteler
("Narr." vol. i, p. 161) describes a passage through it, within
which there is room only for a few boats. Its height, as I am
informed by Dr. Allan, is about 3,500 feet; it is very precipitous,
and is composed of granite, greenstone, and quartz; coloured
blue.—<i>Mohilla</i>; on the S. side of this island there
is</p>
<p> </p>
<hr>
<p class="page"><a name="page 140">page 140</a></p>
<p> </p>
<p>anchorage, in from thirty to forty-five fathoms, between a reef
and the shore (Horsburgh, vol. i, p. 214); in Captain Owen's chart
of Madagascar, this island is represented as encircled; coloured
blue.—<i>Great Comoro Island</i> is, as I am informed by Dr.
Allan, about 8,000 feet high, and apparently volcanic; it is not
regularly encircled; but reefs of various shapes and dimensions,
jut out from every headland on the W., S., and S.E. coasts, inside
of which reefs there are channels, often parallel with the shore,
with deep water. On the north-western coasts the reefs appear
attached to the shores. The land near the coast is in some places
bold, but generally speaking it is flat; Horsburgh says (vol. i, p.
214) the water is profoundly deep close to the <i>shore</i>, from
which expression I presume some parts are without reefs. From this
description I apprehend the reef belongs to the barrier class; but
I have not coloured it, as most of the charts which I have seen,
represent the reefs round it as very much less extensive than round
the other islands in the group.</p>
<p>M<small>ADAGASCAR</small>.—My information is chiefly
derived from the published charts by Captain Owen, and the accounts
given by him and by Lieutenant Boteler. Commencing at the S.W.
extremity of the island; towards the northern part of the <i>Star
Bank</i> (in lat. 25° S.) the coast for ten miles is fringed by
a reef; coloured red. The shore immediately S. of <i>St.
Augustine's Bay</i> appears fringed; but <i>Tullear</i> Harbour,
directly N. of it, is formed by a narrow reef ten miles long,
extending parallel to the shore, with from four to ten fathoms
within it. If this reef had been more extensive, it must have been
classed as a barrier-reef; but as the line of coast falls inwards
here, a submarine bank perhaps extends parallel to the shore, which
has offered a foundation for the growth of the coral; I have left
this part uncoloured. From lat. 22° 16' to 21° 37', the
shore is fringed by coral-reefs (see Lieutenant Boteler's
"Narrative," vol. ii, p. 106), less than a mile in width, and with
shallow water within. There are outlying coral-shoals in several
parts of the offing, with about ten fathoms between them and the
shore, and the depth of the sea one mile and a half seaward, is
about thirty fathoms. The part above specified is engraved on a
large scale; and as in the charts on rather a smaller scale the
same fringe of reef extends as far as lat. 33° 15'; I have
coloured the whole of this part of the coast red. The islands of
<i>Juan de Nova</i> (in lat. 17° S.) appear in the charts on a
large scale to be fringed, but I have not been able to ascertain
whether the reefs are of coral; uncoloured. The main part of the
west coast appears to be low, with outlying sandbanks, which,
Lieutenant Boteler (vol. ii, p. 106) says, "are faced on the edge
of deep water by a line of sharp-pointed coral-rocks." Nevertheless
I have not coloured this part, as I cannot make out by the charts
that the coast itself is fringed. The headlands of <i>Narrenda</i>
and <i>Passandava</i> Bays (14° 40') and the islands in front
of <i>Radama Harbour</i> are represented in the plans as regularly
fringed, and have accordingly been coloured red. With respect to
the <i>East coast of Madagascar</i>, Dr. Allan informs me in a
letter, that the whole line of coast, from <i>Tamatave</i>, in
18° 12', to <i>C. Amber</i>, at the extreme northern point of
the island, is bordered by coral-reefs. The land is low,
uneven,</p>
<p> </p>
<hr>
<p class="page"><a name="page 141">page 141</a></p>
<p> </p>
<p>and gradually rising from the coast. From Captain Owen's charts,
also, the existence of these reefs, which evidently belong to the
fringing class, on some parts, namely N. of <i>British Sound</i>,
and near <i>Ngoncy</i>, of the above line of coast might have been
inferred. Lieutenant Boteler (vol. i, p. 155) speaks of "the reef
surrounding the island of <i>St. Mary's</i> at a small distance
from the shore." In a previous chapter I have described, from the
information of Dr. Allan, the manner in which the reefs extend in
N.E. lines from the headlands on this coast, thus sometimes forming
rather deep channels within them, this seems caused by the action
of the currents, and the reefs spring up from the submarine
prolongations of the sandy headlands. The above specified portion
of the coast is coloured red. The remaining S.E. portions do not
appear in any published chart to possess reefs of any kind; and the
Rev. W. Ellis, whose means of information regarding this side of
Madagascar have been extensive, informs me he believes there are
none.</p>
<p>E<small>AST</small> C<small>OAST OF</small>
A<small>FRICA</small>.—Proceeding from the northern part, the
coast appears, for a considerable space, without reefs. My
information, I may here observe, is derived from the survey by
Captain Owen, together with his narrative; and that by Lieutenant
Boteler. At <i>Mukdeesha</i> (10° 1' N.) there is a coral-reef
extending four or five miles along the shore (Owen's "Narr." vol.
i, p. 357) which in the chart lies at the distance of a quarter of
a mile from the shore, and has within it from six to ten feet
water: this then is a fringing-reef, and is coloured red. From <i>
Juba</i>, a little S. of the equator, to <i>Lamoo</i> (in 2°
20' S.) "the coast and islands are formed of madrepore" (Owen's
"Narrative," vol. i, p. 363). The chart of this part (entitled <i>
Dundas Islands</i>), presents an extraordinary appearance; the
coast of the mainland is quite straight and it is fronted at the
average distance of two miles, by exceedingly narrow, straight
islets, fringed with reefs. Within the chain of islets, there are
extensive tidal flats and muddy bays, into which many rivers enter;
the depths of these spaces varies from one to four
fathoms—the latter depth not being common, and about twelve
feet the average. Outside the chain of islets, the sea, at the
distance of a mile, varies in depth from eight to fifteen fathoms.
Lieutenant Boteler ("Narr.," vol. i, p. 369) describes the muddy
bay of <i>Patta</i>, which seems to resemble other parts of this
coast, as fronted by small, narrow, level islets formed of
decomposing coral, the margin of which is seldom of greater height
than twelve feet, overhanging the rocky surface from which the
islets rise. Knowing that the islets are formed of coral, it is, I
think, scarcely possible to view the coast, and not at once
conclude that we here see a fringing-reef, which has been upraised
a few feet: the unusual depth of from two to four fathoms within
some of these islets, is probably due to muddy rivers having
prevented the growth of coral near the shore. There is, however,
one difficulty on this view, namely, that before the elevation took
place, which converted the reef into a chain of islets, the water
must apparently have been still deeper; on the other hand it may be
supposed that the formation of a nearly perfect barrier in front,
of so large an extent of coast, would cause the currents
(especially in front of the rivers), to deepen their muddy beds.
When describing in</p>
<p> </p>
<hr>
<p class="page"><a name="page 142">page 142</a></p>
<p> </p>
<p>the chapter on fringing-reefs, those of Mauritius, I have given
my reasons for believing that the shoal spaces within reefs of this
kind, must, in many instances, have been deepened. However this may
be, as several parts of this line of coast are undoubtedly fringed
by living reefs, I have coloured it red.—<i>Maleenda</i>
(3° 20' S.). In the plan of the harbour, the south headland
appears fringed; and in Owen's chart on a larger scale, the reefs
are seen to extend nearly thirty miles southward; coloured
red.—<i>Mombas</i> (4° 5' S.). The island which forms the
harbour, "is surrounded by cliffs of madrepore, capable of being
rendered almost impregnable" (Owen's "Narr.," vol. i, p. 412). The
shore of the mainland N. and S. of the harbour, is most regularly
fringed by a coral-reef at a distance from half a mile to one mile
and a quarter from the land; within the reef the depth is from nine
to fifteen feet; outside the reef the depth at rather less than
half a mile is thirty fathoms. From the charts it appears that a
space about thirty-six miles in length, is here fringed; coloured
red.—<i>Pemba</i> (5° S.) is an island of
coral-formation, level, and about two hundred feet in height
(Owen's "Narr.," vol. i, p. 425); it is thirty-five miles long, and
is separated from the mainland by a deep sea. The outer coast is
represented in the chart as regularly fringed; coloured red. The
mainland in front of Pemba is likewise fringed; but there also
appear to be some outlying reefs with deep water between them and
the shore. I do not understand their structure, either from the
charts or the description, therefore have not coloured
them.—<i>Zanzibar</i> resembles Pemba in most respects; its
southern half on the western side and the neighbouring islets are
fringed; coloured red. On the mainland, a little S. of Zanzibar,
there are some banks parallel to the coast, which I should have
thought had been formed of coral, had it not been said (Boteler's
"Narr.," vol. ii, p. 39) that they were composed of sand; not
coloured.—<i>Latham's Bank</i> is a small island, fringed by
coral-reefs; but being only ten feet high, it has not been
coloured.—<i>Monfeea</i> is an island of the same character
as Pemba; its outer shore is fringed, and its southern extremity is
connected with Keelwa Point on the mainland by a chain of islands
fringed by reefs; coloured red. The four last-mentioned islands
resemble in many respects some of the islands in the Red Sea, which
will presently be described.—<i>Keelwa.</i> In a plan of the
shore, a space of twenty miles N. and S. of this place is fringed
by reefs, apparently of coral: these reefs are prolonged still
further southward in Owen's general chart. The coast in the plans
of the rivers <i>Lindy</i> and <i>Monghow</i> (9° 59' and
10° 7' S.) has the same structure; coloured
red.—<i>Querimba Islands</i> (from 10° 40' to 13°
S.). A chart on a large scale is given of these islands; they are
low, and of coral-formation (Boteler's "Narr.," vol. ii, p. 54);
and generally have extensive reefs projecting from them which are
dry at low water, and which on the outside rise abruptly from a
deep sea: on their insides they are separated from the continent by
a channel, or rather a succession of bays, with an average depth of
ten fathoms. The small headlands on the continent also have
coral-banks attached to them; and the Querimba islands and banks
are placed on the lines of prolongation of these headlands, and
are</p>
<p> </p>
<hr>
<p class="page"><a name="page 143">page 143</a></p>
<p> </p>
<p>separated from them by very shallow channels. It is evident that
whatever cause, whether the drifting of sediment or subterranean
movements, produced the headlands, likewise produced, as might have
been expected, submarine prolongations to them; and these towards
their outer extremities, have since afforded a favourable basis for
the growth of coral-reefs, and subsequently for the formation of
islets. As these reefs clearly belong to the fringing class, the
Querimba islands have been coloured red.—<i>Monabila</i>
(13° 32' S.). In the plan of this harbour, the headlands
outside are fringed by reefs apparently of coral; coloured
red.—<i>Mozambique</i> (150° S.) The outer part of the
island on which the city is built, and the neighbouring islands,
are fringed by coral-reefs; coloured red. From the description
given in Owen's "Narr." (vol. i, p. 162), the shore from <i>
Mozambique</i> to <i>Delagoa Bay</i> appears to be low and sandy;
many of the shoals and islets off this line of coast are of
coral-formation; but from their small size and lowness, it is not
possible, from the charts, to know whether they are truly fringed.
Hence this portion of coast is left uncoloured, as are likewise
those parts more northward, of which no mention has been made in
the foregoing pages from the want of information.</p>
<p>P<small>ERSIAN</small> G<small>ULF</small>.—From the
charts lately published on a large scale by the East India Company,
it appears that several parts, especially the southern shores of
this gulf, are fringed by coral-reefs; but as the water is very
shallow, and as there are numerous sandbanks, which are difficult
to distinguish on the chart from reefs, I have not coloured the
upper part red. Towards the mouth, however, where the water is
rather deeper, the islands of <i>Ormuz</i> and <i>Larrack</i>,
appear so regularly fringed, that I have coloured them red. There
are certainly no atolls in the Persian Gulf. The shores of <i>
Immaum</i>, and of the promontory forming the southern headland of
the Persian Gulf, seem to be without reefs. The whole S.W. part
(except one or two small patches) of <i>Arabia Felix</i>, and the
shores of <i>Socotra</i> appear from the charts and memoir of
Captain Haines (<i>Geograph. Journ.</i>, 1839, p. 125) to be
without any reefs. I believe there are no extensive coral-reefs on
any part of the coasts of <i>India</i>, except on the low
promontory of <i>Madura</i> (as already mentioned) in front of
Ceylon.</p>
<p>R<small>ED</small> S<small>EA</small>.—My information is
chiefly derived from the admirable charts published by the East
India Company in 1836, from personal communication with Captain
Moresby, one of the surveyors, and from the excellent memoir,
"Über die Nätur der Corallen-Bänken des Rothen
Meeres," by Ehrenberg. The plains immediately bordering the Red Sea
seem chiefly to consist of a sedimentary formation of the newer
tertiary period. The shore is, with the exception of a few parts,
fringed by coral-reefs. The water is generally profoundly deep
close to the shore; but this fact, which has attracted the
attention of most voyagers, seems to have no necessary connection
with the presence of reefs; for Captain Moresby particularly
observed to me, that, in lat. 24° 10' on the eastern side,
there is a piece of coast, with very deep water close to it,
without any reefs, but not differing in other respects from the
usual nature of the coast-line. The most remarkable feature in the
Red Sea</p>
<p> </p>
<hr>
<p class="page"><a name="page 144">page 144</a></p>
<p> </p>
<p>is the chain of submerged banks, reefs, and islands, lying some
way from the shore, chiefly on the eastern side; the space within
being deep enough to admit a safe navigation in small vessels. The
banks are generally of an oval form, and some miles in width; but
some of them are very long in proportion to their width. Captain
Moresby informs me that any one, who had not made actual plans of
them, would be apt to think that they were much more elongated than
they really are. Many of them rise to the surface, but the greater
number lie from five to thirty fathoms beneath it, with irregular
soundings on them. They consist of sand and living coral; coral on
most of them, according to Captain Moresby, covering the greater
part of their surface. They extend parallel to the shore, and they
are not unfrequently connected in their middle parts by short
transverse banks with the mainland. The sea is generally profoundly
deep quite close to them, as it is near most parts of the coast of
the mainland; but this is not universally the case, for between
lat. 15° and 17° the water deepens quite gradually from the
banks, both on the eastern and western shores, towards the middle
of the sea. Islands in many parts arise from these banks; they are
low, flat-topped, and consist of the same horizontally stratified
formation with that forming the plain- like margin of the mainland.
Some of the smaller and lower islands consist of mere sand. Captain
Moresby informs me, that small masses of rock, the remnants of
islands, are left on many banks where there is now no dry land.
Ehrenberg also asserts that most of the islets, even the lowest,
have a flat abraded basis, composed of the same tertiary formation:
he believes that as soon as the surf wears down the protuberant
parts of a bank, just beneath the level of the sea, the surface
becomes protected from further abrasion by the growth of coral, and
he thus accounts for the existence of so many banks standing on a
level with the surface of this sea. It appears that most of the
islands are certainly decreasing in size.</p>
<p>The form of the banks and islands is most singular in the part
just referred to, namely, from lat. 15° to 17°, where the
sea deepens quite gradually: the <i>Dhalac</i> group, on the
western coast, is surrounded by an intricate archipelago of islets
and shoals; the main island is very irregularly shaped, and it
includes a bay seven miles long, by four across, in which no bottom
was found with 252 feet: there is only one entrance into this bay,
half a mile wide, and with an island in front of it. The submerged
banks on the eastern coast, within the same latitudes, round <i>
Farsan Island</i>, are, likewise, penetrated by many narrow creeks
of deep water; one is twelve miles long, in the form of a hatchet,
in which, close to its broad upper end, soundings were not struck
with 360 feet, and its entrance is only half a mile wide: in
another creek of the same nature, but even with a more irregular
outline, there was no bottom with 480 feet. The island of Farsan,
itself, has as singular a form as any of its surrounding banks. The
bottom of the sea round the Dhalac and Farsan Islands consists
chiefly of sand and agglutinated fragments, but, in the deep and
narrow creeks, it consists of mud; the islands themselves consist
of thin, horizontally stratified, modern tertiary</p>
<p> </p>
<hr>
<p class="page"><a name="page 145">page 145</a></p>
<p> </p>
<p>beds, containing but little broken coral,<sup>1</sup> their
shores are fringed by living coral-reefs.</p>
<p>From the account given by Rüppell<sup>2</sup> of the manner
in which Dhalac has been rent by fissures, the opposite sides of
which have been unequally elevated (in one instance to the amount
of fifty feet), it seems probable that its irregular form, as well
as probably that of Farsan, may have been partly caused by unequal
elevations; but, considering the general form of the banks, and of
the deep-water creeks, together with the composition of the land, I
think their configuration is more probably due in great part to
strong currents having drifted sediment over an uneven bottom: it
is almost certain that their form cannot be attributed to the
growth of coral. Whatever may have been the precise origin of the
Dhalac and Farsan Archipelagoes, the greater number of the banks on
the eastern side of the Red Sea seem to have originated through
nearly similar means. I judge of this from their similarity in
configuration (in proof of which I may instance a bank on the east
coast in lat. 22°; and although it is true that the northern
banks generally have a less complicated outline), and from their
similarity in composition, as may be observed in their upraised
portions. The depth within the banks northward of lat. 17°, is
usually greater, and their outer sides shelve more abruptly
(circumstances which seem to go together) than in the Dhalac and
Farsan Archipelagoes; but this might easily have been caused by a
difference in the action of the currents during their formation:
moreover, the greater quantity of living coral, which, according to
Captain Moresby, exists on the northern banks, would tend to give
them steeper margins.</p>
<p>From this account, brief and imperfect as it is, we can see that
the great chain of banks on the eastern coast, and on the western
side in the southern portion, differ greatly from true
barrier-reefs wholly formed by the growth of coral. It is indeed
the direct conclusion of Ehrenberg ("Über die," etc., pp. 45
and 51), that they are connected in their origin quite secondarily
with the growth of coral; and he remarks that the islands off the
coast of Norway, if worn down level with the sea, and merely coated
with living coral, would present a nearly similar appearance. I
cannot, however, avoid suspecting, from information given me by Dr.
Malcolmson and Captain Moresby, that Ehrenberg has rather
under-rated the influence of corals, in some places at least, on
the formation of the tertiary deposits of the Red Sea.</p>
<p><i>The west coast of the Red Sea between lat. 19° and
22°.</i>—There are, in this space, reefs, which, if I had
known nothing of those in other parts of the Red Sea, I should
unhesitatingly have considered as barrier-reefs; and, after
deliberation, I have come to the same conclusion. One of these
reefs, in 20° 15', is twenty miles long, less than a mile in
width (but expanding at the northern end into a disc), slightly
sinuous, and extending parallel to the mainland at the distance of
five miles from it, with very deep water within; in one spot
soundings were not obtained with 205 fathoms. Some leagues further
south, there is another linear reef, very narrow, ten miles long,
with other small portions</p>
<p class="fnote">1. Rüppell, "Reise in Abyssinie," Band. i, S.
247.<br>
2. <i>Ibid</i>., S. 245.</p>
<p> </p>
<hr>
<p class="page"><a name="page 146">page 146</a></p>
<p> </p>
<p>of reef, north and south, almost connected with it; and within
this line of reefs (as well as outside) the water is profoundly
deep. There are also some small linear and sickle-formed reefs,
lying a little way out at sea. All these reefs are covered, as I am
informed by Captain Moresby, by living corals. Here, then, we have
all the characters of reefs of the barrier class; and in some
outlying reefs we have an approach to the structure of atolls. The
source of my doubts about the classification of these reefs, arises
from having observed in the Dhalac and Farsan groups the narrowness
and straightness of several spits of sand and rock: one of these
spits in the Dhalac group is nearly fifteen miles long, only two
broad, and it is bordered on each side with deep water; so that, if
worn down by the surf, and coated with living corals, it would form
a reef nearly similar to those within the space under
consideration. There is, also, in this space (lat. 21°) a
peninsula, bordered by cliffs, with its extremity worn down to the
level of the sea, and its basis fringed with reefs: in the line of
prolongation of this peninsula, there lies the island of <i>
Macowa</i> (formed, according to Captain Moresby, of the usual
tertiary deposit), and some smaller islands, large parts of which
likewise appear to have been worn down, and are now coated with
living corals. If the removal of the strata in these several cases
had been more complete, the reefs thus formed would have nearly
resembled those barrier-like ones now under discussion.
Notwithstanding these facts, I cannot persuade myself that the many
very small, isolated, and sickle-formed reefs and others, long,
nearly straight, and very narrow, with the water unfathomably deep
close round them, could possibly have been formed by corals merely
coating banks of sediment, or the abraded surfaces of irregularly
shaped islands. I feel compelled to believe that the foundations of
these reefs have subsided, and that the corals, during their upward
growth, have given to these reefs their present forms: I may remark
that the subsidence of narrow and irregularly-shaped peninsulas and
islands, such as those existing on the coasts of the Red Sea, would
afford the requisite foundations for the reefs in question.</p>
<p><i>The west coast from lat. 22° to 24°.</i>—This
part of the coast (north of the space coloured blue on the map) is
fronted by an irregularly shelving bank, from about ten to thirty
fathoms deep; numerous little reefs, some of which have the most
singular shapes, rise from this bank. It may be observed,
respecting one of them, in lat. 23° 10', that if the promontory
in lat. 24° were worn down to the level of the sea, and coated
with corals, a very similar and grotesquely formed reef would be
produced. Many of the reefs on this part of the coast may thus have
originated; but there are some sickle, and almost atoll-formed
reefs lying in deep water off the promontory in lat. 24°, which
lead me to suppose that all these reefs are more probably allied to
the barrier or atoll classes. I have not, however, ventured to
colour this portion of coast. <i>On the west coast from lat.
19° to 17°</i> (south of space coloured blue on the map),
there are many low islets of very small dimensions, not much
elongated, and rising out of great depths at a distance from the
coast; these cannot be classed either with atolls, or barrier- or
fringing-reefs. I may here remark that the outlying reefs on the
west</p>
<p> </p>
<hr>
<p class="page"><a name="page 147">page 147</a></p>
<p> </p>
<p>coast, between lat. 19° and 24°, are the only ones in
the Red Sea, which approach in structure to the true atolls of the
Indian and Pacific Oceans, but they present only imperfect
miniature likenesses of them.</p>
<p><i>Eastern coast.</i>—I have felt the greatest doubt about
colouring any portion of this coast, north of the fringing-reefs
round the Farsan Islands in 16° 10'. There are many small
outlying coral-reefs along the whole line of coast; but as the
greater number rise from banks not very deeply submerged (the
formation of which has been shown to be only secondarily connected
with the growth of coral), their origin may be due simply to the
growth of knolls of corals, from an irregular foundation situated
within a limited depth. But between lat. 18° and 20°, there
are so many linear, elliptic, and extremely small reefs, rising
abruptly out of profound depths, that the same reasons, which led
me to colour blue a portion of the west coast, have induced me to
do the same in this part. There exist some small outlying reefs
rising from deep water, north of lat. 20° (the northern limit
coloured blue), on the east coast; but as they are not very
numerous and scarcely any of them linear, I have thought it right
to leave them uncoloured.</p>
<p>In the <i>southern parts</i> of the Red Sea, considerable spaces
of the mainland, and of some of the Dhalac islands, are skirted by
reefs, which, as I am informed by Captain Moresby, are of living
coral, and have all the characters of the fringing class. As in
these latitudes, there are no outlying linear or sickle-formed
reefs, rising out of unfathomable depths, I have coloured these
parts of the coast red. On similar grounds, I have coloured red the
<i>northern parts of the western coast</i> (north of lat. 24°
30'), and likewise the shores of the chief part of the <i>Gulf of
Suez.</i> In the <i>Gulf of Acaba</i>, as I am informed by Captain
Moresby there are no coral-reefs, and the water is profoundly
deep.</p>
<p>W<small>EST</small> I<small>NDIES</small>.—My information
regarding the reefs of this area, is derived from various sources,
and from an examination of numerous charts; especially of those
lately executed during the survey under Captain Owen, R.N. I lay
under particular obligation to Captain Bird Allen, R.N., one of the
members of the late survey, for many personal communications on
this subject. As in the case of the Red Sea, it is necessary to
make some preliminary remarks on the submerged banks of the West
Indies, which are in some degree connected with coral-reefs, and
cause considerable doubts in their classification. That large
accumulations of sediment are in progress on the West Indian
shores, will be evident to any one who examines the charts of that
sea, especially of the portion north of a line joining Yucutan and
Florida. The area of deposition seems less intimately connected
with the debouchement of the great rivers, than with the course of
the sea-currents; as is evident from the vast extension of the
banks from the promontories of Yucutan and Mosquito.</p>
<p>Besides the coast-banks, there are many of various dimensions
which stand quite isolated; these closely resemble each other, they
lie from two or three to twenty or thirty fathoms under water, and
are composed of sand, sometimes firmly agglutinated, with little or
no coral; their surfaces are smooth and nearly level, shelving only
to the amount of a</p>
<p> </p>
<hr>
<p class="page"><a name="page 148">page 148</a></p>
<p> </p>
<p>few fathoms, very gradually all round towards their edges, where
they plunge abruptly into the unfathomable sea. This steep
inclination of their sides, which is likewise characteristic of the
coast-banks, is very remarkable: I may give as an instance, the
Misteriosa Bank, on the edges of which the soundings change in 250
fathoms horizontal distance, from 11 to 210 fathoms; off the
northern point of the bank of Old Providence, in 200 fathoms
horizontal distance, the change is from 19 to 152 fathoms; off the
Great Bahama Bank, in 160 fathoms horizontal distance, the
inclination is in many places from 10 fathoms to no bottom with 190
fathoms. On coasts in all parts of the world, where sediment is
accumulating, something of this kind may be observed; the banks
shelve very gently far out to sea, and then terminate abruptly. The
form and composition of the banks standing in the middle parts of
the W. Indian Sea, clearly show that their origin must be chiefly
attributed to the accumulation of sediment; and the only obvious
explanation of their isolated position is the presence of a
nucleus, round which the currents have collected fine drift matter.
Any one who will compare the character of the bank surrounding the
hilly island of Old Providence, with those banks in its
neighbourhood which stand isolated, will scarcely doubt that they
surround submerged mountains. We are led to the same conclusion by
examining the bank called Thunder Knoll, which is separated from
the Great Mosquito Bank by a channel only seven miles wide, and 145
fathoms deep. There cannot be any doubt that the Mosquito Bank has
been formed by the accumulation of sediment round the promontory of
the same name; and Thunder Knoll resembles the Mosquito Bank, in
the state of its surface submerged twenty fathoms, in the
inclinations of its sides, in composition, and in every other
respect. I may observe, although the remark is here irrelevant,
that geologists should be cautious in concluding that all the
outlyers of any formation have once been connected together, for we
here see that deposits, doubtless of exactly the same nature, may
be deposited with large valley-like spaces between them.</p>
<p>Linear strips of coral-reefs and small knolls project from many
of the isolated, as well as coast-banks; sometimes they occur quite
irregularly placed, as on the Mosquito Bank, but more generally
they form crescents on the windward side, situated some little
distance within the outer edge of the banks:—thus on the
Serranilla Bank they form an interrupted chain which ranges between
two and three miles within the windward margin: generally they
occur, as on Roncador, Courtown, and Anegada Banks, nearer the line
of deep water. Their occurrence on the windward side is conformable
to the general rule, of the efficient kinds of corals flourishing
best where most exposed; but their position some way within the
line of deep water I cannot explain, without it be, that a depth
somewhat less than that close to the outer margin of the banks, is
most favourable to their growth. Where the corals have formed a
nearly continuous rim, close to the windward edge of a bank some
fathoms submerged, the reef closely resembles an atoll; but if the
bank surrounds an island (as in the case of Old Providence),</p>
<p> </p>
<hr>
<p class="page"><a name="page 149">page 149</a></p>
<p> </p>
<p>the reef resembles an encircling barrier-reef. I should
undoubtedly have classed some of these fringed banks as imperfect
atolls, or barrier-reefs, if the sedimentary nature of their
foundations had not been evident from the presence of other
neighbouring banks, of similar forms and of similar composition,
but without the crescent-like marginal reef: in the third chapter,
I observed that probably some atoll-like reefs did exist, which had
originated in the manner here supposed.</p>
<p>Proofs of elevation within recent tertiary periods abound, as
referred to in the sixth chapter, over nearly the whole area of the
West Indies. Hence it is easy to understand the origin of the low
land on the coasts, where sediment is now accumulating; for
instance on the northern part of Yucutan, and on the N.E. part of
Mosquito, where the land is low, and where extensive banks appear
to be in progressive formation. Hence, also, the origin of the
Great Bahama Banks, which are bordered on their western and
southern edges by very narrow, long, singularly shaped islands,
formed of sand, shells, and coral-rock, and some of them about a
hundred feet in height, is easily explained by the elevation of
banks fringed on their windward (western and southern) sides by
coral-reefs. On this view, however, we must suppose either that the
chief part of the surfaces of the great Bahama sandbanks were all
originally deeply submerged, and were brought up to their present
level by the same elevatory action, which formed the linear
islands; or that during the elevation of the banks, the superficial
currents and swell of the waves continued wearing them down and
keeping them at a nearly uniform level: the level is not quite
uniform; for, in proceeding from the N.W. end of the Bahama group
towards the S.E. end, the depth of the banks increases, and the
area of land decreases, in a very gradual and remarkable manner.
The latter view, namely, that these banks have been worn down by
the currents and swell during their elevation, seems to me the most
probable one. It is, also, I believe, applicable to many banks,
situated in widely distant parts of the West Indian Sea, which are
wholly submerged; for, on any other view, we must suppose, that the
elevatory forces have acted with astonishing uniformity.</p>
<p>The shores of the Gulf of Mexico, for the space of many hundred
miles, is formed by a chain of lagoons, from one to twenty miles in
breadth ("Columbian Navigator," p. 178, etc.), containing either
fresh or salt water, and separated from the sea by linear strips of
sand. Great spaces of the shores of Southern Brazil,<sup>1</sup>
and of the United States from Long Island (as observed by Professor
Rogers) to Florida have the same character. Professor Rogers, in
his "Report to the British Association" (vol. iii, p. 13),
speculates on the origin of these low, sandy, linear islets; he
states that the layers of which they are composed are too
homogeneous, and contain too large a proportion of</p>
<p class="fnote">1. In the "London and Edinburgh Philosophical
Journal," 1841, p. 257, I have described a singular bar of
sandstone lying parallel to the coast off Pernambuco in Brazil,
which probably is an analogous formation.</p>
<p> </p>
<hr>
<p class="page"><a name="page 150">page 150</a></p>
<p> </p>
<p>shells, to permit the common supposition of their formation
being simply due to matter thrown up, where it now lies, by the
surf: he considers these islands as upheaved bars or shoals, which
were deposited in lines where opposed currents met. It is evident
that these islands and spits of sand parallel to the coast, and
separated from it by shallow lagoons, have no necessary connection
with coral-formations. But in Southern Florida, from the accounts I
have received from persons who have resided there, the upraised
islands seem to be formed of strata, containing a good deal of
coral, and they are extensively fringed by living reefs; the
channels within these islands are in some places between two and
three miles wide, and five or six fathoms deep, though
generally<sup>1</sup> they are less in depth than width. After
having seen how frequently banks of sediment in the West Indian Sea
are fringed by reefs, we can readily conceive that bars of sediment
might be greatly aided in their formation along a line of coast, by
the growth of corals; and such bars would, in that case, have a
deceptive resemblance with true barrier-reefs.</p>
<p>Having now endeavoured to remove some sources of doubt in
classifying the reefs of the West Indies, I will give my
authorities for colouring such portions of the coast as I have
thought myself warranted in doing. Captain Bird Allen informs me,
that most of the islands on the <i>Bahama Banks</i> are fringed,
especially on their windward sides, with living reefs; and hence I
have coloured those, which are thus represented in Captain Owen's
late chart, red. The same officer informs me, that the islands
along the southern part of <i>Florida</i> are similarly fringed;
coloured red. C<small>UBA</small>: Proceeding along the northern
coast, at the distance of forty miles from the extreme S.E. point,
the shores are fringed by reefs, which extend westward for a space
of 160 miles, with only a few breaks. Parts of these reefs are
represented in the plans of the harbours on this coast by Captain
Owen; and an excellent description is given of them by Mr. Taylor
(Loudon's "Mag. of Nat. Hist.," vol. ix, p. 449); he states that
they enclosed a space called the "<i>baxo</i>," from half to
three-quarters of a mile in width, with a sandy bottom, and a
little coral. In most parts people can wade, at low water, to the
reef; but in some parts the depth is between two and three fathoms.
Close outside the reef, the depth is between six and seven fathoms;
these well-characterised fringing-reefs are coloured red. Westward
of longitude 77° 30', on the northern side of Cuba, a great
bank commences, which extends along the coast for nearly four
degrees of longitude. In the place of its commencement, in its
structure, and in the "<i>cays</i>," or low islands on its edge,
there is a marked correspondence (as observed by Humboldt, "Pers.
Narr.," vol. vii, p. 88) between it and the Great Bahama and Sal
Banks, which lie directly in front. Hence one is led to attribute
the same origin to both these sets of banks; namely, the
accumulation of sediment, conjoined with an elevatory movement, and
the growth of</p>
<p class="fnote">1. In the ordinary sea-charts, no lagoons appear
on the coast of Florida, north of 26°; but Major Whiting
(<i>Silliman's Journal</i>, vol. xxxv, p. 54) says that many are
formed by sand thrown up along the whole line of coast from St.
Augustine's to Jupiter Inlet.</p>
<p> </p>
<hr>
<p class="page"><a name="page 151">page 151</a></p>
<p> </p>
<p>coral on their outward edges; those parts which appear fringed
by living reefs are coloured red. Westward of these banks, there is
a portion of coast apparently without reefs, except in the
harbours, the shores of which seem in the published plans to be
fringed. The <i>Colorado Shoals</i> (see Captain Owen's charts),
and the low land at the western end of Cuba, correspond as closely
in relative position and structure to the banks at the extreme
point of Florida, as the banks above described on the north side of
Cuba, do to the Bahamas, the depth within the islets and reefs on
the outer edge of the <i>Colorados</i>, is generally between two
and three fathoms, increasing to twelve fathoms in the southern
part, where the bank becomes nearly open, without islets or
coral-reefs; the portions which are fringed are coloured red. The
southern shore of Cuba is deeply concave, and the included space is
filled up with mud and sandbanks, low islands and coral-reefs.
Between the mountainous <i>Isle of Pines</i> and the southern shore
of Cuba, the general depth is only between two and three fathoms;
and in this part small islands, formed of fragmentary rock and
broken madrepores (Humboldt, "Pers. Narr.," vol. vii, pp. 51, 86 to
90, 291, 309, 320), rise abruptly, and just reach the surface of
the sea. From some expressions used in the "Columbian Navigator"
(vol. i, pt ii, p. 94), it appears that considerable spaces along
the outer coast of Southern Cuba are bounded by cliffs of
coral-rock, formed probably by the upheaval of coral-reefs and
sandbanks. The charts represent the southern part of the Isle of
Pines as fringed by reefs, which the "Columb. Navig." says extend
some way from the coast, but have only from nine to twelve feet
water on them; these are coloured red.—I have not been able
to procure any detailed description of the large groups of banks
and "cays" further eastward on the southern side of Cuba; within
them there is a large expanse, with a muddy bottom, from eight to
twelve fathoms deep; although some parts of this line of coast are
represented in the general charts of the West Indies, as fringed, I
have not thought it prudent to colour them. The remaining portion
of the south coast of Cuba appears to be without coral-reefs.</p>
<p>Y<small>UCUTAN</small>.—The N.E. part of the promontory
appears in Captain Owen's charts to be fringed; coloured red. The
eastern coast, from 20° to 18° is fringed. South of lat.
18°, there commences the most remarkable reef in the West
Indies: it is about one hundred and thirty miles in length, ranging
in a N. and S. line, at an average distance of fifteen miles from
the coast. The islets on it are all low, as I have been informed by
Captain B. Allen; the water deepens suddenly on the outside of the
reef, but not more abruptly than off many of the sedimentary banks:
within its southern extremity (off <i>Honduras</i>) the depth is
twenty-five fathoms; but in the more northern parts, the depth soon
increases to ten fathoms, and within the northernmost part, for a
space of twenty miles, the depth is only from one to two fathoms.
In most of these respects we have the characteristics of a
barrier-reef; nevertheless, from observing, first, that the channel
within the reef is a continuation of a great irregular bay, which
penetrates the mainland to the depth of fifty miles; and secondly,
that considerable spaces of this barrier-like reef are</p>
<p> </p>
<hr>
<p class="page"><a name="page 152">page 152</a></p>
<p> </p>
<p>described in the charts (for instance, in lat. 16° 45' and
16° 12') as formed of pure sand; and thirdly, from knowing that
sediment is accumulating in many parts of the West Indies in banks
parallel to the shore; I have not ventured to colour this reef as a
barrier, without further evidence that it has really been formed by
the growth of corals, and that it is not merely in parts a spit of
sand, and in other parts a worn down promontory, partially coated
and fringed by reefs; I lean, however, to the probability of its
being a barrier-reef, produced by subsidence. To add to my doubts,
immediately on the outside of this barrier-like reef, <i>Turneffe,
Lighthouse</i>, and <i>Glover</i> reefs are situated, and these
reefs have so completely the form of atolls, that if they had
occurred in the Pacific, I should not have hesitated about
colouring them blue. <i>Turneffe Reef</i> seems almost entirely
filled up with low mud islets; and the depth within the other two
reefs is only from one to three fathoms. From this circumstance and
from their similarity in form, structure, and relative position,
both to the bank called <i>Northern Triangles</i>, on which there
is an islet between seventy and eighty feet, and to <i>Cozumel</i>
Island, the level surface of which is likewise between seventy and
eighty feet in height, I consider it more probable that the three
foregoing banks are the worn down bases of upheaved shoals, fringed
with corals, than that they are true atolls, wholly produced by the
growth of coral during subsidence; left uncoloured.</p>
<p>In front of the eastern <i>Mosquito</i> coast, there are between
lat. 12° and 16° some extensive banks (already mentioned,
p. 148), with high islands rising from their centres; and there are
other banks wholly submerged, both of which kinds of banks are
bordered, near their windward margins, by crescent-shaped
coral-reefs. But it can hardly be doubted, as was observed in the
preliminary remarks, that these banks owe their origin, like the
great bank extending from the Mosquito promontory, almost entirely
to the accumulation of sediment, and not to the growth of corals;
hence I have not coloured them.</p>
<p><i>Cayman Island:</i> this island appears in the charts to be
fringed; and Captain B. Allen informs me that the reefs extend
about a mile from the shore, and have only from five to twelve feet
water within them; coloured red.—<i>Jamaica:</i> judging from
the charts, about fifteen miles of the S.E. extremity, and about
twice that length on the S.W. extremity, and some portions on the
S. side near Kingston and Port Royal, are regularly fringed, and
therefore are coloured red. From the plans of some harbours on the
N. side of Jamaica, parts of the coast appear to be fringed; but as
these are not represented in the charts of the whole island, I have
not coloured them.—<i>St. Domingo:</i> I have not been able
to obtain sufficient information, either from plans of the
harbours, or from general charts, to enable me to colour any part
of the coast, except sixty miles from Port de Plata westward, which
seems very regularly fringed; many other parts, however, of the
coast are probably fringed, especially towards the eastern end of
the island.—<i>Puerto Rico:</i> considerable portions of the
southern, western, and eastern coasts, and some parts of the
northern coast, appear in the charts to be fringed; coloured
red.—Some miles in length of the</p>
<p> </p>
<hr>
<p class="page"><a name="page 153">page 153</a></p>
<p> </p>
<p>southern side of the Island of <i>St. Thomas</i> is fringed;
most of the <i>Virgin Gorda</i> Islands, as I am informed by Mr.
Schomburgk, are fringed; the shores of <i>Anegada</i>, as well as
the bank on which it stands, are likewise fringed; these islands
have been coloured red. The greater part of the southern side of
<i>Santa Cruz</i> appears in the Danish survey to be fringed (see
also Prof. Hovey's account of this island, in <i>Silliman's
Journal</i>, vol. xxxv, p. 74); the reefs extend along the shore
for a considerable space, and project rather more than a mile; the
depth within the reef is three fathoms; coloured red.—The <i>
Antilles</i>, as remarked by Von Buch ("Descrip. Iles Canaries," p.
494), may be divided into two linear groups, the western row being
volcanic, and the eastern of modern calcareous origin; my
information is very defective on the whole group. Of the eastern
islands, <i>Barbuda</i> and the western coasts of <i>Antigua</i>
and <i>Mariagalante</i> appear to be fringed: this is also the case
with <i>Barbadoes</i>, as I have been informed by a resident; these
islands are coloured red. On the shores of the Western Antilles, of
volcanic origin, very few coral-reefs appear to exist. The island
of <i>Martinique</i>, of which there are beautifully executed
French charts, on a very large scale, alone presents any appearance
worthy of special notice. The south-western, southern, and eastern
coasts, together forming about half the circumference of the
island, are skirted by very irregular banks, projecting generally
rather less than a mile from the shore, and lying from two to five
fathoms submerged. In front of almost every valley, they are
breached by narrow, crooked, steep-sided passages. The French
engineers ascertained by boring, that these submerged banks
consisted of madreporitic rocks, which were covered in many parts
by thin layers of mud or sand. From this fact, and especially from
the structure of the narrow breaches, I think there can be little
doubt that these banks once formed living reefs, which fringed the
shores of the island, and like other reefs probably reached the
surface. From some of these submerged banks reefs of living coral
rise abruptly, either in small detached patches, or in lines
parallel to, but some way within the outer edges of the banks on
which they are based. Besides the above banks which skirt the
shores of the island, there is on the eastern side a range of
linear banks, similarly constituted, twenty miles in length,
extending parallel to the coast line, and separated from it by a
space between two and four miles in width, and from five to fifteen
fathoms in depth. From this range of detached banks, some linear
reefs of living coral likewise rise abruptly; and if they had been
of greater length (for they do not front more than a sixth part of
the circumference of the island), they would necessarily from their
position have been coloured as barrier-reefs; as the case stands
they are left uncoloured. I suspect that after a small amount of
subsidence, the corals were killed by sand and mud being deposited
on them, and the reefs being thus prevented from growing upwards,
the banks of madreporitic rock were left in their present submerged
condition.</p>
<p>T<small>HE</small> B<small>ERMUDA</small> I<small>SLANDS</small>
have been carefully described by Lieutenant Nelson, in an excellent
Memoir in the "Geological Transactions" (vol. v, part i, p. 103).
In the form of the bank or reef, on one side of which</p>
<p> </p>
<hr>
<p class="page"><a name="page 154">page 154</a></p>
<p> </p>
<p>the islands stand, there is a close general resemblance to an
atoll; but in the following respects there is a considerable
difference,—first, in the margin of the reef not forming (as
I have been informed by Mr. Chaffers, R.N.) a flat, solid surface,
laid bare at low water, and regularly bounding the internal space
of shallow water or lagoon; secondly, in the border of gradually
shoaling water, nearly a mile and a half in width, which surrounds
the entire outside of the reef (as is laid down in Captain Hurd's
chart); and thirdly, in the size, height, and extraordinary form of
the islands, which present little resemblance to the long, narrow,
simple islets, seldom exceeding half a mile in breadth, which
surmount the annular reefs of almost all the atolls in the Indian
and Pacific Oceans. Moreover, there are evident proofs (Nelson, <i>
Ibid</i>., p. 118), that islands similar to the existing ones,
formerly extended over other parts of the reef. It would, I
believe, be difficult to find a true atoll with land exceeding
thirty feet in height; whereas, Mr. Nelson estimates the highest
point of the Bermuda Islands to be 260 feet; if, however, Mr.
Nelson's view, that the whole of the land consists of sand drifted
by the winds, and agglutinated together, were proved correct, this
difference would be immaterial; but, from his own account (p. 118),
there occur in one place, five or six layers of red earth,
interstratified with the ordinary calcareous rock, and including
stones too heavy for the wind to have moved, without having at the
same time utterly dispersed every grain of the accompanying drifted
matter. Mr. Nelson attributes the origin of these several layers,
with their embedded stones, to as many violent catastrophes; but
further investigation in such cases has generally succeeded in
explaining phenomena of this kind by ordinary and simpler means.
Finally, I may remark, that these islands have a considerable
resemblance in shape to Barbuda in the West Indies, and to Pemba on
the eastern coast of Africa, which latter island is about two
hundred feet in height, and consists of coral-rock. I believe that
the Bermuda Islands, from being fringed by living reefs, ought to
have been coloured red; but I have left them uncoloured, on account
of their general resemblance in external form to a lagoon-island or
atoll.</p>
<p> </p>
<hr>
<p> </p>
<center><b><a name="Index">INDEX</a></b></center>
<p>The names in italics are all names of places, and refer
exclusively to the Appendix: in well-defined archipelagoes, or
groups of islands, the name of each separate island is not
given.</p>
<p><small>Abrolhos, Brazil, coated by corals <a href="#page 50">
50</a><br>
<i>Abrolhos (Australia)</i> <a href="#page 130">130</a><br>
Absence of coral-reefs from certain coasts <a href="#page 51">
51</a><br>
<i>Acaba, gulf of</i> <a href="#page 147">147</a><br>
<i>Admiralty group</i> <a href="#page 124">124</a><br>
Africa, east coast, fringing-reef of <a href="#page 48">48</a><br>
—— Madreporitic rock of <a href="#page 101">101</a><br>
<i>Africa, east coast</i> <a href="#page 141">141</a><br>
Age of individual corals <a href="#page 57">57</a>, <a href=
"#page 64">64</a><br>
<i>Aiou</i> <a href="#page 128">128</a><br>
<i>Aitutaki</i> <a href="#page 114">114</a><br>
<i>Aldabra</i> <a href="#page 139">139</a><br>
<i>Alert reef</i> <a href="#page 123">123</a><br>
<i>Alexander, Grand Duke, island</i> <a href="#page 115">
115</a><br>
Allan, Dr., on Holuthuriæ feeding on corals <a href=
"#page 21">21</a><br>
—— on quick growth of corals at Madagascar <a href=
"#page 62">62</a><br>
—— on reefs affected by currents <a href="#page 49">
9</a><br>
<i>Alloufatou</i> <a href="#page 119">119</a><br>
<i>Alphonse</i> <a href="#page 139">139</a><br>
<i>Amargoura (Amargura)</i> <a href="#page 119">119</a><br>
<i>Amboina</i> <a href="#page 128">128</a><br>
<i>America, west coast</i> <a href="#page 111">111</a><br>
<i>Amirantes</i> <a href="#page 138">138</a><br>
<i>Anachorites</i> <a href="#page 125">125</a><br>
<i>Anambas</i> <a href="#page 133">133</a><br>
Anamouka, description of <a href="#page 99">99</a><br>
<i>Anamouka</i> <a href="#page 119">119</a><br>
<i>Anadaman islands</i> <a href="#page 132">132</a><br>
<i>Antilles</i> <a href="#page 153">153</a><br>
<i>Appoo reef</i> <a href="#page 134">134</a><br>
<i>Arabia Felix</i> <a href="#page 143">143</a><br>
Areas, great extent of, interspersed with low islands<br>
—— of subsidence and of elevation <a href="#page 106">
106</a><br>
—— of subsidence appear to be elongated <a href=
"#page 106">106</a><br>
—— of subsidence alternating with areas of elevation <a
href="#page 108">108</a><br>
<i>Arru group</i> <a href="#page 128">128</a><br>
<i>Arzobispo</i> <a href="#page 127">127</a><br>
Ascidia, depth at which found <a href="#page 67">67</a><br>
<i>Assomption</i> <a href="#page 139">139</a><br>
<i>Astova</i> <a href="#page 139">139</a><br>
<i>Atlantic islands</i> <a href="#page 121">121</a><br>
Atolls, breaches in their reefs <a href="#page 31">31</a>, <a href=
"#page 81">81</a><br>
—— dimensions of <a href="#page 25">25</a><br>
—— dimensions of groups of <a href="#page 71">
71</a><br>
—— not based on craters or on banks of sediment, or of
ck <a href="#page 69">69</a>, <a href="#page 71">71</a>, <a href=
"#page 72">72</a>, <a href="#page 73">73</a>, <a href="#page 108">
108</a><br>
—— of irregular forms <a href="#page 25">25</a>, <a
href="#page 84">84</a><br>
—— steepness of their flanks <a href="#page 26">
26</a><br>
—— width of their reef and islets <a href="#page 25">
25</a><br>
—— their lowness <a href="#page 70">70</a><br>
—— lagoons <a href="#page 29">29</a><br>
—— general range <a href="#page 94">94</a><br>
—— with part of their reef submerged, and theory of <a
href="#page 29">29</a>, <a href="#page 81">81</a><br>
<i>Augustine, St.</i> <a href="#page 120">120</a><br>
Aurora island, an upraised atoll <a href="#page 64">64</a>, <a
href="#page 71">71</a>, <a href="#page 104">104</a><br>
<i>Aurora</i> <a href="#page 112">112</a><br>
Austral islands, recently elevated <a href="#page 99">99</a><br>
<i>Austral islands</i> <a href="#page 114">114</a><br>
<i>Australia, N.W. coast</i> <a href="#page 130">130</a><br>
Australian barrier-reef <a href="#page 42">42</a>, <a href=
"#page 93">93</a><br>
<i>Australian barrier</i> <a href="#page 123">123</a><br>
<br>
<i>Babuyan group</i> <a href="#page 134">134</a><br>
<i>Bahama banks</i> <a href="#page 149">149</a>, <a href=
"#page 150">150</a><br>
<i>Balahac</i> <a href="#page 133">133</a><br>
<i>Bally</i> <a href="#page 131">131</a><br>
<i>Baring</i> <a href="#page 121">121</a><br>
Barrier-reef of Australia <a href="#page 42">42</a>, <a href=
"#page 93">93</a><br>
—— of New Caledonia <a href="#page 44">44</a><br>
Barrier-reefs, breaches through <a href="#page 77">77</a><br>
—— not based on worn down margin of rock <a href=
"#page 43">43</a><br>
—— on banks of sediment <a href="#page 43">43</a><br>
—— on submarine craters <a href="#page 44">44</a><br>
—— steepness of their flanks <a href="#page 39">
39</a><br>
—— their probable vertical thickness <a href=
"#page 43">43</a>, <a href="#page 76">76</a><br>
—— theory of their formation <a href="#page 76">76</a>,
<a href="#page 78">78</a><br>
<i>Bampton shoal</i> <a href="#page 123">123</a><br>
<i>Banks islands</i> <a href="#page 122">122</a><br>
<i>Banks in the West Indies</i> <a href="#page 147">147</a><br>
<i>Bashee islands</i> <a href="#page 134">134</a><br>
<i>Bass island</i> <a href="#page 115">115</a><br>
<i>Batoa</i> <a href="#page 119">119</a><br>
<i>Beaupré reef</i> <a href="#page 123">123</a><br>
Beechey, Captain, obligations of the author to <a href="#page 26">
26</a><br>
—— on submerged reefs <a href="#page 27">27</a><br>
—— account of Matilda island <a href="#page 60">
60</a><br>
Belcher, Captain, on boring through coral-reef <a href="#page 59">
59</a><br>
<i>Belize reef, off</i> <a href="#page 151">151</a><br>
<i>Bellinghausen</i> <a href="#page 113">113</a><br>
<i>Bermuda islands</i> <a href="#page 153">153</a><br>
<i>Beveridge reef</i> <a href="#page 118">118</a><br>
<i>Bligh</i> <a href="#page 122">122</a><br>
Bolabola, view of <a href="#page 12">12</a><br>
<i>Bombay shoal</i> <a href="#page 136">136</a><br>
<i>Bonin Bay</i> <a href="#page 131">131</a><br>
<i>Bonin group</i> <a href="#page 127">127</a><br>
Borings through coral-reefs <a href="#page 59">59</a><br>
Borneo, W. coast, recently elevated <a href="#page 101">101</a><br>
<i>Borneo, E. coast</i> <a href="#page 131">131</a><br>
—— <i>S.W. and W. coast</i> <a href="#page 133">
133</a><br>
—— <i>N. coast</i> <a href="#page 133">133</a><br>
—— <i>western bank</i> <a href="#page 136">136</a><br>
<i>Boscawen</i> <a href="#page 119">119</a><br>
<i>Boston</i> <a href="#page 121">121</a><br>
<i>Bouka</i> <a href="#page 124">124</a><br>
<i>Bourbon</i> <a href="#page 138">138</a><br>
<i>Bourou</i> <a href="#page 128">128</a><br>
<i>Bouton</i> <a href="#page 132">132</a><br>
Brazil, fringing-reefs on coast of <a href="#page 48">48</a><br>
Breaches through barrier-reefs <a href="#page 71">71</a><br>
<i>Brook</i> <a href="#page 115">115</a><br>
<i>Bunker</i> <a href="#page 115">115</a><br>
<i>Bunoa</i> <a href="#page 133">133</a><br>
Byron <a href="#page 121">121</a><br>
<br>
<i>Cagayanes</i> <a href="#page 133">133</a><br>
<i>Candelaria</i> <a href="#page 124">124</a><br>
<i>Cargados Carajos</i> <a href="#page 138">138</a><br>
<i>Caroline archipelago</i> <a href="#page 125">125</a><br>
<i>Caroline island</i> <a href="#page 115">115</a><br>
<i>Carteret shoal</i> <a href="#page 128">128</a><br>
Caryophyllia, depth at which it lives <a href="#page 66">66</a><br>
<i>Cavilli</i> <a href="#page 133">133</a><br>
<i>Cayman island</i> <a href="#page 152">152</a><br>
<i>Celebes</i> <a href="#page 129">129</a><br>
<i>Ceram</i> <a href="#page 128">128</a><br>
Ceylon, recently elevated <a href="#page 101">101</a><br>
<i>Ceylon</i> <a href="#page 137">137</a><br>
Chagos Great Bank, description and theory of <a href="#page 37">
37</a>, <a href="#page 85">85</a><br>
Chagos group <a href="#page 86">86</a><br>
<i>Chagos group</i> <a href="#page 137">137</a><br>
Chama-shells embedded in coral-rock <a href="#page 68">68</a><br>
Chamisso, on corals preferring the surf <a href="#page 52">
52</a><br>
Changes in the state of Keeling atoll <a href="#page 21">21</a><br>
—— of atolls <a href="#page 74">74</a><br>
Channels leading into the lagoons of atolls <a href="#page 30">
30</a>, <a href="#page 82">82</a><br>
—— —— into the Maldiva atolls <a href=
"#page 33">33</a>, <a href="#page 35">35</a><br>
—— through barrier-reefs <a href="#page 77">77</a><br>
<i>Chase</i> <a href="#page 120">120</a><br>
<i>China sea</i> <a href="#page 135">135</a><br>
Christmas atoll <a href="#page 60">60</a>, <a href="#page 97">
97</a><br>
<i>Christmas atoll</i> <a href="#page 116">116</a><br>
<i>Christmas island</i> (Indian Ocean) <a href="#page 137">
137</a><br>
<i>Clarence</i> <a href="#page 116">116</a><br>
<i>Clipperton rock</i> <a href="#page 111">111</a><br>
Cocos, or Keeling atoll <a href="#page 15">15</a><br>
<i>Cocos (or Keeling)</i> <a href="#page 137">137</a><br>
<i>Cocos island</i> (Pacific) <a href="#page 111">111</a><br>
Cochin China, encroachments of the sea on the coast <a href=
"#page 95">95</a><br>
<i>Cochin China</i> <a href="#page 183">183</a><br>
<i>Coetivi</i> <a href="#page 139">139</a><br>
<i>Comoro group</i> <a href="#page 139">139</a><br>
Composition of coral-formations <a href="#page 88">88</a><br>
Conglomerate coral-rock on Keeling atoll <a href="#page 20">
20</a><br>
—— on other atolls <a href="#page 28">28</a><br>
—— coral-rock <a href="#page 88">88</a><br>
Cook islands, recently elevated <a href="#page 98">98</a>, <a href=
"#page 103">103</a><br>
<i>Cook islands</i> <a href="#page 114">114</a><br>
Coral-blocks bored by vermiform animals <a href="#page 21">21</a>,
<a href="#page 88">88</a><br>
Coral-reefs, their distribution and absence from certain areas <a
href="#page 50">50</a><br>
—— destroyed by loose sediment <a href="#page 53">
53</a><br>
Coral-rock at Keeling atoll <a href="#page 20">20</a><br>
—— Mauritius <a href="#page 47">47</a><br>
—— organic remains of <a href="#page 88">88</a><br>
Corals dead but upright in Keeling lagoon <a href="#page 22">
22</a><br>
—— depths at which they live <a href="#page 64">
64</a><br>
—— off Keeling atoll <a href="#page 17">17</a><br>
—— killed by a short exposure <a href="#page 16">
16</a><br>
—— living in the lagoon of Keeling atoll <a href=
"#page 20">20</a><br>
—— quick growth of, in Keeling lagoon <a href=
"#page 21">21</a><br>
—— merely coating the bottom of the sea <a href=
"#page 50">50</a><br>
—— standing exposed in the Low archipelago <a href=
"#page 96">96</a><br>
Corallian sea <a href="#page 94">94</a><br>
<i>Corallian sea</i> <a href="#page 123">123</a><br>
<i>Cornwallis</i> <a href="#page 121">121</a><br>
<i>Cosmoledo</i> <a href="#page 139">139</a><br>
Couthouy, Mr., alleged proofs of recent elevation of the Low
archipelago <a href="#page 96">96</a><br>
—— on coral-rock at Mangaia and Aurora islands <a href=
"#page 64">64</a><br>
—— on external ledges round coral-islands <a href=
"#page 80">80</a><br>
—— remarks confirmatory of the author's theory <a href=
"#page 96">96</a><br>
Crescent-formed reefs <a href="#page 84">84</a><br>
<i>Cuba</i> <a href="#page 150">150</a><br>
Cuming, Mr., on the recent elevation of the Philippines <a href=
"#page 101">101</a><br>
<br>
<i>Dangerous, or Low archipelago</i> <a href="#page 111">
111</a><br>
<i>Danger islands</i> <a href="#page 116">116</a><br>
Depths at which reef-building corals live <a href="#page 63">
63</a><br>
—— at Mauritius, the Red Sea, and in the Maldiva
archipelago <a href="#page 66">66</a><br>
—— at which other corals and corallines can live <a
href="#page 67">67</a><br>
<i>Dhalac group</i> <a href="#page 144">144</a><br>
Diego Garcia, slow growth of reef <a href="#page 56">56</a><br>
Dimensions of the larger groups of atolls <a href="#page 71">
71</a><br>
Disseverment of the Maldiva atolls, and theory of <a href=
"#page 37">37</a>, <a href="#page 82">82</a><br>
Distribution of coral-reefs <a href="#page 50">50</a><br>
<i>Domingo, St.</i> <a href="#page 152">152</a><br>
Dory, Port, recently elevated <a href="#page 100">100</a><br>
<i>Dory, Port</i> <a href="#page 127">127</a><br>
<i>Duff islands</i> <a href="#page 122">122</a><br>
<i>Durour</i> <a href="#page 125">125</a><br>
<br>
<i>Eap</i> <a href="#page 126">126</a><br>
arthquakes at Keeling atoll <a href="#page 23">23</a><br>
—— in groups of atolls <a href="#page 75">75</a><br>
—— in Navigator archipelago <a href="#page 100">
100</a><br>
ast Indian archipelago, recently elevated <a href="#page 100">
100</a><br>
<i>Easter</i> <a href="#page 111">111</a><br>
<i>Echequier</i> <a href="#page 125">125</a><br>
hrenberg, on the banks of the Red Sea <a href="#page 49">49</a>, <a
href="#page 143">143</a><br>
—— on depths at which corals live in the Red Sea <a
href="#page 66">66</a><br>
—— on corals preferring the surf <a href="#page 53">
53</a><br>
—— on the antiquity of certain corals <a href=
"#page 57">57</a><br>
<i>Eimeo</i> <a href="#page 112">112</a><br>
levated reef of Mauritius <a href="#page 47">47</a><br>
levations, recent proofs of <a href="#page 98">98</a><br>
—— immense areas of <a href="#page 106">106</a><br>
<i>Elivi</i> <a href="#page 126">126</a><br>
lizabeth island <a href="#page 59">59</a><br>
—— recently elevated <a href="#page 98">98</a>, <a
href="#page 104">104</a><br>
<i>Elizabeth island</i> <a href="#page 112">112</a><br>
<i>Ellice group</i> <a href="#page 120">120</a><br>
ncircled islands, their height <a href="#page 41">41</a><br>
—— geological composition <a href="#page 42">42</a>, <a
href="#page 44">44</a><br>
ua, description of <a href="#page 99">99</a><br>
<i>Eoua</i> <a href="#page 118">118</a><br>
upted matter probably not associated with thick masses of
coral-rock <a href="#page 89">89</a><br>
<br>
Fais, recently elevated <a href="#page 100">100</a>, <a href=
"#page 104">104</a><br>
<i>Fais</i> <a href="#page 126">126</a><br>
<i>Fanning</i> <a href="#page 116">116</a><br>
<i>Farallon de Medinilla</i> <a href="#page 127">127</a><br>
<i>Farson group</i> <a href="#page 144">144</a><br>
<i>Fataka</i> <a href="#page 122">122</a><br>
Fiji archipelago <a href="#page 119">119</a><br>
Fish, feeding on corals <a href="#page 21">21</a><br>
—— killed in Keeling lagoon by heavy rain <a href=
"#page 24">24</a><br>
Fissures across coral-islands <a href="#page 75">75</a><br>
Fitzroy, Captain, on a submerged shed at Keeling atoll <a href=
"#page 23">23</a><br>
—— on an inundation in the Low archipelago <a href=
"#page 74">74</a><br>
<i>Flint</i> <a href="#page 115">115</a><br>
<i>Flores</i> <a href="#page 130">130</a><br>
<i>Florida</i> <a href="#page 149">149</a><br>
<i>Folger</i> <a href="#page 127">127</a><br>
<i>Formosa</i> <a href="#page 135">135</a><br>
Forster, theory of coral-formations <a href="#page 73">73</a><br>
<i>Frederick reef</i> <a href="#page 123">123</a><br>
<i>Freewill</i> <a href="#page 128">128</a><br>
Friendly group recently elevated <a href="#page 99">99</a>, <a
href="#page 105">105</a><br>
<i>Friendly archipelago</i> <a href="#page 118">118</a><br>
Fringing-reefs, absent where coast precipitous <a href="#page 45">
5</a><br>
—— breached in front of streams <a href="#page 54">
54</a><br>
—— described by MM. Quoy and Gaimard <a href=
"#page 98">98</a><br>
—— not closely attached to shelving coasts <a href=
"#page 46">46</a><br>
—— of east coast of Africa <a href="#page 48"></a><br>
—— of Cuba <a href="#page 48">48</a><br>
—— of Mauritius <a href="#page 45">45</a><br>
—— on worn down banks of rock <a href="#page 49">
9</a><br>
—— on banks of sediment <a href="#page 49">49</a><br>
—— their appearance when elevated <a href="#page 47">
7</a><br>
—— their growth influenced by currents <a href=
"#page 49">49</a><br>
—— by shallowness of sea <a href="#page 49">49</a><br>
<br>
<i>Galapagos archipelago</i> <a href="#page 111">111</a><br>
<i>Galega</i> <a href="#page 139">139</a><br>
Gambier islands, section of <a href="#page 43">43</a><br>
<i>Gambier islands</i> <a href="#page 112">112</a><br>
<i>Gardner</i> <a href="#page 116">116</a><br>
<i>Gaspar rico</i> <a href="#page 121">121</a><br>
Geological composition of coral-formations <a href="#page 88">
</a><br>
<i>Gilbert archipelago</i> <a href="#page 120">120</a><br>
<i>Gilolo</i> <a href="#page 129">129</a><br>
<i>Glorioso</i> <a href="#page 139">139</a><br>
Gloucester island <a href="#page 74">74</a><br>
<i>Glover reef</i> <a href="#page 152">152</a><br>
<i>Gomez</i> <a href="#page 111">111</a><br>
<i>Gouap</i> <a href="#page 126">126</a><br>
<i>Goulou</i> <a href="#page 126">126</a><br>
<i>Grampus</i> <a href="#page 127">127</a><br>
<i>Gran Cocal</i> <a href="#page 120">120</a><br>
Great Chagos Bank, description and theory of <a href="#page 37">
37</a>, <a href="#page 85">85</a><br>
Grey, Captain, on sandbars <a href="#page 46">46</a><br>
Grouping of the different classes of reefs <a href="#page 93">
93</a><br>
<i>Guedes</i> <a href="#page 128">128</a><br>
<br>
Hall, Captain B., on Loo Choo <a href="#page 101">101</a><br>
Harvey islands, recently elevated <a href="#page 104">104</a><br>
Height of encircled islands <a href="#page 41">41</a><br>
<i>Hermites</i> <a href="#page 125">125</a><br>
<i>Hervey or Cook islands</i> <a href="#page 114">114</a><br>
<i>Hogoleu</i> <a href="#page 125">125</a><br>
Holothuriæ (Holuthuriæ) feeding on coral <a href=
"#page 21">21</a><br>
Houden island, height of <a href="#page 71">71</a><br>
<i>Honduras, reef off</i> <a href="#page 151">151</a><br>
<i>Horn</i> <a href="#page 119">119</a><br>
<i>Houtman Abrolhos</i> <a href="#page 130">130</a><br>
Huaheine; alleged proofs of its recent elevation <a href=
"#page 103">103</a><br>
<i>Huaheine</i> <a href="#page 113">113</a><br>
<i>Humphrey</i> <a href="#page 115">115</a><br>
<i>Hunter</i> <a href="#page 119">119</a><br>
Hurricanes, effects of, on coral-islands <a href="#page 74">
74</a><br>
<br>
<i>Immaum</i> <a href="#page 143">143</a><br>
<i>Independence</i> <a href="#page 120">120</a><br>
India, west coast, recently elevated <a href="#page 101">
101</a><br>
<i>India</i> <a href="#page 143">143</a><br>
Irregular reefs in shallow seas <a href="#page 49">49</a><br>
Islets of coral-rock, their formation <a href="#page 19">19</a><br>
—— their destruction in the Maldiva atolls <a href=
"#page 36">36</a><br>
<br>
<i>Jamaica</i> <a href="#page 152">152</a><br>
<i>Jarvis</i> <a href="#page 115">115</a><br>
Java, recently elevated <a href="#page 100">100</a><br>
<i>Java</i> <a href="#page 131">131</a><br>
<i>Johnston island</i> <a href="#page 116">116</a><br>
<i>Juan de Nova</i> <a href="#page 139">139</a><br>
<i>Juan de Nova (Madagascar)</i> <a href="#page 140">140</a><br>
<br>
<i>Kalatoa</i> <a href="#page 131">131</a><br>
Kamtschatka, proofs of its recent elevation <a href="#page 105">
105</a><br>
<i>Karkalang</i> <a href="#page 129">129</a><br>
Keeling atoll, section of reef <a href="#page 15">15</a><br>
<i>Keeling, south atoll</i> <a href="#page 137">137</a><br>
—— <i>north atoll</i> <a href="#page 137">137</a><br>
<i>Keffing</i> <a href="#page 128">128</a><br>
<i>Kemin</i> <a href="#page 115">115</a>, <a href="#page 116">
116</a><br>
<i>Kennedy</i> <a href="#page 123">123</a><br>
<i>Keppel</i> <a href="#page 119">119</a><br>
<i>Kumi</i> <a href="#page 135">135</a><br>
<br>
<i>Laccadive group</i> <a href="#page 137">137</a><br>
Ladrones, or Marianas, recently elevated <a href="#page 100">
100</a><br>
<i>Ladrones archipelago</i> <a href="#page 127">127</a><br>
Lagoon of Keeling atoll <a href="#page 20">20</a><br>
Lagoons bordered by inclined ledges and walls, and theory of their
formation <a href="#page 32">32</a>, <a href="#page 79">79</a><br>
—— of small atolls filled up with sediment <a href=
"#page 32">32</a><br>
Lagoon-channels within barrier-reefs <a href="#page 40">40</a><br>
Lagoon-reefs, all submerged in some atolls, and rising to the
surface in others <a href="#page 55">55</a><br>
<i>Lancaster reef</i> <a href="#page 115">115</a><br>
<i>Latte</i> <a href="#page 119">119</a><br>
<i>Lauglan islands</i> <a href="#page 123">123</a><br>
Ledges round certain lagoons <a href="#page 32">32</a>, <a href=
"#page 79">79</a><br>
<i>Lette</i> <a href="#page 129">129</a><br>
<i>Lighthouse reef</i> <a href="#page 152">152</a><br>
Lloyd, Mr., on corals refixing themselves <a href="#page 62">
62</a><br>
Loo Choo, recently elevated <a href="#page 101">101</a><br>
<i>Loo Choo</i> <a href="#page 135">135</a><br>
<i>Louisiade</i> <a href="#page 123">123</a><br>
Low archipelago, alleged proofs of its recent elevation <a href=
"#page 96">96</a><br>
<i>Low archipelago</i> <a href="#page 111">111</a><br>
Lowness of coral-islands <a href="#page 70">70</a><br>
<i>Loyalty group</i> <a href="#page 123">123</a><br>
<i>Lucepara</i> <a href="#page 133">133</a><br>
Lutké, Admiral, on fissures across coral-islands <a href=
"#page 75">75</a><br>
Luzon, recently elevated <a href="#page 101">101</a><br>
<i>Luzon</i> <a href="#page 134">134</a><br>
Lyell, Mr., on channels into the lagoons of atolls <a href=
"#page 31">31</a><br>
—— on the lowness of their leeward sides <a href=
"#page 82">82</a><br>
—— on the antiquity of certain corals <a href=
"#page 58">58</a><br>
—— on the apparent continuity of distinct coral-islands
<a href="#page 89">89</a><br>
—— on the recently elevated beds of the Red Sea <a
href="#page 102">102</a><br>
—— on the outline of the areas of subsidence <a href=
"#page 106">106</a><br>
<br>
<i>Macassar strait</i> <a href="#page 131">131</a><br>
<i>Macclesfield bank</i> <a href="#page 136">136</a><br>
Madagascar, quick growth of corals at <a href="#page 62">62</a><br>
—— madreporitic rock of <a href="#page 101">101</a><br>
<i>Madagascar</i> <a href="#page 140">140</a><br>
<i>Madjiko-sima</i> <a href="#page 135">135</a><br>
<i>Madura (Java)</i> <a href="#page 131">131</a><br>
<i>Madura (India)</i> <a href="#page 137">137</a><br>
Mahlos Mahdoo, theory of formation <a href="#page 88">88</a><br>
Malacca, recently elevated <a href="#page 100">100</a><br>
<i>Malacca</i> <a href="#page 133">133</a><br>
Malcolmson, Dr., on recent elevation of W. coast of India <a href=
"#page 100">100</a><br>
—— on recent elevation of Camaran island <a href=
"#page 102">102</a><br>
<i>Malden</i> <a href="#page 115">115</a><br>
Maldiva atolls, and theory of their formation <a href="#page 33">
33</a>, <a href="#page 80">80</a>, <a href="#page 82">82</a><br>
—— steepness of their flanks <a href="#page 26">
26</a><br>
—— growth of coral at <a href="#page 62">62</a><br>
<i>Maldiva archipelago</i> <a href="#page 137">137</a><br>
Mangaia island <a href="#page 64">64</a><br>
—— recently elevated <a href="#page 99">99</a>, <a
href="#page 104">104</a><br>
<i>Mangaia</i> <a href="#page 114">114</a><br>
<i>Mangs</i> <a href="#page 127">127</a><br>
Marianas, recently elevated <a href="#page 100">100</a><br>
<i>Mariana archipelago</i> <a href="#page 127">127</a><br>
<i>Mariere</i> <a href="#page 126">126</a><br>
<i>Marquesas archipelago</i> <a href="#page 113">113</a><br>
<i>Marshall archipelago</i> <a href="#page 121">121</a><br>
<i>Marshall island</i> <a href="#page 127">127</a><br>
<i>Martinique</i> <a href="#page 153">153</a><br>
<i>Martires</i> <a href="#page 126">126</a><br>
Mary's St. in Madagascar, harbour made in reefs <a href="#page 54">
54</a><br>
<i>Mary island</i> <a href="#page 116">116</a><br>
<i>Matia, or Aurora</i> <a href="#page 112">112</a><br>
Matilda atoll <a href="#page 60">60</a><br>
Mauritius, fringing-reefs of <a href="#page 45">45</a><br>
—— depths at which corals live there <a href=
"#page 64">64</a><br>
—— recently elevated <a href="#page 101">101</a><br>
<i>Mauritius</i> <a href="#page 138">138</a><br>
Maurua, section of <a href="#page 43">43</a><br>
<i>Maurua</i> <a href="#page 113">113</a><br>
Menchikoff atoll <a href="#page 25">25</a>, <a href="#page 84">
</a><br>
<i>Mendana archipelago</i> <a href="#page 113">113</a><br>
<i>Mendana isles</i> <a href="#page 122">122</a><br>
<i>Mexico, gulf of</i> <a href="#page 149">149</a><br>
Millepora complanata at Keeling atoll <a href="#page 16">16</a><br>
<i>Mindoro</i> <a href="#page 134">134</a><br>
<i>Mohilla (Mohila)</i> <a href="#page 139">139</a><br>
Molucca islands, recently elevated <a href="#page 100">100</a><br>
<i>Mopeha</i> <a href="#page 113">113</a><br>
Moresby, Captain, on boring through coral-reefs <a href="#page 59">
59</a><br>
<i>Morty</i> <a href="#page 129">129</a><br>
<i>Mosquito coast</i> <a href="#page 152">152</a><br>
Musquillo atoll <a href="#page 84">84</a><br>
<i>Mysol</i> <a href="#page 129">129</a><br>
<br>
Namourrek group <a href="#page 84">84</a><br>
<i>Natunas</i> <a href="#page 133">133</a><br>
Navigator archipelago, elevation of <a href="#page 99">99</a><br>
<i>Navigator archipelago</i> <a href="#page 117">117</a><br>
<i>Nederlandisch</i> <a href="#page 120">120</a><br>
Nelson, Lieutenant, on the consolidation of coral-rocks under water
<a href="#page 59">59</a><br>
—— theory of coral-formations <a href="#page 73">
73</a><br>
—— on the Bermuda islands <a href="#page 154">
154</a><br>
<i>New Britain</i> <a href="#page 124">124</a><br>
New Caledonia, steepness of its reefs <a href="#page 39">39</a><br>
—— —— barrier-reef of <a href="#page 44">
</a>, <a href="#page 79">79</a>, <a href="#page 83">83</a>, <a
href="#page 93">93</a><br>
<i>New Caledonia</i> <a href="#page 123">123</a><br>
<i>New Guinea (E. end)</i> <a href="#page 124">124</a><br>
<i>New Guinea (W. end)</i> <a href="#page 127">127</a><br>
<i>New Hanover</i> <a href="#page 124">124</a><br>
New Hebrides, recently elevated <a href="#page 100">100</a><br>
<i>New Hebrides</i> <a href="#page 121">121</a><br>
New Ireland, recently elevated <a href="#page 100">100</a><br>
<i>New Ireland</i> <a href="#page 124">124</a><br>
<i>New Nantucket</i> <a href="#page 116">116</a><br>
<i>Nicobar islands</i> <a href="#page 132">132</a><br>
<i>Niouha</i> <a href="#page 119">119</a><br>
Nulliporæ at Keeling atoll <a href="#page 18">18</a><br>
—— on the reefs of atolls <a href="#page 28">28</a><br>
—— on barrier-reefs <a href="#page 39">39</a><br>
—— their wide distribution and abundance <a href=
"#page 68">68</a><br>
<br>
Objections to the theory of subsidence <a href="#page 87">7</a><br>
<i>Ocean islands</i> <a href="#page 117">117</a>, <a href=
"#page 121">121</a><br>
<i>Ono</i> <a href="#page 120">120</a><br>
<i>Onouafu (Onouafou)</i> <a href="#page 119">119</a><br>
<i>Ormuz</i> <a href="#page 143">143</a><br>
<i>Oscar group</i> <a href="#page 120">120</a><br>
Oscillations of level <a href="#page 103">103</a>, <a href=
"#page 108">108</a><br>
<i>Ouallan, or Ualan (Oualan)</i> <a href="#page 125">125</a><br>
Ouluthy atoll <a href="#page 60">60</a><br>
<i>Outong Java</i> <a href="#page 124">124</a><br>
<br>
<i>Palawan, S.W. coast <a href="#page 133">133</a><br>
—— N.W. coast <a href="#page 134">134</a><br>
—— western bank <a href="#page 136">136</a><br>
</i> Palmerston <a href="#page 114">114</a><br>
<i>Palmyra</i> <a href="#page 116">116</a><br>
<i>Paracells</i> <a href="#page 136">136</a><br>
<i>Paraquas</i> <a href="#page 136">136</a><br>
<i>Patchow</i> <a href="#page 135">135</a><br>
<i>Pelew islands</i> <a href="#page 126">126</a><br>
Pemba island, singular form of <a href="#page 102">102</a><br>
<i>Pemba</i> <a href="#page 142">142</a><br>
<i>Penrhyn</i> <a href="#page 115">115</a><br>
<i>Peregrino</i> <a href="#page 115">115</a><br>
Pernambuco, bar of sandstone at <a href="#page 47">47</a><br>
Persian gulf, recently elevated <a href="#page 102">102</a><br>
<i>Persian gulf</i> <a href="#page 143">143</a><br>
Pescado <a href="#page 115">115</a><br>
<i>Pescadores</i> <a href="#page 135">135</a><br>
<i>Peyster group</i> <a href="#page 120">120</a><br>
<i>Philip</i> <a href="#page 126">126</a><br>
Philippine archipelago, recently elevated <a href="#page 101">
101</a><br>
<i>Philippine archipelago</i> <a href="#page 134">134</a><br>
<i>Phœnix</i> <a href="#page 116">116</a><br>
<i>Piguiram</i> <a href="#page 126">126</a><br>
<i>Pitcairn</i> <a href="#page 112">112</a><br>
Pitt's bank <a href="#page 86">86</a><br>
<i>Pitt island</i> <a href="#page 120">120</a><br>
<i>Platte</i> <a href="#page 139">139</a><br>
<i>Pleasant</i> <a href="#page 121">121</a><br>
Porites, chief coral on margin of Keeling atoll <a href="#page 16">
16</a><br>
<i>Postillions</i> <a href="#page 131">131</a><br>
Pouynipète <a href="#page 95">95</a><br>
—— its probable subsidence <a href="#page 95">
95</a><br>
<i>Pouynipète</i> <a href="#page 125">125</a><br>
<i>Pratas shoal</i> <a href="#page 135">135</a><br>
<i>Proby</i> <a href="#page 119">119</a><br>
<i>Providence</i> <a href="#page 139">139</a><br>
<i>Puerto Rico</i> <a href="#page 152">152</a><br>
<i>Pulo Anna</i> <a href="#page 126">126</a><br>
Pumice floated to coral-islands <a href="#page 88">88</a><br>
<i>Pylstaart</i> <a href="#page 118">118</a><br>
Pyrard de Laval, astonishment at the atolls in the Indian Ocean <a
href="#page 11">11</a><br>
<br>
Quoy and Gaimard, depths at which corals live <a href="#page 66">
66</a><br>
—— description of reefs applicable only to
fringing-reefs <a href="#page 98">98</a><br>
<br>
Range of atolls <a href="#page 94">94</a><br>
<i>Rapa</i> <a href="#page 115">115</a><br>
<i>Rearson</i> <a href="#page 115">115</a><br>
Red Sea, banks of rock coated by reefs <a href="#page 49">
49</a><br>
—— proofs of its recent elevation <a href="#page 102">
102</a><br>
—— supposed subsidence of <a href="#page 103">
103</a><br>
<i>Red Sea</i> <a href="#page 143">143</a><br>
Reefs, irregular in shallow seas <a href="#page 49">49</a><br>
—— rising to the surface in some lagoons and all
submerged in others <a href="#page 55">55</a><br>
—— their distribution <a href="#page 50">50</a><br>
—— their absence from some coasts <a href="#page 51">
51</a><br>
<i>Revilla-gigedo</i> <a href="#page 111">111</a><br>
Ring-formed reefs of the Maldiva atolls, and theory of <a href=
"#page 34"></a>, <a href="#page 80">80</a><br>
<i>Rodriguez</i> <a href="#page 138">138</a><br>
<i>Rosario</i> <a href="#page 127">127</a><br>
<i>Rose island</i> <a href="#page 118">118</a><br>
<i>Rotches</i> <a href="#page 120">120</a><br>
<i>Rotoumah</i> <a href="#page 120">120</a><br>
<i>Roug</i> <a href="#page 125">125</a><br>
<i>Rowley shoals</i> <a href="#page 130">130</a><br>
Rüppell, Dr., on the recent deposits of Red Sea <a href=
"#page 102">102</a><br>
<br>
<i>Sable, ile de</i> <a href="#page 138">138</a><br>
<i>Sahia de Malha</i> <a href="#page 137">137</a><br>
<i>St. Pierre</i> <a href="#page 139">139</a><br>
<i>Sala</i> <a href="#page 111">111</a><br>
<i>Salomon (Solomon) archipelago</i> <a href="#page 123">
123</a><br>
Samoa, or Navigator archipelago, elevation of <a href="#page 99">
99</a><br>
<i>Samoa archipelago</i> <a href="#page 117">117</a><br>
Sand-bars parallel to coasts <a href="#page 46">46</a><br>
<i>Sandal-wood</i> <a href="#page 129">129</a><br>
Sandwich archipelago, recently elevated <a href="#page 98">
98</a><br>
<i>Sandwich archipelago</i> <a href="#page 117">117</a><br>
<i>Sanserot</i> <a href="#page 126">126</a><br>
<i>Santa-Cruz group</i> <a href="#page 122">122</a><br>
Savage island, recently elevated <a href="#page 59">59</a>, <a
href="#page 99">99</a>, <a href="#page 104">104</a><br>
<i>Savage</i> <a href="#page 118">118</a><br>
<i>Savu</i> <a href="#page 129">129</a><br>
<i>Saya, or Sahia de Malha</i> <a href="#page 137">137</a><br>
<i>Scarborough shoal</i> <a href="#page 136">136</a><br>
Scarus feeding on corals <a href="#page 21">21</a><br>
<i>Schouten</i> <a href="#page 124">124</a><br>
<i>Scilly</i> <a href="#page 113">113</a><br>
Scoriæ floated to coral-islands <a href="#page 89">89</a><br>
<i>Scott's reef</i> <a href="#page 130">130</a><br>
Sections of islands encircled by barrier-reefs <a href="#page 43">
43</a>, <a href="#page 176">176</a><br>
—— of Bolabola <a href="#page 76">76</a><br>
Sediment in Keeling lagoon <a href="#page 21">21</a><br>
—— in other atolls <a href="#page 29">29</a>, <a href=
"#page 35">35</a><br>
—— injurious to corals <a href="#page 53">53</a><br>
—— transported from coral-islands far seaward <a href=
"#page 89">89</a><br>
<i>Seniavine</i> <a href="#page 125">125</a><br>
<i>Serangani</i> <a href="#page 129">129</a><br>
<i>Seychelles</i> <a href="#page 138">138</a><br>
Ship-bottom quickly coated with coral <a href="#page 62">62</a><br>
<i>Smyth island</i> <a href="#page 116">116</a><br>
Society archipelago, stationary condition of <a href="#page 96">
96</a><br>
—— alleged proofs of recent elevation <a href=
"#page 103">103</a><br>
<i>Society archipelago</i> <a href="#page 112">112</a><br>
<i>Socotra</i> <a href="#page 143">143</a><br>
<i>Solor</i> <a href="#page 130">130</a><br>
Sooloo islands, recently elevated <a href="#page 101">101</a><br>
<i>Sooloo islands</i> <a href="#page 133">133</a><br>
<i>Souvaroff</i> <a href="#page 115">115</a><br>
<i>Spanish</i> <a href="#page 126">126</a><br>
Sponge, depths at which found <a href="#page 67">67</a><br>
<i>Starbuck (Slarbuck)</i> <a href="#page 115">115</a><br>
Stones transported in roots of trees <a href="#page 89">89</a><br>
Storms, effects of, on coral-islands <a href="#page 74">74</a><br>
Stutchbury, Mr., on the growth of an Agaricia <a href="#page 63">
63</a><br>
—— on upraised corals in Society archipelago <a href=
"#page 103">103</a><br>
Subsidence of Keeling atoll <a href="#page 28">28</a><br>
—— extreme slowness of <a href="#page 87">87</a>, <a
href="#page 108">108</a><br>
—— areas of, apparently elongated <a href="#page 106">
106</a><br>
—— areas of immense <a href="#page 106">106</a><br>
—— great amount of <a href="#page 108">108</a><br>
<i>Suez, gulf of</i> <a href="#page 147">147</a><br>
<i>Sulphur islands</i> <a href="#page 127">127</a><br>
Sumatra, recently elevated <a href="#page 100">100</a><br>
<i>Sumatra</i> <a href="#page 132">132</a><br>
<i>Sumbawa</i> <a href="#page 130">130</a><br>
Surf favourable to the growth of massive corals <a href="#page 52">
52</a><br>
<i>Swallow shoal</i> <a href="#page 136">136</a><br>
<i>Sydney island</i> <a href="#page 116">116</a><br>
<br>
Tahiti, alleged proofs of its recent elevation <a href="#page 103">
103</a><br>
<i>Tahiti</i> <a href="#page 112">112</a><br>
Temperature of the sea at the Galapagos archipelago <a href=
"#page 51">51</a><br>
<i>Tenasserim</i> <a href="#page 133">133</a><br>
<i>Tenimber island</i> <a href="#page 128">128</a><br>
<i>Teturoa</i> <a href="#page 113">113</a><br>
Theories on coral-formations <a href="#page 69">69</a>, <a href=
"#page 73">73</a><br>
Theory of subsidence, and objections to <a href="#page 72">72</a>,
<a href="#page 86">86</a><br>
Thickness, vertical, of barrier-reefs <a href="#page 43">43</a>, <a
href="#page 76">76</a><br>
<i>Thomas, St.</i> <a href="#page 153">153</a><br>
<i>Tikopia</i> <a href="#page 122">122</a><br>
Timor, recently elevated <a href="#page 100">100</a><br>
<i>Timor</i> <a href="#page 129">129</a><br>
<i>Timor-laut</i> <a href="#page 128">128</a><br>
<i>Tokan-Bessees</i> <a href="#page 131">131</a><br>
<i>Tongatabou</i> <a href="#page 118">118</a><br>
<i>Tonquin</i> <a href="#page 137">137</a><br>
<i>Toubai</i> <a href="#page 113">113</a><br>
<i>Toufoa (Toofoa)</i> <a href="#page 119">119</a><br>
<i>Toupoua</i> <a href="#page 122">122</a><br>
Traditions of change in coral-islands <a href="#page 73">73</a><br>
Tridacnæ embedded in coral-rock <a href="#page 63">63</a><br>
—— left exposed in the Low archipelago <a href=
"#page 96">96</a><br>
Tubularia, quick growth of <a href="#page 63">63</a><br>
<i>Tumbelan</i> <a href="#page 133">133</a><br>
<i>Turneffe reef</i> <a href="#page 152">152</a><br>
<i>Turtle</i> <a href="#page 119">119</a><br>
<br>
<i>Ualan</i> <a href="#page 125">125</a><br>
<br>
Vanikoro, section of <a href="#page 43">43</a><br>
—— its state and changes in its reefs <a href=
"#page 95">95</a><br>
<i>Vanikoro</i> <a href="#page 122">122</a><br>
<i>Vine reef</i> <a href="#page 125">125</a><br>
<i>Virgin Gorda</i> <a href="#page 153">153</a><br>
<i>Viti archipelago</i> <a href="#page 119">119</a><br>
Volcanic islands, with living corals on their shores <a href=
"#page 51">51</a><br>
—— matter, probably not associated with thick masses of
coral-rock <a href="#page 88">88</a><br>
Volcanoes, authorities for their position on the map <a href=
"#page 90">90</a><br>
—— their presence determined by the movements in
progress <a href="#page 104">104</a><br>
—— absent or extinct in the areas of subsidence <a
href="#page 105">105</a><br>
<br>
<i>Waigiou</i> <a href="#page 128">128</a><br>
<i>Wallis island</i> <a href="#page 119">119</a><br>
<i>Washington</i> <a href="#page 116">116</a><br>
<i>Wells' reef</i> <a href="#page 123">123</a><br>
Wellstead, Lieutenant, account of a ship coated with corals <a
href="#page 62">62</a><br>
West Indies, banks of sediment fringed by reefs <a href="#page 49">
49</a><br>
—— recently elevated <a href="#page 102">102</a><br>
<i>West Indies</i> <a href="#page 147">147</a><br>
Whitsunday island, view of <a href="#page 12">12</a><br>
—— changes in its state <a href="#page 74">74</a><br>
Williams, Rev. J., on traditions of the natives regarding
coral-islands <a href="#page 74">74</a><br>
—— on antiquity of certain corals <a href="#page 64">
64</a><br>
<i>Wolchonsky</i> <a href="#page 111">111</a><br>
<i>Wostock</i> <a href="#page 115">115</a><br>
<br>
<i>Xulla islands</i> <a href="#page 128">128</a><br>
<br>
<i>York island</i> <a href="#page 116">116</a><br>
<i>Yucutan, coast of</i> <a href="#page 151">151</a><br>
<br>
Zones of different kinds of corals outside the same reefs <a href=
"#page 55">55</a>, <a href="#page 60">60</a><br>
</small></p>
<center>END OF CORAL REEFS<br><br>
<a href="volcan.html">Volcanic Islands</a><br>
<a href="southam.html">South American Geology</a> </center>
</body>
</html>
|
lucashmorais/x-Bench
|
zip/testes/corals.html
|
HTML
|
mit
| 585,517
|
package x7c1.wheat.modern.database
import android.database.sqlite.SQLiteDatabase
import x7c1.wheat.macros.database.{Query, TypedCursor, TypedFields}
trait QueryPlanColumn extends TypedFields {
def detail: String
}
case class QueryPlan(detail: String){
def useTempBtree: Boolean = {
detail contains "USE TEMP B-TREE"
}
}
class QueryExplainer(db: SQLiteDatabase){
def explain(query: Query): Seq[QueryPlan] = {
val rawCursor = db.rawQuery(query.toExplain.sql, query.selectionArgs)
val cursor = TypedCursor[QueryPlanColumn](rawCursor)
try {
0 until rawCursor.getCount flatMap { n =>
cursor.moveToFind(n){
QueryPlan(detail = cursor.detail)
}
}
} finally {
rawCursor.close()
}
}
}
object QueryExplainer {
def apply(db: SQLiteDatabase): QueryExplainer = new QueryExplainer(db)
}
|
x7c1/Linen
|
wheat-modern/src/main/scala/x7c1/wheat/modern/database/Query.scala
|
Scala
|
mit
| 857
|
package conf
import (
"github.com/sirupsen/logrus"
)
// Logger is a configuration struct to define logger's behaviour
type Logger struct {
Level string `yaml:"level" default:"info"`
Format string `yaml:"format" default:"text"`
}
// Configure takes the configuration for the logger and translats it to
// logrus's usage
func (c Logger) Configure() {
SetFormatter(c.Format)
SetLogLevel(c.Level)
}
// SetLogLevel sets the logging level when possible, otherwise it fallbacks to
// the default logrus level and logs a warning
func SetLogLevel(lvl string) {
l, err := logrus.ParseLevel(lvl)
if err != nil {
logrus.WithField("provided", lvl).Warn("Invalid log level, fallback to Info level")
logrus.SetLevel(logrus.InfoLevel)
} else {
logrus.SetLevel(l)
}
}
// SetFormatter defines the way logs are formatted
func SetFormatter(format string) {
switch format {
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
case "text":
logrus.SetFormatter(&logrus.TextFormatter{})
default:
logrus.SetFormatter(&logrus.TextFormatter{})
}
}
|
Depado/gomonit
|
conf/logger.go
|
GO
|
mit
| 1,059
|
//-----------------------------------------------------------------------
// <copyright file="IBusinessObject.cs" company="Marimer LLC">
// Copyright (c) Marimer LLC. All rights reserved.
// Website: http://www.lhotka.net/cslanet/
// </copyright>
// <summary>This is the core interface implemented</summary>
//-----------------------------------------------------------------------
namespace Csla.Core
{
/// <summary>
/// This is the core interface implemented
/// by all CSLA .NET base classes.
/// </summary>
public interface IBusinessObject
{
/// <summary>
/// Gets a value representing this object instance's
/// unique identity value within the business object
/// graph.
/// </summary>
int Identity { get; }
}
}
|
ronnymgm/csla-light
|
Source/Csla.Shared/Core/IBusinessObject.cs
|
C#
|
mit
| 763
|
import cPickle
import numpy as np
import cv2
def unpickle(file):
fo = open(file, 'rb')
dict = cPickle.load(fo)
fo.close()
return dict
files = ['../../datasets/svhn/cifar-10-batches-py/data_batch_1']
dict = unpickle(files[0])
images = dict['data'].reshape(-1, 3, 32, 32)
labels = np.array(dict['labels'])
images = np.swapaxes(images, 1, 3)
#images[0] = cv2.cvtColor(images[0], cv2.COLOR_RGB2BGR)
cv2.imshow("", images[1000])
cv2.waitKey(0)
cv2.destroyAllWindows()
|
penny4860/SVHN-deep-digit-detector
|
tests/cifar_loader.py
|
Python
|
mit
| 487
|
MagPi for BlackBerry
--------------------
MagPi client for BlackBerry. Read MagPi issues with your device :)
License
-------
This software is released under MIT License. Copyright (c) 2013 MagPi <emailthemagpi@gmail.com>, Andrea Stagi <stagi.andrea@gmail.com>
|
astagi/magpi-bb10
|
README.md
|
Markdown
|
mit
| 263
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* General page setup
*/
#dt_example {
font: 80%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
color: #333;
background-color: #fff;
}
#dt_example #demo {
margin: 30px auto 0 auto;
}
#dt_example .demo_jui {
margin: 30px auto 0 auto;
}
#dt_example .big {
font-size: 1.3em;
font-weight: bold;
line-height: 1.6em;
color: #4E6CA3;
}
#dt_example .spacer {
height: 20px;
clear: both;
}
#dt_example .clear {
clear: both;
}
#dt_example pre {
padding: 15px;
background-color: #F5F5F5;
border: 1px solid #CCCCCC;
}
#dt_example h1 {
margin-top: 2em;
font-size: 1.3em;
font-weight: normal;
line-height: 1.6em;
color: #4E6CA3;
border-bottom: 1px solid #B0BED9;
clear: both;
}
#dt_example h2 {
font-size: 1.2em;
font-weight: normal;
line-height: 1.6em;
color: #4E6CA3;
clear: both;
}
#dt_example a {
color: #0063DC;
text-decoration: none;
}
#dt_example a:hover {
text-decoration: underline;
}
#dt_example ul {
color: #B0BED9;
}
.css_right {
float: right;
}
.css_left {
float: left;
}
|
summea/quiet-content
|
app/webroot/css/demo_page.css
|
CSS
|
mit
| 1,134
|
/* Copyright (c) 2015 Connectal Project
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <sys/mman.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
#include "TestRequest.h"
#include "TestIndication.h"
#include "dmac.h"
#ifdef SIMULATION
int arraySize = 1024;
#else
int arraySize = 1024;
#endif
int numchannels = 1;
int numIters = 1;
int writeReqBytes = 256;
int readReqBytes = 256;
class TestTop : public TestIndicationWrapper
{
public:
virtual void read_version_resp(uint32_t a) {
fprintf(stderr, "read version %d\n", a);
}
virtual void read_txpktbuf_debug_resp(uint8_t p, uint64_t a, uint64_t b, uint64_t c, uint64_t d) {
fprintf(stderr, "Port %d: sop_enq: %ld sop_deq: %ld eop_enq: %ld eop_deq: %ld\n", p, a, b, c, d);
}
virtual void read_rxpktbuf_debug_resp(uint8_t p, uint64_t a, uint64_t b, uint64_t c, uint64_t d) {
fprintf(stderr, "Port %d: sop_enq: %ld sop_deq: %ld eop_enq: %ld eop_deq: %ld\n", p, a, b, c, d);
}
virtual void read_ring2mac_debug_resp(uint8_t p, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e) {
fprintf(stderr, "Ring2Mac %d: bytes: %ld sop: %ld eop: %ld idles: %ld total: %ld\n", p, a, b, c, d, e);
}
virtual void read_mac2ring_debug_resp(uint8_t p, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e) {
fprintf(stderr, "Mac2Ring %d: bytes: %ld sop: %ld eop: %ld idles: %ld total: %ld\n", p, a, b, c, d, e);
}
TestTop(unsigned int id) : TestIndicationWrapper(id) {}
};
static TestRequestProxy *device = 0;
class ChannelWorker : public DmaCallback {
DmaChannel *channel;
int channelNumber;
int numReads;
int numWrites;
int waitCount;
DmaBuffer *buffers[4];
static void *threadfn(void *c);
void run();
static volatile int started;
static pthread_t *threads;
public:
ChannelWorker(int channelNumber)
: channelNumber(channelNumber), numReads(0), numWrites(0), waitCount(0) {
channel = new DmaChannel(channelNumber, this);
fprintf(stderr, "[%s:%d] channel %d allocating buffers\n", __FUNCTION__, __LINE__, channelNumber);
for (int i = 0; i < 4; i++) {
buffers[i] = new DmaBuffer(4096);
//memset(buffers[i]->buffer(), 0xba, arraySize);
char * p = buffers[i]->buffer();
for ( int j = 0 ; j < arraySize ; j ++)
p[j] = (char) j;
channel->setObjTransferFromFpga(i, buffers[i]->reference());
}
}
double linkUtilization(int32_t cycles, int inclHeaders = 0) {
double dataBeats = (double)arraySize/16;
int headerBeats = 0;
if (inclHeaders) {
headerBeats = arraySize / writeReqBytes;
}
double totalBeats = dataBeats + headerBeats;
return totalBeats / (double)(-cycles);
}
void transferToFpgaDone (const uint8_t tag) {
numReads--;
if (numReads) {
fprintf(stderr, "[%s:%d] channel %d requesting dma transferToFpga size=%d\n", __FUNCTION__, __LINE__, channelNumber, arraySize);
// int tag = 0;
channel->transferToFpga(buffers[1], 0, arraySize, channelNumber);
}
}
void transferFromFpgaDone ( uint32_t sglId, uint32_t len ) {
if (0)
for (int i = 0; i < 4; i++) {
if (buffers[i]->reference() == sglId) {
for (int j = 0; j < 8; j++) {
fprintf(stderr, "%d: %016lx\n", j, *(uint64_t *)(buffers[i]->buffer() + j*8));
}
}
}
if (numWrites) {
fprintf(stderr, "[%s:%d] channel %d requesting dma transferFromFpga size=%d\n", __FUNCTION__, __LINE__, channelNumber, arraySize);
numWrites--;
}
}
static void runTest();
};
void *ChannelWorker::threadfn(void *c)
{
ChannelWorker *worker = (ChannelWorker *)c;
while (!started) {
// wait for other threads to be ready
}
worker->run();
return 0;
}
void ChannelWorker::run()
{
channel->setWriteRequestSize(writeReqBytes);
channel->setReadRequestSize(readReqBytes);
numReads = numWrites = numIters;
if (numReads) {
fprintf(stderr, "[%s:%d] channel %d requesting dma read size=%d\n", __FUNCTION__, __LINE__, channelNumber, arraySize);
// int tag = 0;
channel->transferToFpga(buffers[1], 0, arraySize, channelNumber);
waitCount++;
}
while (numReads > 0 && numWrites > 0) {
channel->checkIndications();
}
}
volatile int ChannelWorker::started = 0;
pthread_t *ChannelWorker::threads = 0;
void ChannelWorker::runTest()
{
started = 0;
threads = new pthread_t[numchannels];
for (int i = 0; i < numchannels; i++) {
ChannelWorker * worker = new ChannelWorker(i);
pthread_create(&threads[i], 0, worker->threadfn, worker);
}
started = 1;
// wait for threads to exit
for (int i = 0; i < numchannels; i++) {
void *ret;
pthread_join(threads[i], &ret);
fprintf(stderr, "thread exited ret=%p\n", ret);
}
}
int main(int argc, char * const*argv)
{
int opt;
while ((opt = getopt(argc, argv, "R:W:i:s:n:")) != -1) {
switch (opt) {
case 'W':
writeReqBytes = strtoul(optarg, 0, 0);
if (writeReqBytes > 1024)
writeReqBytes = 1024;
break;
case 'R':
readReqBytes = strtoul(optarg, 0, 0);
if (readReqBytes > 1024)
readReqBytes = 1024;
break;
case 'i':
numIters = strtoul(optarg, 0, 0);
break;
case 's': {
char *endptr = 0;
arraySize = strtoul(optarg, &endptr, 0);
if (endptr) {
switch (*endptr) {
case 'K':
arraySize *= 1024;
break;
case 'M':
arraySize *= 1024*1024;
break;
default:
break;
}
}
} break;
case 'n':
numchannels = strtoul(optarg, 0, 0);
break;
default:
fprintf(stderr,
"Usage: %s [-r] [-w] [-s transferSize]\n"
" -r read only\n"
" -r write only\n",
argv[0]);
exit(EXIT_FAILURE);
}
}
TestTop indication (IfcNames_TestIndicationH2S);
device = new TestRequestProxy(IfcNames_TestRequestS2H);
ChannelWorker::runTest();
while(1) {
device->read_txpktbuf_debug(0);
device->read_rxpktbuf_debug(0);
device->read_ring2mac_debug(0);
device->read_mac2ring_debug(0);
sleep(2);
fprintf(stderr, "\n");
}
return 0;
}
|
hanw/sonic-lite
|
hw/tests/test_dma_phy/testdma.cpp
|
C++
|
mit
| 7,962
|
# -*- encoding: utf-8 -*-
from supriya.tools.ugentools.UGen import UGen
class TDelay(UGen):
r'''A trigger delay.
::
>>> source = ugentools.Dust.kr()
>>> tdelay = ugentools.TDelay.ar(
... duration=0.1,
... source=source,
... )
>>> tdelay
TDelay.ar()
'''
### CLASS VARIABLES ###
__documentation_section__ = 'Trigger Utility UGens'
__slots__ = ()
_ordered_input_names = (
'source',
'duration',
)
_valid_calculation_rates = None
### INITIALIZER ###
def __init__(
self,
calculation_rate=None,
duration=0.1,
source=None,
):
UGen.__init__(
self,
calculation_rate=calculation_rate,
duration=duration,
source=source,
)
### PUBLIC METHODS ###
@classmethod
def ar(
cls,
duration=0.1,
source=None,
):
r'''Constructs an audio-rate TDelay.
::
>>> source = ugentools.Dust.kr()
>>> tdelay = ugentools.TDelay.ar(
... duration=0.1,
... source=source,
... )
>>> tdelay
TDelay.ar()
Returns ugen graph.
'''
from supriya.tools import synthdeftools
calculation_rate = synthdeftools.CalculationRate.AUDIO
ugen = cls._new_expanded(
calculation_rate=calculation_rate,
duration=duration,
source=source,
)
return ugen
@classmethod
def kr(
cls,
duration=0.1,
source=None,
):
r'''Constructs a control-rate TDelay.
::
>>> source = ugentools.Dust.kr()
>>> tdelay = ugentools.TDelay.kr(
... duration=0.1,
... source=source,
... )
>>> tdelay
TDelay.kr()
Returns ugen graph.
'''
from supriya.tools import synthdeftools
calculation_rate = synthdeftools.CalculationRate.CONTROL
ugen = cls._new_expanded(
calculation_rate=calculation_rate,
duration=duration,
source=source,
)
return ugen
### PUBLIC PROPERTIES ###
@property
def duration(self):
r'''Gets `duration` input of TDelay.
::
>>> source = ugentools.Dust.kr()
>>> tdelay = ugentools.TDelay.ar(
... duration=0.1,
... source=source,
... )
>>> tdelay.duration
0.1
Returns ugen input.
'''
index = self._ordered_input_names.index('duration')
return self._inputs[index]
@property
def source(self):
r'''Gets `source` input of TDelay.
::
>>> source = ugentools.Dust.kr()
>>> tdelay = ugentools.TDelay.ar(
... duration=0.1,
... source=source,
... )
>>> tdelay.source
OutputProxy(
source=Dust(
calculation_rate=CalculationRate.CONTROL,
density=0.0
),
output_index=0
)
Returns ugen input.
'''
index = self._ordered_input_names.index('source')
return self._inputs[index]
|
andrewyoung1991/supriya
|
supriya/tools/ugentools/TDelay.py
|
Python
|
mit
| 3,463
|
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "TootList.settings.local")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
gkoehler/TootList
|
TootList/manage.py
|
Python
|
mit
| 257
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>monae: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.11.1 / monae - 0.0.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
monae
<small>
0.0.1
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-02-09 07:07:27 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-09 07:07:27 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
coq 8.11.1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.11.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.11.2 Official release 4.11.2
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
name: "coq-monae"
maintainer: "reynald.affeldt@aist.go.jp"
homepage: "https://github.com/affeldt-aist/monae"
bug-reports: "https://github.com/affeldt-aist/monae/issues"
dev-repo: "git+https://github.com/affeldt-aist/monae.git"
license: "GPLv3"
authors: [
"Reynald Affeldt"
"David Nowak"
"Takafumi Saikawa"
]
build: [
["coq_makefile" "-f" "_CoqProject" "-o" "Makefile"]
[make]
]
install: [
[make "install"]
]
depends: [
"coq" { (>= "8.9.1" & < "8.10.0~") }
"coq-infotheo" { (>= "0.0.1" & < "0.0.4") }
]
synopsis: "Monae"
description: """
This repository contains a formalization of monads including several
models, examples of monadic equational reasoning, and an application
to program semantics.
"""
url {
http: "https://github.com/affeldt-aist/monae/archive/0.0.1.tar.gz"
checksum: "md5=098f07dde98231f5068b9d0b09670dc3"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-monae.0.0.1 coq.8.11.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.1).
The following dependencies couldn't be met:
- coq-monae -> coq < 8.10.0~ -> ocaml < 4.10
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-monae.0.0.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.11.2-2.0.7/released/8.11.1/monae/0.0.1.html
|
HTML
|
mit
| 6,703
|
package main
import (
"encoding/gob"
"encoding/json"
"log"
"os"
"sort"
"github.com/tsenart/vegeta/lib"
)
func main() {
var res vegeta.Results
if err := gob.NewDecoder(os.Stdin).Decode(&res); err != nil {
log.Fatal(err)
}
sort.Sort(res)
if err := json.NewEncoder(os.Stdout).Encode(res); err != nil {
log.Fatal(err)
}
}
|
bgentry/vegeta-encoder
|
main.go
|
GO
|
mit
| 337
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module Alder.Html.Internal
( -- * Elements
Node(..)
-- * Attributes
, Id
, Handlers
, Attributes(..)
, defaultAttributes
-- * Html
, Html
, HtmlM(..)
, runHtml
, parent
, leaf
, text
-- * Event handlers
, EventType(..)
, Event(..)
, Handler(..)
-- * Setting attributes
, Attribute
, Attributable
, (!)
, (!?)
, (!#)
, (!.)
, (!?.)
, key
-- * Creating attributes
, attribute
, boolean
, onEvent
) where
import Control.Applicative
import Data.DList as DList
import Data.Hashable
import Data.HashMap.Strict as HashMap hiding ((!))
import Data.Monoid
import Data.Text as Text
import Data.Tree
import Unsafe.Coerce
import Alder.JavaScript
infixl 1 !, !?, !#, !., !?.
data Node
= Element !Text Attributes
| Text !Text
type Id = Text
type Handlers = HashMap EventType (JSObj -> IO ())
data Attributes = Attributes
{ elementId :: !(Maybe Id)
, elementKey :: !(Maybe Int)
, elementClass :: ![Text]
, otherAttributes :: !(HashMap Text Text)
, handlers :: !Handlers
}
defaultAttributes :: Attributes
defaultAttributes = Attributes
{ elementId = Nothing
, elementKey = Nothing
, elementClass = []
, otherAttributes = HashMap.empty
, handlers = HashMap.empty
}
type Html = HtmlM ()
newtype HtmlM a = HtmlM (Attributes -> DList (Tree Node))
deriving (Monoid)
instance Functor HtmlM where
fmap _ = unsafeCoerce
instance Applicative HtmlM where
pure _ = mempty
(<*>) = appendHtml
instance Monad HtmlM where
return _ = mempty
(>>) = appendHtml
m >>= k = m `appendHtml` k (error "Alder.HtmlM: monadic bind")
appendHtml :: HtmlM a -> HtmlM b -> HtmlM c
appendHtml a b = unsafeCoerce a <> unsafeCoerce b
runHtml :: Html -> Forest Node
runHtml (HtmlM f) = DList.toList (f defaultAttributes)
parent :: Text -> Html -> Html
parent t h = HtmlM $ \a -> DList.singleton (Node (Element t a) (runHtml h))
leaf :: Text -> Html
leaf t = HtmlM $ \a -> DList.singleton (Node (Element t a) [])
text :: Text -> Html
text t = HtmlM $ \_ -> DList.singleton (Node (Text t) [])
addAttribute :: Attribute -> HtmlM a -> HtmlM a
addAttribute (Attribute f) (HtmlM g) = HtmlM (g . f)
data EventType
= KeyDown | KeyPress | KeyUp
| Focus | Blur
| Input | Change
| Submit
| MouseDown | MouseUp | Click | DoubleClick | MouseMove | MouseEnter | MouseLeave
deriving (Eq, Ord, Read, Show, Enum, Bounded)
instance Hashable EventType where
hashWithSalt s = hashWithSalt s . fromEnum
class Event e where
extractEvent :: JSObj -> IO e
class Handler f where
fire :: f e -> e -> IO ()
newtype Attribute = Attribute (Attributes -> Attributes)
instance Monoid Attribute where
mempty = Attribute id
mappend (Attribute f) (Attribute g) = Attribute (f . g)
class Attributable h where
(!) :: h -> Attribute -> h
instance Attributable (HtmlM a) where
(!) = flip addAttribute
instance Attributable h => Attributable (r -> h) where
f ! a = (! a) . f
(!?) :: Attributable h => h -> (Bool, Attribute) -> h
h !? (p, a) = if p then h ! a else h
(!#) :: Attributable h => h -> Text -> h
h !# v = h ! Attribute addId
where
addId a = a { elementId = Just v }
(!.) :: Attributable h => h -> Text -> h
h !. v = h ! Attribute addClass
where
addClass a = a { elementClass = v : elementClass a }
(!?.) :: Attributable h => h -> (Bool, Text) -> h
h !?. (p, v) = if p then h !. v else h
key :: Int -> Attribute
key i = Attribute $ \a -> a { elementKey = Just i }
attribute :: Text -> Text -> Attribute
attribute k v = Attribute $ \a ->
a { otherAttributes = HashMap.insert k v (otherAttributes a) }
boolean :: Text -> Attribute
boolean k = attribute k ""
onEvent :: (Handler f, Event e) => EventType -> f e -> Attribute
onEvent k handler = Attribute $ \a ->
a { handlers = HashMap.insert k h (handlers a) }
where
h v = do
e <- extractEvent v
fire handler e
|
ghcjs/ghcjs-sodium
|
src/Alder/Html/Internal.hs
|
Haskell
|
mit
| 4,281
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>quickchick: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.10.0 / quickchick - 1.1.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
quickchick
<small>
1.1.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-12-09 07:56:05 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-09 07:56:05 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
coq 8.10.0 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.06.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.06.1 Official 4.06.1 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
version: "1.1.0"
maintainer: "llamp@seas.upenn.edu"
synopsis: "Randomized Property-Based Testing Plugin for Coq"
homepage: "https://github.com/QuickChick/QuickChick"
dev-repo: "git+https://github.com/QuickChick/QuickChick.git"
bug-reports: "https://github.com/QuickChick/QuickChick/issues"
license: "MIT"
build: [ make "-j%{jobs}%" ]
install: [ make "install" ]
depends: [
"ocaml" {>= "4.04.0"}
"coq" {>= "8.9" < "8.10~"}
"coq-ext-lib"
"coq-mathcomp-ssreflect"
"ocamlbuild"
"ocamlfind"
"coq-simple-io" {>= "1.0" < "1.1"}
]
authors: [
"Leonidas Lampropoulos <>"
"Zoe Paraskevopoulou <>"
"Maxime Denes <>"
"Catalin Hritcu <>"
"Benjamin Pierce <>"
"Li-yao Xia <>"
"Arthur Azevedo de Amorim <>"
"Yishuai Li <>"
"Antal Spector-Zabusky <>"
]
tags: [
"keyword:extraction"
"category:Miscellaneous/Coq Extensions"
"logpath:QuickChick"
]
url {
src: "https://github.com/QuickChick/QuickChick/archive/v1.1.0.tar.gz"
checksum: "md5=13c1d3bcaf1cfdf59867aa44652d8210"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-quickchick.1.1.0 coq.8.10.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.10.0).
The following dependencies couldn't be met:
- coq-quickchick -> coq < 8.10~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-quickchick.1.1.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.06.1-2.0.5/released/8.10.0/quickchick/1.1.0.html
|
HTML
|
mit
| 7,109
|
require_relative 'global_thread_pool_shared'
shared_examples :executor_service do
after(:each) do
subject.kill
subject.wait_for_termination(0.1)
end
it_should_behave_like :global_thread_pool
context '#post' do
it 'rejects the block while shutting down' do
latch = Concurrent::CountDownLatch.new(1)
subject.post{ sleep(1) }
subject.shutdown
begin
subject.post{ latch.count_down }
rescue Concurrent::RejectedExecutionError
end
expect(latch.wait(0.1)).to be_falsey
end
it 'rejects the block once shutdown' do
subject.shutdown
latch = Concurrent::CountDownLatch.new(1)
begin
subject.post{ latch.count_down }
rescue Concurrent::RejectedExecutionError
end
expect(latch.wait(0.1)).to be_falsey
end
end
context '#running?' do
it 'returns true when the thread pool is running' do
expect(subject).to be_running
end
it 'returns false when the thread pool is shutting down' do
subject.post{ sleep(1) }
subject.shutdown
subject.wait_for_termination(1)
expect(subject).not_to be_running
end
it 'returns false when the thread pool is shutdown' do
subject.shutdown
subject.wait_for_termination(1)
expect(subject).not_to be_running
end
it 'returns false when the thread pool is killed' do
subject.kill
subject.wait_for_termination(1)
expect(subject).not_to be_running
end
end
context '#shutdown' do
it 'stops accepting new tasks' do
latch1 = Concurrent::CountDownLatch.new(1)
latch2 = Concurrent::CountDownLatch.new(1)
subject.post{ sleep(0.2); latch1.count_down }
subject.shutdown
begin
expect(subject.post{ latch2.count_down }).to be_falsey
rescue Concurrent::RejectedExecutionError
end
expect(latch1.wait(1)).to be_truthy
expect(latch2.wait(0.2)).to be_falsey
end
it 'allows in-progress tasks to complete' do
latch = Concurrent::CountDownLatch.new(1)
subject.post{ sleep(0.1); latch.count_down }
subject.shutdown
expect(latch.wait(1)).to be_truthy
end
it 'allows pending tasks to complete' do
latch = Concurrent::CountDownLatch.new(2)
subject.post{ sleep(0.2); latch.count_down }
subject.post{ sleep(0.2); latch.count_down }
subject.shutdown
expect(latch.wait(1)).to be_truthy
end
end
context '#shutdown followed by #wait_for_termination' do
it 'allows in-progress tasks to complete' do
latch = Concurrent::CountDownLatch.new(1)
subject.post{ sleep(0.1); latch.count_down }
subject.shutdown
subject.wait_for_termination(1)
expect(latch.wait(1)).to be_truthy
end
it 'allows pending tasks to complete' do
q = Queue.new
5.times do |i|
subject.post { sleep 0.1; q << i }
end
subject.shutdown
subject.wait_for_termination(1)
expect(q.length).to eq 5
end
it 'stops accepting/running new tasks' do
expected = Concurrent::AtomicFixnum.new(0)
subject.post{ sleep(0.1); expected.increment }
subject.post{ sleep(0.1); expected.increment }
subject.shutdown
begin
subject.post{ expected.increment }
rescue Concurrent::RejectedExecutionError
end
subject.wait_for_termination(1)
expect(expected.value).to eq(2)
end
end
context '#kill' do
it 'stops accepting new tasks' do
expected = Concurrent::AtomicBoolean.new(false)
latch = Concurrent::CountDownLatch.new(1)
subject.post{ sleep(0.1); latch.count_down }
latch.wait(1)
subject.kill
begin
expect(subject.post{ expected.make_true }).to be_falsey
rescue Concurrent::RejectedExecutionError
end
sleep(0.1)
expect(expected.value).to be_falsey
end
it 'rejects all pending tasks' do
subject.post{ sleep(1) }
sleep(0.1)
subject.kill
sleep(0.1)
begin
expect(subject.post{ nil }).to be_falsey
rescue Concurrent::RejectedExecutionError
end
end
end
context '#wait_for_termination' do
it 'immediately returns true when no operations are pending' do
subject.shutdown
expect(subject.wait_for_termination(0)).to be_truthy
end
it 'returns true after shutdown has complete' do
10.times { subject << proc{ nil } }
sleep(0.1)
subject.shutdown
expect(subject.wait_for_termination(1)).to be_truthy
end
it 'returns true when shutdown sucessfully completes before timeout' do
subject.post{ sleep(0.5) }
sleep(0.1)
subject.shutdown
expect(subject.wait_for_termination(1)).to be_truthy
end
it 'returns false when shutdown fails to complete before timeout' do
unless subject.serialized?
100.times{ subject.post{ sleep(1) } }
sleep(0.1)
subject.shutdown
expect(subject.wait_for_termination(0)).to be_falsey
end
end
it 'waits forever when no timeout value is given' do
subject.post{ sleep(0.5) }
sleep(0.1)
subject.shutdown
expect(subject.wait_for_termination).to be_truthy
end
end
end
|
akihiro17/concurrent-ruby
|
spec/concurrent/executor/executor_service_shared.rb
|
Ruby
|
mit
| 5,255
|
package dhbw.object.calisthenics.minesweeper;
import java.io.IOException;
public class Start {
public static void main(String[] args) throws IOException {
UserInput userInput = new UserInput();
FieldGenerator fieldGenerator = new FieldGenerator();
Field field = fieldGenerator.next(null);
while(true){
field.print(System.out);
System.out.flush();
int target = userInput.nextTarget();
field.goUncover(target);
field.checkField();
}
}
}
|
marc1404/dhbw-object-calisthenics
|
src/dhbw/object/calisthenics/minesweeper/Start.java
|
Java
|
mit
| 550
|
/*
* Project: UHC
* Class: gg.uhc.uhc.modules.food.ExtendedSaturationModule
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Graham Howden <graham_howden1 at yahoo.co.uk>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package gg.uhc.uhc.modules.food;
import gg.uhc.uhc.modules.DisableableModule;
import gg.uhc.uhc.modules.ModuleRegistry;
import com.google.common.collect.ImmutableMap;
import org.bukkit.Material;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerItemConsumeEvent;
import java.util.List;
public class ExtendedSaturationModule extends DisableableModule implements Listener {
protected static final String MULTIPLIER_KEY = "mutliplier";
protected static final double DEFAULT_MULTIPLIER = 2.5D;
protected static final String ICON_NAME = "Extended Saturation";
protected double multiplier;
public ExtendedSaturationModule() {
setId("ExtendedSaturation");
this.iconName = ICON_NAME;
this.icon.setType(Material.COOKED_BEEF);
this.icon.setWeight(ModuleRegistry.CATEGORY_MISC);
}
public double getMultiplier() {
return multiplier;
}
public void setMultiplier(double multiplier) {
this.multiplier = multiplier;
config.set(MULTIPLIER_KEY, multiplier);
saveConfig();
rerender();
}
@Override
protected boolean isEnabledByDefault() {
return false;
}
@Override
public void initialize() throws InvalidConfigurationException {
if (!config.contains(MULTIPLIER_KEY)) {
config.set(MULTIPLIER_KEY, DEFAULT_MULTIPLIER);
}
if (!config.isDouble(MULTIPLIER_KEY) && !config.isInt(MULTIPLIER_KEY)) {
throw new InvalidConfigurationException(
"Invalid value at " + config.getCurrentPath() + ".multiplier (" + config.get(MULTIPLIER_KEY) + ")"
);
}
multiplier = config.getDouble(MULTIPLIER_KEY);
super.initialize();
}
@Override
protected List<String> getEnabledLore() {
return messages.evalTemplates(ENABLED_LORE_PATH, ImmutableMap.of("multiplier", multiplier));
}
@EventHandler(ignoreCancelled = true)
public void on(PlayerItemConsumeEvent event) {
if (isEnabled()) {
new SaturationMultiplierRunnable(
event.getPlayer().getUniqueId(),
event.getPlayer().getSaturation(),
multiplier - 1D
).runTask(plugin);
}
}
}
|
Eluinhost/UHC
|
src/main/java/gg/uhc/uhc/modules/food/ExtendedSaturationModule.java
|
Java
|
mit
| 3,657
|
# WHAT'S GOING ON IN HERE!?!?
WELL?
|
Bergenfrundt/WHATSGOINGONINHERE
|
README.md
|
Markdown
|
mit
| 36
|
package in.ac.iitm.students.activities.treasurehunt;
import android.Manifest;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.design.widget.Snackbar;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.android.volley.AuthFailureError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.squareup.picasso.Picasso;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import in.ac.iitm.students.R;
import in.ac.iitm.students.activities.AboutUsActivity;
import in.ac.iitm.students.activities.main.CameraActivity;
import in.ac.iitm.students.activities.main.HomeActivity;
import in.ac.iitm.students.fragments.CameraFragment;
import in.ac.iitm.students.objects.Clue;
import in.ac.iitm.students.objects.ClueList;
import in.ac.iitm.students.others.LogOutAlertClass;
import in.ac.iitm.students.others.LogUtils;
import in.ac.iitm.students.others.MySingleton;
import in.ac.iitm.students.others.UtilStrings;
import in.ac.iitm.students.others.Utils;
public class QuestionsActivity extends AppCompatActivity {
static final int MY_PERMISSION_REQUEST_CAMERA = 1024;
static final int MY_PERMISSION_REQUEST_WRITE_STORAGE = 2048;
static final int MY_PERMISSION_REQUEST_READ_STORAGE = 512;
TextView countdown;
SwipeRefreshLayout srl;
int returned_status;
SharedPreferences pref;
ProgressDialog progressDialog;
ArrayList<Button> buttonArrayList;
ArrayList<Button> skipArrayList;
ArrayList<String> clues;
ArrayList<Integer> clueIds;
ArrayList<Clue> clueArrayList;
ArrayList<TextView> textViews;
ArrayList<ImageView> imageViews;
ArrayList<View> cards;
int submit_perm_index;
int batch;
int cardCount;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layout_th_questions);
pref = getBaseContext().getSharedPreferences("MyPref", Context.MODE_PRIVATE);
if (pref.getAll().containsKey(UtilStrings.TIMESTAMP)) {
Utils.setup_drawer(this, R.id.drawer_layout, R.id.nav_view, R.id.toolbar, R.id.nav_treasure_hunt, 1);
} else {
Utils.setup_drawer(this, R.id.drawer_layout, R.id.nav_view, R.id.toolbar, R.id.nav_treasure_hunt, 0);
}
batch = Utils.getprefInt(UtilStrings.BATCH_NUM, getBaseContext());
cardCount = getCountForBatch(batch);
submit_perm_index = 0;
clues = new ArrayList<>();
clueIds = new ArrayList<>();
clueArrayList = new ArrayList<>();
textViews = new ArrayList<>();
imageViews = new ArrayList<>();
cards = new ArrayList<>();
buttonArrayList = new ArrayList<>();
skipArrayList = new ArrayList<>();
for (int i = 0; i < cardCount; i++) {
clues.add(" ");
clueIds.add(0);
clueArrayList.add(new Clue());
}
cards.add(findViewById(R.id.card_q_1));
cards.add(findViewById(R.id.card_q_2));
cards.add(findViewById(R.id.card_q_3));
cards.add(findViewById(R.id.card_q_4));
for (int i = 0; i < 4; i++) {
textViews.add((TextView) cards.get(i).findViewById(R.id.tv_question));
imageViews.add((ImageView) cards.get(i).findViewById(R.id.img_question));
buttonArrayList.add((Button) cards.get(i).findViewById(R.id.ans_submit));
skipArrayList.add((Button) cards.get(i).findViewById(R.id.ans_skip));
cards.get(i).setVisibility(View.VISIBLE);
}
if (batch > 3) setSkipInvisible();
else setSkipVisible();
returned_status = -2;
Button answers = findViewById(R.id.btn_answer_activity);
answers.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getBaseContext(), AnswersActivity.class);
startActivity(intent);
}
});
ImageButton refresh = (ImageButton)findViewById(R.id.btn_refresh);
refresh.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
refreshQuestions();
}
});
countdown = findViewById(R.id.timer);
Long login = Utils.getprefLong(UtilStrings.TIMESTAMP, getBaseContext());
LogUtils.debug("timelogin", login.toString());
Long zerohours = 0L;
Long timeOfActivity = System.currentTimeMillis();
new CountDownTimer(zerohours - timeOfActivity + login, 1000) {
public void onTick(long millisUntilFinished) {
long d = millisUntilFinished;
long hours = TimeUnit.MILLISECONDS.toHours(d);
d -= TimeUnit.HOURS.toMillis(hours);
long minutes = TimeUnit.MILLISECONDS.toMinutes(d);
d -= TimeUnit.MINUTES.toMillis(minutes);
long seconds = TimeUnit.MILLISECONDS.toSeconds(d);
countdown.setText(hours + ":" + minutes + ":" + seconds);
}
public void onFinish() {
countdown.setText("00:00:00");
countdown.setTextColor(getResources().getColor(R.color.red));
}
}.start();
srl = findViewById(R.id.scroll_view_q);
srl.setOnRefreshListener(
new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
// This method performs the actual data-refresh operation.
// The method calls setRefreshing(false) when it's finished.
refreshQuestions();
srl.setRefreshing(false);
}
}
);
for (int i = 0; i < 4; i++) {
skipArrayList.get(i).setEnabled(true);
final int finalI = i;
skipArrayList.get(i).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setSkipped(clueIds.get(finalI));
}
});
}
// if(ContextCompat.checkSelfPermission(this, Manifest.permission_group.STORAGE) != PackageManager.PERMISSION_GRANTED){
// if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission_group.STORAGE)) {
// // show an explanation why you need this permission
// Snackbar snackbar = Snackbar
// .make(this.findViewById(android.R.id.content), "Please grant Storage permission for this app from settings.", Snackbar.LENGTH_LONG);
// snackbar.show();
// } else {
// // No explanation needed
// ActivityCompat.requestPermissions(this, new String[]{Manifest.permission_group.STORAGE}, MY_PERMISSION_REQUEST_STORAGE);
// // MY_PERMISSION_REQUEST_CAMERA is an app defined constant
// }
// }
// if(ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED){
// if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
// // show an explanation why you need this permission
// Snackbar snackbar = Snackbar
// .make(this.findViewById(android.R.id.content), "Please grant this permission to this app for accessing treasure hunt photos.", Snackbar.LENGTH_LONG);
// snackbar.show();
// } else {
// // No explanation needed
// ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, MY_PERMISSION_REQUEST_READ_STORAGE);
// // MY_PERMISSION_REQUEST_CAMERA is an app defined constant
// }
// }
// if(ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED){
// if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
// // show an explanation why you need this permission
// Snackbar snackbar = Snackbar
// .make(this.findViewById(android.R.id.content), "Please grant this permission to this app for saving treasure hunt photos.", Snackbar.LENGTH_LONG);
// snackbar.show();
// } else {
// // No explanation needed
// ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, MY_PERMISSION_REQUEST_WRITE_STORAGE);
// // MY_PERMISSION_REQUEST_CAMERA is an app defined constant
// }
// }
if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED ) {
if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.CAMERA)) {
// show an explanation why you need this permission
Snackbar snackbar = Snackbar
.make(this.findViewById(android.R.id.content), "Please grant Camera permission for this app from settings.", Snackbar.LENGTH_LONG);
snackbar.show();
} else {
// No explanation needed
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, MY_PERMISSION_REQUEST_CAMERA);
}
} else{
// Permission has already been granted.
for(int i = 0; i < 4; i++){
buttonArrayList.get(i).setEnabled(true);
final int finalI = i;
buttonArrayList.get(i).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getApplicationContext(), CameraActivity.class);
startActivityForResult(intent, finalI);
}
});
}
}
refreshQuestions();
// final ArrayList<ImageView> expand = new ArrayList<>();
// for(int i = 0; i < 4; i++){
// expand.add((ImageView) cards.get(i).findViewById(R.id.iv_expand));
// final int finalI = i;
// expand.get(i).setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// if(!isExpanded.get(finalI)){
// Picasso.with(getBaseContext()).load(R.drawable.informalslogo).fit().centerCrop().into(imageViews.get(finalI));
// imageViews.get(finalI).setVisibility(View.VISIBLE);
// expand.get(finalI).setImageResource(R.drawable.ic_expand_less_black_24dp);
// expand.get(finalI).setColorFilter(getBaseContext().getResources().getColor(R.color.white));
// isExpanded.set(finalI, true);
// } else {
// imageViews.get(finalI).setVisibility(View.GONE);
// expand.get(finalI).setImageResource(R.drawable.ic_expand_more_black_24dp);
// expand.get(finalI).setColorFilter(getBaseContext().getResources().getColor(R.color.white));
// isExpanded.set(finalI, false);
// }
// }
// });
// }
}
private void setSkipVisible() {
for(int i = 0; i < 4; i++){
skipArrayList.get(i).setVisibility(View.VISIBLE);
}
}
private void setSkipInvisible() {
for(int i = 0; i < 4; i++){
skipArrayList.get(i).setVisibility(View.GONE);
}
}
private void setSkipped(final int questionId) {
//Toast.makeText(getApplicationContext(), "Skipping", Toast.LENGTH_SHORT).show();
String url = getResources().getString(R.string.url_base) +"treasurehunt/skip.php";
//int return_val;
StringRequest request = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject jsonObject = new JSONObject(response);
LogUtils.debug("SKIP",response);
returned_status = jsonObject.getInt("status");
switch (returned_status){
case 0 :
Toast.makeText(getBaseContext(), "Marked As Skipped", Toast.LENGTH_SHORT).show();
refreshQuestions();
break;
case 128 :
new AlertDialog.Builder(QuestionsActivity.this)
.setMessage("Solve all other clues to Skip.")
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
})
.show();
break;
case 8 :
new AlertDialog.Builder(QuestionsActivity.this)
.setMessage("The event has ended.")
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(QuestionsActivity.this, AnswersActivity.class);
startActivity(intent);
}
})
.show();
break;
case 64 :
new AlertDialog.Builder(QuestionsActivity.this)
.setMessage("Cannot Skip these clues.")
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
})
.show();
break;
case 32 :
new AlertDialog.Builder(QuestionsActivity.this)
.setMessage("Answered clues cannot be skipped.")
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
refreshQuestions();
}
})
.show();
break;
default :
LogUtils.info("ERROR", " " + returned_status);
Toast.makeText(getBaseContext(), "Server error. Please try again.", Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
LogUtils.info("Error","Unable to fetch");
Toast.makeText(getBaseContext(), "Network error. Please try again.", Toast.LENGTH_SHORT).show();
}
})
{
@Override
protected Map<String, String> getParams() {
Map<String, String> params = new HashMap<>();
params.put("ID",String.valueOf(questionId));
String name = Utils.getprefString(UtilStrings.NAME,getBaseContext());
params.put("SUBMITTED_BY",name);
name = name.substring(0, name.indexOf('_'));
params.put("TEAM_NAME",name);
LogUtils.info("SKIP_PARAMS", name+" "+String.valueOf(questionId));
return params;
}
};
MySingleton.getInstance(getBaseContext()).addToRequestQueue(request);
}
private int getCountForBatch(int batch) {
switch(batch) {
case 3:
return 3;
case 4:
return 2;
case 5:
return 1;
case 1:
case 2:
default:
return 4;
}
}
@Override
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults){
switch(requestCode){
case MY_PERMISSION_REQUEST_CAMERA:{
// if request is cancelled then grantResults array will be empty
LogUtils.info("PERMISSION", "ITS HERE");
if(grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED){
// permission granted
LogUtils.info("PERMISSION", "ITS HERE enabled");
for(int i = 0; i < cardCount; i++) {
buttonArrayList.get(i).setEnabled(true);
final int finalI = i;
buttonArrayList.get(i).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getApplicationContext(), CameraActivity.class);
startActivityForResult(intent, finalI);
}
});
}
} else{
// permission denied
LogUtils.info("PERMISSION", "ITS HERE disabled");
for(int i = 0; i < cardCount; i++)
buttonArrayList.get(i).setEnabled(false);
}
} break;
case MY_PERMISSION_REQUEST_READ_STORAGE:
break;
case MY_PERMISSION_REQUEST_WRITE_STORAGE:
break;
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != Activity.RESULT_OK) return;
else{
String filename = data.getStringExtra(CameraFragment.EXTRA_PHOTO_FILENAME);
boolean backcamera = data.getBooleanExtra("backcamera", true);
if(filename != null){
clueArrayList.get(requestCode).setAnswerImageFilename(filename);
clueArrayList.get(requestCode).setBackcamera(backcamera);
callSetSolvedAPI(clueIds.get(requestCode), requestCode);
}
}
}
private void refreshQuestions(){
//add code for refreshing questions here
String url = getResources().getString(R.string.url_base) +"treasurehunt/getCluesFinal.php";
StringRequest request = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject jsonObject = new JSONObject(response);
LogUtils.debug("ClueResponse", response);
LogUtils.debug("TEAM_NAME",Utils.getprefString(UtilStrings.NAME,getBaseContext()).substring(0,UtilStrings.NAME.length()-4));
int status = jsonObject.getInt("status");
switch(status){
case 0:
batch = jsonObject.getInt("batch");
cardCount = getCountForBatch(batch);
if(batch > 3) setSkipInvisible();
else setSkipVisible();
Utils.saveprefInt(UtilStrings.BATCH_NUM, batch,QuestionsActivity.this);
JSONArray jsonArray = jsonObject.getJSONArray("clues");
cardCount = jsonArray.length();
for(int i = 0; i < 4; i++){
cards.get(i).setVisibility(View.GONE);
cards.get(i).findViewById(R.id.status_qn).setBackgroundColor(getResources().getColor(R.color.white));
}
clues = new ArrayList<>();
clueIds = new ArrayList<>();
clueArrayList = new ArrayList<>();
for(int i = 0; i < cardCount; i++){
cards.get(i).setVisibility(View.VISIBLE);
clues.add(jsonArray.getJSONObject(i).getString("questions"));
clueIds.add(jsonArray.getJSONObject(i).getInt("id"));
clueArrayList.add(new Clue());
if(isURL(clues.get(i))){
clueArrayList.get(i).setQuestionImageUrl(clues.get(i));
Picasso.with(getBaseContext()).setLoggingEnabled(true);
imageViews.get(i).setVisibility(View.VISIBLE);
Picasso.with(getBaseContext()).load(clues.get(i)).into(imageViews.get(i));
textViews.get(i).setVisibility(View.GONE);
clueArrayList.get(i).setQuestionImageUrl(clues.get(i));
}
else {
clueArrayList.get(i).setQuestionText(clues.get(i));
imageViews.get(i).setVisibility(View.GONE);
textViews.get(i).setVisibility(View.VISIBLE);
textViews.get(i).setText(clues.get(i));
clueArrayList.get(i).setQuestionText(clues.get(i));
}
clueArrayList.get(i).setQuestionID(clueIds.get(i));
int solved = jsonArray.getJSONObject(i).getInt("solved");
switch(solved){
case 0 :
buttonArrayList.get(i).setVisibility(View.VISIBLE);
skipArrayList.get(i).setVisibility(View.VISIBLE);
break;
case 1 :
buttonArrayList.get(i).setVisibility(View.GONE);
skipArrayList.get(i).setVisibility(View.GONE);
cards.get(i).findViewById(R.id.status_qn).setBackgroundColor(getResources().getColor(R.color.colorLightGreen));
break;
case 2 :
buttonArrayList.get(i).setVisibility(View.GONE);
skipArrayList.get(i).setVisibility(View.GONE);
cards.get(i).findViewById(R.id.status_qn).setBackgroundColor(getResources().getColor(R.color.red));
break;
}
}
progressDialog.dismiss();
break;
case 1:
progressDialog.dismiss();
new AlertDialog.Builder(QuestionsActivity.this)
.setMessage("You have completed the treasure hunt.")
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
})
.show();
break;
case 4:
progressDialog.dismiss();
progressDialog.dismiss();
new AlertDialog.Builder(QuestionsActivity.this)
.setMessage("The event has ended.")
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
})
.show();
break;
default:
progressDialog.dismiss();
LogUtils.info("ERROR REFRESH", " "+status );
}
} catch (JSONException e) {
e.printStackTrace();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
//LogUtils.info("Error","Unable to fetch");
progressDialog.dismiss();
Toast.makeText(getBaseContext(), "Network error!", Toast.LENGTH_SHORT).show();
refreshQuestions();
}
})
{
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<>();
String name = Utils.getprefString(UtilStrings.NAME,getBaseContext());
name = name.substring(0, name.indexOf('_'));
params.put("TEAM_NAME",name);
LogUtils.info("MY TEAM", name);
return params;
}
};
MySingleton.getInstance(getBaseContext()).addToRequestQueue(request);
progressDialog = new ProgressDialog(QuestionsActivity.this);
progressDialog.setMessage("Loading");
progressDialog.show();
}
private void callSetSolvedAPI(final int id,final int requestCode){
String url = getResources().getString(R.string.url_base) +"treasurehunt/setSolvedFinal.php";
//int return_val;
StringRequest request = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject jsonObject = new JSONObject(response);
LogUtils.debug("SolvedResponse",response);
returned_status = jsonObject.getInt("status");
switch (returned_status){
case 0 :
Toast.makeText(getBaseContext(), "Already solved by teammate.", Toast.LENGTH_SHORT).show();
break;
case 1 :
clueArrayList.get(requestCode).setSolved(true);
Toast.makeText(getBaseContext(), "Successfully Updated", Toast.LENGTH_SHORT).show();
ClueList.getInstance(getApplicationContext()).addClue(clueArrayList.get(requestCode));
break;
case 4 :
new AlertDialog.Builder(QuestionsActivity.this)
.setMessage("The event has ended.")
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(QuestionsActivity.this, AnswersActivity.class);
startActivity(intent);
}
})
.show();
break;
default :
LogUtils.info("ERROR", " " + returned_status);
}
refreshQuestions();
} catch (JSONException e) {
e.printStackTrace();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
//LogUtils.info("Error","Unable to fetch");
//Internet
}
})
{
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<>();
// params.put("TEAM_NAME",Utils.getprefString(UtilStrings.NAME,getBaseContext()).substring(0,UtilStrings.NAME.length()-4));
params.put("ID",String.valueOf(id));
String name = Utils.getprefString(UtilStrings.NAME,getBaseContext());
params.put("SUBMITTED_BY",name);
name = name.substring(0, name.indexOf('_'));
params.put("TEAM_NAME",name);
return params;
}
};
MySingleton.getInstance(getBaseContext()).addToRequestQueue(request);
}
private boolean isURL(String s){
try {
new URL(s).toURI();
return true;
}
// If there was an Exception
// while creating URL object
catch (Exception e) {
return false;
}
}
@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
Intent intent = new Intent(QuestionsActivity.this, HomeActivity.class);
startActivity(intent);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_about) {
Intent intent = new Intent(QuestionsActivity.this, AboutUsActivity.class);
startActivity(intent);
return true;
} else if (id == R.id.action_log_out) {
LogOutAlertClass lg = new LogOutAlertClass();
lg.isSure(QuestionsActivity.this);
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onPause(){
super.onPause();
ClueList.getInstance(getApplicationContext()).saveClues();
}
}
|
InstituteWebOps/students_app
|
app/src/main/java/in/ac/iitm/students/activities/treasurehunt/QuestionsActivity.java
|
Java
|
mit
| 33,048
|
---
layout: post
title: AutoFac - Dynamic resolution of services multiple levels deep
date: 2017-03-22 20:33
comments: false
categories: []
---
<strong>Problem</strong>
Using the [AutoFac](https://autofac.org/) IOC container, I have a hierarchy of services that are three layers deep.
- A service in each layer is being injected with an instance of an interface in the layer below it.
- The bottom layer has a single interface that has multiple implementations.
- The middle layer has a single interface that has a single implementation.
- The middle layer's service is being injected with the interface in the bottom layer.
- The top layer has multiple types that are injected with the single interface from the middle layer.
The problem is that depending on the service in the top layer,
I want the service in the middle layer to be injected with a different implementation of the bottom layer.
All documentation and examples for resolving different implementations of an interface are only two layers deep.
<strong>Solution</strong>
Adding a third layer, where the middle layer stays the same,
but you want the bottom layer to change based on the service in the top layer,
initially seems like a challenge, but can fortunately be solved using the same pattern prescribed for the two layer scenario.
The following is an example unit test, showing how this problem can be solved:
{% highlight csharp %}
public class TestGrandChildResolutions
{
public interface IA1 { IB B { get; set; } }
public class A1 : IA1 { public IB B { get; set; } public A1(IB b) { this.B = b; } }
public interface IA2 { IB B { get; set; } }
public class A2 : IA2 { public IB B { get; set; } public A2(IB b) { this.B = b; } }
public interface IB { IC C { get; set; } }
public class B : IB { public IC C { get; set; } public B(IC c) { this.C = c; } }
public interface IC { }
public class C1 : IC { }
public class C2 : IC { }
[Test]
public void Test()
{
ContainerBuilder builder = new ContainerBuilder();
builder.RegisterType<C1>().AsImplementedInterfaces().Named<IC>("C1-Name");
builder.RegisterType<C2>().AsImplementedInterfaces().Named<IC>("C2-Name");
builder.RegisterType<B>().AsImplementedInterfaces().WithParameter(ResolvedParameter.ForNamed<IC>("C1-Name")).Named<IB>("B1-Name");
builder.RegisterType<B>().AsImplementedInterfaces().WithParameter(ResolvedParameter.ForNamed<IC>("C2-Name")).Named<IB>("B2-Name");
builder.RegisterType<A1>().AsImplementedInterfaces().WithParameter(ResolvedParameter.ForNamed<IB>("B1-Name"));
builder.RegisterType<A2>().AsImplementedInterfaces().WithParameter(ResolvedParameter.ForNamed<IB>("B2-Name"));
IContainer container = builder.Build();
IA1 a1 = container.Resolve<IA1>();
IA2 a2 = container.Resolve<IA2>();
Assert.IsInstanceOf<C1>(a1.B.C, "C1 Check");
Assert.IsInstanceOf<C2>(a2.B.C, "C2 Check");
}
}
{% endhighlight %}
|
sethflowers/blog
|
_posts/2017-03-22-AutoFac-dynamic-resolution-of-service-multiple-levels-deep.md
|
Markdown
|
mit
| 3,000
|
<?php
namespace ride\cli\command\orm\doctrine;
use Doctrine\ORM\Tools\Console\Command\InfoCommand;
use ride\library\dependency\DependencyInjector;
class InfoDoctrineCommand extends AbstractDoctrineCommand {
/**
* @param \ride\library\dependency\DependencyInjector $di
*/
public function __construct(DependencyInjector $di) {
parent::__construct($di, new InfoCommand(), 'doctrine info');
}
}
|
all-ride/ride-app-orm-doctrine
|
src/ride/cli/command/orm/doctrine/InfoDoctrineCommand.php
|
PHP
|
mit
| 423
|
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// White-box tests for transport.go (in package http instead of http_test).
package req
import (
"bytes"
"context"
"crypto/tls"
"errors"
"github.com/imroc/req/v3/internal/testcert"
"io"
"net"
"net/http"
"strings"
"testing"
)
func withT(r *http.Request, t *testing.T) *http.Request {
return r.WithContext(context.WithValue(r.Context(), tLogKey{}, t.Logf))
}
// Issue 15446: incorrect wrapping of errors when server closes an idle connection.
func TestTransportPersistConnReadLoopEOF(t *testing.T) {
ln := newLocalListener(t)
defer ln.Close()
connc := make(chan net.Conn, 1)
go func() {
defer close(connc)
c, err := ln.Accept()
if err != nil {
t.Error(err)
return
}
connc <- c
}()
tr := new(Transport)
req, _ := http.NewRequest("GET", "http://"+ln.Addr().String(), nil)
req = withT(req, t)
treq := &transportRequest{Request: req}
cm := connectMethod{targetScheme: "http", targetAddr: ln.Addr().String()}
pc, err := tr.getConn(treq, cm)
if err != nil {
t.Fatal(err)
}
defer pc.close(errors.New("test over"))
conn := <-connc
if conn == nil {
// Already called t.Error in the accept goroutine.
return
}
conn.Close() // simulate the server hanging up on the client
_, err = pc.roundTrip(treq)
if !isTransportReadFromServerError(err) && err != errServerClosedIdle {
t.Errorf("roundTrip = %#v, %v; want errServerClosedIdle or transportReadFromServerError", err, err)
}
<-pc.closech
err = pc.closed
if !isTransportReadFromServerError(err) && err != errServerClosedIdle {
t.Errorf("pc.closed = %#v, %v; want errServerClosedIdle or transportReadFromServerError", err, err)
}
}
func isTransportReadFromServerError(err error) bool {
_, ok := err.(transportReadFromServerError)
return ok
}
func newLocalListener(t *testing.T) net.Listener {
ln, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
ln, err = net.Listen("tcp6", "[::1]:0")
}
if err != nil {
t.Fatal(err)
}
return ln
}
func dummyRequest(method string) *http.Request {
req, err := http.NewRequest(method, "http://fake.tld/", nil)
if err != nil {
panic(err)
}
return req
}
func dummyRequestWithBody(method string) *http.Request {
req, err := http.NewRequest(method, "http://fake.tld/", strings.NewReader("foo"))
if err != nil {
panic(err)
}
return req
}
func dummyRequestWithBodyNoGetBody(method string) *http.Request {
req := dummyRequestWithBody(method)
req.GetBody = nil
return req
}
// issue22091Error acts like a golang.org/x/net/http2.ErrNoCachedConn.
type issue22091Error struct{}
func (issue22091Error) IsHTTP2NoCachedConnError() {}
func (issue22091Error) Error() string { return "issue22091Error" }
func TestTransportShouldRetryRequest(t *testing.T) {
tests := []struct {
pc *persistConn
req *http.Request
err error
want bool
}{
0: {
pc: &persistConn{reused: false},
req: dummyRequest("POST"),
err: nothingWrittenError{},
want: false,
},
1: {
pc: &persistConn{reused: true},
req: dummyRequest("POST"),
err: nothingWrittenError{},
want: true,
},
2: {
pc: &persistConn{reused: true},
req: dummyRequest("POST"),
err: http2ErrNoCachedConn,
want: true,
},
3: {
pc: nil,
req: nil,
err: issue22091Error{}, // like an external http2ErrNoCachedConn
want: true,
},
4: {
pc: &persistConn{reused: true},
req: dummyRequest("POST"),
err: errMissingHost,
want: false,
},
5: {
pc: &persistConn{reused: true},
req: dummyRequest("POST"),
err: transportReadFromServerError{},
want: false,
},
6: {
pc: &persistConn{reused: true},
req: dummyRequest("GET"),
err: transportReadFromServerError{},
want: true,
},
7: {
pc: &persistConn{reused: true},
req: dummyRequest("GET"),
err: errServerClosedIdle,
want: true,
},
8: {
pc: &persistConn{reused: true},
req: dummyRequestWithBody("POST"),
err: nothingWrittenError{},
want: true,
},
9: {
pc: &persistConn{reused: true},
req: dummyRequestWithBodyNoGetBody("POST"),
err: nothingWrittenError{},
want: false,
},
}
for i, tt := range tests {
got := tt.pc.shouldRetryRequest(tt.req, tt.err)
if got != tt.want {
t.Errorf("%d. shouldRetryRequest = %v; want %v", i, got, tt.want)
}
}
}
type roundTripFunc func(r *http.Request) (*http.Response, error)
func (f roundTripFunc) RoundTrip(r *http.Request) (*http.Response, error) {
return f(r)
}
// Issue 25009
func TestTransportBodyAltRewind(t *testing.T) {
cert, err := tls.X509KeyPair(testcert.LocalhostCert, testcert.LocalhostKey)
if err != nil {
t.Fatal(err)
}
ln := newLocalListener(t)
defer ln.Close()
go func() {
tln := tls.NewListener(ln, &tls.Config{
NextProtos: []string{"foo"},
Certificates: []tls.Certificate{cert},
})
for i := 0; i < 2; i++ {
sc, err := tln.Accept()
if err != nil {
t.Error(err)
return
}
if err := sc.(TLSConn).Handshake(); err != nil {
t.Error(err)
return
}
sc.Close()
}
}()
addr := ln.Addr().String()
req, _ := http.NewRequest("POST", "https://example.org/", bytes.NewBufferString("request"))
roundTripped := false
tr := &Transport{
DisableKeepAlives: true,
TLSNextProto: map[string]func(string, TLSConn) http.RoundTripper{
"foo": func(authority string, c TLSConn) http.RoundTripper {
return roundTripFunc(func(r *http.Request) (*http.Response, error) {
n, _ := io.Copy(io.Discard, r.Body)
if n == 0 {
t.Error("body length is zero")
}
if roundTripped {
return &http.Response{
Body: NoBody,
StatusCode: 200,
}, nil
}
roundTripped = true
return nil, http2noCachedConnError{}
})
},
},
DialTLSContext: func(_ context.Context, _, _ string) (net.Conn, error) {
tc, err := tls.Dial("tcp", addr, &tls.Config{
InsecureSkipVerify: true,
NextProtos: []string{"foo"},
})
if err != nil {
return nil, err
}
if err := tc.Handshake(); err != nil {
return nil, err
}
return tc, nil
},
}
c := &http.Client{Transport: tr}
_, err = c.Do(req)
if err != nil {
t.Error(err)
}
}
|
imroc/req
|
transport_internal_test.go
|
GO
|
mit
| 6,328
|
class GovernmentPoliticalFigure < ApplicationRecord
belongs_to :user, optional: true
belongs_to :government
belongs_to :political_figure, class_name: Character.name, optional: true
end
|
indentlabs/notebook
|
app/models/page_groupers/government_political_figure.rb
|
Ruby
|
mit
| 191
|
package codility_tape_equilibrium;
public class frog_jmp {
public static void main(String[] args) {
// TODO Auto-generated method stub
int X=10;
int Y=85;
int D=30;
System.out.println(solution(X,Y,D));
}
public static int solution(int X, int Y, int D)
{
if(X==Y)
return 0;
int i=0;
while(X<Y)
{
X+=D;
i++;
}
return i;
}
}
|
hackendemoniado/retos_codility
|
frog_jmp.java
|
Java
|
mit
| 360
|
using System;
using System.Web;
using Raven.Client.Documents.Session;
namespace BrickPile.Core.Infrastructure.Listeners
{
/// <summary>
/// Hook for users to provide additional logic on store operations
/// </summary>
internal class StoreListener
{
private readonly Action<string, IPage, IMetadataDictionary> onPagePublish;
private readonly Action<string, IPage, IMetadataDictionary> onPageSave;
private readonly Action<string, IPage, IMetadataDictionary> onPageUnpublish;
/// <summary>
/// Initializes a new instance of the <see cref="StoreListener" /> class.
/// </summary>
/// <param name="onPagePublish">The on page publish.</param>
/// <param name="onPageSave">The on page save.</param>
/// <param name="onPageUnPublish">The on page un publish.</param>
public StoreListener(Action<string, IPage, IMetadataDictionary> onPagePublish,
Action<string, IPage, IMetadataDictionary> onPageSave, Action<string, IPage, IMetadataDictionary> onPageUnPublish)
{
this.onPagePublish = onPagePublish;
this.onPageSave = onPageSave;
this.onPageUnpublish = onPageUnPublish;
}
/// <summary>
/// Invoked before the store request is sent to the server.
/// </summary>
/// <param name="key">The key.</param>
/// <param name="entityInstance">The entity instance.</param>
/// <param name="metadata">The metadata.</param>
/// <param name="original">The original document that was loaded from the server</param>
/// <returns>
/// Whatever the entity instance was modified and requires us re-serialize it.
/// Returning true would force re-serialization of the entity, returning false would
/// mean that any changes to the entityInstance would be ignored in the current SaveChanges call.
/// </returns>
public bool BeforeStore(string key, object entityInstance, IMetadataDictionary metadata, IMetadataDictionary original)
{
var entity = entityInstance as IPage;
if (entity == null)
return false;
if (DocumentListenerContext.IsInDocumentListenerContext)
return false;
var action = HttpContext.Current.Items["storeAction"] as StoreAction?;
using (DocumentListenerContext.Enter())
{
switch (action)
{
case StoreAction.None:
return false;
case StoreAction.Save:
//_onPageSave(key, entity, metadata);
this.onPagePublish(key, entity, metadata);
break;
case StoreAction.Publish:
this.onPagePublish(key, entity, metadata);
break;
case StoreAction.UnPublish:
//_onPageUnpublish(key, entity, metadata);
return false;
default:
return false;
}
return true;
}
}
/// <summary>
/// Invoked after the store request is sent to the server.
/// </summary>
/// <param name="key">The key.</param>
/// <param name="entityInstance">The entity instance.</param>
/// <param name="metadata">The metadata.</param>
public void AfterStore(string key, object entityInstance, IMetadataDictionary metadata) {}
}
}
|
brickpile/brickpile
|
BrickPile.Core/Infrastructure/Listeners/StoreListener.cs
|
C#
|
mit
| 3,638
|
/**
* @file src/Modules/imageProc/DistToOrigin.h
* @date Aug 2018
* @author PhRG - opticalp.fr
*/
/*
Copyright (c) 2018 Ph. Renaud-Goud / Opticalp
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#ifndef SRC_MODULES_IMAGEPROC_DISTTOORIGIN_H_
#define SRC_MODULES_IMAGEPROC_DISTTOORIGIN_H_
#ifdef HAVE_OPENCV
#include "core/Module.h"
/**
* Display centering informations on the input image
*
* according to the delta x and delta y input values
* to the output image (color)
*/
class DistToOrigin: public Module
{
public:
DistToOrigin(ModuleFactory* parent, std::string customName);
std::string description()
{
return "Display centering information on the image";
}
private:
/**
* Main logic
*/
void process(int startCond);
static size_t refCount; ///< reference counter to generate a unique internal name
enum params
{
paramXpos,
paramYpos,
paramRatio,
paramColorMode, // gray, red, green, blue
paramColorLevel, // luminance
paramCnt
};
Poco::Int64 getIntParameterValue(size_t paramIndex);
void setIntParameterValue(size_t paramIndex, Poco::Int64 value);
double getFloatParameterValue(size_t paramIndex);
void setFloatParameterValue(size_t paramIndex, double value);
std::string getStrParameterValue(size_t paramIndex);
void setStrParameterValue(size_t paramIndex, std::string value);
int xPos, yPos;
double ratio;
std::string title;
enum colorMode
{
colorGray,
colorRed,
colorGreen,
colorBlue,
colorModeCnt
};
colorMode color;
int colorLevel;
/// Indexes of the input ports
enum inPorts
{
imageInPort,
deltaXPort,
deltaYPort,
inPortCnt
};
/// Indexes of the output ports
enum outPorts
{
imageOutPort,
outPortCnt
};
};
#endif /* HAVE_OPENCV */
#endif /* SRC_MODULES_IMAGEPROC_DISTTOORIGIN_H_ */
|
Opticalp/instrumentall
|
src/modules/imageProc/DistToOrigin.h
|
C
|
mit
| 2,981
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64a.c
Label Definition File: CWE401_Memory_Leak.c.label.xml
Template File: sources-sinks-64a.tmpl.c
*/
/*
* @description
* CWE: 401 Memory Leak
* BadSource: realloc Allocate data using realloc()
* GoodSource: Allocate data on the stack
* Sinks:
* GoodSink: call free() on data
* BadSink : no deallocation of data
* Flow Variant: 64 Data flow: void pointer to data passed from one function to another in different source files
*
* */
#include "std_testcase.h"
#include <wchar.h>
#ifndef OMITBAD
/* bad function declaration */
void CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64b_badSink(void * dataVoidPtr);
void CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64_bad()
{
struct _twoIntsStruct * data;
data = NULL;
/* POTENTIAL FLAW: Allocate memory on the heap */
data = (struct _twoIntsStruct *)realloc(data, 100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64b_badSink(&data);
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodG2B uses the GoodSource with the BadSink */
void CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64b_goodG2BSink(void * dataVoidPtr);
static void goodG2B()
{
struct _twoIntsStruct * data;
data = NULL;
/* FIX: Use memory allocated on the stack with ALLOCA */
data = (struct _twoIntsStruct *)ALLOCA(100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64b_goodG2BSink(&data);
}
/* goodB2G uses the BadSource with the GoodSink */
void CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64b_goodB2GSink(void * dataVoidPtr);
static void goodB2G()
{
struct _twoIntsStruct * data;
data = NULL;
/* POTENTIAL FLAW: Allocate memory on the heap */
data = (struct _twoIntsStruct *)realloc(data, 100*sizeof(struct _twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine((twoIntsStruct *)&data[0]);
CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64b_goodB2GSink(&data);
}
void CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64_good()
{
goodG2B();
goodB2G();
}
#endif /* OMITGOOD */
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
#ifdef INCLUDEMAIN
int main(int argc, char * argv[])
{
/* seed randomness */
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64_good();
printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
printLine("Calling bad()...");
CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64_bad();
printLine("Finished bad()");
#endif /* OMITBAD */
return 0;
}
#endif
|
maurer/tiamat
|
samples/Juliet/testcases/CWE401_Memory_Leak/s03/CWE401_Memory_Leak__struct_twoIntsStruct_realloc_64a.c
|
C
|
mit
| 3,392
|
package ir.co.dpq.pluf.saas;
public interface IPConfigurationDao {
}
|
phoenix-scholars/JPluf
|
jpluf-core/src/main/java/ir/co/dpq/pluf/saas/IPConfigurationDao.java
|
Java
|
mit
| 71
|
<?php
/**
* PublicIpListApi
* PHP version 7.3
*
* @category Class
* @package Fastly
* @author oss@fastly.com
*/
/**
* Fastly API
*
* A PHP client library for interacting with most facets of the Fastly API.
*
*/
/**
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
namespace Fastly\Api;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Psr7\MultipartStream;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use Fastly\ApiException;
use Fastly\Configuration;
use Fastly\HeaderSelector;
use Fastly\ObjectSerializer;
/**
* PublicIpListApi Class Doc Comment
*
* @category Class
* @package Fastly
* @author oss@fastly.com
*/
class PublicIpListApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @var int Host index
*/
protected $hostIndex;
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
* @param int $hostIndex (Optional) host index to select the list of hosts if multiple are defined
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
$hostIndex = 0
) {
$this->client = $client ?: new Client();
$this->config = $config ?: new Configuration();
$this->headerSelector = $selector ?: new HeaderSelector();
$this->hostIndex = $hostIndex;
}
/**
* Set the host index
*
* @param int $hostIndex Host index (required)
*/
public function setHostIndex($hostIndex): void
{
$this->hostIndex = $hostIndex;
}
/**
* Get the host index
*
* @return int Host index
*/
public function getHostIndex()
{
return $this->hostIndex;
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation listFastlyIps
*
* List Fastly's public IPs
*
* Note: the input parameter is an associative array with the keys listed as the parameter name below
*
*
* @throws \Fastly\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Fastly\Model\PublicIpList
*/
public function listFastlyIps($options)
{
list($response) = $this->listFastlyIpsWithHttpInfo($options);
return $response;
}
/**
* Operation listFastlyIpsWithHttpInfo
*
* List Fastly's public IPs
*
* Note: the input parameter is an associative array with the keys listed as the parameter name below
*
*
* @throws \Fastly\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Fastly\Model\PublicIpList, HTTP status code, HTTP response headers (array of strings)
*/
public function listFastlyIpsWithHttpInfo($options)
{
$request = $this->listFastlyIpsRequest($options);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
);
} catch (ConnectException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
(int) $e->getCode(),
null,
null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
(string) $request->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
switch($statusCode) {
case 200:
if ('\Fastly\Model\PublicIpList' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
ObjectSerializer::deserialize($content, '\Fastly\Model\PublicIpList', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
$returnType = '\Fastly\Model\PublicIpList';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Fastly\Model\PublicIpList',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation listFastlyIpsAsync
*
* List Fastly's public IPs
*
* Note: the input parameter is an associative array with the keys listed as the parameter name below
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function listFastlyIpsAsync($options)
{
return $this->listFastlyIpsAsyncWithHttpInfo($options)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation listFastlyIpsAsyncWithHttpInfo
*
* List Fastly's public IPs
*
* Note: the input parameter is an associative array with the keys listed as the parameter name below
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function listFastlyIpsAsyncWithHttpInfo($options)
{
$returnType = '\Fastly\Model\PublicIpList';
$request = $this->listFastlyIpsRequest($options);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
(string) $response->getBody()
);
}
);
}
/**
* Create request for operation 'listFastlyIps'
*
* Note: the input parameter is an associative array with the keys listed as the parameter name below
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function listFastlyIpsRequest($options)
{
// unbox the parameters from the associative array
$resourcePath = '/public-ip-list';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}
// this endpoint requires API token authentication
$apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key');
if ($apiToken !== null) {
$headers['Fastly-Key'] = $apiToken;
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Create http client option
*
* @throws \RuntimeException on file opening failure
* @return array of http client options
*/
protected function createHttpClientOption()
{
$options = [];
if ($this->config->getDebug()) {
$options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');
if (!$options[RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}
|
fastly/fastly-php
|
lib/Api/PublicIpListApi.php
|
PHP
|
mit
| 11,838
|
@extends('layouts.indexLayout')
@section('content')
<!-- 轮播图-->
<div class="container">
<div class="row">
<div class="col-md-12 carousel">
<img style="width:100%;" src="{{ asset('images/lunbo.jpg') }}" alt="芝麻小程序市场"/>
<button class="btn btn-issue" data-toggle="modal" data-target=".model-issue">发布小程序</button>
</div>
</div>
<!-- 导航 -->
<div class="zhima-nav">
<div class="container">
<div class="col-md-12 ">
<div class="content-left">
<ul>
<li class="active-left"><a href="">全部分类</a></li>
@foreach($tag as $taglist)
<li class=""><a class="taglist" data-id="{{$taglist->id}}"
href="">{{$taglist->name}}</a></li>
@endforeach
</ul>
</div>
</div>
</div>
</div>
<!-- 展示页 -->
<div class="container">
<div class="row">
<div class="col-md-12 " style="padding:0;">
<ul class="content-right">
</ul>
<div class="morelist" style="cursor:pointer;">加载更多</div>
</div>
</div>
</div>
@endsection
@section('script')
<script>
var offset = 0
var limit = 12
// ng
function ajax(offset = 0, tag = null) {
$.ajax({
url: "{{url('ajax')}}",
method: 'POST',
data: {'offset': offset, 'limit': limit, 'tag': tag},
success: function (res) {
if (res.length != 0) {
$.each(res, function (index, value) {
var li = $('<li class="code-item" data-item="' + value.id + '"></li>');
var dl = $('<dl></dl>');
var dd1 = $('<dd></dd>');
var icon = '<img class="dataicon" src="' + value.icon + '" alt="正在加载中...">'
var dd2 = $('<dt></dt>');
var p = $('<p></p>');
var name = '<span class="dataname">' + value.name + '</span>';
var qrcode = '<button type="button" class="btn btn-taste" data-toggle="tooltip" data-placement="bottom" data-html="true" title="" data-original-title="<img alt=\'qrcode\' class=\'img-responsive\' style=\'width:120px;height:150px;\' src=' + value.qrcode + '>">体验</button>';
var overall_rating = $('<div class="overallrating"></div>');
var star = $('<div class="star"></div>');
var score = '<span class="score">' + value.overall_rating / 10 + '</span>分'
var tag = $('<div class="btn-tag-list"></div>');
var description = '<p class="description">' + value.description + '</p>';
$.each(value.tag, function (index, value) {
tag.append('<a data-id="' + index + '" type="button" class="btn btn-default btn-xs eachTag">' + value + '</a>');
})
li.append(dl);
dl.append(dd1);
dd1.append(icon);
dl.append(dd2);
dd2.append(p);
p.append(name);
p.append(qrcode);
overall_rating.append(star);
overall_rating.append(score);
dd2.append(overall_rating);
li.append(tag);
li.append(description);
$('.content-right').append(li);
$(".star").eq(index).raty({readOnly: true, score: value.overall_rating / 10});
});
$("[data-toggle='tooltip']").tooltip();
// 分类跳转
$('.eachTag').on('click', function () {
offset = 0
$('.morelist').html('加载更多');
$('.content-right').html('');
tag = $(this).data('id');
ajax(offset, tag);
// 修改样式 todo
$('.content-left li').attr('class', '');
$(this).parent().attr('class', 'active-left');
return false;
})
$('.code-item').on('click', function () {
var item = $(this).data('item');
window.open("{{url('show')}}/" + item);
})
} else {
// no more data
$('.morelist').html('没有更多了');
}
}
});
}
// 加载更多
$('.morelist').on('click', function () {
offset += limit;
ajax(offset, !(typeof(tag) == 'undefined') ? tag : null);
})
// 发布小程序
$('.btn-issue').on('click', function () {
if ("{{session('uid')}}") {
window.location = "{{url('create')}}";
} else {
alert('请登录');
}
})
// 分类跳转
$('.taglist').on('click', function () {
offset = 0
$('.morelist').html('加载更多');
$('.content-right').html('');
tag = $(this).data('id');
ajax(offset, tag);
// 修改样式
$('.content-left li').attr('class', '');
$(this).parent().attr('class', 'active-left');
return false;
})
// main
$(function () {
ajax(offset);
});
</script>
@endsection
|
hotapp8/app_market
|
resources/views/index.blade.php
|
PHP
|
mit
| 7,117
|
<?xml version="1.0" ?><!DOCTYPE TS><TS language="id_ID" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About XDE2</source>
<translation>Tentang XDE2</translation>
</message>
<message>
<location line="+39"/>
<source><b>XDE2</b> version</source>
<translation><b>XDE2</b> versi</translation>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2017 The XDE2 developers</source>
<translation>Copyright © 2009-2014 para pengembang Bitcoin
Copyright © 2012-2014 para pengembang NovaCoin
Copyright © 2014 para pengembang XDE2</translation>
</message>
<message>
<location line="+15"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or <a href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a>.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (<a href="https://www.openssl.org/">https://www.openssl.org/</a>) and cryptographic software written by Eric Young (<a href="mailto:eay@cryptsoft.com">eay@cryptsoft.com</a>) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Buku Alamat</translation>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation>Klik dua-kali untuk mengubah alamat atau label</translation>
</message>
<message>
<location line="+24"/>
<source>Create a new address</source>
<translation>Buat alamat baru</translation>
</message>
<message>
<location line="+10"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Salin alamat yang dipilih ke clipboard</translation>
</message>
<message>
<location line="-7"/>
<source>&New Address</source>
<translation>&Alamat Baru</translation>
</message>
<message>
<location line="-43"/>
<source>These are your XDE2 addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation>Ini adalah alamat XDE2 Anda untuk menerima pembayaran. Anda dapat memberikan alamat yang berbeda untuk setiap pengirim, sehingga Anda dapat melacak siapa yang membayar Anda.</translation>
</message>
<message>
<location line="+53"/>
<source>&Copy Address</source>
<translation>&Salin Alamat</translation>
</message>
<message>
<location line="+7"/>
<source>Show &QR Code</source>
<translation>Unjukkan &Kode QR</translation>
</message>
<message>
<location line="+7"/>
<source>Sign a message to prove you own a XDE2 address</source>
<translation>Masukan pesan untuk membuktikan bahwa anda telah mempunyai adress XDE2</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Sign & Pesan</translation>
</message>
<message>
<location line="+17"/>
<source>Delete the currently selected address from the list</source>
<translation>Menghapus alamat yang saat ini dipilih dari daftar yang tersedia</translation>
</message>
<message>
<location line="-10"/>
<source>Verify a message to ensure it was signed with a specified XDE2 address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Delete</source>
<translation>&Hapus</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+65"/>
<source>Copy &Label</source>
<translation>Salin &Label</translation>
</message>
<message>
<location line="+2"/>
<source>&Edit</source>
<translation>&Ubah</translation>
</message>
<message>
<location line="+250"/>
<source>Export Address Book Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>File CSV (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Penulisan data ke file gagal %1</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+145"/>
<source>Label</source>
<translation>Label</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Alamat</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(tidak ada label)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Dialog Kata kunci</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Masukkan kata kunci</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Kata kunci baru</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Ulangi kata kunci baru</translation>
</message>
<message>
<location line="+33"/>
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>For staking only</source>
<translation>Hanya untuk staking</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+38"/>
<source>Encrypt wallet</source>
<translation>Meng-enkripsikan dompet</translation>
</message>
<message>
<location line="+7"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Operasi ini memerlukan kata kunci dompet Anda untuk membuka dompet ini.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Buka dompet</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Operasi ini memerlukan kata kunci dompet Anda untuk mendekripsi dompet ini.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Men-dekripsikan dompet</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Ubah kata kunci</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Masukkan kata kunci lama dan baru ke dompet ini.</translation>
</message>
<message>
<location line="+45"/>
<source>Confirm wallet encryption</source>
<translation>Menkonfirmasi enkripsi dompet</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Apakah Anda yakin untuk mengenkripsi dompet Anda?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Peringatan: tombol Caps Lock aktif!</translation>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation>Dompet terenkripsi</translation>
</message>
<message>
<location line="-140"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>XDE2 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source>
<translation>XDE2 akan ditutup untuk menyelesaikan proses enkripsi. Ingat bahwa dompet Anda tidak bisa di lindungi dengan enkripsi sepenuhny dari pencurian melalui infeksi malware di komputer Anda.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+44"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Enkripsi dompet gagal</translation>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Enkripsi dompet gagal karena kesalahan internal. Dompet Anda tidak dienkripsi.</translation>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation>Kata kunci yang dimasukkan tidak cocok.</translation>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation>Gagal buka dompet</translation>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Kata kunci yang dimasukkan untuk dekripsi dompet tidak cocok.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Dekripsi dompet gagal</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Passphrase dompet telah berhasil diubah.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+297"/>
<source>Sign &message...</source>
<translation>Pesan &penanda...</translation>
</message>
<message>
<location line="-64"/>
<source>Show general overview of wallet</source>
<translation>Tampilkan kilasan umum dari dompet</translation>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation>&Transaksi</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Jelajah sejarah transaksi</translation>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation>&Buku Alamat</translation>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Mengedit daftar alamat-alamat dan label</translation>
</message>
<message>
<location line="-18"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Tampilkan daftar alamat untuk menerima pembayaran</translation>
</message>
<message>
<location line="+34"/>
<source>E&xit</source>
<translation>K&eluar</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Keluar dari aplikasi</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about XDE2</source>
<translation>Tunjukkan informasi tentang XDE2</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>Mengenai &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Tampilkan informasi mengenai Qt</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Pilihan...</translation>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation>%Enkripsi Dompet...</translation>
</message>
<message>
<location line="+2"/>
<source>&Backup Wallet...</source>
<translation>&Cadangkan Dompet...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>&Ubah Kata Kunci...</translation>
</message>
<message>
<location line="+9"/>
<source>&Export...</source>
<translation>&Ekspor...</translation>
</message>
<message>
<location line="-55"/>
<source>Send coins to a XDE2 address</source>
<translation>Kirim koin ke alamat XDE2</translation>
</message>
<message>
<location line="+39"/>
<source>Modify configuration options for XDE2</source>
<translation>Memodifikasi opsi aturan untuk XDE2</translation>
</message>
<message>
<location line="+17"/>
<source>Export the data in the current tab to a file</source>
<translation>Mengekspor data dari tab saat ini ke dalam file</translation>
</message>
<message>
<location line="-13"/>
<source>Encrypt or decrypt wallet</source>
<translation>Mengenkripsi atau mendekripsi dompet</translation>
</message>
<message>
<location line="+2"/>
<source>Backup wallet to another location</source>
<translation>Cadangkan dompet ke lokasi lain</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Ubah kata kunci yang digunakan untuk enkripsi dompet</translation>
</message>
<message>
<location line="+10"/>
<source>&Debug window</source>
<translation>&Jendela Debug</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Buka konsol debug dan diagnosa</translation>
</message>
<message>
<location line="-5"/>
<source>&Verify message...</source>
<translation>&Verifikasi pesan...</translation>
</message>
<message>
<location line="-214"/>
<location line="+551"/>
<source>Transfer</source>
<translation>XDE2 (CoinHitam)</translation>
</message>
<message>
<location line="-551"/>
<source>Wallet</source>
<translation>Dompet</translation>
</message>
<message>
<location line="+193"/>
<source>&About XDE2</source>
<translation>&Tentang XDE2</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&Tunjukkan / Sembunyikan</translation>
</message>
<message>
<location line="+8"/>
<source>Unlock wallet</source>
<translation>Buka Dompet</translation>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation>&Kunci Dompet</translation>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation>Kunci dompet</translation>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Berkas</translation>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation>&Pengaturan</translation>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation>&Bantuan</translation>
</message>
<message>
<location line="+17"/>
<source>Tabs toolbar</source>
<translation>Baris tab</translation>
</message>
<message>
<location line="+46"/>
<location line="+9"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
<message>
<location line="+0"/>
<location line="+58"/>
<source>XDE2 client</source>
<translation>Klien XDE2</translation>
</message>
<message numerus="yes">
<location line="+70"/>
<source>%n active connection(s) to XDE2 network</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+488"/>
<source>Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Not staking because wallet is locked</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is syncing</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because you don't have mature coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-808"/>
<source>&Dashboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>&Unlock Wallet...</source>
<translation>&Buka Dompet</translation>
</message>
<message>
<location line="+273"/>
<source>Up to date</source>
<translation>Terbaru</translation>
</message>
<message>
<location line="+43"/>
<source>Catching up...</source>
<translation>Menyusul...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Sent transaction</source>
<translation>Transaksi terkirim</translation>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation>Transaksi diterima</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Tanggal: %1
Jumlah: %2
Jenis: %3
Alamat: %4
</translation>
</message>
<message>
<location line="+100"/>
<location line="+15"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<location line="+15"/>
<source>URI can not be parsed! This can be caused by an invalid XDE2 address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Wallet is <b>not encrypted</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Dompet saat ini <b>terenkripsi</b> dan <b>terbuka</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Dompet saat ini <b>terenkripsi</b> dan <b>terkunci</b></translation>
</message>
<message>
<location line="+24"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation>Back-up Gagal</translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+91"/>
<source>%n second(s)</source>
<translation><numerusform>%n detik</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation><numerusform>%n menit</numerusform></translation>
</message>
<message numerus="yes">
<location line="-429"/>
<location line="+433"/>
<source>%n hour(s)</source>
<translation><numerusform>%n jam</numerusform></translation>
</message>
<message>
<location line="-456"/>
<source>Processed %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+27"/>
<location line="+433"/>
<source>%n day(s)</source>
<translation><numerusform>%n hari</numerusform></translation>
</message>
<message numerus="yes">
<location line="-429"/>
<location line="+6"/>
<source>%n week(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+0"/>
<source>%1 and %2</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+0"/>
<source>%n year(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>%1 behind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Last received block was generated %1 ago.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+69"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+324"/>
<source>Not staking</source>
<translation>Lagi tidak staking</translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+104"/>
<source>A fatal error occurred. XDE2 can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+110"/>
<source>Network Alert</source>
<translation>Notifikasi Jaringan</translation>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation>Jumlah:</translation>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation>Bytes:</translation>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation>Jumlah:</translation>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation>Prioritas:</translation>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation>Biaya:</translation>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+552"/>
<source>no</source>
<translation>tidak</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation>Setelah biaya:</translation>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation>Perubahan:</translation>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation>mode Daftar</translation>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation>Jumlah</translation>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation>Label</translation>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation>Alamat</translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation>Tanggal</translation>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation>Terkonfirmasi</translation>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation>Prioritas</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-515"/>
<source>Copy address</source>
<translation>Salin alamat</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Salin label</translation>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation>Salin jumlah</translation>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation>Salikan jumlah</translation>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation>Salinkan Biaya</translation>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation>Salinkan setelah biaya</translation>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation>Salinkan bytes</translation>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation>Salinkan prioritas</translation>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation>Salinkan output rendah</translation>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation>Salinkan perubahan</translation>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation>tertinggi</translation>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation>tinggi</translation>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation>menengah-tinggi</translation>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation>menengah</translation>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation>rendah-menengah</translation>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation>rendah</translation>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation>terendah</translation>
</message>
<message>
<location line="+155"/>
<source>DUST</source>
<translation>DUST</translation>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation>ya</translation>
</message>
<message>
<location line="+10"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<location line="+66"/>
<source>(no label)</source>
<translation>(tidak ada label)</translation>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation>perubahan dari %1 (%2)</translation>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation>(perubahan)</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Ubah Alamat</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Label</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Alamat</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Alamat menerima baru</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Alamat mengirim baru</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Ubah alamat menerima</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Ubah alamat mengirim</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Alamat yang dimasukkan "%1" sudah ada di dalam buku alamat.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid XDE2 address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Tidak dapat membuka dompet.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Pembuatan kunci baru gagal.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+426"/>
<location line="+12"/>
<source>XDE2-Qt</source>
<translation>XDE2-Qt</translation>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>versi</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Penggunaan:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Pilihan</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>&Utama</translation>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>Bayar &biaya transaksi</translation>
</message>
<message>
<location line="+31"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Reserve</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start XDE2 after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start XDE2 on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Network</source>
<translation>&Jaringan</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the XDE2 client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>Petakan port dengan &UPnP</translation>
</message>
<message>
<location line="+7"/>
<source>Connect to the XDE2 network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation>IP Proxy:</translation>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation>&Port:</translation>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Port proxy (cth. 9050)</translation>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation>Versi &SOCKS:</translation>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation>Versi SOCKS proxy (cth. 5)</translation>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation>&Jendela</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Hanya tampilkan ikon tray setelah meminilisasi jendela</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>&Meminilisasi ke tray daripada taskbar</translation>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>M&eminilisasi saat tutup</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Tampilan</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>&Bahasa Antarmuka Pengguna:</translation>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting XDE2.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>&Unit untuk menunjukkan jumlah:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show coin control features or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Display coin &control features (experts only!)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Whether to select the coin outputs randomly or with minimal coin age.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Minimize weight consumption (experimental)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use black visual theme (requires restart)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&YA</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&Batal</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation>standar</translation>
</message>
<message>
<location line="+149"/>
<location line="+9"/>
<source>Warning</source>
<translation>Peringatan</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting XDE2.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation>Alamat proxy yang diisi tidak valid.</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Formulir</translation>
</message>
<message>
<location line="+46"/>
<location line="+247"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the XDE2 network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-173"/>
<source>Stake:</source>
<translation>Stake:</translation>
</message>
<message>
<location line="+32"/>
<source>Unconfirmed:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-113"/>
<source>Wallet</source>
<translation>Dompet</translation>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+80"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Total:</source>
<translation>Total:</translation>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation>Total saldo anda saat ini</translation>
</message>
<message>
<location line="+50"/>
<source><b>Recent transactions</b></source>
<translation><b>Transaksi sebelumnya</b></translation>
</message>
<message>
<location line="-118"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-32"/>
<source>Total of coins that was staked, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>tidak tersinkron</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start XDE2: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>Permintaan Pembayaran</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Jumlah:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>Label:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Pesan:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>&Simpan Sebagai...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation>Simpan Code QR</translation>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>Gambar PNG (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>Nama Klien</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<source>N/A</source>
<translation>T/S</translation>
</message>
<message>
<location line="-194"/>
<source>Client version</source>
<translation>Versi Klien</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Informasi</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>Menggunakan versi OpenSSL</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Waktu nyala</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Jaringan</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Jumlah hubungan</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Rantai blok</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Jumlah blok terkini</translation>
</message>
<message>
<location line="+197"/>
<source>&Network Traffic</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Clear</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Totals</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>In:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+80"/>
<source>Out:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-383"/>
<source>Last block time</source>
<translation>Waktu blok terakhir</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Buka</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the XDE2-Qt help message to get a list with possible XDE2 command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>&Tunjukkan</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Konsol</translation>
</message>
<message>
<location line="-237"/>
<source>Build date</source>
<translation>Tanggal pembuatan</translation>
</message>
<message>
<location line="-104"/>
<source>XDE2 - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>XDE2 Core</source>
<translation>Inti XDE2</translation>
</message>
<message>
<location line="+256"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the XDE2 debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>Bersihkan konsol</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="+325"/>
<source>Welcome to the XDE2 RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Gunakan panah keatas dan kebawah untuk menampilkan sejarah, dan <b>Ctrl-L</b> untuk bersihkan layar.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Ketik <b>help</b> untuk menampilkan perintah tersedia.</translation>
</message>
<message>
<location line="+127"/>
<source>%1 B</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 KB</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 MB</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 GB</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>%1 m</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>%1 h</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 h %2 m</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+181"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Kirim Koin</translation>
</message>
<message>
<location line="+76"/>
<source>Coin Control Features</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Inputs...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>automatically selected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Insufficient funds!</source>
<translation>Jumlah dana dibutuhkan tidak mencukupi!</translation>
</message>
<message>
<location line="+77"/>
<source>Quantity:</source>
<translation>Jumlah:</translation>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation>0</translation>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation>Bytes:</translation>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation>Jumlah:</translation>
</message>
<message>
<location line="+22"/>
<location line="+86"/>
<location line="+86"/>
<location line="+32"/>
<source>0.00 XDE2</source>
<translation>123.456 XDE2 {0.00 ?}</translation>
</message>
<message>
<location line="-191"/>
<source>Priority:</source>
<translation>Prioritas:</translation>
</message>
<message>
<location line="+19"/>
<source>medium</source>
<translation>menengah</translation>
</message>
<message>
<location line="+32"/>
<source>Fee:</source>
<translation>Biaya:</translation>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation>Output Rendah:</translation>
</message>
<message>
<location line="+19"/>
<source>no</source>
<translation>tidak</translation>
</message>
<message>
<location line="+32"/>
<source>After Fee:</source>
<translation>Setelah Biaya:</translation>
</message>
<message>
<location line="+35"/>
<source>Change</source>
<translation>Perubahan</translation>
</message>
<message>
<location line="+50"/>
<source>custom change address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+106"/>
<source>Send to multiple recipients at once</source>
<translation>Kirim ke beberapa penerima sekaligus</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>Hapus %Semua</translation>
</message>
<message>
<location line="+24"/>
<source>Balance:</source>
<translation>Saldo:</translation>
</message>
<message>
<location line="+16"/>
<source>123.456 XDE2</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Konfirmasi aksi pengiriman</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-173"/>
<source>Enter a XDE2 address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Salin jumlah</translation>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+86"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Konfirmasi pengiriman koin</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>Jumlah yang dibayar harus lebih besar dari 0.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>Jumlah melebihi saldo Anda.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>Kelebihan total saldo Anda ketika biaya transaksi %1 ditambahkan.</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Ditemukan alamat ganda, hanya dapat mengirim ke tiap alamat sekali per operasi pengiriman.</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+247"/>
<source>WARNING: Invalid XDE2 address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation>(tidak ada label)</translation>
</message>
<message>
<location line="+4"/>
<source>WARNING: unknown change address</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>J&umlah:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>Kirim &Ke:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Masukkan label bagi alamat ini untuk menambahkannya ke buku alamat Anda</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Label:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+J</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Tempel alamat dari salinan</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+B</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a XDE2 address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-118"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+203"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-193"/>
<location line="+203"/>
<source>Alt+A</source>
<translation>Alt+J</translation>
</message>
<message>
<location line="-193"/>
<source>Paste address from clipboard</source>
<translation>Tempel alamat dari salinan</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+B</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this XDE2 address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>Hapus %Semua</translation>
</message>
<message>
<location line="-87"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified XDE2 address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a XDE2 address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter XDE2 signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>Alamat yang dimasukkan tidak sesuai.</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>Silahkan periksa alamat dan coba lagi.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TrafficGraphWidget</name>
<message>
<location filename="../trafficgraphwidget.cpp" line="+75"/>
<source>KB/s</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+25"/>
<source>Open until %1</source>
<translation>Buka hingga %1</translation>
</message>
<message>
<location line="+6"/>
<source>conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/tidak terkonfirmasi</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 konfirmasi</translation>
</message>
<message>
<location line="+17"/>
<source>Status</source>
<translation>Status</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Tanggal</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>Dari</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>Untuk</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Pesan:</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 510 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Transaksi</translation>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Amount</source>
<translation>Jumlah</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>, belum berhasil disiarkan</translation>
</message>
<message numerus="yes">
<location line="-36"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+71"/>
<source>unknown</source>
<translation>tidak diketahui</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Rincian transaksi</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Jendela ini menampilkan deskripsi rinci dari transaksi tersebut</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+231"/>
<source>Date</source>
<translation>Tanggal</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Jenis</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Alamat</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Jumlah</translation>
</message>
<message>
<location line="+52"/>
<source>Open until %1</source>
<translation>Buka hingga %1</translation>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Terkonfirmasi (%1 konfirmasi)</translation>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Blok ini tidak diterima oleh node lainnya dan kemungkinan tidak akan diterima!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Terbuat tetapi tidak diterima</translation>
</message>
<message>
<location line="+42"/>
<source>Received with</source>
<translation>Diterima dengan</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Diterima dari</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Terkirim ke</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Pembayaran ke Anda sendiri</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Tertambang</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(t/s)</translation>
</message>
<message>
<location line="+194"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Status transaksi. Arahkan ke bagian ini untuk menampilkan jumlah konfrimasi.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Tanggal dan waktu transaksi tersebut diterima.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Jenis transaksi.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Alamat tujuan dari transaksi.</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Jumlah terbuang dari atau ditambahkan ke saldo.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+54"/>
<location line="+17"/>
<source>All</source>
<translation>Semua</translation>
</message>
<message>
<location line="-16"/>
<source>Today</source>
<translation>Hari ini</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Minggu ini</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Bulan ini</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Bulan kemarin</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Tahun ini</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Jarak...</translation>
</message>
<message>
<location line="+12"/>
<source>Received with</source>
<translation>DIterima dengan</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Terkirim ke</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Ke Anda sendiri</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Ditambang</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Lainnya</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Masukkan alamat atau label untuk mencari</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Jumlah min</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Salin alamat</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Salin label</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Salin jumlah</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Ubah label</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Tampilkan rincian transaksi</translation>
</message>
<message>
<location line="+138"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Berkas CSV (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Terkonfirmasi</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Tanggal</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Jenis</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Label</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Alamat</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Jumlah</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Jarak:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>ke</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+208"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+173"/>
<source>XDE2 version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation>Penggunaan:</translation>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or XDE2d</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation>Daftar perintah</translation>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation>Dapatkan bantuan untuk perintah</translation>
</message>
<message>
<location line="-147"/>
<source>Options:</source>
<translation>Pilihan:</translation>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: XDE2.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: XDE2d.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Tentukan direktori data</translation>
</message>
<message>
<location line="-25"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=XDE2rpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "XDE2 Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Atur ukuran tembolok dalam megabyte (standar: 25)</translation>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Listen for connections on <port> (default: 15714 or testnet: 25714)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Mengatur hubungan paling banyak <n> ke peer (standar: 125)</translation>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Hubungkan ke node untuk menerima alamat peer, dan putuskan</translation>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation>Tentukan alamat publik Anda sendiri</translation>
</message>
<message>
<location line="+4"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Always query for peer addresses via DNS lookup (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Batas untuk memutuskan peer buruk (standar: 100)</translation>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Jumlah kedua untuk menjaga peer buruk dari hubung-ulang (standar: 86400)</translation>
</message>
<message>
<location line="-37"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+65"/>
<source>Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-17"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Menerima perintah baris perintah dan JSON-RPC</translation>
</message>
<message>
<location line="+1"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Berjalan dibelakang sebagai daemin dan menerima perintah</translation>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation>Gunakan jaringan uji</translation>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+96"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-103"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong XDE2 will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+132"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-18"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-69"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-91"/>
<source>Sync checkpoints policy (default: strict)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+89"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-88"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-17"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Kirim info lacak/debug ke konsol sebaliknya dari berkas debug.log</translation>
</message>
<message>
<location line="+5"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+30"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-35"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-43"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+116"/>
<source>Unable to sign checkpoint, wrong checkpointkey?
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-86"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-26"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Username for JSON-RPC connections</source>
<translation>Nama pengguna untuk hubungan JSON-RPC</translation>
</message>
<message>
<location line="+51"/>
<source>Verifying database integrity...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>WARNING: syncronized checkpoint violation detected, but skipped!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-54"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-56"/>
<source>Password for JSON-RPC connections</source>
<translation>Kata sandi untuk hubungan JSON-RPC</translation>
</message>
<message>
<location line="-32"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Output debugging information (default: 0, supplying <category> is optional)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>If <category> is not supplied, output all debugging information.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source><category> can be:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>Izinkan hubungan JSON-RPC dari alamat IP yang ditentukan</translation>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Kirim perintah ke node berjalan pada <ip> (standar: 127.0.0.1)</translation>
</message>
<message>
<location line="+1"/>
<source>Wait for RPC server to start</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Menjalankan perintah ketika perubahan blok terbaik (%s dalam cmd digantikan oleh hash blok)</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Upgrade wallet to latest format</source>
<translation>Perbarui dompet ke format terbaru</translation>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Kirim ukuran kolam kunci ke <n> (standar: 100)</translation>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Pindai ulang rantai-blok untuk transaksi dompet yang hilang</translation>
</message>
<message>
<location line="+3"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>Gunakan OpenSSL (https) untuk hubungan JSON-RPC</translation>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Berkas sertifikat server (standar: server.cert)</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Kunci pribadi server (standar: server.pem)</translation>
</message>
<message>
<location line="+10"/>
<source>Initialization sanity check failed. XDE2 is shutting down.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation>Eror: Dompet hanya di-buka hanya untuk staking, transaksi gagal dilaksanakan</translation>
</message>
<message>
<location line="+17"/>
<source>Error: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-174"/>
<source>This help message</source>
<translation>Pesan bantuan ini</translation>
</message>
<message>
<location line="+104"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>Tidak dapat mengikat ke %s dengan komputer ini (ikatan gagal %d, %s)</translation>
</message>
<message>
<location line="-133"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Izinkan peninjauan DNS untuk -addnote, -seednode dan -connect</translation>
</message>
<message>
<location line="+126"/>
<source>Loading addresses...</source>
<translation>Memuat alamat...</translation>
</message>
<message>
<location line="-12"/>
<source>Error loading blkindex.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>Gagal memuat wallet.dat: Dompet rusak</translation>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of XDE2</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart XDE2 to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation>Gagal memuat wallet.dat</translation>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Alamat -proxy salah: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Jaringan tidak diketahui yang ditentukan dalam -onlynet: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>Diminta versi proxy -socks tidak diketahui: %i</translation>
</message>
<message>
<location line="+4"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>Tidak dapat menyelesaikan alamat -bind: '%s'</translation>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>Tidak dapat menyelesaikan alamat -externalip: '%s'</translation>
</message>
<message>
<location line="-23"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Jumlah salah untuk -paytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+60"/>
<source>Sending...</source>
<translation>Mengirim...</translation>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation>Jumlah salah</translation>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation>Saldo tidak mencukupi</translation>
</message>
<message>
<location line="-40"/>
<source>Loading block index...</source>
<translation>Memuat indeks blok...</translation>
</message>
<message>
<location line="-110"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Tambahkan node untuk dihubungkan dan upaya untuk menjaga hubungan tetap terbuka</translation>
</message>
<message>
<location line="+125"/>
<source>Unable to bind to %s on this computer. XDE2 is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-101"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>Minimize weight consumption (experimental) (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>How many blocks to check at startup (default: 500, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Keep at most <n> unconnectable blocks in memory (default: %u)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. XDE2 is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Loading wallet...</source>
<translation>Memuat dompet...</translation>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation>Tidak dapat menurunkan versi dompet</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation>Tidak dapat menyimpan alamat standar</translation>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation>Memindai ulang...</translation>
</message>
<message>
<location line="+2"/>
<source>Done loading</source>
<translation>Memuat selesai</translation>
</message>
<message>
<location line="-161"/>
<source>To use the %s option</source>
<translation>Gunakan pilihan %s</translation>
</message>
<message>
<location line="+188"/>
<source>Error</source>
<translation>Gagal</translation>
</message>
<message>
<location line="-18"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>Anda harus mengatur rpcpassword=<kata sandi> dalam berkas konfigurasi:
%s
Jika berkas tidak ada, buatlah dengan permisi berkas hanya-dapat-dibaca-oleh-pemilik.</translation>
</message>
</context>
</TS>
|
CoinProjects/XDE2
|
src/qt/locale/bitcoin_id_ID.ts
|
TypeScript
|
mit
| 116,033
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
| example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
| http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are three reserved routes:
|
| $route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
| $route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
| $route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route['default_controller'] = 'Frontend';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
// Admin page
$route[ADMIN_FOLDER] = "backend";
$route[ADMIN_FOLDER.'/([a-zA-Z_-]+)/(:any)/(:any)'] = "backend/$1/$2/$3";
$route[ADMIN_FOLDER.'/([a-zA-Z_-]+)/(:any)'] = "backend/$1/$2";
$route[ADMIN_FOLDER.'/([a-zA-Z_-]+)'] = "backend/$1/index";
// Frontend
$route['([a-zA-Z0-9_-]+)'] = 'frontend/category/detail/$1';
$route['([a-zA-Z0-9_-]+)-(:num).html'] = 'frontend/product/detail/$2';
|
toaicntt/base
|
app/config/routes.php
|
PHP
|
mit
| 2,360
|
var Type = require("@kaoscript/runtime").Type;
module.exports = function() {
var __ks_Foobar = {};
__ks_Foobar.__ks_func_foobar_0 = function() {
};
__ks_Foobar._im_foobar = function(that) {
var args = Array.prototype.slice.call(arguments, 1, arguments.length);
if(args.length === 0) {
return __ks_Foobar.__ks_func_foobar_0.apply(that);
}
throw new SyntaxError("Wrong number of arguments");
};
function foo(x) {
if(arguments.length < 1) {
throw new SyntaxError("Wrong number of arguments (" + arguments.length + " for 1)");
}
if(x === void 0 || x === null) {
throw new TypeError("'x' is not nullable");
}
else if(!Type.isBoolean(x)) {
throw new TypeError("'x' is not of type 'Boolean'");
}
let y = null;
y = bar();
if(y !== null) {
__ks_Foobar._im_foobar(y);
}
}
function bar() {
}
};
|
kaoscript/kaoscript
|
test/fixtures/compile/type/type.decl.class.default.js
|
JavaScript
|
mit
| 835
|
<?php
/*
* This file is part of the Lug package.
*
* (c) Eric GELOEN <geloen.eric@gmail.com>
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code.
*/
namespace Lug\Bundle\ResourceBundle\Tests\Form\Extension;
use Lug\Bundle\ResourceBundle\Form\DataTransformer\BooleanTransformer;
use Lug\Bundle\ResourceBundle\Form\Extension\BooleanExtension;
use Lug\Bundle\ResourceBundle\Routing\ParameterResolverInterface;
use Symfony\Component\Form\Extension\Core\DataTransformer\BooleanToStringTransformer;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Validator\ValidatorExtension;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\Forms;
use Symfony\Component\Validator\Validation;
/**
* @author GeLo <geloen.eric@gmail.com>
*/
class BooleanExtensionTest extends \PHPUnit_Framework_TestCase
{
/**
* @var FormFactoryInterface
*/
private $formFactory;
/**
* @var \PHPUnit_Framework_MockObject_MockObject|ParameterResolverInterface
*/
private $parameterResolver;
/**
* @var BooleanTransformer
*/
private $booleanTransformer;
/**
* {@inheritdoc}
*/
protected function setUp()
{
$this->parameterResolver = $this->createParameterResolverMock();
$this->booleanTransformer = new BooleanTransformer();
$this->formFactory = Forms::createFormFactoryBuilder()
->addExtension(new ValidatorExtension(Validation::createValidator()))
->addTypeExtension(new BooleanExtension($this->parameterResolver, $this->booleanTransformer))
->getFormFactory();
}
public function testCheckboxType()
{
$viewTransformers = $this->formFactory
->create(CheckboxType::class, null, ['api' => false])
->getConfig()
->getViewTransformers();
$this->assertCount(1, $viewTransformers);
$this->assertInstanceOf(BooleanToStringTransformer::class, $viewTransformers[0]);
}
public function testApiType()
{
$viewTransformers = $this->formFactory
->create(CheckboxType::class, null, ['api' => true])
->getConfig()
->getViewTransformers();
$this->assertCount(1, $viewTransformers);
$this->assertInstanceOf(BooleanTransformer::class, $viewTransformers[0]);
}
/**
* @dataProvider validInitialProvider
*/
public function testValidInitialData($expected, $data)
{
$form = $this->formFactory->create(CheckboxType::class, $data, ['api' => true]);
$this->assertSame($expected, $form->getData());
}
/**
* @dataProvider invalidProvider
*
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
* @expectedExceptionMessage The boolean type expects a boolean or null value
*/
public function testInvalidInitialData($data)
{
$this->formFactory->create(CheckboxType::class, $data, ['api' => true]);
}
/**
* @dataProvider validSubmitProvider
*/
public function testValidSubmittedData($expected, $data)
{
$form = $this->formFactory
->create(CheckboxType::class, null, ['api' => true])
->submit($data);
$this->assertTrue($form->isValid());
$this->assertSame($expected, $form->getData());
}
/**
* @dataProvider invalidProvider
*/
public function testInvalidSubmittedData($data)
{
$form = $this->formFactory
->create(CheckboxType::class, null, ['api' => true])
->submit($data);
$this->assertFalse($form->isValid());
$this->assertNull($form->getData());
}
/**
* @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
* @expectedExceptionMessage The option "api" with value "foo" is expected to be of type "bool", but is of type "string".
*/
public function testInvalidApiOption()
{
$this->formFactory->create(CheckboxType::class, null, ['api' => 'foo']);
}
/**
* @return mixed[]
*/
public function validInitialProvider()
{
return [
[true, true],
[false, false],
[false, null],
];
}
/**
* @return mixed[]
*/
public function validSubmitProvider()
{
return [
[true, true],
[true, 1],
[true, '1'],
[true, 'true'],
[true, 'yes'],
[true, 'on'],
[false, false],
[false, 0],
[false, '0'],
[false, 'false'],
[false, 'no'],
[false, 'off'],
[false, ''],
[false, null],
];
}
/**
* @return mixed[]
*/
public function invalidProvider()
{
return [
['foo'],
[1.2],
[new \stdClass()],
[['foo' => 'bar']],
];
}
/**
* @return \PHPUnit_Framework_MockObject_MockObject|ParameterResolverInterface
*/
private function createParameterResolverMock()
{
return $this->createMock(ParameterResolverInterface::class);
}
}
|
php-lug/lug
|
src/Bundle/ResourceBundle/Tests/Form/Extension/BooleanExtensionTest.php
|
PHP
|
mit
| 5,333
|
import java.io.{BufferedReader, InputStreamReader, PrintWriter}
import java.net.{InetSocketAddress, Socket}
/*
* Copyright (c) 2016 Markus Mulkahainen
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
*/
/**
* Created by markus on 22.1.2016.
*/
class POP3Client(val server: String, val port: Int) {
val socket = new Socket()
socket.connect(new InetSocketAddress(server, port))
val io = new ClientIO(socket)
println(io.receive())
def login(username: String, password: String): (Boolean, String) = {
io.send(new POP3Messages.USER(username).msg())
var msg = POP3Messages.parseReturnMessage(io.receive())
msg match {
case POP3Messages.ERR(data) =>
return (false, data)
case POP3Messages.DEFAULT(data) =>
return (false, data)
case _ =>
//nothing
}
io.send(new POP3Messages.PASS(password).msg())
msg = POP3Messages.parseReturnMessage(io.receive())
msg match {
case POP3Messages.ERR(data) =>
return (false, data)
case POP3Messages.DEFAULT(data) =>
return (false, data)
case _ =>
//nothing
}
return (true, "Login ok")
}
def getMessages(): List[MailRef] = {
io.send(new POP3Messages.LIST().msg())
val res = POP3Messages.parseReturnMessage(io.receive())
res match {
case POP3Messages.ERR(data) =>
return List(MailRef.default())
case POP3Messages.OK(data) =>
val n = Integer.parseInt(data.split(" ").head) //"n messages"
return (1 to n)
.map(_ => io.receive())
.map(x => new MailRef(x.split(" ").head, x.split(" ").tail.head))
.toList
}
}
def getMail(mail: MailRef): String = {
io.send(new POP3Messages.RETR(mail.id).msg())
val res = POP3Messages.parseReturnMessage(io.receive())
res match {
case POP3Messages.ERR(data) =>
return data
case _ =>
//nothing
}
return Stream
.continually(io.receive())
.takeWhile(x => !x.equals("."))
.reduce((a,b) => new String(a + "\n" +b))
}
def quit(): Unit = {
io.send(new POP3Messages.QUIT().msg())
}
class MailRef(val id: String, val size: String) { override def toString():String = { return id + " " +size}}
object MailRef { def default(): MailRef = { return new MailRef("", "")}}
class ClientIO(val socket: Socket) {
val out = new PrintWriter(socket.getOutputStream(), true)
val in = new BufferedReader(new InputStreamReader(socket.getInputStream()))
def send(msg: String): Unit = {
out.println(msg)
}
def receive(): String = {
return in.readLine()
}
}
private object POP3Messages {
abstract class Pop3Message { def msg():String }
case class USER(val username: String) extends Pop3Message { def msg(): String = { return "USER " + username }}
case class PASS(val password: String) extends Pop3Message { def msg(): String = { return "PASS " + password }}
case class LIST() extends Pop3Message { def msg(): String = { return "LIST" }}
case class QUIT() extends Pop3Message { def msg(): String = { return "QUIT" }}
case class RETR(val id: String) extends Pop3Message { def msg(): String = { return "RETR " + id }} // extra for the assignment
abstract class Pop3ReturnMessage
case class OK(val data: String = "") extends Pop3ReturnMessage
case class ERR(val data: String = "") extends Pop3ReturnMessage
case class DEFAULT(val data: String = "") extends Pop3ReturnMessage
class DataSeparator(val sep: String)
private val strToMsgMap: Map[String, (DataSeparator, Function[String, Pop3ReturnMessage])] = Map(
"+OK" -> (new DataSeparator(" "), (x: String) => new OK(x)),
"-ERR" -> (new DataSeparator(" "), (x: String) => new ERR(x))
)
def parseReturnMessage(msg: String): Pop3ReturnMessage = {
val sepAndFn = strToMsgMap
.filterKeys(x => msg.startsWith(x))
.values
.headOption
.getOrElse((new DataSeparator(""), (x: String) => new DEFAULT(x)))
return sepAndFn._2(msg.substring(msg.indexOf(sepAndFn._1.sep) + sepAndFn._1.sep.length()))
}
}
}
|
Klyyssi/ties323
|
mail-protocols/pop-client/src/main/scala/POP3Client.scala
|
Scala
|
mit
| 4,689
|
const int SUBARU_MAX_STEER = 2047; // 1s
// real time torque limit to prevent controls spamming
// the real time limit is 1500/sec
const int SUBARU_MAX_RT_DELTA = 940; // max delta torque allowed for real time checks
const uint32_t SUBARU_RT_INTERVAL = 250000; // 250ms between real time checks
const int SUBARU_MAX_RATE_UP = 50;
const int SUBARU_MAX_RATE_DOWN = 70;
const int SUBARU_DRIVER_TORQUE_ALLOWANCE = 60;
const int SUBARU_DRIVER_TORQUE_FACTOR = 10;
const int SUBARU_STANDSTILL_THRSLD = 20; // about 1kph
const int SUBARU_L_DRIVER_TORQUE_ALLOWANCE = 75;
const int SUBARU_L_DRIVER_TORQUE_FACTOR = 10;
const CanMsg SUBARU_TX_MSGS[] = {{0x122, 0, 8}, {0x221, 0, 8}, {0x322, 0, 8}};
#define SUBARU_TX_MSGS_LEN (sizeof(SUBARU_TX_MSGS) / sizeof(SUBARU_TX_MSGS[0]))
AddrCheckStruct subaru_addr_checks[] = {
{.msg = {{ 0x40, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 10000U}, { 0 }, { 0 }}},
{.msg = {{0x119, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 20000U}, { 0 }, { 0 }}},
{.msg = {{0x13a, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 20000U}, { 0 }, { 0 }}},
{.msg = {{0x13c, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 20000U}, { 0 }, { 0 }}},
{.msg = {{0x240, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 50000U}, { 0 }, { 0 }}},
};
#define SUBARU_ADDR_CHECK_LEN (sizeof(subaru_addr_checks) / sizeof(subaru_addr_checks[0]))
addr_checks subaru_rx_checks = {subaru_addr_checks, SUBARU_ADDR_CHECK_LEN};
const CanMsg SUBARU_L_TX_MSGS[] = {{0x161, 0, 8}, {0x164, 0, 8}};
#define SUBARU_L_TX_MSGS_LEN (sizeof(SUBARU_L_TX_MSGS) / sizeof(SUBARU_L_TX_MSGS[0]))
// TODO: do checksum and counter checks after adding the signals to the outback dbc file
AddrCheckStruct subaru_l_addr_checks[] = {
{.msg = {{0x140, 0, 8, .expected_timestep = 10000U}, { 0 }, { 0 }}},
{.msg = {{0x371, 0, 8, .expected_timestep = 20000U}, { 0 }, { 0 }}},
{.msg = {{0x144, 0, 8, .expected_timestep = 50000U}, { 0 }, { 0 }}},
};
#define SUBARU_L_ADDR_CHECK_LEN (sizeof(subaru_l_addr_checks) / sizeof(subaru_l_addr_checks[0]))
addr_checks subaru_l_rx_checks = {subaru_l_addr_checks, SUBARU_L_ADDR_CHECK_LEN};
static uint8_t subaru_get_checksum(CANPacket_t *to_push) {
return (uint8_t)GET_BYTE(to_push, 0);
}
static uint8_t subaru_get_counter(CANPacket_t *to_push) {
return (uint8_t)(GET_BYTE(to_push, 1) & 0xFU);
}
static uint8_t subaru_compute_checksum(CANPacket_t *to_push) {
int addr = GET_ADDR(to_push);
int len = GET_LEN(to_push);
uint8_t checksum = (uint8_t)(addr) + (uint8_t)((unsigned int)(addr) >> 8U);
for (int i = 1; i < len; i++) {
checksum += (uint8_t)GET_BYTE(to_push, i);
}
return checksum;
}
static int subaru_rx_hook(CANPacket_t *to_push) {
bool valid = addr_safety_check(to_push, &subaru_rx_checks,
subaru_get_checksum, subaru_compute_checksum, subaru_get_counter);
if (valid && (GET_BUS(to_push) == 0U)) {
int addr = GET_ADDR(to_push);
if (addr == 0x119) {
int torque_driver_new;
torque_driver_new = ((GET_BYTES_04(to_push) >> 16) & 0x7FFU);
torque_driver_new = -1 * to_signed(torque_driver_new, 11);
update_sample(&torque_driver, torque_driver_new);
}
// enter controls on rising edge of ACC, exit controls on ACC off
if (addr == 0x240) {
int cruise_engaged = ((GET_BYTES_48(to_push) >> 9) & 1U);
if (cruise_engaged && !cruise_engaged_prev) {
controls_allowed = 1;
}
if (!cruise_engaged) {
controls_allowed = 0;
}
cruise_engaged_prev = cruise_engaged;
}
// sample wheel speed, averaging opposite corners
if (addr == 0x13a) {
int subaru_speed = ((GET_BYTES_04(to_push) >> 12) & 0x1FFFU) + ((GET_BYTES_48(to_push) >> 6) & 0x1FFFU); // FR + RL
subaru_speed /= 2;
vehicle_moving = subaru_speed > SUBARU_STANDSTILL_THRSLD;
}
if (addr == 0x13c) {
brake_pressed = ((GET_BYTE(to_push, 7) >> 6) & 1U);
}
if (addr == 0x40) {
gas_pressed = GET_BYTE(to_push, 4) != 0U;
}
generic_rx_checks((addr == 0x122));
}
return valid;
}
static int subaru_legacy_rx_hook(CANPacket_t *to_push) {
bool valid = addr_safety_check(to_push, &subaru_l_rx_checks, NULL, NULL, NULL);
if (valid && (GET_BUS(to_push) == 0U)) {
int addr = GET_ADDR(to_push);
if (addr == 0x371) {
int torque_driver_new;
torque_driver_new = (GET_BYTE(to_push, 3) >> 5) + (GET_BYTE(to_push, 4) << 3);
torque_driver_new = to_signed(torque_driver_new, 11);
update_sample(&torque_driver, torque_driver_new);
}
// enter controls on rising edge of ACC, exit controls on ACC off
if (addr == 0x144) {
int cruise_engaged = ((GET_BYTES_48(to_push) >> 17) & 1U);
if (cruise_engaged && !cruise_engaged_prev) {
controls_allowed = 1;
}
if (!cruise_engaged) {
controls_allowed = 0;
}
cruise_engaged_prev = cruise_engaged;
}
// sample wheel speed, averaging opposite corners
if (addr == 0xD4) {
int subaru_speed = ((GET_BYTES_04(to_push) >> 16) & 0xFFFFU) + (GET_BYTES_48(to_push) & 0xFFFFU); // FR + RL
subaru_speed /= 2;
vehicle_moving = subaru_speed > SUBARU_STANDSTILL_THRSLD;
}
if (addr == 0xD1) {
brake_pressed = ((GET_BYTES_04(to_push) >> 16) & 0xFFU) > 0U;
}
if (addr == 0x140) {
gas_pressed = GET_BYTE(to_push, 0) != 0U;
}
generic_rx_checks((addr == 0x164));
}
return valid;
}
static int subaru_tx_hook(CANPacket_t *to_send) {
int tx = 1;
int addr = GET_ADDR(to_send);
if (!msg_allowed(to_send, SUBARU_TX_MSGS, SUBARU_TX_MSGS_LEN)) {
tx = 0;
}
// steer cmd checks
if (addr == 0x122) {
int desired_torque = ((GET_BYTES_04(to_send) >> 16) & 0x1FFFU);
bool violation = 0;
uint32_t ts = microsecond_timer_get();
desired_torque = -1 * to_signed(desired_torque, 13);
if (controls_allowed) {
// *** global torque limit check ***
violation |= max_limit_check(desired_torque, SUBARU_MAX_STEER, -SUBARU_MAX_STEER);
// *** torque rate limit check ***
violation |= driver_limit_check(desired_torque, desired_torque_last, &torque_driver,
SUBARU_MAX_STEER, SUBARU_MAX_RATE_UP, SUBARU_MAX_RATE_DOWN,
SUBARU_DRIVER_TORQUE_ALLOWANCE, SUBARU_DRIVER_TORQUE_FACTOR);
// used next time
desired_torque_last = desired_torque;
// *** torque real time rate limit check ***
violation |= rt_rate_limit_check(desired_torque, rt_torque_last, SUBARU_MAX_RT_DELTA);
// every RT_INTERVAL set the new limits
uint32_t ts_elapsed = get_ts_elapsed(ts, ts_last);
if (ts_elapsed > SUBARU_RT_INTERVAL) {
rt_torque_last = desired_torque;
ts_last = ts;
}
}
// no torque if controls is not allowed
if (!controls_allowed && (desired_torque != 0)) {
violation = 1;
}
// reset to 0 if either controls is not allowed or there's a violation
if (violation || !controls_allowed) {
desired_torque_last = 0;
rt_torque_last = 0;
ts_last = ts;
}
if (violation) {
tx = 0;
}
}
return tx;
}
static int subaru_legacy_tx_hook(CANPacket_t *to_send) {
int tx = 1;
int addr = GET_ADDR(to_send);
if (!msg_allowed(to_send, SUBARU_L_TX_MSGS, SUBARU_L_TX_MSGS_LEN)) {
tx = 0;
}
// steer cmd checks
if (addr == 0x164) {
int desired_torque = ((GET_BYTES_04(to_send) >> 8) & 0x1FFFU);
bool violation = 0;
uint32_t ts = microsecond_timer_get();
desired_torque = -1 * to_signed(desired_torque, 13);
if (controls_allowed) {
// *** global torque limit check ***
violation |= max_limit_check(desired_torque, SUBARU_MAX_STEER, -SUBARU_MAX_STEER);
// *** torque rate limit check ***
violation |= driver_limit_check(desired_torque, desired_torque_last, &torque_driver,
SUBARU_MAX_STEER, SUBARU_MAX_RATE_UP, SUBARU_MAX_RATE_DOWN,
SUBARU_L_DRIVER_TORQUE_ALLOWANCE, SUBARU_L_DRIVER_TORQUE_FACTOR);
// used next time
desired_torque_last = desired_torque;
// *** torque real time rate limit check ***
violation |= rt_rate_limit_check(desired_torque, rt_torque_last, SUBARU_MAX_RT_DELTA);
// every RT_INTERVAL set the new limits
uint32_t ts_elapsed = get_ts_elapsed(ts, ts_last);
if (ts_elapsed > SUBARU_RT_INTERVAL) {
rt_torque_last = desired_torque;
ts_last = ts;
}
}
// no torque if controls is not allowed
if (!controls_allowed && (desired_torque != 0)) {
violation = 1;
}
// reset to 0 if either controls is not allowed or there's a violation
if (violation || !controls_allowed) {
desired_torque_last = 0;
rt_torque_last = 0;
ts_last = ts;
}
if (violation) {
tx = 0;
}
}
return tx;
}
static int subaru_fwd_hook(int bus_num, CANPacket_t *to_fwd) {
int bus_fwd = -1;
if (bus_num == 0) {
bus_fwd = 2; // Camera CAN
}
if (bus_num == 2) {
// Global platform
// 0x122 ES_LKAS
// 0x221 ES_Distance
// 0x322 ES_LKAS_State
int addr = GET_ADDR(to_fwd);
int block_msg = ((addr == 0x122) || (addr == 0x221) || (addr == 0x322));
if (!block_msg) {
bus_fwd = 0; // Main CAN
}
}
return bus_fwd;
}
static int subaru_legacy_fwd_hook(int bus_num, CANPacket_t *to_fwd) {
int bus_fwd = -1;
if (bus_num == 0) {
bus_fwd = 2; // Camera CAN
}
if (bus_num == 2) {
// Preglobal platform
// 0x161 is ES_CruiseThrottle
// 0x164 is ES_LKAS
int addr = GET_ADDR(to_fwd);
int block_msg = ((addr == 0x161) || (addr == 0x164));
if (!block_msg) {
bus_fwd = 0; // Main CAN
}
}
return bus_fwd;
}
static const addr_checks* subaru_init(int16_t param) {
UNUSED(param);
controls_allowed = false;
relay_malfunction_reset();
return &subaru_rx_checks;
}
const safety_hooks subaru_hooks = {
.init = subaru_init,
.rx = subaru_rx_hook,
.tx = subaru_tx_hook,
.tx_lin = nooutput_tx_lin_hook,
.fwd = subaru_fwd_hook,
};
static const addr_checks* subaru_legacy_init(int16_t param) {
UNUSED(param);
controls_allowed = false;
relay_malfunction_reset();
return &subaru_l_rx_checks;
}
const safety_hooks subaru_legacy_hooks = {
.init = subaru_legacy_init,
.rx = subaru_legacy_rx_hook,
.tx = subaru_legacy_tx_hook,
.tx_lin = nooutput_tx_lin_hook,
.fwd = subaru_legacy_fwd_hook,
};
|
commaai/panda
|
board/safety/safety_subaru.h
|
C
|
mit
| 10,558
|
/* ###################################################################
** This component module is generated by Processor Expert. Do not modify it.
** Filename : BitIoLdd2.c
** Project : eurocodec
** Processor : MK22FN512VLH12
** Component : BitIO_LDD
** Version : Component 01.033, Driver 01.03, CPU db: 3.00.000
** Repository : Kinetis
** Compiler : GNU C Compiler
** Date/Time : 2015-12-05, 11:41, # CodeGen: 0
** Abstract :
** The HAL BitIO component provides a low level API for unified
** access to general purpose digital input/output pins across
** various device designs.
**
** RTOS drivers using HAL BitIO API are simpler and more
** portable to various microprocessors.
** Settings :
** Component name : BitIoLdd2
** Pin for I/O : PTD0/LLWU_P12/SPI0_PCS0/UART2_RTS_b/FTM3_CH0/FBa_ALE/FBa_CS1_b/FBa_TS_b/LPUART0_RTS_b
** Direction : Input/Output
** Initialization :
** Init. direction : Input
** Init. value : 1
** Auto initialization : yes
** Safe mode : yes
** Contents :
** Init - LDD_TDeviceData* BitIoLdd2_Init(LDD_TUserData *UserDataPtr);
** SetDir - void BitIoLdd2_SetDir(LDD_TDeviceData *DeviceDataPtr, bool Dir);
** GetVal - bool BitIoLdd2_GetVal(LDD_TDeviceData *DeviceDataPtr);
** PutVal - void BitIoLdd2_PutVal(LDD_TDeviceData *DeviceDataPtr, bool Val);
** ClrVal - void BitIoLdd2_ClrVal(LDD_TDeviceData *DeviceDataPtr);
** SetVal - void BitIoLdd2_SetVal(LDD_TDeviceData *DeviceDataPtr);
**
** Copyright : 1997 - 2015 Freescale Semiconductor, Inc.
** All Rights Reserved.
**
** Redistribution and use in source and binary forms, with or without modification,
** are permitted provided that the following conditions are met:
**
** o Redistributions of source code must retain the above copyright notice, this list
** of conditions and the following disclaimer.
**
** o Redistributions in binary form must reproduce the above copyright notice, this
** list of conditions and the following disclaimer in the documentation and/or
** other materials provided with the distribution.
**
** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
** contributors may be used to endorse or promote products derived from this
** software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
** http: www.freescale.com
** mail: support@freescale.com
** ###################################################################*/
/*!
** @file BitIoLdd2.c
** @version 01.03
** @brief
** The HAL BitIO component provides a low level API for unified
** access to general purpose digital input/output pins across
** various device designs.
**
** RTOS drivers using HAL BitIO API are simpler and more
** portable to various microprocessors.
*/
/*!
** @addtogroup BitIoLdd2_module BitIoLdd2 module documentation
** @{
*/
/* MODULE BitIoLdd2. */
/* {Default RTOS Adapter} No RTOS includes */
#include "BitIoLdd2.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
LDD_TUserData *UserDataPtr; /* Pointer to user data */
} BitIoLdd2_TDeviceData; /* Device data structure type */
typedef BitIoLdd2_TDeviceData *BitIoLdd2_TDeviceDataPtr ; /* Pointer to the device data structure. */
/* {Default RTOS Adapter} Static object used for simulation of dynamic driver memory allocation */
static BitIoLdd2_TDeviceData DeviceDataPrv__DEFAULT_RTOS_ALLOC;
/*
** ===================================================================
** Method : BitIoLdd2_Init (component BitIO_LDD)
*/
/*!
** @brief
** Initializes the device. Allocates memory for the device data
** structure, allocates interrupt vectors and sets interrupt
** priority, sets pin routing, sets timing, etc. If the "Enable
** in init. code" is set to "yes" value then the device is also
** enabled(see the description of the Enable() method). In this
** case the Enable() method is not necessary and needn't to be
** generated.
** @param
** UserDataPtr - Pointer to the user or
** RTOS specific data. This pointer will be
** passed as an event or callback parameter.
** @return
** - Pointer to the dynamically allocated private
** structure or NULL if there was an error.
*/
/* ===================================================================*/
LDD_TDeviceData* BitIoLdd2_Init(LDD_TUserData *UserDataPtr)
{
/* Allocate device structure */
BitIoLdd2_TDeviceDataPtr DeviceDataPrv;
/* {Default RTOS Adapter} Driver memory allocation: Dynamic allocation is simulated by a pointer to the static object */
DeviceDataPrv = &DeviceDataPrv__DEFAULT_RTOS_ALLOC;
DeviceDataPrv->UserDataPtr = UserDataPtr; /* Store the RTOS device structure */
/* Enable device clock gate */
/* SIM_SCGC5: PORTD=1 */
SIM_SCGC5 |= SIM_SCGC5_PORTD_MASK;
/* Configure pin as input */
/* GPIOD_PDDR: PDD&=~1 */
GPIOD_PDDR &= (uint32_t)~(uint32_t)(GPIO_PDDR_PDD(0x01));
/* Set initialization value */
/* GPIOD_PDOR: PDO|=1 */
GPIOD_PDOR |= GPIO_PDOR_PDO(0x01);
/* Initialization of pin routing */
/* PORTD_PCR0: ISF=0,MUX=1 */
PORTD_PCR0 = (uint32_t)((PORTD_PCR0 & (uint32_t)~(uint32_t)(
PORT_PCR_ISF_MASK |
PORT_PCR_MUX(0x06)
)) | (uint32_t)(
PORT_PCR_MUX(0x01)
));
/* Registration of the device structure */
PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_BitIoLdd2_ID,DeviceDataPrv);
return ((LDD_TDeviceData *)DeviceDataPrv);
}
/*
** ===================================================================
** Method : BitIoLdd2_SetDir (component BitIO_LDD)
*/
/*!
** @brief
** Sets a pin direction (available only if the direction =
** _[input/output]_).
** @param
** DeviceDataPtr - Device data structure
** pointer returned by <Init> method.
** @param
** Dir - Direction to set. Possible values:
** <false> - Input
** <true> - Output
*/
/* ===================================================================*/
void BitIoLdd2_SetDir(LDD_TDeviceData *DeviceDataPtr, bool Dir)
{
(void)DeviceDataPtr; /* Parameter is not used, suppress unused argument warning */
if (Dir) {
/* Output */
GPIO_PDD_SetPortOutputDirectionMask(BitIoLdd2_MODULE_BASE_ADDRESS, BitIoLdd2_PORT_MASK);
} else {
/* Input */
GPIO_PDD_SetPortInputDirectionMask(BitIoLdd2_MODULE_BASE_ADDRESS, BitIoLdd2_PORT_MASK);
}
}
/*
** ===================================================================
** Method : BitIoLdd2_GetVal (component BitIO_LDD)
*/
/*!
** @brief
** Returns the input/output value. If the direction is [input]
** then the input value of the pin is read and returned. If the
** direction is [output] then the last written value is read
** and returned (see <Safe mode> property for limitations).
** This method cannot be disabled if direction is [input].
** @param
** DeviceDataPtr - Device data structure
** pointer returned by <Init> method.
** @return
** - Input or output value. Possible values:
** <false> - logical "0" (Low level)
** <true> - logical "1" (High level)
*/
/* ===================================================================*/
bool BitIoLdd2_GetVal(LDD_TDeviceData *DeviceDataPtr)
{
uint32_t PortData; /* Port data masked according to the bit used */
(void)DeviceDataPtr; /* Parameter is not used, suppress unused argument warning */
if ((GPIO_PDD_GetPortDirection(BitIoLdd2_MODULE_BASE_ADDRESS) & BitIoLdd2_PORT_MASK) == 0U) {
/* Port is configured as input */
PortData = GPIO_PDD_GetPortDataInput(BitIoLdd2_MODULE_BASE_ADDRESS) & BitIoLdd2_PORT_MASK;
} else {
/* Port is configured as output */
PortData = GPIO_PDD_GetPortDataOutput(BitIoLdd2_MODULE_BASE_ADDRESS) & BitIoLdd2_PORT_MASK;
}
return (PortData != 0U) ? (bool)TRUE : (bool)FALSE;
}
/*
** ===================================================================
** Method : BitIoLdd2_PutVal (component BitIO_LDD)
*/
/*!
** @brief
** The specified output value is set. If the direction is <b>
** input</b>, the component saves the value to a memory or a
** register and this value will be written to the pin after
** switching to the output mode (using <tt>SetDir(TRUE)</tt>;
** see <a href="BitIOProperties.html#SafeMode">Safe mode</a>
** property for limitations). If the direction is <b>output</b>,
** it writes the value to the pin. (Method is available only if
** the direction = <u><tt>output</tt></u> or <u><tt>
** input/output</tt></u>).
** @param
** DeviceDataPtr - Device data structure
** pointer returned by <Init> method.
** @param
** Val - Output value. Possible values:
** <false> - logical "0" (Low level)
** <true> - logical "1" (High level)
*/
/* ===================================================================*/
void BitIoLdd2_PutVal(LDD_TDeviceData *DeviceDataPtr, bool Val)
{
(void)DeviceDataPtr; /* Parameter is not used, suppress unused argument warning */
if (Val) {
GPIO_PDD_SetPortDataOutputMask(BitIoLdd2_MODULE_BASE_ADDRESS, BitIoLdd2_PORT_MASK);
} else { /* !Val */
GPIO_PDD_ClearPortDataOutputMask(BitIoLdd2_MODULE_BASE_ADDRESS, BitIoLdd2_PORT_MASK);
} /* !Val */
}
/*
** ===================================================================
** Method : BitIoLdd2_ClrVal (component BitIO_LDD)
*/
/*!
** @brief
** Clears (set to zero) the output value. It is equivalent to
** the [PutVal(FALSE)]. This method is available only if the
** direction = _[output]_ or _[input/output]_.
** @param
** DeviceDataPtr - Pointer to device data
** structure returned by <Init> method.
*/
/* ===================================================================*/
void BitIoLdd2_ClrVal(LDD_TDeviceData *DeviceDataPtr)
{
(void)DeviceDataPtr; /* Parameter is not used, suppress unused argument warning */
GPIO_PDD_ClearPortDataOutputMask(BitIoLdd2_MODULE_BASE_ADDRESS, BitIoLdd2_PORT_MASK);
}
/*
** ===================================================================
** Method : BitIoLdd2_SetVal (component BitIO_LDD)
*/
/*!
** @brief
** Sets (to one) the output value. It is equivalent to the
** [PutVal(TRUE)]. This method is available only if the
** direction = _[output]_ or _[input/output]_.
** @param
** DeviceDataPtr - Pointer to device data
** structure returned by <Init> method.
*/
/* ===================================================================*/
void BitIoLdd2_SetVal(LDD_TDeviceData *DeviceDataPtr)
{
(void)DeviceDataPtr; /* Parameter is not used, suppress unused argument warning */
GPIO_PDD_SetPortDataOutputMask(BitIoLdd2_MODULE_BASE_ADDRESS, BitIoLdd2_PORT_MASK);
}
/* END BitIoLdd2. */
#ifdef __cplusplus
} /* extern "C" */
#endif
/*!
** @}
*/
/*
** ###################################################################
**
** This file was created by Processor Expert 10.5 [05.21]
** for the Freescale Kinetis series of microcontrollers.
**
** ###################################################################
*/
|
ThisIsNotRocketScience/Eurorack-KDS
|
eurocodec/Generated_Code/BitIoLdd2.c
|
C
|
mit
| 13,150
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: Sort.java 468650 2006-10-28 07:03:30Z minchau $
*/
package org.apache.xalan.xsltc.compiler;
import java.text.Collator;
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.StringTokenizer;
import java.util.Vector;
import org.apache.bcel.classfile.Field;
import org.apache.bcel.classfile.Method;
import org.apache.bcel.generic.ALOAD;
import org.apache.bcel.generic.ANEWARRAY;
import org.apache.bcel.generic.ASTORE;
import org.apache.bcel.generic.CHECKCAST;
import org.apache.bcel.generic.ConstantPoolGen;
import org.apache.bcel.generic.GETFIELD;
import org.apache.bcel.generic.ICONST;
import org.apache.bcel.generic.ILOAD;
import org.apache.bcel.generic.INVOKEINTERFACE;
import org.apache.bcel.generic.INVOKESPECIAL;
import org.apache.bcel.generic.INVOKESTATIC;
import org.apache.bcel.generic.INVOKEVIRTUAL;
import org.apache.bcel.generic.InstructionHandle;
import org.apache.bcel.generic.InstructionList;
import org.apache.bcel.generic.LocalVariableGen;
import org.apache.bcel.generic.NEW;
import org.apache.bcel.generic.NOP;
import org.apache.bcel.generic.PUSH;
import org.apache.bcel.generic.PUTFIELD;
import org.apache.bcel.generic.TABLESWITCH;
import org.apache.xalan.xsltc.compiler.util.ClassGenerator;
import org.apache.xalan.xsltc.compiler.util.CompareGenerator;
import org.apache.xalan.xsltc.compiler.util.ErrorMsg;
import org.apache.xalan.xsltc.compiler.util.IntType;
import org.apache.xalan.xsltc.compiler.util.MethodGenerator;
import org.apache.xalan.xsltc.compiler.util.NodeSortRecordFactGenerator;
import org.apache.xalan.xsltc.compiler.util.NodeSortRecordGenerator;
import org.apache.xalan.xsltc.compiler.util.StringType;
import org.apache.xalan.xsltc.compiler.util.Type;
import org.apache.xalan.xsltc.compiler.util.TypeCheckError;
import org.apache.xalan.xsltc.compiler.util.Util;
import org.apache.xml.dtm.Axis;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
*/
final class Sort extends Instruction implements Closure {
private Expression _select;
private AttributeValue _order;
private AttributeValue _caseOrder;
private AttributeValue _dataType;
private String _lang; // bug! see 26869
private String _data = null;
private String _className = null;
private ArrayList _closureVars = null;
private boolean _needsSortRecordFactory = false;
// -- Begin Closure interface --------------------
/**
* Returns true if this closure is compiled in an inner class (i.e.
* if this is a real closure).
*/
public boolean inInnerClass() {
return (_className != null);
}
/**
* Returns a reference to its parent closure or null if outermost.
*/
public Closure getParentClosure() {
return null;
}
/**
* Returns the name of the auxiliary class or null if this predicate
* is compiled inside the Translet.
*/
public String getInnerClassName() {
return _className;
}
/**
* Add new variable to the closure.
*/
public void addVariable(VariableRefBase variableRef) {
if (_closureVars == null) {
_closureVars = new ArrayList();
}
// Only one reference per variable
if (!_closureVars.contains(variableRef)) {
_closureVars.add(variableRef);
_needsSortRecordFactory = true;
}
}
// -- End Closure interface ----------------------
private void setInnerClassName(String className) {
_className = className;
}
/**
* Parse the attributes of the xsl:sort element
*/
public void parseContents(Parser parser) {
final SyntaxTreeNode parent = getParent();
if (!(parent instanceof ApplyTemplates) &&
!(parent instanceof ForEach)) {
reportError(this, parser, ErrorMsg.STRAY_SORT_ERR, null);
return;
}
// Parse the select expression (node string value if no expression)
_select = parser.parseExpression(this, "select", "string(.)");
// Get the sort order; default is 'ascending'
String val = getAttribute("order");
if (val.length() == 0) val = "ascending";
_order = AttributeValue.create(this, val, parser);
// Get the sort data type; default is text
val = getAttribute("data-type");
if (val.length() == 0) {
try {
final Type type = _select.typeCheck(parser.getSymbolTable());
if (type instanceof IntType)
val = "number";
else
val = "text";
}
catch (TypeCheckError e) {
val = "text";
}
}
_dataType = AttributeValue.create(this, val, parser);
_lang = getAttribute("lang"); // bug! see 26869
// val = getAttribute("lang");
// _lang = AttributeValue.create(this, val, parser);
// Get the case order; default is language dependant
val = getAttribute("case-order");
_caseOrder = AttributeValue.create(this, val, parser);
}
/**
* Run type checks on the attributes; expression must return a string
* which we will use as a sort key
*/
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
final Type tselect = _select.typeCheck(stable);
// If the sort data-type is not set we use the natural data-type
// of the data we will sort
if (!(tselect instanceof StringType)) {
_select = new CastExpr(_select, Type.String);
}
_order.typeCheck(stable);
_caseOrder.typeCheck(stable);
_dataType.typeCheck(stable);
return Type.Void;
}
/**
* These two methods are needed in the static methods that compile the
* overloaded NodeSortRecord.compareType() and NodeSortRecord.sortOrder()
*/
public void translateSortType(ClassGenerator classGen,
MethodGenerator methodGen) {
_dataType.translate(classGen, methodGen);
}
public void translateSortOrder(ClassGenerator classGen,
MethodGenerator methodGen) {
_order.translate(classGen, methodGen);
}
public void translateCaseOrder(ClassGenerator classGen,
MethodGenerator methodGen) {
_caseOrder.translate(classGen, methodGen);
}
public void translateLang(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new PUSH(cpg, _lang)); // bug! see 26869
}
/**
* This method compiles code for the select expression for this
* xsl:sort element. The method is called from the static code-generating
* methods in this class.
*/
public void translateSelect(ClassGenerator classGen,
MethodGenerator methodGen) {
_select.translate(classGen,methodGen);
}
/**
* This method should not produce any code
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
// empty
}
/**
* Compiles code that instantiates a SortingIterator object.
* This object's constructor needs referencdes to the current iterator
* and a node sort record producing objects as its parameters.
*/
public static void translateSortIterator(ClassGenerator classGen,
MethodGenerator methodGen,
Expression nodeSet,
Vector sortObjects)
{
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// SortingIterator.SortingIterator(NodeIterator,NodeSortRecordFactory);
final int init = cpg.addMethodref(SORT_ITERATOR, "<init>",
"("
+ NODE_ITERATOR_SIG
+ NODE_SORT_FACTORY_SIG
+ ")V");
// Backwards branches are prohibited if an uninitialized object is
// on the stack by section 4.9.4 of the JVM Specification, 2nd Ed.
// We don't know whether this code might contain backwards branches
// so we mustn't create the new object until after we've created
// the suspect arguments to its constructor. Instead we calculate
// the values of the arguments to the constructor first, store them
// in temporary variables, create the object and reload the
// arguments from the temporaries to avoid the problem.
LocalVariableGen nodesTemp =
methodGen.addLocalVariable("sort_tmp1",
Util.getJCRefType(NODE_ITERATOR_SIG),
null, null);
LocalVariableGen sortRecordFactoryTemp =
methodGen.addLocalVariable("sort_tmp2",
Util.getJCRefType(NODE_SORT_FACTORY_SIG),
null, null);
// Get the current node iterator
if (nodeSet == null) { // apply-templates default
final int children = cpg.addInterfaceMethodref(DOM_INTF,
"getAxisIterator",
"(I)"+
NODE_ITERATOR_SIG);
il.append(methodGen.loadDOM());
il.append(new PUSH(cpg, Axis.CHILD));
il.append(new INVOKEINTERFACE(children, 2));
}
else {
nodeSet.translate(classGen, methodGen);
}
nodesTemp.setStart(il.append(new ASTORE(nodesTemp.getIndex())));
// Compile the code for the NodeSortRecord producing class and pass
// that as the last argument to the SortingIterator constructor.
compileSortRecordFactory(sortObjects, classGen, methodGen);
sortRecordFactoryTemp.setStart(
il.append(new ASTORE(sortRecordFactoryTemp.getIndex())));
il.append(new NEW(cpg.addClass(SORT_ITERATOR)));
il.append(DUP);
nodesTemp.setEnd(il.append(new ALOAD(nodesTemp.getIndex())));
sortRecordFactoryTemp.setEnd(
il.append(new ALOAD(sortRecordFactoryTemp.getIndex())));
il.append(new INVOKESPECIAL(init));
}
/**
* Compiles code that instantiates a NodeSortRecordFactory object which
* will produce NodeSortRecord objects of a specific type.
*/
public static void compileSortRecordFactory(Vector sortObjects,
ClassGenerator classGen, MethodGenerator methodGen)
{
String sortRecordClass =
compileSortRecord(sortObjects, classGen, methodGen);
boolean needsSortRecordFactory = false;
final int nsorts = sortObjects.size();
for (int i = 0; i < nsorts; i++) {
final Sort sort = (Sort) sortObjects.elementAt(i);
needsSortRecordFactory |= sort._needsSortRecordFactory;
}
String sortRecordFactoryClass = NODE_SORT_FACTORY;
if (needsSortRecordFactory) {
sortRecordFactoryClass =
compileSortRecordFactory(sortObjects, classGen, methodGen,
sortRecordClass);
}
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
// Backwards branches are prohibited if an uninitialized object is
// on the stack by section 4.9.4 of the JVM Specification, 2nd Ed.
// We don't know whether this code might contain backwards branches
// so we mustn't create the new object until after we've created
// the suspect arguments to its constructor. Instead we calculate
// the values of the arguments to the constructor first, store them
// in temporary variables, create the object and reload the
// arguments from the temporaries to avoid the problem.
// Compile code that initializes the static _sortOrder
LocalVariableGen sortOrderTemp
= methodGen.addLocalVariable("sort_order_tmp",
Util.getJCRefType("[" + STRING_SIG),
null, null);
il.append(new PUSH(cpg, nsorts));
il.append(new ANEWARRAY(cpg.addClass(STRING)));
for (int level = 0; level < nsorts; level++) {
final Sort sort = (Sort)sortObjects.elementAt(level);
il.append(DUP);
il.append(new PUSH(cpg, level));
sort.translateSortOrder(classGen, methodGen);
il.append(AASTORE);
}
sortOrderTemp.setStart(il.append(new ASTORE(sortOrderTemp.getIndex())));
LocalVariableGen sortTypeTemp
= methodGen.addLocalVariable("sort_type_tmp",
Util.getJCRefType("[" + STRING_SIG),
null, null);
il.append(new PUSH(cpg, nsorts));
il.append(new ANEWARRAY(cpg.addClass(STRING)));
for (int level = 0; level < nsorts; level++) {
final Sort sort = (Sort)sortObjects.elementAt(level);
il.append(DUP);
il.append(new PUSH(cpg, level));
sort.translateSortType(classGen, methodGen);
il.append(AASTORE);
}
sortTypeTemp.setStart(il.append(new ASTORE(sortTypeTemp.getIndex())));
LocalVariableGen sortLangTemp
= methodGen.addLocalVariable("sort_lang_tmp",
Util.getJCRefType("[" + STRING_SIG),
null, null);
il.append(new PUSH(cpg, nsorts));
il.append(new ANEWARRAY(cpg.addClass(STRING)));
for (int level = 0; level < nsorts; level++) {
final Sort sort = (Sort)sortObjects.elementAt(level);
il.append(DUP);
il.append(new PUSH(cpg, level));
sort.translateLang(classGen, methodGen);
il.append(AASTORE);
}
sortLangTemp.setStart(il.append(new ASTORE(sortLangTemp.getIndex())));
LocalVariableGen sortCaseOrderTemp
= methodGen.addLocalVariable("sort_case_order_tmp",
Util.getJCRefType("[" + STRING_SIG),
null, null);
il.append(new PUSH(cpg, nsorts));
il.append(new ANEWARRAY(cpg.addClass(STRING)));
for (int level = 0; level < nsorts; level++) {
final Sort sort = (Sort)sortObjects.elementAt(level);
il.append(DUP);
il.append(new PUSH(cpg, level));
sort.translateCaseOrder(classGen, methodGen);
il.append(AASTORE);
}
sortCaseOrderTemp.setStart(
il.append(new ASTORE(sortCaseOrderTemp.getIndex())));
il.append(new NEW(cpg.addClass(sortRecordFactoryClass)));
il.append(DUP);
il.append(methodGen.loadDOM());
il.append(new PUSH(cpg, sortRecordClass));
il.append(classGen.loadTranslet());
sortOrderTemp.setEnd(il.append(new ALOAD(sortOrderTemp.getIndex())));
sortTypeTemp.setEnd(il.append(new ALOAD(sortTypeTemp.getIndex())));
sortLangTemp.setEnd(il.append(new ALOAD(sortLangTemp.getIndex())));
sortCaseOrderTemp.setEnd(
il.append(new ALOAD(sortCaseOrderTemp.getIndex())));
il.append(new INVOKESPECIAL(
cpg.addMethodref(sortRecordFactoryClass, "<init>",
"(" + DOM_INTF_SIG
+ STRING_SIG
+ TRANSLET_INTF_SIG
+ "[" + STRING_SIG
+ "[" + STRING_SIG
+ "[" + STRING_SIG
+ "[" + STRING_SIG + ")V")));
// Initialize closure variables in sortRecordFactory
final ArrayList dups = new ArrayList();
for (int j = 0; j < nsorts; j++) {
final Sort sort = (Sort) sortObjects.get(j);
final int length = (sort._closureVars == null) ? 0 :
sort._closureVars.size();
for (int i = 0; i < length; i++) {
VariableRefBase varRef = (VariableRefBase) sort._closureVars.get(i);
// Discard duplicate variable references
if (dups.contains(varRef)) continue;
final VariableBase var = varRef.getVariable();
// Store variable in new closure
il.append(DUP);
il.append(var.loadInstruction());
il.append(new PUTFIELD(
cpg.addFieldref(sortRecordFactoryClass, var.getEscapedName(),
var.getType().toSignature())));
dups.add(varRef);
}
}
}
public static String compileSortRecordFactory(Vector sortObjects,
ClassGenerator classGen, MethodGenerator methodGen,
String sortRecordClass)
{
final XSLTC xsltc = ((Sort)sortObjects.firstElement()).getXSLTC();
final String className = xsltc.getHelperClassName();
final NodeSortRecordFactGenerator sortRecordFactory =
new NodeSortRecordFactGenerator(className,
NODE_SORT_FACTORY,
className + ".java",
ACC_PUBLIC | ACC_SUPER | ACC_FINAL,
new String[] {},
classGen.getStylesheet());
ConstantPoolGen cpg = sortRecordFactory.getConstantPool();
// Add a new instance variable for each var in closure
final int nsorts = sortObjects.size();
final ArrayList dups = new ArrayList();
for (int j = 0; j < nsorts; j++) {
final Sort sort = (Sort) sortObjects.get(j);
final int length = (sort._closureVars == null) ? 0 :
sort._closureVars.size();
for (int i = 0; i < length; i++) {
final VariableRefBase varRef = (VariableRefBase) sort._closureVars.get(i);
// Discard duplicate variable references
if (dups.contains(varRef)) continue;
final VariableBase var = varRef.getVariable();
sortRecordFactory.addField(new Field(ACC_PUBLIC,
cpg.addUtf8(var.getEscapedName()),
cpg.addUtf8(var.getType().toSignature()),
null, cpg.getConstantPool()));
dups.add(varRef);
}
}
// Define a constructor for this class
final org.apache.bcel.generic.Type[] argTypes =
new org.apache.bcel.generic.Type[7];
argTypes[0] = Util.getJCRefType(DOM_INTF_SIG);
argTypes[1] = Util.getJCRefType(STRING_SIG);
argTypes[2] = Util.getJCRefType(TRANSLET_INTF_SIG);
argTypes[3] = Util.getJCRefType("[" + STRING_SIG);
argTypes[4] = Util.getJCRefType("[" + STRING_SIG);
argTypes[5] = Util.getJCRefType("[" + STRING_SIG);
argTypes[6] = Util.getJCRefType("[" + STRING_SIG);
final String[] argNames = new String[7];
argNames[0] = DOCUMENT_PNAME;
argNames[1] = "className";
argNames[2] = TRANSLET_PNAME;
argNames[3] = "order";
argNames[4] = "type";
argNames[5] = "lang";
argNames[6] = "case_order";
InstructionList il = new InstructionList();
final MethodGenerator constructor =
new MethodGenerator(ACC_PUBLIC,
org.apache.bcel.generic.Type.VOID,
argTypes, argNames, "<init>",
className, il, cpg);
// Push all parameters onto the stack and called super.<init>()
il.append(ALOAD_0);
il.append(ALOAD_1);
il.append(ALOAD_2);
il.append(new ALOAD(3));
il.append(new ALOAD(4));
il.append(new ALOAD(5));
il.append(new ALOAD(6));
il.append(new ALOAD(7));
il.append(new INVOKESPECIAL(cpg.addMethodref(NODE_SORT_FACTORY,
"<init>",
"(" + DOM_INTF_SIG
+ STRING_SIG
+ TRANSLET_INTF_SIG
+ "[" + STRING_SIG
+ "[" + STRING_SIG
+ "[" + STRING_SIG
+ "[" + STRING_SIG + ")V")));
il.append(RETURN);
// Override the definition of makeNodeSortRecord()
il = new InstructionList();
final MethodGenerator makeNodeSortRecord =
new MethodGenerator(ACC_PUBLIC,
Util.getJCRefType(NODE_SORT_RECORD_SIG),
new org.apache.bcel.generic.Type[] {
org.apache.bcel.generic.Type.INT,
org.apache.bcel.generic.Type.INT },
new String[] { "node", "last" }, "makeNodeSortRecord",
className, il, cpg);
il.append(ALOAD_0);
il.append(ILOAD_1);
il.append(ILOAD_2);
il.append(new INVOKESPECIAL(cpg.addMethodref(NODE_SORT_FACTORY,
"makeNodeSortRecord", "(II)" + NODE_SORT_RECORD_SIG)));
il.append(DUP);
il.append(new CHECKCAST(cpg.addClass(sortRecordClass)));
// Initialize closure in record class
final int ndups = dups.size();
for (int i = 0; i < ndups; i++) {
final VariableRefBase varRef = (VariableRefBase) dups.get(i);
final VariableBase var = varRef.getVariable();
final Type varType = var.getType();
il.append(DUP);
// Get field from factory class
il.append(ALOAD_0);
il.append(new GETFIELD(
cpg.addFieldref(className,
var.getEscapedName(), varType.toSignature())));
// Put field in record class
il.append(new PUTFIELD(
cpg.addFieldref(sortRecordClass,
var.getEscapedName(), varType.toSignature())));
}
il.append(POP);
il.append(ARETURN);
constructor.setMaxLocals();
constructor.setMaxStack();
sortRecordFactory.addMethod(constructor);
makeNodeSortRecord.setMaxLocals();
makeNodeSortRecord.setMaxStack();
sortRecordFactory.addMethod(makeNodeSortRecord);
xsltc.dumpClass(sortRecordFactory.getJavaClass());
return className;
}
/**
* Create a new auxillary class extending NodeSortRecord.
*/
private static String compileSortRecord(Vector sortObjects,
ClassGenerator classGen,
MethodGenerator methodGen) {
final XSLTC xsltc = ((Sort)sortObjects.firstElement()).getXSLTC();
final String className = xsltc.getHelperClassName();
// This generates a new class for handling this specific sort
final NodeSortRecordGenerator sortRecord =
new NodeSortRecordGenerator(className,
NODE_SORT_RECORD,
"sort$0.java",
ACC_PUBLIC | ACC_SUPER | ACC_FINAL,
new String[] {},
classGen.getStylesheet());
final ConstantPoolGen cpg = sortRecord.getConstantPool();
// Add a new instance variable for each var in closure
final int nsorts = sortObjects.size();
final ArrayList dups = new ArrayList();
for (int j = 0; j < nsorts; j++) {
final Sort sort = (Sort) sortObjects.get(j);
// Set the name of the inner class in this sort object
sort.setInnerClassName(className);
final int length = (sort._closureVars == null) ? 0 :
sort._closureVars.size();
for (int i = 0; i < length; i++) {
final VariableRefBase varRef = (VariableRefBase) sort._closureVars.get(i);
// Discard duplicate variable references
if (dups.contains(varRef)) continue;
final VariableBase var = varRef.getVariable();
sortRecord.addField(new Field(ACC_PUBLIC,
cpg.addUtf8(var.getEscapedName()),
cpg.addUtf8(var.getType().toSignature()),
null, cpg.getConstantPool()));
dups.add(varRef);
}
}
MethodGenerator init = compileInit(sortObjects, sortRecord,
cpg, className);
MethodGenerator extract = compileExtract(sortObjects, sortRecord,
cpg, className);
sortRecord.addMethod(init);
sortRecord.addMethod(extract);
xsltc.dumpClass(sortRecord.getJavaClass());
return className;
}
/**
* Create a constructor for the new class. Updates the reference to the
* collator in the super calls only when the stylesheet specifies a new
* language in xsl:sort.
*/
private static MethodGenerator compileInit(Vector sortObjects,
NodeSortRecordGenerator sortRecord,
ConstantPoolGen cpg,
String className)
{
final InstructionList il = new InstructionList();
final MethodGenerator init =
new MethodGenerator(ACC_PUBLIC,
org.apache.bcel.generic.Type.VOID,
null, null, "<init>", className,
il, cpg);
// Call the constructor in the NodeSortRecord superclass
il.append(ALOAD_0);
il.append(new INVOKESPECIAL(cpg.addMethodref(NODE_SORT_RECORD,
"<init>", "()V")));
il.append(RETURN);
return init;
}
/**
* Compiles a method that overloads NodeSortRecord.extractValueFromDOM()
*/
private static MethodGenerator compileExtract(Vector sortObjects,
NodeSortRecordGenerator sortRecord,
ConstantPoolGen cpg,
String className) {
final InstructionList il = new InstructionList();
// String NodeSortRecord.extractValueFromDOM(dom,node,level);
final CompareGenerator extractMethod =
new CompareGenerator(ACC_PUBLIC | ACC_FINAL,
org.apache.bcel.generic.Type.STRING,
new org.apache.bcel.generic.Type[] {
Util.getJCRefType(DOM_INTF_SIG),
org.apache.bcel.generic.Type.INT,
org.apache.bcel.generic.Type.INT,
Util.getJCRefType(TRANSLET_SIG),
org.apache.bcel.generic.Type.INT
},
new String[] { "dom",
"current",
"level",
"translet",
"last"
},
"extractValueFromDOM", className, il, cpg);
// Values needed for the switch statement
final int levels = sortObjects.size();
final int match[] = new int[levels];
final InstructionHandle target[] = new InstructionHandle[levels];
InstructionHandle tblswitch = null;
// Compile switch statement only if the key has multiple levels
if (levels > 1) {
// Put the parameter to the swtich statement on the stack
il.append(new ILOAD(extractMethod.getLocalIndex("level")));
// Append the switch statement here later on
tblswitch = il.append(new NOP());
}
// Append all the cases for the switch statment
for (int level = 0; level < levels; level++) {
match[level] = level;
final Sort sort = (Sort)sortObjects.elementAt(level);
target[level] = il.append(NOP);
sort.translateSelect(sortRecord, extractMethod);
il.append(ARETURN);
}
// Compile def. target for switch statement if key has multiple levels
if (levels > 1) {
// Append the default target - it will _NEVER_ be reached
InstructionHandle defaultTarget =
il.append(new PUSH(cpg, EMPTYSTRING));
il.insert(tblswitch,new TABLESWITCH(match, target, defaultTarget));
il.append(ARETURN);
}
return extractMethod;
}
}
|
kcsl/immutability-benchmark
|
benchmark-applications/reiminfer-oopsla-2012/source/Xalan/src/org/apache/xalan/xsltc/compiler/Sort.java
|
Java
|
mit
| 26,373
|
package ch.protonmail.vladyslavbond.quizzing.controllers;
public class OptionsControllerException extends ControllerException
{
/**
*
*/
private static final long serialVersionUID = -5021004022535417076L;
public OptionsControllerException(String message, Throwable cause)
{
super(message, cause);
}
public OptionsControllerException(Throwable cause)
{
super(cause);
}
public OptionsControllerException(String string)
{
super(string);
}
}
|
Wbondar/quizzing
|
controllers/src/main/java/ch/protonmail/vladyslavbond/quizzing/controllers/OptionsControllerException.java
|
Java
|
mit
| 523
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.