|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hp.hpl.jena.sparql.vocabulary.EARL
public class EARL
| Field Summary | |
|---|---|
static com.hp.hpl.jena.rdf.model.Property |
assertedBy
|
static com.hp.hpl.jena.rdf.model.Resource |
Assertion
Parent node that contains all parts of an assertion |
static com.hp.hpl.jena.rdf.model.Resource |
Assertor
Persons or evaluation tools that claim assertions |
static com.hp.hpl.jena.rdf.model.Resource |
automatic
Test was performed by a tool only |
static com.hp.hpl.jena.rdf.model.Resource |
cannotTell
Outcome of the test is uncertain |
static com.hp.hpl.jena.rdf.model.Resource |
CompoundAssertor
Group of persons or evaluation tools that claim assertions |
static com.hp.hpl.jena.rdf.model.Resource |
Content
Subjects that are available on the Web |
static com.hp.hpl.jena.rdf.model.Property |
context
|
static com.hp.hpl.jena.rdf.model.Resource |
fail
Test failed |
static com.hp.hpl.jena.rdf.model.Property |
helpAssertor
Assertor assisting to determine assertion result |
static com.hp.hpl.jena.rdf.model.Resource |
heuristic
Result was derived from other results |
static com.hp.hpl.jena.rdf.model.Property |
info
|
static com.hp.hpl.jena.rdf.model.Property |
mainAssertor
Assertor mainly responsible for determining assertion result |
static com.hp.hpl.jena.rdf.model.Resource |
manual
Test was performed by a human only |
static com.hp.hpl.jena.rdf.model.Property |
mode
|
static com.hp.hpl.jena.rdf.model.Resource |
NAMESPACE
The namespace of the vocabulary as a resource |
static com.hp.hpl.jena.rdf.model.Resource |
notApplicable
Test is not applicable to the subject |
static com.hp.hpl.jena.rdf.model.Resource |
notAvailable
Test was performed by a combination of persons and tools |
static com.hp.hpl.jena.rdf.model.Resource |
notTested
Test has not been carried out |
static java.lang.String |
NS
The namespace of the vocabulary as a string |
static com.hp.hpl.jena.rdf.model.Property |
outcome
|
static com.hp.hpl.jena.rdf.model.Resource |
OutcomeValue
Nominal value of the result |
static com.hp.hpl.jena.rdf.model.Resource |
pass
Test passed |
static com.hp.hpl.jena.rdf.model.Property |
pointer
|
static com.hp.hpl.jena.rdf.model.Property |
result
|
static com.hp.hpl.jena.rdf.model.Resource |
semiAutomatic
Test was performed primarily by a tool, and human assistance |
static com.hp.hpl.jena.rdf.model.Resource |
SingleAssertor
One person or evaluation tool that claims assertions |
static com.hp.hpl.jena.rdf.model.Resource |
Software
A tool that can perform tests or be the subject of testing |
static com.hp.hpl.jena.rdf.model.Property |
sourceCopy
|
static com.hp.hpl.jena.rdf.model.Property |
subject
|
static com.hp.hpl.jena.rdf.model.Property |
test
|
static com.hp.hpl.jena.rdf.model.Resource |
TestCase
A test case against which subjects are tested |
static com.hp.hpl.jena.rdf.model.Resource |
TestCriterion
A testable statement against which subjects are tested |
static com.hp.hpl.jena.rdf.model.Resource |
TestMode
Mode in which tests were conducted |
static com.hp.hpl.jena.rdf.model.Resource |
TestRequirement
A requirement against which subjects are tested |
static com.hp.hpl.jena.rdf.model.Resource |
TestResult
Result from conducting test cases on subjects |
static com.hp.hpl.jena.rdf.model.Resource |
TestSubject
Subject of the assertion |
| Constructor Summary | |
|---|---|
EARL()
|
| Method Summary | |
|---|---|
static java.lang.String |
getURI()
The namespace of the vocabulary as a string |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NS
The namespace of the vocabulary as a string
public static final com.hp.hpl.jena.rdf.model.Resource NAMESPACE
The namespace of the vocabulary as a resource
public static final com.hp.hpl.jena.rdf.model.Property assertedBy
public static final com.hp.hpl.jena.rdf.model.Property info
public static final com.hp.hpl.jena.rdf.model.Property outcome
public static final com.hp.hpl.jena.rdf.model.Property mode
public static final com.hp.hpl.jena.rdf.model.Property helpAssertor
Assertor assisting to determine assertion result
public static final com.hp.hpl.jena.rdf.model.Property result
public static final com.hp.hpl.jena.rdf.model.Property mainAssertor
Assertor mainly responsible for determining assertion result
public static final com.hp.hpl.jena.rdf.model.Property pointer
public static final com.hp.hpl.jena.rdf.model.Property sourceCopy
public static final com.hp.hpl.jena.rdf.model.Property test
public static final com.hp.hpl.jena.rdf.model.Property subject
public static final com.hp.hpl.jena.rdf.model.Property context
public static final com.hp.hpl.jena.rdf.model.Resource CompoundAssertor
Group of persons or evaluation tools that claim assertions
public static final com.hp.hpl.jena.rdf.model.Resource OutcomeValue
Nominal value of the result
public static final com.hp.hpl.jena.rdf.model.Resource TestResult
Result from conducting test cases on subjects
public static final com.hp.hpl.jena.rdf.model.Resource TestCase
A test case against which subjects are tested
public static final com.hp.hpl.jena.rdf.model.Resource SingleAssertor
One person or evaluation tool that claims assertions
public static final com.hp.hpl.jena.rdf.model.Resource TestCriterion
A testable statement against which subjects are tested
public static final com.hp.hpl.jena.rdf.model.Resource Assertion
Parent node that contains all parts of an assertion
public static final com.hp.hpl.jena.rdf.model.Resource TestMode
Mode in which tests were conducted
public static final com.hp.hpl.jena.rdf.model.Resource Content
Subjects that are available on the Web
public static final com.hp.hpl.jena.rdf.model.Resource Software
A tool that can perform tests or be the subject of testing
public static final com.hp.hpl.jena.rdf.model.Resource TestRequirement
A requirement against which subjects are tested
public static final com.hp.hpl.jena.rdf.model.Resource TestSubject
Subject of the assertion
public static final com.hp.hpl.jena.rdf.model.Resource Assertor
Persons or evaluation tools that claim assertions
public static final com.hp.hpl.jena.rdf.model.Resource fail
Test failed
public static final com.hp.hpl.jena.rdf.model.Resource notTested
Test has not been carried out
public static final com.hp.hpl.jena.rdf.model.Resource pass
Test passed
public static final com.hp.hpl.jena.rdf.model.Resource semiAutomatic
Test was performed primarily by a tool, and human assistance
public static final com.hp.hpl.jena.rdf.model.Resource notApplicable
Test is not applicable to the subject
public static final com.hp.hpl.jena.rdf.model.Resource heuristic
Result was derived from other results
public static final com.hp.hpl.jena.rdf.model.Resource automatic
Test was performed by a tool only
public static final com.hp.hpl.jena.rdf.model.Resource manual
Test was performed by a human only
public static final com.hp.hpl.jena.rdf.model.Resource cannotTell
Outcome of the test is uncertain
public static final com.hp.hpl.jena.rdf.model.Resource notAvailable
Test was performed by a combination of persons and tools
| Constructor Detail |
|---|
public EARL()
| Method Detail |
|---|
public static java.lang.String getURI()
The namespace of the vocabulary as a string
NS
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Vim 7.3 on Windows crash after using Command-T
-
anonymous
Ruby version: 1.9.2-p180
Vim version: 7.3.46
Devkit: DevKit-tdm-32-4.5.2-20110712-1620-sfx
I've done all the steps without problem but when i'm going to use ":CommandT" command i gets the following error message.
"Line 2 Encoding::ConverterNotFoundError: code converter not found (ASCII-8BIT to UTF-8)"
If i press the down key i get "NoMethodError: undefined method 'length' for nil:NilClass"
After that if i push ESC i get a windows crash for vim.
I hope help you :-)
Thx for your work, Mario
Reply
This topic is now closed.


The key is to set realistic customer expectations and then not to just meet them, but to exceed them — preferably in unexpected and helpful ways.
Let's get in touch and talk.


[[head]]
Hello Human! This is a blog post
[[[ title ]]]
[[[ author ]]] - [[[ date ]]]
[[[ content ]]]


Deliverying...
Information
Time: x
Restaurant: x
Location: x
Ordered Item: x
Delivery Location: x
Arrived?
Yes
Cancel Delivery


--- layout: article title: Mellon Foundation Grants description: Analysis of thirteen years of Mellon Foundation grants made to private and public universities. ---
Using 13 years of grants data locked up in PDFs (that have since been released as an interactive grants database), I wrote a series of python scripts that extracted data from PDFs and matched institutions with their university type and IPEDS unit id to generate an interactive database of grants made by the Mellon Foundation to universities.
In addition to building and analyzing the data set, I was responsible for the front-end presentation, creating a responsive, embeddable database with guidance from Brian O'Leary. Read the full story by Jennifer Howard.


Tutorials
This section contains tutorials and tutorial-like things! They range from examples of customizing and extending MARKUP to documentation of what’s necessary to keep the them running. We put these here in part because much of customizing and working with Sphinx is some degree of inscrutable or opaque and there just aren’t enough examples out there.
Blockquotes
MARKUP does not support blockquote styles for Markdown by default. This support can be added easily. Blockquotes are added to Markdown like this:
but without the supporting CSS the text is presented plainly.
To add support for blockquotes, you’ll need to update the CSS for MARKUP (for both HTML and PDF).
To add CSS to support blockquotes
Open a command prompt and navigate to the _themes/markup/static/
directory.
Run the following command:
$ sass --watch scss/markup.scss:markup.css_t
Open the _themes/markup/static/_sphinx.scss
file in a text editor.
Add CSS similar to:
blockquote, q {
border-left: 5px solid $markup-dark-blue;
padding: 1em 1em 1em 1em;
}
Save the _sphinx.css
file.
Add a blockquote to a Markdown topic:
Run the build and review the output.
Update the CSS to your preferences. Change the color, margin size, etc.
When finished with the _themes/markup/static/
directory, repeat these steps exactly for the _themes/markup_pdf/static/
directory to ensure this style is also available for PDF printing.
 Want to use your organization’s colors? Fine. Here’s how to change them.
Open a command prompt and navigate to the _themes/markup/static/
directory.
Run the following command:
$ sass --watch scss/markup.scss:markup.css_t
Open the _themes/markup/static/_config.scss
file in a text editor.
This file contains variables similar to:
$markup-red: #f06543;
$markup-dark-blue: #1e2022;
$markup-blue-grey: #c9d6df;
$markup-bright-yellow: #f9e784;
For admonitions and code-blocks, they have specific names:
$markup-code-block-console: #216869;
$markup-note: #52616b;
Some are related to navigation and others are extension-specific (for tabs and expandos). We’d like to think they are all perfectly named, but they might not be.
In the other CSS files, such as _sphinx.scss
you’ll see the variables:
div.note {
border: 2px solid $markup-note;
}
div.note p.admonition-title {
color: $markup-white;
background-color: $markup-note;
border-bottom-color: $markup-note;
}
You can change these however you want. Do one or two at a time, test as you go. As you save the CSS files, Sass will verify the output is done correctly and will report any errors with the syntax. You’ll need to look at the output to make sure you’ve got the colors you want.
Code Block Styles
A new color style for code blocks can be easily added. There are three spots in the _sphinx.scss
file that require updates for new code blocks, along with a new entry in _config.scss
.
The following example shows how to add code block styles for everybody’s favorite statically-typed purely functional programming language: Haskell!
Add code block styles for Haskell
Identify the shortname for the lexer in Pygments. In this case, it’s haskell
.
Open a command prompt and navigate to the _themes/markup/static/
directory.
Run the following command:
$ sass --watch scss/markup.scss:markup.css_t
Open the _themes/markup/static/_config.scss
file in a text editor and update the list of code block-specific variables to add the highlighted entry for Haskell, along with choosing a color:
$markup-code-block-none: #93a1aa;
$markup-code-block-bash: #345995;
$markup-code-block-console: #216869;
$markup-code-block-css: #51344d;
$markup-code-block-django: #8fcb9b;
$markup-code-block-haskell: #b8c5d6;
$markup-code-block-html: #eac435;
/* ... snip ... */
Open _sphinx.scss
and add the highlighted sections. This will add Haskell to the CSS that defines the border of the code block:
.highlight-none,
.highlight-bash,
.highlight-console,
.highlight-css,
.highlight-django,
.highlight-haskell,
.highlight-html,
/* ... snip ... */
.highlight-yaml,{
position:relative;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-moz-border-radius-topleft: 2px;
-moz-border-radius-topright: 2px;
-moz-border-radius-bottomleft: 2px;
-moz-border-radius-bottomright: 2px;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
.highlight-none:before,
.highlight-bash:before,
.highlight-console:before,
.highlight-css:before,
.highlight-django:before,
.highlight-haskell:before,
.highlight-html:before,
/* ... snip ... */
.highlight-yaml:before,{
z-index:10;
font-size:9px;
padding:.2em .6em;
text-align:center;
color:$markup-dark-grey;
display:block;
position:absolute;
border-radius:0 3px 0 3px;
border-top:none;
border-right:none;
background-color:$markup-lightest-grey;
top:0;
right:0;
height:12px
}
Add the following block of code. Copy and paste one of the others, and then be sure to get the highlighted names correct for the content
and color variable names:
.highlight-haskell:before{
content:'HASKELL';
background-color:$markup-code-block-haskell;
color:$markup-white;
}
.highlight-haskell pre{
border-color:$markup-code-block-haskell;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-moz-border-radius-topleft: 2px;
-moz-border-radius-topright: 2px;
-moz-border-radius-bottomleft: 2px;
-moz-border-radius-bottomright: 2px;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
Tip
For darker background colors use $markup-white
for the text color; for lighter background colors use $markup-almost-black
. The text color is defined by color
in the first CSS block.
File Names
File names should be short, direct, and obvious. They should contain fully-spelled out words as often as possible. For example:
install.rst
for a topic about installing an application.
configure.rst
for a topic about configuring an application.
readme.rst
for a topic about what you might need to know first.
faq.rst
for a topic that contains FAQs.
and so on.
If you need to use multiple words in a file name, use an underscore (_
) to delimit each word. For example:
install_windows.rst
for a topic about installing an application on Microsoft Windows.
install_macos.rst
for a topic about installing an application on Mac OS.
install_linux.rst
for a topic about installing an application on Linux.
Tip
Files in a directory are typically sorted alphabetically. So use the most common word first, and then be more specific in subsequent words. This will keep topics grouped together, as opposed to if they were named windows_install.rst
, macos_install.rst
, and linux_install.rst
.
Font Awesome Icons
Font Awesome is an open source icon library that offers a free standard set of icons. MARKUP uses a single unmodified CSS and a single unmodified JavaScript file from the Font Awesome Free for the Web library.
Upgrade the Font Awesome Free for the Web library
- Navigate to https://fontawesome.com/start.
- Click Download.
- On the next page, click the Font Awesome Free for the Web button.
- When the download is complete, open it. Copy the following files:
all.css
and all.js
.
- Paste these files into
_themes/markup/static/
.
Use Font Awesome Pro
- Navigate to https://fontawesome.com/pro.
- Purchase a subscription for Font Awesome Pro.
- Download the icon library.
- When the download is complete, open it. Copy the following files:
all.css
and all.js
.
- Paste these files into
_themes/markup/static/
.
GitHub Pages
You can host the output of a Sphinx project on GitHub pages:
- Create a directory named
/docs
as a top-level directory in your documentation project.
- In the
/docs
directory, add a file named .nojekyll
. This file should be empty.
- Build your Sphinx output to the
/docs
directory.
- In GitHub, choose Settings and then under GitHub Pages select the
master branch /docs folder
option. The Settings page will refresh with the URL for the published HTML. For example: https://markup-theme.github.io/markup-theme/.
- Check in your project.
- A few minutes later you should see the HTML at the URL specified under GitHub Pages.
Note
You may need to update the linking paths used in the site for the nav-docs
, layout
, and search
files, as the GitHub path generated by GitHub pages adds a directory to the path that is the same name as the project. For example, the /markup-theme/
part of the https://markup-theme.github.io/markup-theme/
is added and this may affect how URLs are defined across the site.
Page not Found
You can add a 404.html page to the output of a Sphinx project on GitHub pages. This can be a Markdown or reStructuredText file, depending on your preference.
To add a 404.html file
Create a file named 404.rst
or 404.md
in the docs collection that is used for the root of the documentation website. For example, MARKUP uses the /markup_theme/
as its top-level for GitHub pages.
For example, an initial 404 page using reStructuredText would be similar to:
==================================================
Page not found ...
==================================================
The page you were looking for is not here.
You can change this later to be anything you want. It’s a page that follows all of the same rules as any other page in MARKUP.
Add 404
to the toctree
list in the index file that is located in the same collection.
Build your Sphinx output to the /docs
directory.
Push the changes to GitHub.
Verify the changes by entering a page name you know does not exist. That page should show the contents of 404.html
.
robots.txt
The robots exclusion standard, also known as the robots exclusion protocol or simply robots.txt, is a standard used by websites to communicate with web crawlers and other web robots. The standard specifies how to inform the web robot about which areas of the website should not be processed or scanned. Robots are often used by search engines to categorize websites. The standard can be used in conjunction with a sitemap.xml file, a robot inclusion standard for websites.
Important
Not all robots cooperate with the standard; email harvesters, spambots, malware and robots that scan for security vulnerabilities may even start with the portions of the website where they have been told to stay out.
To add a robots.txt file
Create a file named robots.txt
in the /misc
directory similar to:
Sitemap: https://markup-theme.github.io/markup-theme/sitemap.xml
User-agent: *
Disallow:
where the URL for Sitemap
should be the URL for sitemap.xml on your site. This example allows web robots to look at the entire site, including subdirectories. You can allow or disallow web robots access to specific areas of your site. See https://www.robotstxt.org/robotstxt.html for more information about how to do this.
This example uses a file that is independent of a Sphinx build and is not an official part of any document collection. As such, you will need to choose a process for getting a copy of this file from the /misc
directory to the /docs
directory whenever this file is updated. In some situations, this can be automated. For example, a Jenkinsfile could have an entry similar to:
sh "cp -r ./misc/robots.txt ./docs/"
MARKUP just uses the old-fashioned copy and paste method. It’s more risky, in that sometimes we forget, but 100% of the rest of the time it works!
sitemap.xml
The Sitemaps protocol allows a webmaster to inform search engines about URLs on a website that are available for crawling. A Sitemap is an XML file that lists the URLs for a site and allows webmasters to include additional information about each URL, such as:
- When it was last updated
- How often it changes
- How important it is in relation to other URLs in the site
A sitemap.xml file helps search engines crawl the site more efficiently and to find URLs that may be isolated from rest of the site’s content.
To add a sitemap.xml file
Create a file named sitemap.xml
in the /misc
directory similar to:
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>
<url>
<loc>
https://markup-theme.github.io/markup-theme/index.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/about.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/css.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/faq.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/resources.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/setup.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/style_guide.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/templates.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/tutorials.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/upgrades.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/md/md.html
</loc>
</url>
<url>
<loc>
https://markup-theme.github.io/markup-theme/rst/rst.html
</loc>
</url>
</urlset>
where a <url>
group exists for each page in the site.
This example uses a file that is independent of a Sphinx build and is not an official part of any document collection. As such, you will need to choose a process for getting a copy of this file from the /misc
directory to the /docs
directory whenever this file is updated. In some situations, this can be automated. For example, a Jenkinsfile could have an entry similar to:
sh "cp -r ./misc/sitemap.xml ./docs/"
MARKUP just uses the old-fashioned copy and paste method. It’s more risky, in that sometimes we forget, but 100% of the rest of the time it works!
Glossary
A glossary is super cool! MARKUP does not have one. Boo! But you can add one! Here’s how.
Open the nav-docs.html
file located at _themes/markup-theme/
. This is the global template for the left-side navigation.
Scroll to the bottom and find the

entries. There’s one already there named “Site Map”.
Copy this:

Site Map

and paste it immediately above that

grouping.
Then change it to say this:

Glossary

In the markup_theme
docs collection, add a file named glossary.rst
.
Name the title “Glossary” and use the definition list pattern for each term.  You may use headers to group by letter or (if you have tons of terms) you could split the glossary into separate topics by letter. For example: glossary_a.rst
, glossary_b.rst
, etc.
Once you have a glossary, it’s easy to reuse glossary terms via the includes patterns. See the /shared/terms.rst
in MARKUP for how to create a single source for reusable terms.
Tip
In addition to a glossary, some organizations can benefit from having a topic that contains only a two-column table with abbreviations and/or initialisms in one column and those abbreviations and/or initialisms spelled out in another. Call this topic abbreviations.rst
, give it a title similar to “Abbreviations, Initialisms”, and then use a list-table with rows for each term. For example:
.. list-table::
:widths: 50 550
:header-rows: 0
* - **CSV**
- Comma-Separated Values
* - **Mbit**
- Megabit
* - **MB**
- Megabyte
* - **MiB**
- Mebibyte
will look like this:
| CSV |
Comma-Separated Values |
| Mbit |
Megabit |
| MB |
Megabyte |
| MiB |
Mebibyte |
Local Pygments CSS
Pygments is an open source generic syntax highlighter that is used by MARKUP to prettify source code. Pygments has an open source license.
MARKUP puts a copy of the Pygments CSS into the _themes/markup/static/
directory to provide local control for two CSS settings:
.highlight .hll { background-color: #f9e784 }
.highlight { background: #ffffff; }
They are located at the top of the CSS file. The reason why this is done is to be able to apply a preferred color to code line highlights and to prevent the default grey background for code blocks from appearing in situations where code blocks appear inside admonitions, by changing it to white.
It’s a somewhat clumsy workaround, but figuring out how to override two specific CSS settings in Pygments was harder and (at this time) seems impossible. If you don’t want to use a local copy of pygments.css, just remove it from MARKUP. The default yellow highlight is probably fine and the instance of code blocks appearing inside admonitions should be uncommon. If you want to keep it, you may need to grab an updated copy of pygments.css and re-do these two changes when Pygments itself is upgraded.
Large Topics, Single Source
You can build entire sections of content by copying in paragraphs from other topics using the includes
directive (via file or via snippet).
This can be quite useful, such as for building reference topics for a collection of API entities, but also building a single topic for all API entities. Another example is building PDF topics that reuse most (but not all) of another topic.
It’s also possible that output format differences, such as those between the HTML and PDF outputs in MARKUP, even when subtle, may not be fully compatible. This approach allows you to use single sourcing as much as possible, while also addressing output-specific requirements for certain sections that cannot be single sourced.
Look in /markup_pdf/rst.rst
to see a topic that is built almost entirely by copying in paragraphs from /markup_rst/rst.rst
. There are some carefully crafted bespoke paragraphs wrapped in there, but most of it is pulled in via the includes
directive.
Due to the nature of how the includes
directive works, any path that is accessible to the Sphinx build command can be a valid inclusion target. This could be other topics in other directories within the same repo (as MARKUP demonstrates) or it could be other topics in other repos.
Navigation Icons
MARKUP is configured to use Font Awesome icons in the following locations:
- Throughout the left-side navigation at the first level of headers.
- At the top of the right-side navigation.
- For the hamburger button.
- Inline in paragraphs (via special steps in reStructuredText files or via HTML tags in Markdown).
Left Side
The site-specific nav-docs.html file uses Font Awesome to apply icons to the left-side of the first-level headers.
Font Awesome icons
The standard way MARKUP adds Font Awesome icons to the left-side navigation uses the iconClass
line to specify which icon to use:
{
"title": "Start Here",
"iconClass": "fas fa-arrow-alt-circle-right fa-fw",
"subItems": [
{
"title": "Start Here",
"hasSubItems": false,
"url": "/some_file.html"
},
{
"title": "FAQ",
"hasSubItems": false,
"url": "/faq.html"
},
{
"title": "Additional Resources",
"hasSubItems": false,
"url": "/resources.html"
},
]
},
Custom SVG images
You can use custom icons–such as a company or product logo–instead, as long as the custom icon is an SVG image and as long as it’s in the /_static
directory for that documentation site. Change the iconClass
line to be "image": "filename.svg",
:
{
"title": "Start Here",
"image": "markup.svg",
"subItems": [
{
"title": "Start Here",
"hasSubItems": false,
"url": "/some_file.html"
},
{
"title": "FAQ",
"hasSubItems": false,
"url": "/faq.html"
},
{
"title": "Additional Resources",
"hasSubItems": false,
"url": "/resources.html"
},
]
},
Right Side
The right-side navigation is built automatically based on the header structure of the topic. It contains a single icon at the top. This icon is specified in _themes/markup/localtoc.html
:
{%- if display_toc %}

 {{ _('ON THIS PAGE') }}

{{ toc }}
You may create site-specific right-side navigation icons by adding a copy of localtoc.html
to a site-specific _templates
directory, and then updating the name of the Font Awesome icon.
You may comment it out if you don’t want to use the icon:
{%- if display_toc %}

 {{ _('ON THIS PAGE') }}

{{ toc }}
Inline
You can create inline Font Awesome icons.
- For reStructuredText topics, this requires using tokens:
|token-name|
.
- For Markdown, you can use inline HTML:

.
See the guides for reStructuredText and Markdown for more information.
PDF Cover Pages
PDF generation relies on two images located in the markup_pdf/_static
directory:
- cover-test.png
- markup-logo.png
Both of these images should be replaced with your preferred PDF cover and company logo. Replace cover-test.png
with any PNG image you want, and then update markup-logo.png
with your company’s logo.
If you change any of these names, be sure to update these names in the _themes/markup_pdf/layout.html
file also. While you’re in there, fix the copyright statement at the bottom to say your company name and your company URL.
You can move around the markup-logo.png
file by adjusting the top
, left
, width
, and height
settings for #logo
in the _nav.scss
file markup_pdf
theme.
Tokens
MARKUP has an example of tokens built into the theme. Open the /markup_theme/tokens/names.txt
to see examples of tokens. For example:
.. |company_name| replace:: YourCompanyName
.. |theme| replace:: MARKUP
.. |md| replace:: Markdown
.. |rst| replace:: reStructuredText
The format for defining a token is:
.. |token| replace:: some-string
where
|token|
defines the string (with pipes |
on either side) within your reStructuredText files
replace::
tells Sphinx the string that will replace the token
some-string
defines the string that will be populated by Sphinx at build-time
Tokens are useful for ensuring consistency of naming. They work best with short names, but can be used for complete sentences.
Tip
If you create too many tokens, this may slow your build down. In some cases, with lots of tokens, quite a bit. So use them carefully and for things where using a token makes sense.
Another example of using tokens is to create situations where Font Awesome icons can be used inline within reStructuredText topics. For example:
.. |fa-index-circle| raw:: html

which then appears like this:
some string some string some string
A location in the docs where something like this is useful is a front page in which all of the topics are listed, sort of line an index. See https://docs.djangoproject.com/en/2.2/ and the |
character they use. Instead, MARKUP sets it as a circle icon from Font Awesome.
Note
Markdown topics can use the
string directly inline and do not require a token.


Originally a project targeted at learners, neoan3 was first used in production roughly a decade ago. Since then, industry standards, performance needs, testability, continuous integration, scalability, maintainability and reusability became more and more relevant in ongoing development.
Used internally by teams inside the corporate world, neoan3 now moves inside the open source world and is looking forward to users, contributors and patrons.
Neoan3 is not only another all purpose framework; its focus is speed and security.
Neoan3 is rapidly fast in the following ways:
Neoan3 has many built-in security layers


Brendan Rodgers responds to Tottenham job claims as Leicester boss delivers firm verdict
It was reported that the former Celtic manager was Spurs' first choice to replace Mauricio Pochettino.
by Chris Doyle, https://www.dailyrecord.co.uk/authors/chris-doyle/Brendan Rodgers insists his future lies with Leicester City after he was linked with the Tottenham job.
It was reported that the former Celtic manager was Spurs' first choice to replace Mauricio Pochettino after he was sacked, before making the move for Jose Mourinho .
The Daily Mail claimed that chairman Daniel Levy made a tentative enquiry about Rodgers' availability prior to Mourinho's appointment.
When asked about the links Rodgers insisted he is happy and committed to the project at the Foxes.
He said: "There is nothing to talk about on it.
"The only thing I will say is I was very happy here at Leicester , I've literally just joined the club in February.
"Everything has been great since we've been in. We have a project here that we want to develop over the next number of years.
"That's my sole focus, along with the team and the staff and the club here. In this game, what I've learned is that you'll always be linked with jobs and speculation around other jobs, but what's most important is the now, and I'm very happy here to develop and work with the club in order to help them improve.
"What happens in football now is that if you go through times when you're doing well and you work well, everyone wants to take you away from that.
"I'm very happy in my professional life. I'm very happy in my life personally in Leicestershire, it's a great place to live and work and we have created a real unity here at the club.
"I came here with a responsibility to help Top (chairman Aiyawatt Srivaddhanaprabha), (chief executive) Susan Whelan, (director of football) Jon Rudkin and all the players and staff here, to help the club grow.
"In my time here that is what I'll aim to do. How long that will be you can never tell but I am very happy to be here."


About Me
Assignment Requirements
The purpose of this assignment is to become familiar with how the Internet works and create a website to display what we have learned.
A total of 5 topics will be discussed, each with it's own webpage. Bootstrap and CSS is used to create the webpages.
Fun Fact
My name is Margaret Chen and I am currently taking IS601 as part of the Certification of Data Mining Program at the
New Jersey Institute of Technology. I previously graduated from The College of New Jersey with a BS in Chemistry.
Since then, I have been working within the pharamaceutical industry as a lab scientist.


Toggle navigation
DCAH Competition - Tyler Kline
Terminal Analysis
Airline Analysis
Interactive Cross-filter Charts
Flight Data Visualizations
All visualizations and designs below are built on
Bootstrap
and
D3
.
Created by:
Tyler Kline
Begin Demo!
Departure Ratings by Terminal/Destination
Flight experience scores (calculated from % Delayed, % Cancelled, etc...), by percentile:
Red
: <20%
Red/Yellow
: 20%-40%
Yellow
: 40%-60%
Green/Yellow
: 60%-80%
Green
: >80%
Flight Experience by Day/Airline
What happened on the 27th to JetBlue and Envoy??
(refresh page to view animation)
Interactive Cross-filter Charts


Works in Progress is a design show celebrating the journey of bringing your ideas to life. As makers and designers, we know all about what goes on in the studio, in the workshop, and on the factory floor – behind the scenes – to create beautiful, functional works.
The first installment of the Works in Progress show will take place at the Ann Arbor Art Center (January 11–February 9, 2019). This show gives designers and makers a platform to showcase the beauty and chaos involved in bringing functional works to life. The exhibit’s curatorial scope of functional works includes fashion, graphic design, furniture, architecture, industrial design, and more.
All entries are due by MIDNIGHT EASTERN TIME, DECEMBER 9TH, 2018.
To participate, complete the work submission form below, and upload your work samples.
In order to get the best and most inclusive submissions possible, we have decided to waive the $10 submission fee. All who have entered so far will be refunded.
However, upon acceptance, there will be a $20 exhibition fee for the selected individuals.
Work Samples may include:
Participants selected for the Works in Progress show will be responsible for transporting work to and from Ann Arbor Art Center. All applicants will receive a response by Dec. 17th, 2018.
Timeline
Submissions Open – Nov. 12
Submissions Close – Dec. 9
Participants Notified – Dec. 17
Works Delivered - Jan. 6
Show Opens - Jan. 11
Further info will be communicated to selected participants via email.
Work-Related Questions
Maximum size of work?
Bigger than a grain of rice, smaller than an elephant.
If you’re not sure, email us at the address below.
Who’s organizing the show?
A handful of designers & makers in SE Michigan. Sophie, Chris, & Matt
Got further questions? Email us at<EMAIL_ADDRESS>Something went wrong -- please scroll down to fix it so we can process your submission!
{% endif %} {% else %}Sorry, but the entry period ended at midnight Eastern on December 9th, 2018. If you submitted an entry, you will receive an update on or before December 17th, 2018 with your status.
{% endif %}


bool output_reset_rewrite_vars ( void )
This function resets the URL rewriter and removes all rewrite variables previously set by the output_add_rewrite_var() function or the session mechanism (if session.use_trans_sid was set on session_start()).
Returns TRUE on success or FALSE on failure.


1. Ovary fully inferior
2. Leaf parallel veined
3. Leaves fleshy, toothed, spine-tipped ..... AGAVACEAE (Agave)
3' Leaves not fleshy, entire, not spine-tipped
4. Fertile stamens 1–2, filament(s) and anther(s) wholly fused above ovary to stigma and style, forming a column; ovary with a half twist; ovules many, microscopic; seeds dust-like ..... ORCHIDACEAE
4' Fertile stamens 3 or more, not fused to stigma and style; ovary straight; ovules not microscopic; seeds well developed
5. Stamens 6; leaves not 2-ranked and folded (0 at flower in Amaryllis); adaxial and abaxial faces both visible ..... AMARYLLIDACEAE
5' Stamens 3; leaves 2-ranked, generally folded lengthwise and apparently attached "edge-on", only abaxial face of leaf visible ..... IRIDACEAE
2' Leaf pinnately or palmately veined
6. Leaves basal, palmately veined and lobed, prickly — petiole 1–1.5 m, blade 1–2+ m ..... GUNNERACEAE {G14}
6' Leaves cauline, pinnately veined, entire or toothed, smooth
7. Leaves opposite; petals 2, 1–1.5 mm, white; fruit indehiscent, with hooked hairs ..... ONAGRACEAE (Circaea)
7' Leaves alternate; petals 3, yellow; fruit dehiscent, without hooked hairs
8. Petals 0.8–2.3 mm; leaves narrowly oblanceolate, 1–3 cm ..... ONAGRACEAE (Neoholmgrenia)
8' Petals >= 30 mm; leaves ± elliptic, 20–55 cm ..... ZINGIBERACEAE
1' Ovary superior or partially inferior
9. Stem nodes with small, dry, sometimes spiny-spurred, scale-like leaves that subtend 1–20 thread-like, needle-like, or ovate, leaf-like branchlets — erect to sprawling herb, sub-shrub, or twining vine ..... ASPARAGACEAE
9' Stem nodes without small, dry, scale-like leaves that subtend leaf-like branches
10. Leaves needle-like, abaxially grooved; low shrub ..... ERICACEAE (Empetrum) {G7,9,12}
10' Leaves generally not needle-like, generally not abaxially grooved; herb to tree
11. Plant submersed aquatic; leaves very thin, 1-veined, opposite or whorled; flowers generally unisexual ..... HYDROCHARITACEAE (2) {G2,6,8}
11' Plant terrestrial, or if aquatic, leaves not very thin, 1-veined, and opposite or whorled
12. Leaf venation pinnate or palmate, smaller veins generally forming a network (occasionally only midvein evident)
13. Tendrils present; vine; leaves ovate — flowers unisexual; plants dioecious ..... SMILACACEAE {G6,7,8,9}
13' Tendrils 0; herb, shrub, or tree (occasionally vine with twining stem); leaves various
14. Leaves compound or deeply lobed
15. Herb
16. Perennial herb; leaves basal, 2–3-ternate; petals in 2 tight whorls of 3; sepals in 4–5 whorls of 3 ..... BERBERIDACEAE (Vancouveria) {G20}
16' Annual; leaves cauline, 1-ternate or 1-odd-pinnate; petals 3; sepals 3 ..... LIMNANTHACEAE (Floerkea) {G10}
15' Shrub or tree
17. Trunk stout, unbranched, crowned by a tight terminal rosette of very large leaves ..... ARECACEAE
17' Trunk(s) branched, with leaves < 50 cm, distributed on twigs
18. Leaves alternate; leaflets spiny-toothed; fruit berry ..... BERBERIDACEAE (Berberis) {G20}
18' Leaves opposite; leaflets serrate; fruit winged achene ..... OLEACEAE (Fraxinus) {G7,9,12}
14' Leaves simple
19. Plant woody
20. Stamens many ..... HYDRANGEACEAE (Carpenteria) {G21, 22}
20' Stamens 2–9
21. Leaf blade gland-dotted, aromatic; anthers dehiscing by uplifted lids; fruit fleshy ..... LAURACEAE {G12}
21' Leaf blade not gland-dotted, not aromatic; anthers dehiscing by slits; fruit dry
22. Inner perianth parts 2, petal-like, outer minutely 4-lobed, ± green; fruit winged, 22–30 mm ..... OLEACEAE (Fraxinus parryi)
22' Inner and outer perianth parts in 3s, all petal-like; fruit 3-angled achene, < 5 mm ..... POLYGONACEAE (2) {G2,6,8,15,19}
19' Plant herbaceous
23. Flower bilateral, proximal portion of calyx with a protruding, hollow spur ..... BALSAMINACEAE {G24}
23' Flower radial, calyx without a spur
24. Cauline leaves in a whorl of 3 subtending 1 large terminal flower ..... MELANTHIACEAE (2) {G10}
24' Cauline leaves alternate, opposite, or whorled, sometimes reduced to bracts; flowers >> 1, small
25. Fruit achene, (2)3-angled — inner and outer perianth generally similar, both whorls petal-like or both sepal-like (inner perianth parts much enlarged in fruit in Rumex) ..... POLYGONACEAE (2) {G2,6,8,15,19}
25' Fruit capsule
26. Leaves not fleshy; plant ± aquatic; flowers axillary; outer perianth parts 2–3, ± = inner; stigmas 3; seeds many, surface net-like, brown to yellow-brown ..... ELATINACEAE (Elatine)
26' Leaves fleshy; plant terrestrial; flowers in ± 1-sided raceme-, panicle-, or umbel-like cluster; outer perianth parts 2, > inner; stigmas 2; seeds 1–many, shiny, black ..... MONTIACEAE (Calyptridium) {G24}
12' Leaf venation parallel, sometimes in wider leaves several larger veins originating from leaf base but smaller veins parallel to them and not forming a network
27. Shrub, tree, or densely leafy rosette plant; leaves ± sword-like or ± grass-like, fibrous and/or fleshy, persisting > 1 year
28. Leaves grass-like; styles 3 ..... MELANTHIACEAE (Xerophyllum)
28' Leaves sword-like; style 1 or stigmas sessile
29. Ovules many per locule
30. Perianth creamy white; leaves tough, fibrous, entire or with marginal fibers ..... AGAVACEAE (2)
30' Perianth ± orange or red; leaves fleshy, toothed ..... ASPHODELACEAE (Aloe)
29' Ovules 2 per locule
31. Flowers bisexual; fruit a berry ..... LAXMANNIACEAE
31' Flowers generally unisexual (occasionally some bisexual); fruit a papery capsule ..... RUSCACEAE (Nolina) {G6,7,8,9}
27' Herb; leaves generally thin, generally not persisting (sometimes ± cylindric)
32. Sepals and petals clearly different
33. Plant aquatic, plant body submersed or leaves floating to emergent ..... HYDROCHARITACEAE (2) {G2,6,8}
33' Plant terrestrial
34. Above-ground stem 0, leaves 2–3(4), all basal; sepals much wider than narrowly linear petals; stamens 3; pedicels twisted, recurved in age; fruit touching soil ..... LILIACEAE (Scoliopus)
34' Above-ground stem well developed, ± leafy; sepals much narrower than reniform to generally widely ovate petals; stamens 6, sometimes 3 sterile; pedicels not recurved in age; fruit not touching soil
35. Petals glabrous, withering after 1 day; ovary ± spheric; seeds few ..... COMMELINACEAE
35' Petals hairy, generally persistent several days; ovary ± cylindric; seeds many ..... LILIACEAE (Calochortus)
32' Sepals and petals very similar
36. Perianth parts generally green to ± brown (red or white), scale-like
37. Inflorescence of 1–many flowers, variously clustered, subtended individually and/or in small groups by bracts; style 1, stigmas 2–3, slender, spreading; fruit a capsule ..... JUNCACEAE {G13}
37' Inflorescence a bractless raceme; stigmas 3 or 6, ± sessile; fruit breaking into mericarps ..... JUNCAGINACEAE {G2,10,13}
36' Perianth parts petal-like in color and texture
38. Inflorescence an umbel (rarely flower solitary or in short, dense raceme); leaves all basal, arising from bulb or corm
39. Fruit a berry ..... LILIACEAE (Clintonia)
39' Fruit a capsule
40. Plant with onion odor; inflorescence bracts 2 (sometimes fused), wholly enclosing immature inflorescence, but generally not formed among pedicels; stems and leaves arising from bulb ..... ALLIACEAE {G1}
40' Plant without onion odor; inflorescence bracts 3 or more, not wholly enclosing immature inflorescence, and some formed among pedicels; stems and leaves arising from corm ..... THEMIDACEAE
38' Inflorescence various, often a raceme or panicle, if flowers in umbels stem ± leafy or with scale-like bracts; leaves basal and/or cauline, underground parts various
41. Perianth parts proximally ± fused into tube
42. Plant aquatic, floating on water surface, stranded on mud, or rooting in bottom sediments; flowers generally open only 1 day ..... PONTEDERIACEAE
42' Plant generally terrestrial, sometimes in damp soil; flowers generally open > 1 day
43. Ovary underground; perianth tube long, stalk-like ..... AGAVACEAE (Leucocrinum)
43' Ovary above-ground; perianth tube not stalk-like
44. Perianth red (yellow) ..... ASPHODELACEAE (Kniphofia)
44' Perianth white to ± yellow
45. Perianth 45–60 mm; leaves strongly wavy-margined ..... AGAVACEAE (Hesperocallis)
45' Perianth 8–12 mm; leaves not wavy-margined ..... TECOPHILAEACEAE
41' Perianth parts free or nearly so
46. Leaves mostly or all cauline
47. Styles 3; flowers bisexual or staminate ..... MELANTHIACEAE (Veratrum) {G6}
47' Style 1 or stigmas sessile; flowers bisexual
48. Perianth 8–110+ mm ..... LILIACEAE (3)
48' Perianth 1–7 mm ..... RUSCACEAE (Maianthemum) {G15}
46' Leaves all basal or basal and cauline
49. All or some filaments densely hairy
50. Inner 3 filaments hairy ..... ASPHODELACEAE ([Bulbine])
50' All filaments hairy ..... NARTHECIACEAE
49' Filaments glabrous (or expanded filament base puberulent)
51. Styles 3
52. Stem glabrous ..... MELANTHIACEAE (2) {G10}
52' Stem glandular ..... TOFIELDIACEAE
51' Style 1 or 0 and stigmas sessile
53. Cauline leaves present, ± well developed ..... LILIACEAE (3)
53' Cauline leaves 0 or reduced to linear or scale-like bracts
54. Leaf lanceolate or ovate to elliptic or obovate ..... LILIACEAE (3)
54' Leaf linear
55. Leaves ± flat, often keeled or wavy-margined; stem generally 1 from bulb ..... AGAVACEAE (2)
55' Leaves ± cylindric, hollow; stems several–many from tuber-like rhizome ..... ASPHODELACEAE (Asphodelus)


This is the direct children
This is the direct children
This is the direct children
This is inside a div hence it is not a direct children
This is the direct children
==================This does not have adjacent siblling (Does not have anything above this in this section)
This has a siblinhg
This has a siblinhg
This breaks the adjacent sibling link and the next one would be differentThis has a siblinhg
This has a siblinhg
==================This does not have General siblling (Does not have anything above this in this section)
This has a sibling
This has a siblinhg
Even if this breaks the flow still the next sibling wont have an effectThis has a siblinhg
This has a siblinhg
==================


---
layout: default
title: Metadata Specs - Browse by Type - Best Practices
---
Metadata Specs: Browse by Institution - Best Practices
{% for spec in site.metadata_specs %}
{% if spec.type == "best-practices" %}
-
{{ spec.description }}
{% endif %}
{% endfor %}


To use Zotero you should get an API key. Navigate to Zotero API settings. Create and copy API key into the field below.
API Key
Style
Language
Afrikaans
Arabic
Bulgarian
Catalan
Czech
Welsh
Danish
German (Austria)
German (Switzerland)
German (Germany)
Greek
English (UK)
English (US)
Spanish (Chile)
Spanish (Spain)
Spanish (Mexico)
Estonian
Basque
Persian
Finnish
French (Canada)
French (France)
Hebrew
Croatian
Hungarian
Indonesian
Icelandic
Italian
Japanese
Khmer
Korean
Latin
Lithuanian
Latvian
Mongolian
Norwegian (Bokmål)
Dutch
Norwegian (Nynorsk)
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Romanian
Russian
Slovak
Slovenian
Serbian
Swedish
Thai
Turkish
Ukrainian
Vietnamese
Chinese (PRC)
Chinese (Taiwan)


fftwtools: Wrapper for 'FFTW3' Includes: One-Dimensional Univariate,
One-Dimensional Multivariate, and Two-Dimensional Transform
Provides a wrapper for several 'FFTW' functions. This package provides access to the two-dimensional 'FFT', the multivariate 'FFT', and the one-dimensional real to complex 'FFT' using the 'FFTW3' library. The package includes the functions fftw() and mvfftw() which are designed to mimic the functionality of the R functions fft() and mvfft(). The 'FFT' functions have a parameter that allows them to not return the redundant complex conjugate when the input is real data.
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=fftwtools
to link to this page.


DUDE, WHERE'S MY CAR? RATING: 7/10 --> Good movie
For more reviews and movie screensavers, visit http://www.joblo.com/
Dude, how come they didn't preview this movie for the critics?  Dude, but what kind of box-office can a movie like this do anyway? Dude, it doesn't really matter, the studio is obviously gonna make its money back cause it cost so little and films like this rent out for years to come. Dude, since when did you get this smart? Dude, uuuhmm...pass me the bong! Cough-cough!

CRITIQUE: Dude, this movie is made specifically for one type of audience: 15 to 25-year old male horndogs who enjoy getting wasted or stoned every now and again. Not many other people will "get" it. In fact, if you are not part of that target audience, I doubt that you will either enjoy or appreciate this movie's complete nuttiness. Mind you, I'm not part of that target group, but since those days weren't that far off for me (or are they still around?), the film's complete over-the-top goofiness worked for me just the same. This movie combines elements from the CHEECH & CHONG flicks, BEAVIS & BUTTHEAD and the obvious, BILL & TED'S. The movie doesn't take itself seriously, it doesn't pretend to be about anything more than a couple of stoners running around and getting into strange and funny adventures and it features plenty of cleavage. Sound interesting to you? To many, it won't. To others, it will.
Unfortunately, I was disappointed with one specific aspect of the movie. If you're gonna have a movie about potheads and strip joints and big breasted aliens, how'sabout showing us a little T&A every now and then? This movie skips on most of the profanity and sexual gratuities and replaces it with decent chunk o' humor, which was a little too PG-13 for my taste. I only wish that someone would come around one day and make a nice, out of this world trippy movie that features a deeper insight into these bumbling idiots. But as it stands, this movie is still quite humorous all around, definitely weird and unpredictable (the ostrich attack is a classic) and frivolous enough to recommend to anyone who considers two goofs saying "sweet!" and "dude!" over and over again...funny. I enjoyed it for the most part, despite its unfunny patches and definitely enjoyed its giant sexy alien woman at the end. Woo-hah! For those of you who enjoy the cheebah every now and again, I say rent this puppy with some buds and some munchies and have a blast! You could also follow it all up with FEAR AND LOATHING IN LAS VEGAS, BREAKFAST OF CHAMPIONS and a late night copy of EVIL DEAD 2.
Little Known Facts about this film and its stars: Actor Ashton Kutcher recently admitted that he hasn't smoked up in the past three years (on "The Craig Kilborn Show"). Apparently, his move from NY (where he was a male model) to LA (where he stars in TV's "The 70s Show") has obliterated his pot smoking habits. His full name is Christopher Ashton Kutcher and he was born in Iowa. He majored in Biochemical Engineering at the University of Iowa. The guy who plays Tommy in this movie is named Charlie O'Connell. He is actor Jerry O'Connell's brother.
Review Date: December 15, 2000 Director: Danny Leiner Writer: Phillip Stark Producers: Broderick Johnson, Andrew A. Kosove, Wayne Allan Rice Actors: Ashton Kutcher as Jesse Seann William Scott as Chester Kristy Swanson as Christie Boner Genre: Comedy Year of Release: 2000 ------------------------------------ JoBlo's Movie Emporium http://www.joblo.com/ ------------------------------------ (c) 2000 Berge Garabedian
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
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.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


This chapter covers the syntax of the Groovy programming language. The grammar of the language derives from the Java grammar, but enhances it with specific constructs for Groovy, and allows certain simplifications.
1. Comments
1.1. Single line comment
Single line comments start with //
and can be found at any position in the line.
The characters following //
, till the end of the line, are considered part of the comment.
// a standalone single line comment
println "hello" // a comment till the end of the line
1.2. Multiline comment
A multiline comment starts with /*
and can be found at any position in the line.
The characters following /*
will be considered part of the comment, including new line characters,
up to the first */
closing the comment.
Multiline comments can thus be put at the end of a statement, or even inside a statement.
/* a standalone multiline comment
spanning two lines */
println "hello" /* a multiline comment starting
at the end of a statement */
println 1 /* one */ + 2 /* two */
1.3. GroovyDoc comment
Similarly to multiline comments, GroovyDoc comments are multiline, but start with /**
and end with */
.
Lines following the first GroovyDoc comment line can optionally start with a star *
.
Those comments are associated with:
-
type definitions (classes, interfaces, enums, annotations),
-
fields and properties definitions
-
methods definitions
Although the compiler will not complain about GroovyDoc comments not being associated with the above language elements, you should prepend those constructs with the comment right before it.
/**
* A Class description
*/
class Person {
/** the name of the person */
String name
/**
* Creates a greeting method for a certain person.
*
* @param otherPerson the person to greet
* @return a greeting message
*/
String greet(String otherPerson) {
"Hello ${otherPerson}"
}
}
GroovyDoc follows the same conventions as Java’s own JavaDoc. So you’ll be able to use the same tags as with JavaDoc.
1.4. Shebang line
Beside the single line comment, there is a special line comment, often called the shebang line understood by UNIX systems
which allows scripts to be run directly from the command-line, provided you have installed the Groovy distribution
and the groovy
command is available on the PATH
.
#!/usr/bin/env groovy
println "Hello from the shebang line"
The # character must be the first character of the file. Any indentation would yield a compilation error.
|
2. Keywords
The following list represents all the keywords of the Groovy language:
as |
assert |
break |
case |
catch |
class |
const |
continue |
def |
default |
do |
else |
enum |
extends |
false |
finally |
for |
goto |
if |
implements |
import |
in |
instanceof |
interface |
new |
null |
package |
return |
super |
switch |
this |
throw |
throws |
trait |
true |
try |
while |
3. Identifiers
3.1. Normal identifiers
Identifiers start with a letter, a dollar or an underscore. They cannot start with a number.
A letter can be in the following ranges:
-
'a' to 'z' (lowercase ascii letter)
-
'A' to 'Z' (uppercase ascii letter)
-
'\u00C0' to '\u00D6'
-
'\u00D8' to '\u00F6'
-
'\u00F8' to '\u00FF'
-
'\u0100' to '\uFFFE'
Then following characters can contain letters and numbers.
Here are a few examples of valid identifiers (here, variable names):
def name
def item3
def with_underscore
def $dollarStart
But the following ones are invalid identifiers:
def 3tier
def a+b
def a#b
All keywords are also valid identifiers when following a dot:
foo.as
foo.assert
foo.break
foo.case
foo.catch
3.2. Quoted identifiers
Quoted identifiers appear after the dot of a dotted expression.
For instance, the name
part of the person.name
expression can be quoted with person."name"
or person.'name'
.
This is particularly interesting when certain identifiers contain illegal characters that are forbidden by the Java Language Specification,
but which are allowed by Groovy when quoted. For example, characters like a dash, a space, an exclamation mark, etc.
def map = [:]
map."an identifier with a space and double quotes" = "ALLOWED"
map.'with-dash-signs-and-single-quotes' = "ALLOWED"
assert map."an identifier with a space and double quotes" == "ALLOWED"
assert map.'with-dash-signs-and-single-quotes' == "ALLOWED"
As we shall see in the following section on strings, Groovy provides different string literals. All kind of strings are actually allowed after the dot:
map.'single quote'
map."double quote"
map.'''triple single quote'''
map."""triple double quote"""
map./slashy string/
map.$/dollar slashy string/$
There’s a difference between plain character strings and Groovy’s GStrings (interpolated strings), as in that the latter case, the interpolated values are inserted in the final string for evaluating the whole identifier:
def firstname = "Homer"
map."Simson-${firstname}" = "Homer Simson"
assert map.'Simson-Homer' == "Homer Simson"
4. Strings
Text literals are represented in the form of chain of characters called strings.
Groovy lets you instantiate java.lang.String
objects, as well as GStrings (groovy.lang.GString
)
which are also called interpolated strings in other programming languages.
4.1. Single quoted string
Single quoted strings are a series of characters surrounded by single quotes:
'a single quoted string'
Single quoted strings are plain java.lang.String and don’t support interpolation.
|
4.2. String concatenation
All the Groovy strings can be concatenated with the +
operator:
assert 'ab' == 'a' + 'b'
4.3.  You can span the content of the string across line boundaries without the need to split the string in several pieces, without contatenation or newline escape characters:
def aMultilineString = '''line one
line two
line three'''
If your code is indented, for example in the body of the method of a class, your string will contain the whitespace of the indentation.
The Groovy Development Kit contains methods for stripping out the indentation with the String#stripIndent()
method,
and with the String#stripMargin()
method that takes a delimiter character to identify the text to remove from the beginning of a string.
When creating a string as follows:
def startingAndEndingWithANewline = '''
line one
line two
line three
'''
You will notice that the resulting string contains a newline character as first character. It is possible to strip that character by escaping the newline with a backslash:
def strippedFirstNewline = '''\
line one
line two
line three
'''
assert !strippedFirstNewline.startsWith('\n')
4.3.1. Escaping special characters
You can escape single quotes with the the backslash character to avoid terminating the string literal:
'an escaped single quote: \' needs a backslash'
And you can escape the escape character itself with a double backslash:
'an escaped escape character: \\ needs a double backslash'
Some special characters also use the backslash as escape character:
| Escape sequence | Character |
|---|---|
'\t' |
tabulation |
'\b' |
backspace |
'\n' |
newline |
'\r' |
carriage return |
'\f' |
formfeed |
'\\' |
backslash |
'\'' |
single quote (for single quoted and triple single quoted strings) |
'\"' |
double quote (for double quoted and triple double quoted strings) |
4.4. Double quoted string
Double quoted strings are a series of characters surrounded by double quotes:
"a double quoted string"
Double quoted strings are plain java.lang.String if there’s no interpolated expression,
but are groovy.lang.GString instances if interpolation is present.
|
| To escape a double quote, you can use the backslash character: "A double quote: \"". |
4.4.1. String interpolation
Any Groovy expression can be interpolated in all string literals, apart from single and triple single quoted strings.
Interpolation is the act of replacing a placeholder in the string with its value upon evaluation of the string.
The placeholder expressions are surrounded by ${}
or prefixed with $
for dotted expressions.
The expression value inside the placeholder is evaluated to its string representation when the GString is passed to a method taking a String as argument by calling toString()
on that expression.
Here, we have a string with a placeholder referencing a local variable:
def name = 'Guillaume' // a plain string
def greeting = "Hello ${name}"
assert greeting.toString() == 'Hello Guillaume'
But any Groovy expression is valid, as we can see in this example with an arithmetic expression:
def sum = "The sum of 2 and 3 equals ${2 + 3}"
assert sum.toString() == 'The sum of 2 and 3 equals 5'
Not only expressions are actually allowed in between the ${} placeholder. Statements are also allowed, but a statement’s value is just null .
So if several statements are inserted in that placeholder, the last one should somehow return a meaningful value to be inserted.
For instance, "The sum of 1 and 2 is equal to ${def a = 1; def b = 2; a + b}" is supported and works as expected but a good practice is usually to stick to simple expressions inside GString placeholders.
|
In addition to ${}
placeholders, we can also use a lone $
sign prefixing a dotted expression:
def person = [name: 'Guillaume', age: 36]
assert "$person.name is $person.age years old" == 'Guillaume is 36 years old'
But only dotted expressions of the form a.b
, a.b.c
, etc, are valid, but expressions that would contain parentheses like method calls, curly braces for closures, or arithmetic operators would be invalid.
Given the following variable definition of a number:
def number = 3.14
The following statement will throw a groovy.lang.MissingPropertyException
because Groovy believes you’re trying to access the toString
property of that number, which doesn’t exist:
shouldFail(MissingPropertyException) {
println "$number.toString()"
}
You can think of "$number.toString()" as being interpreted by the parser as "${number.toString}()" .
|
If you need to escape the $
or ${}
placeholders in a GString so they appear as is without interpolation,
you just need to use a \
backslash character to escape the dollar sign:
assert '${name}' == "\${name}"
4.4.2. Special case of interpolating closure expressions
So far, we’ve seen we could interpolate arbitrary expressions inside the ${}
placeholder, but there is a special case and notation for closure expressions. When the placeholder contains an arrow, ${→}
, the expression is actually a closure expression — you can think of it as a closure with a dollar prepended in front of it:
def sParameterLessClosure = "1 + 2 == ${-> 3}" (1)
assert sParameterLessClosure == '1 + 2 == 3'
def sOneParamClosure = "1 + 2 == ${ w -> w << 3}" (2)
assert sOneParamClosure == '1 + 2 == 3'
| 1 | The closure is a parameterless closure which doesn’t take arguments. |
| 2 | Here, the closure takes a single java.io.StringWriter argument, to which you can append content with the << leftShift operator.
In either case, both placeholders are embedded closures. |
In appearance, it looks like a more verbose way of defining expressions to be interpolated, but closure have an interesting advantage over mere expressions: lazy evaluation.
Let’s consider the following sample:
def number = 1 (1)
def eagerGString = "value == ${number}"
def lazyGString = "value == ${ -> number }"
assert eagerGString == "value == 1" (2)
assert lazyGString == "value == 1" (3)
number = 2 (4)
assert eagerGString == "value == 1" (5)
assert lazyGString == "value == 2" (6)
| 1 | We define a number variable containing 1 that we then interpolate within two GStrings,
as an expression in eagerGString and as a closure in lazyGString . |
| 2 | We expect the resulting string to contain the same string value of 1 for eagerGString . |
| 3 | Similarly for lazyGString |
| 4 | Then we change the value of the variable to a new number |
| 5 | With a plain interpolated expression, the value was actually bound at the time of creation of the GString. |
| 6 | But with a closure expression, the closure is called upon each coercion of the GString into String, resulting in an updated string containing the new number value. |
| An embedded closure expression taking more than one parameter will generate an exception at runtime. Only closures with zero or one parameters are allowed. |
4.4.3. Interoperability with Java
When a method (whether implemented in Java or Groovy) expects a java.lang.String
,
but we pass a groovy.lang.GString
instance,
the toString()
method of the GString is automatically and transparently called.
String takeString(String message) { (4)
assert message instanceof String (5)
return message
}
def message = "The message is ${'hello'}" (1)
assert message instanceof GString (2)
def result = takeString(message) (3)
assert result instanceof String
assert result == 'The message is hello'
| 1 | We create a GString variable |
| 2 | We double check it’s an instance of the GString |
| 3 | We then pass that GString to a method taking a String as parameter |
| 4 | The signature of the takeString() method explicitly says its sole parameter is a String |
| 5 | We also verify that the parameter is indeed a String and not a GString. |
4.4.4. GString and String hashCodes
Although interpolated strings can be used in lieu of plain Java strings, they differ with strings in a particular way: their hashCodes are different. Plain Java strings are immutable, whereas the resulting String representation of a GString can vary, depending on its interpolated values. Even for the same resulting string, GStrings and Strings don’t have the same hashCode.
assert "one: ${1}".hashCode() != "one: 1".hashCode()
GString and Strings having different hashCode values, using GString as Map keys should be avoided, especially if we try to retrieve an associated value with a String instead of a GString.
def key = "a"
def m = ["${key}": "letter ${key}"] (1)
assert m["a"] == null (2)
| 1 | The map is created with an initial pair whose key is a GString |
| 2 | When we try to fetch the value with a String key, we will not find it, as Strings and GString have different hashCode values |
4.5. Triple double quoted string
Triple double quoted strings behave like double quoted strings, with the addition that they are multiline, like the triple single quoted strings.
def name = 'Groovy'
def template = """
Dear Mr ${name},
You're the winner of the lottery!
Yours sincerly,
Dave
"""
assert template.toString().contains('Groovy')
| Neither double quotes nor single quotes need be escaped in triple double quoted strings. |
4.6. Slashy string
Beyond the usual quoted strings, Groovy offers slashy strings, which use /
as delimiters.
Slashy strings are particularly useful for defining regular expressions and patterns,
as there is no need to escape backslashes.
Example of a slashy string:
def fooPattern = /.*foo.*/
assert fooPattern == '.*foo.*'
Only forward slashes need to be escaped with a backslash:
def escapeSlash = /The character \/ is a forward slash/
assert escapeSlash == 'The character / is a forward slash'
Slashy strings are multiline:
def multilineSlashy = /one
two
three/
assert multilineSlashy.contains('\n')
Slashy strings can also be interpolated (ie. a GString):
def color = 'blue'
def interpolatedSlashy = /a ${color} car/
assert interpolatedSlashy == 'a blue car'
There are a few gotchas to be aware of.
An empty slashy string cannot be represented with a double forward slash, as it’s understood by the Groovy parser as a line comment. That’s why the following assert would actually not compile as it would look like a non-terminated statement:
assert '' == //
4.7. Dollar slashy string
Dollar slashy strings are multiline GStrings delimited with an opening $/
and and a closing /$
.
The escaping character is the dollar sign, and it can escape another dollar, or a forward slash.
But both dollar and forward slashes don’t need to be escaped, except to escape the dollar of a string subsequence that would start like a GString placeholder sequence, or if you need to escape a sequence that would start like a closing dollar slashy string delimiter.
Here’s an example:
def name = "Guillaume"
def date = "April, 1st"
def dollarSlashy = $/
Hello $name,
today we're ${date}.
$ dollar sign
$$ escaped dollar sign
\ backslash
/ forward slash
$/ escaped forward slash
$/$ escaped dollar slashy string delimiter
/$
assert [
'Guillaume',
'April, 1st',
'$ dollar sign',
'$ escaped dollar sign',
'\\ backslash',
'/ forward slash',
'$/ escaped forward slash',
'/$ escaped dollar slashy string delimiter'
].each { dollarSlashy.contains(it) }
4.8. String summary table
String name |
String syntax |
Interpolated |
Multiline |
Escape character |
Single quoted |
|
|
||
Triple single quoted |
|
|
||
Double quoted |
|
|
||
Triple double quoted |
|
|
||
Slashy |
|
|
||
Dollar slashy |
|
|
4.9. Characters
Unlike Java, Groovy doesn’t have an explicit character literal. However, you can be explicit about making a Groovy string an actual character, by three different means:
char c1 = 'A' (1)
assert c1 instanceof Character
def c2 = 'B' as char (2)
assert c2 instanceof Character
def c3 = (char)'C' (3)
assert c3 instanceof Character
| 1 | by being explicit when declaring a variable holding the character by specifying the char type |
| 2 | by using type coercion with the as operator |
| 3 | by using a cast to char operation |
| The first option 1 is interesting when the character is held in a variable, while the other two (2 and 3) are more interesting when a char value must be passed as argument of a method call. |
5. Numbers
Groovy supports different kinds of integral literals and decimal literals, backed by the usual Number
types of Java.
5.1. Integral literals
The integral literal types are the same as in Java:
-
byte
-
char
-
short
-
int
-
long
-
java.lang.BigInteger
You can create integral numbers of those types with the following declarations:
// primitive types
byte b = 1
char c = 2
short s = 3
int i = 4
long l = 5
// infinite precision
BigInteger bi = 6
If you use optional typing by using the def
keyword, the type of the integral number will vary:
it’ll adapt to the capacity of the type that can hold that number.
For positive numbers:
def a = 1
assert a instanceof Integer
// Integer.MAX_VALUE
def b =<PHONE_NUMBER>
assert b instanceof Integer
// Integer.MAX_VALUE + 1
def c =<PHONE_NUMBER>
assert c instanceof Long
// Long.MAX_VALUE
def d =<PHONE_NUMBER>854775807
assert d instanceof Long
// Long.MAX_VALUE + 1
def e =<PHONE_NUMBER>854775808
assert e instanceof BigInteger
As well as for negative numbers:
def na = -1
assert na instanceof Integer
// Integer.MIN_VALUE
def nb = -2147483648
assert nb instanceof Integer
// Integer.MIN_VALUE - 1
def nc = -2147483649
assert nc instanceof Long
// Long.MIN_VALUE
def nd = -9223372036854775808
assert nd instanceof Long
// Long.MIN_VALUE - 1
def ne = -9223372036854775809
assert ne instanceof BigInteger
5.1.1. Alternative non-base 10 representations
Binary literal
In Java 6 and before, as well as in Groovy, numbers could be represented in decimal, octal and hexadecimal bases, and with Java 7 and Groovy 2, you can use a binary notation with the 0b
prefix:
int xInt = 0b10101111
assert xInt == 175
short xShort = 0b11001001
assert xShort == 201 as short
byte xByte = 0b11
assert xByte == 3 as byte
long xLong = 0b101101101101
assert xLong == 2925l
BigInteger xBigInteger = 0b111100100001
assert xBigInteger == 3873g
int xNegativeInt = -0b10101111
assert xNegativeInt == -175
Octal literal
Octal numbers are specified in the typical format of 0
followed by octal digits.
int xInt = 077
assert xInt == 63
short xShort = 011
assert xShort == 9 as short
byte xByte = 032
assert xByte == 26 as byte
long xLong = 0246
assert xLong == 166l
BigInteger xBigInteger = 01111
assert xBigInteger == 585g
int xNegativeInt = -077
assert xNegativeInt == -63
Hexadecimal literal
Hexadecimal numbers are specified in the typical format of 0x
followed by hex digits.
int xInt = 0x77
assert xInt == 119
short xShort = 0xaa
assert xShort == 170 as short
byte xByte = 0x3a
assert xByte == 58 as byte
long xLong = 0xffff
assert xLong == 65535l
BigInteger xBigInteger = 0xaaaa
assert xBigInteger == 43690g
Double xDouble = new Double('0x1.0p0')
assert xDouble == 1.0d
int xNegativeInt = -0x77
assert xNegativeInt == -119
5.2. Decimal literals
The decimal literal types are the same as in Java:
-
float
-
double
-
java.lang.BigDecimal
You can create decimal numbers of those types with the following declarations:
// primitive types
float f = 1.234
double d = 2.345
// infinite precision
BigDecimal bd = 3.456
Decimals can use exponents, with the e
or E
exponent letter, followed by an optional sign,
and a integral number representing the exponent:
assert 1e3 == 1_000.0
assert 2E4 == 20_000.0
assert 3e+1 == 30.0
assert 4E-2 == 0.04
assert 5e-1 == 0.5
Conveniently for exact decimal number calculations, Groovy choses java.lang.BigDecimal
as its decimal number type.
In addition, both float
and double
are supported, but require an explicit type declaration, type coercion or suffix.
Even if BigDecimal
is the default for decimal numbers, such literals are accepted in methods or closures taking float
or double
as parameter types.
| Decimal numbers can’t be represented using a binary, octal or hexadecimal representation. |
5.3. Underscore in literals
When writing long literal numbers, it’s harder on the eye to figure out how some numbers are grouped together, for example with groups of thousands, of words, etc. By allowing you to place underscore in number literals, it’s easier to spot those groups:
long creditCardNumber = 1234_5678_9012_3456L
long socialSecurityNumbers = 999_99_9999L
double monetaryAmount = 12_345_132.12
long hexBytes = 0xFF_EC_DE_5E
long hexWords = 0xFFEC_DE5E
long maxLong = 0x7fff_ffff_ffff_ffffL
long alsoMaxLong = 9_223_372_036_854_775_807L
long bytes = 0b11010010_01101001_10010100_10010010
5.4. Number type suffixes
We can force a number (including binary, octals and hexadecimals) to have a specific type by giving a suffix (see table bellow), either uppercase or lowercase.
| Type | Suffix |
|---|---|
BigInteger |
|
Long |
|
Integer |
|
BigDecimal |
|
Double |
|
Float |
|
Examples:
assert 42I == new Integer('42')
assert 42i == new Integer('42') // lowercase i more readable
assert 123L == new Long("123") // uppercase L more readable
assert<PHONE_NUMBER> == new Long('2147483648') // Long type used, value too large for an Integer
assert 456G == new BigInteger('456')
assert 456g == new BigInteger('456')
assert 123.45 == new BigDecimal('123.45') // default BigDecimal type used
assert 1.200065D == new Double('1.200065')
assert 1.234F == new Float('1.234')
assert 1.23E23D == new Double('1.23E23')
assert 0b1111L.class == Long // binary
assert 0xFFi.class == Integer // hexadecimal
assert 034G.class == BigInteger // octal
5.5. Math operations
Although operators are covered later on, it’s important to discuss the behavior of math operations and what their resulting types are.
Division and power binary operations aside (covered below),
-
binary operations between
byte
,char
,short
andint
result inint
-
binary operations involving
long
withbyte
,char
,short
andint
result inlong
-
binary operations involving
BigInteger
and any other integral type result inBigInteger
-
binary operations between
float
,double
andBigDecimal
result indouble
-
binary operations between two
BigDecimal
result inBigDecimal
The following table summarizes those rules:
| byte | char | short | int | long | BigInteger | float | double | BigDecimal | |
|---|---|---|---|---|---|---|---|---|---|
byte |
int |
int |
int |
int |
long |
BigInteger |
double |
double |
double |
char |
int |
int |
int |
long |
BigInteger |
double |
double |
double |
|
short |
int |
int |
long |
BigInteger |
double |
double |
double |
||
int |
int |
long |
BigInteger |
double |
double |
double |
|||
long |
long |
BigInteger |
double |
double |
double |
||||
BigInteger |
BigInteger |
double |
double |
double |
|||||
float |
double |
double |
double |
||||||
double |
double |
double |
|||||||
BigDecimal |
BigDecimal |
Thanks Groovy’s operator overloading, the usual arithmetic operators work as well with BigInteger and BigDecimal ,
unlike in Java where you have to use explicit methods for operating on those numbers.
|
5.5.1. The case of the division operator
The division operators /
(and /=
for division and assignment) produce a double
result
if either operand is a float
or double
, and a BigDecimal
result otherwise
(when both operands are any combination of an integral type short
, char
, byte
, int
, long
,
BigInteger
or BigDecimal
).
BigDecimal
division is performed with the divide()
method if the division is exact
(i.e. yielding a result that can be represented within the bounds of the same precision and scale),
or using a MathContext
with a precision
of the maximum of the two operands' precision plus an extra precision of 10,
and a scale
of the maximum of 10 and the maximum of the operands' scale.
For integer division like in Java, you should use the intdiv() method,
as Groovy doesn’t provide a dedicated integer division operator symbol.
|
5.5.2. The case of the power operator
The power operation is represented by the **
operator, with two parameters: the base and the exponent.
The result of the power operation depends on its operands, and the result of the operation
(in particular if the result can be represented as an integral value).
The following rules are used by Groovy’s power operation to determine the resulting type:
-
If the exponent is a decimal value
-
if the result can be represented as an
Integer
, then return anInteger
-
else if the result can be represented as a
Long
, then return aLong
-
otherwise return a
Double
-
-
If the exponent is an integral value
-
if the exponent is strictly negative, then return an
Integer
,Long
orDouble
if the result value fits in that type -
if the exponent is positive or zero
-
if the base is a
BigDecimal
, then return aBigDecimal
result value -
if the base is a
BigInteger
, then return aBigInteger
result value -
if the base is an
Integer
, then return anInteger
if the result value fits in it, otherwise aBigInteger
-
if the base is a
Long
, then return aLong
if the result value fits in it, otherwise aBigInteger
-
-
We can illustrate those rules with a few examples:
// base and exponent are ints and the result can be represented by an Integer
assert 2 ** 3 instanceof Integer // 8
assert 10 ** 9 instanceof Integer // 1_000_000_000
// the base is a long, so fit the result in a Long
// (although it could have fit in an Integer)
assert 5L ** 2 instanceof Long // 25
// the result can't be represented as an Integer or Long, so return a BigInteger
assert 100 ** 10 instanceof BigInteger // 10e20
assert 1234 ** 123 instanceof BigInteger //<PHONE_NUMBER>12727042875...
// the base is a BigDecimal and the exponent a negative int
// but the result can be represented as an Integer
assert 0.5 ** -2 instanceof Integer // 4
// the base is an int, and the exponent a negative float
// but again, the result can be represented as an Integer
assert 1 ** -0.3f instanceof Integer // 1
// the base is an int, and the exponent a negative int
// but the result will be calculated as a Double
// (both base and exponent are actually converted to doubles)
assert 10 ** -1 instanceof Double // 0.1
// the base is a BigDecimal, and the exponent is an int, so return a BigDecimal
assert 1.2 ** 10 instanceof BigDecimal // 6.1917364224
// the base is a float or double, and the exponent is an int
// but the result can only be represented as a Double value
assert 3.4f ** 5 instanceof Double //<PHONE_NUMBER>2146965
assert 5.6d ** 2 instanceof Double // 31.359999999999996
// the exponent is a decimal value
// and the result can only be represented as a Double value
assert 7.8 ** 1.9 instanceof Double // 49.542708423868476
assert 2 ** 0.1f instanceof Double // 1.0717734636432956
6. Booleans
Boolean is a special data type that is used to represent truth values: true
and false
.
Use this data type for simple flags that track true/false conditions.
Boolean values can be stored in variables, assigned into fields, just like any other data type:
def myBooleanVariable = true
boolean untypedBooleanVar = false
booleanField = true
true
and false
are the only two primitive boolean values.
But more complex boolean expressions can be represented using logical operators.
In addition, Groovy has special rules (often referred to as Groovy Truth) for coercing non-boolean objects to a boolean value.
7. Lists
Groovy uses a comma-separated list of values, surrounded by square brackets, to denote lists.
Groovy lists are plain JDK java.util.List
, as Groovy doesn’t define its own collection classes.
The concrete list implementation used when defining list literals are java.util.ArrayList
by default,
unless you decide to specify otherwise, as we shall see later on.
def numbers = [1, 2, 3] (1)
assert numbers instanceof List (2)
assert numbers.size() == 3 (3)
| 1 | We define a list numbers delimited by commas and surrounded by square brackets, and we assign that list into a variable |
| 2 | The list is an instance of Java’s java.util.List interface |
| 3 | The size of the list can be queried with the size() method, and shows our list contains 3 elements |
In the above example, we used a homogeneous list, but you can also create lists containing values of heterogeneous types:
def heterogeneous = [1, "a", true] (1)
| 1 | Our list here contains a number, a string and a boolean value |
We mentioned that by default, list literals are actually instances of java.util.ArrayList
,
but it is possible to use a different backing type for our lists,
thanks to using type coercion with the as
operator, or with explicit type declaration for your variables:
def arrayList = [1, 2, 3]
assert arrayList instanceof java.util.ArrayList
def linkedList = [2, 3, 4] as LinkedList (1)
assert linkedList instanceof java.util.LinkedList
LinkedList otherLinked = [3, 4, 5] (2)
assert otherLinked instanceof java.util.LinkedList
| 1 | We use coercion with the as operator to explicitly request a java.util.LinkedList implementation |
| 2 | We can say that the variable holding the list literal is of type java.util.LinkedList |
You can access elements of the list with the []
subscript operator (both for reading and setting values)
with positive indices or negative indices to access elements from the end of the list, as well as with ranges,
and use the <<
leftShift operator to append elements to a list:
def letters = ['a', 'b', 'c', 'd']
assert letters[0] == 'a' (1)
assert letters[1] == 'b'
assert letters[-1] == 'd' (2)
assert letters[-2] == 'c'
letters[2] = 'C' (3)
assert letters[2] == 'C'
letters << 'e' (4)
assert letters[ 4] == 'e'
assert letters[-1] == 'e'
assert letters[1, 3] == ['b', 'd'] (5)
assert letters[2..4] == ['C', 'd', 'e'] (6)
| 1 | Access the first element of the list (zero-based counting) |
| 2 | Access the last element of the list with a negative index: -1 is the first element from the end of the list |
| 3 | Use an assignment to set a new value for the third element of the list |
| 4 | Use the << leftShift operator to append an element at the end of the list |
| 5 | Access two elements at once, returning a new list containing those two elements |
| 6 | Use a range to access a range of values from the list, from a start to an end element position |
As lists can be heterogeneous in nature, lists can also contain other lists to create multi-dimensional lists:
def multi = [[0, 1], [2, 3]] (1)
assert multi[1][0] == 2 (2)
| 1 | Define a list of list of numbers |
| 2 | Access the second element of the top-most list, and the first element of the inner list |
8. Arrays
Groovy reuses the list notation for arrays, but to make such literals arrays, you need to explicitely define the type of the array through coercion or type declaration.
String[] arrStr = ['Ananas', 'Banana', 'Kiwi'] (1)
assert arrStr instanceof String[] (2)
assert !(arrStr instanceof List)
def numArr = [1, 2, 3] as int[] (3)
assert numArr instanceof int[] (4)
assert numArr.size() == 3
| 1 | Define an array of strings using explicit variable type declaration |
| 2 | Assert that we created an array of strings |
| 3 | Create an array of ints with the as operator |
| 4 | Assert that we created an array of primitive ints |
You can also create multi-dimensional arrays:
def matrix3 = new Integer[3][3] (1)
assert matrix3.size() == 3
Integer[][] matrix2 (2)
matrix2 = [[1, 2], [3, 4]]
assert matrix2 instanceof Integer[][]
| 1 | You can define the bounds of a new array |
| 2 | Or declare an array without specifying its bounds |
Access to elements of an array follows the same notation as for lists:
String[] names = ['Cédric', 'Guillaume', 'Jochen', 'Paul']
assert names[0] == 'Cédric' (1)
names[2] = 'Blackdrag' (2)
assert names[2] == 'Blackdrag'
| 1 | Retrieve the first element of the array |
| 2 | Set the value of the third element of the array to a new value |
| Java’s array initializer notation is not supported by Groovy, as the curly braces can be misinterpreted with the notation of Groovy closures. |
9. Maps
Sometimes called dictionaries or associative arrays in other languages, Groovy features maps. Maps associate keys to values, separating keys and values with colons, and each key/value pairs with commas, and the whole keys and values surrounded by square brackets.
def colors = [red: '#FF0000', green: '#00FF00', blue: '#0000FF'] (1)
assert colors['red'] == '#FF0000' (2)
assert colors.green == '#00FF00' (3)
colors['pink'] = '#FF00FF' (4)
colors.yellow = '#FFFF00' (5)
assert colors.pink == '#FF00FF'
assert colors['yellow'] == '#FFFF00'
assert colors instanceof java.util.LinkedHashMap
| 1 | We define a map of string color names, associated with their hexadecimal-coded html colors |
| 2 | We use the subscript notation to check the content associated with the red key |
| 3 | We can also use the property notation to assert the color green’s hexadecimal representation |
| 4 | Similarly, we can use the subscript notation to add a new key/value pair |
| 5 | Or the property notation, to add the yellow color |
| When using names for the keys, we actually define string keys in the map. |
Groovy creates maps that are actually instances of java.util.LinkedHashMap .
|
If you try to access a key which is not present in the map:
assert colors.unknown == null
You will retrieve a null
result.
In the examples above, we used string keys, but you can also use values of other types as keys:
def numbers = [1: 'one', 2: 'two']
assert numbers[1] == 'one'
Here, we used numbers as keys, as numbers can unambiguously be recognized as numbers, so Groovy will not create a string key like in our previous examples. But consider the case you want to pass a variable in lieu of the key, to have the value of that variable become the key:
def key = 'name'
def person = [key: 'Guillaume'] (1)
assert !person.containsKey('name') (2)
assert person.containsKey('key') (3)
| 1 | The key associated with the 'Guillaume' name will actually be the "key" string, not the value associated with the key variable |
| 2 | The map doesn’t contain the 'name' key |
| 3 | Instead, the map contains a 'key' key |
| You can also pass quoted strings as well as keys: ["name": "Guillaume"]. This is mandatory if your key string isn’t a valid identifier, for example if you wanted to create a string key containing a hash like in: ["street-name": "Main street"]. |
When you need to pass variable values as keys in your map definitions, you must surround the variable or expression with parentheses:
person = [(key): 'Guillaume'] (1)
assert person.containsKey('name') (2)
assert !person.containsKey('key') (3)
| 1 | This time, we surround the key variable with parentheses, to instruct the parser we are passing a variable rather than defining a string key |
| 2 | The map does contain the name key |
| 3 | But the map doesn’t contain the key key as before |


report_cases.Rd
Report case counts by date of report
report_cases( case_estimates, case_forecast = NULL, delays, type = "sample", reporting_effect )
| case_estimates | A data.table of case estimates with the following variables: date, sample, cases |
|---|---|
| case_forecast | A data.table of case forecasts with the following variables: date, sample, cases. If not supplied the default is not incoperate forecasts. |
| delays | A list of delays (i.e incubation period/reporting delay) between infection and report. Each list entry must also be a list containing the mean, standard deviation of the mean (mean_sd), standard deviation (sd), standard deviation of the standard deviation and the maximum allowed value for the that delay (assuming a lognormal distribution with all parameters excepting the max allowed value on the log scale). |
| type | Character string indicating the method to use to transfrom counts. Supports either "sample" which approximates sampling or "median" would shift by the median of the distribution. |
| reporting_effect | A |
A list of data.table
s. The first entry contains the following variables sample
, date
and cases
with the second
being summarised across samples.
if (FALSE) { ## Define example cases cases <- EpiNow2::example_confirmed[1:40] ## Set up example generation time generation_time <- list(mean = EpiNow2::covid_generation_times[1, ]$mean, mean_sd = EpiNow2::covid_generation_times[1, ]$mean_sd, sd = EpiNow2::covid_generation_times[1, ]$sd, sd_sd = EpiNow2::covid_generation_times[1, ]$sd_sd, max = 30) ## Set incubation_period <- list(mean = EpiNow2::covid_incubation_period[1, ]$mean, mean_sd = EpiNow2::covid_incubation_period[1, ]$mean_sd, sd = EpiNow2::covid_incubation_period[1, ]$sd, sd_sd = EpiNow2::covid_incubation_period[1, ]$sd_sd, max = 30) reporting_delay <- list(mean = log(5), mean_sd = log(2), sd = log(2), sd_sd = log(1.5), max = 30) ## Run model out <- EpiNow2::estimate_infections(cases, family = "negbin", generation_time = generation_time, delays = list(incubation_period, reporting_delay), samples = 1000, warmup = 200, cores = 4, chains = 4, estimate_rt = FALSE, verbose = TRUE) reported_cases <- report_cases(case_estimates = out$samples[variable == "infections"][, cases := value][, value := NULL], delays = list(incubation_period, reporting_delay), type = "sample") print(reported_cases) }


The code browser pane is a dynamic visual display of the currently gathered ScriptSense database. The tree displays TorqueScript defined identifiers in black text and engine exports in blue text. When you double click on a script identifier the editor will open the file and line where it is in use or it will show a Go To Definition dialog for you to select from. The toolbar buttons are used to filter out different TorqueScript types: classes, datablocks, global functions, global variable and named objects, and namespaces.


{% extends "admin/base_bootcamp.html" %} {% load static %} {% block header %} {% endblock %} {% block body %}
{{ error_message }}
{% endif %}| Batch Name | {{ batch.name }} |
|---|---|
| Project Name (Project Statistics) | {{ batch.project.name }} |
| Project Created by | {{ batch.project.created_by.get_full_name }} ({{ batch.project.created_by.username }}) |
| Batch Created at | {{ batch.created_at }} |
| Batch Created by | {{ batch.created_by.get_full_name }} ({{ batch.created_by.username }}) |
| Input CSV Filename | {{ batch.filename }} |
| Active? | {% if batch.active %} Yes {% else %} No {% endif %} |
| Assignments per Task | {{ batch.assignments_per_task }} |
| Tasks Completed | {{ batch.total_finished_tasks }} / {{ batch.total_tasks }} |
| Task Assignments Completed | {{ batch.total_finished_task_assignments }} / {{ batch.total_task_assignments }} |
| First Assignment Completed at | {{ first_finished_time }} |
| Most Recent Assignment Completed at | {{ last_finished_time }} |
| Total Work Time | {{ batch_total_work_time }} |
| Mean Time / Assignment | {{ batch_mean_work_time }} |
| Median Time / Assignment | {{ batch_median_work_time}} |
| Username | Name | # Assignments | Mean Time | Median Time | Most Recent Assignment | |||
|---|---|---|---|---|---|---|---|---|
| {{ stats_user.username }} | {{ stats_user.full_name }} | {{ stats_user.assignments_completed }} | {% if stats_user.has_completed_assignments %}{{ stats_user.mean_work_time }}s | {{ stats_user.median_work_time }}s | {{ stats_user.last_finished_time }} | {% else %}{{ stats_user.mean_work_time }} | {{ stats_user.median_work_time }} | {{ stats_user.last_finished_time }} | {% endif %}
| Assignment ID | Username | Name | Created at | Expires at |
|---|---|---|---|---|
| {{ uta.id }} | {{ uta.assigned_to.username }} | {{ uta.assigned_to.get_full_name }} | {{ uta.created_at }} | {{ uta.expires_at }} |


@* * Copyright 2023 HM Revenue & Customs * * Licensed 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. *@ @import uk.gov.hmrc.govukfrontend.views.html.components._ @import uk.gov.hmrc.hmrcfrontend.views.html.helpers._ @import views.html.helper.CSPNonce @this( govukLayout: GovukLayout, hmrcStandardHeader: HmrcStandardHeader, hmrcStandardFooter: HmrcStandardFooter, hmrcLanguageSelectHelper: HmrcLanguageSelectHelper, hmrcHead: HmrcHead, scripts: HmrcScripts, twoThirdsOneThirdMainContent: TwoThirdsOneThirdMainContent, twoThirdsMainContent: TwoThirdsMainContent, hmrcReportTechnicalIssueHelper: HmrcReportTechnicalIssueHelper, govukBackLink: GovukBackLink, ) @( pageTitle: String, sidebar: Option[Html] = None, headScripts: Option[Html] = None, showBackLink: Boolean = false )(content: Html)(implicit request: RequestHeader, messages: Messages) @headBlock = { @headScripts } @contentBlock = { @content


Captain Paone has over 2000 hours of flight instruction experience and has instructed from the primary through ATP levels.
All instruciton is done in our 7KCAB Citabria. That's Airbatic spelled backwards! This aircraft is equipped with an inverted fuel and oil system and is fully rated for Aerobatics.
From Aerobatic instruction to sight-seeing tours we have a program for everyone! Curriculum for students is learn at your own pace and is tailored to the individual.