"Example" (Resource Object Type)

Details

  • Example resources contain interesting examples of Wolfram Language code.

Properties

  • There are standard ResourceObject properties common to all resource types. Additionally, each resource type defines additional special properties.
  • Commonly used standard ResourceObject properties for example resources include:
  • "ExampleNotebook"notebook containing only the example
    "DefinitionNotebook"notebook defining the example and metadata
  • Properties used for sorting example resources include:
  • "Categories"domains corresponding to the example

Using an Example Resource

  • The example is accessed with ResourceObject["Example""name"]["ExampleNotebook"].
  • Properties can be accessed using ResourceObject[]["prop"].

Creating an Example Resource

  • To create an example resource with complete metadata, use the definition notebook available with CreateNotebook["ExampleResource"].
  • Using the definition notebook, the resource can also be stored locally, deployed to the cloud or submitted for publication in the Wolfram Example Repository.

Publishing in the Example Repository

  • Example resources can be published in the Wolfram Example Repository.
  • Submission to the example repository requires a PublisherID.
  • Publication requires approval from a review team and typically involves modifications.

Examples

open allclose all

Basic Examples  (1)

Retrieve an example resource from the public repository:

The resource has type "Prompt":

See the example:

Scope  (2)

Explore the metadata for a published example resource:

See the corresponding categories:

Open the definition notebook:

Open a blank example resource definition notebook to create a new example resource with metadata: