This is the reference for the complete set of builtin rules & functions.
The build language largely resembles Python. As such, following python inspired functions are available as builtins:
len(x)
- returns the length of x
.
enumerate(seq)
- returns a list of pairs of the index and object for each item in
seq
.
zip(x, y,
...)
- returns a list in which each element has one item from each argument.
isinstance(x, type)
- returns True if x
is of the given type.
range([start, ]stop[,
step])
- returns a list of integers up to stop
(or
from start
to stop
).
any(seq)
- returns true if any of the items in seq
are
considered true.
all(seq)
- returns true if all of the items in seq
are
considered true.
min(seq[,key])
- returns the least item in seq
.
key
is a function that is applied to each
item before comparison.
max(seq[,key])
- returns the greatest item in seq
.
key
is a function that is applied to each
item before comparison.
sorted(seq)
- returns a copy of the given list with the contents sorted.
reversed(seq)
- returns a copy of the given list with the items in reverse order.
filter(filter, seq)
- returns a copy of the given list with the items filtered using function.
map(mapper, seq)
- returns a copy of the given list with the items transformed using function.
reduce(function, seq, initializer=None)
- apply function of two arguments cumulatively to the items of seq from left to right reducing to a single value returning that value. eg. reduce(lambda x, y: x+y, [0, 1, 2, 3]) would return (((0+1)+2)+3)=6. If initializer is present it is placed before the first item in the sequence.
package_name()
- returns the package being currently parsed.
subrepo_name()
- returns the subrepo of the package being currently parsed or the empty
string if this is not a subrepo.
join_path(x, ...)
- joins the given path elements using the OS separator. It will
intelligently handle repeated or missing separators.
split_path(path)
- splits the given path into the directory and filename.
splitext(filename)
- splits the given filename into base name and extension at the final
dot.
basename(path)
- returns the basename of a file.
dirname(path)
- returns the directory name of a file.
breakpoint()
- breaks into an interactive debugger allowing inspection of the current
scope. To enable breakpoints, pass the --debug
flag.
json(x)
- returns a JSON-formatted representation of a plz value.
is_semver(s)
- returns true if s
is a semantic version (either
with or without a leading "v"), or false if not.
semver_check(version, constraint)
- checks if a semantic version
meets a constraint. Supported version and constraint formats are listed on this site.
The following are available as member functions of strings:
join(seq)
- joins the elements of seq
together with
this string as a separator.
split(sep)
- splits this string at each occurrence of the given separator.
replace(old, new)
- returns a copy of this string with all instances of
old
replaced with
new
.
partition(sep)
- breaks this string around the first occurrence of
sep
and returns a 3-tuple of (before, sep,
after).
rpartition(sep)
- breaks this string around the last occurrence of
sep
and returns a 3-tuple of (before, sep,
after).
startswith(prefix)
- returns true if this string begins with
prefix
endswith(suffix)
- returns true if this string ends with
suffix
format(arg1=val1,
arg2=val2,
...)
- Replaces named parameters in the string.
lstrip(cutset)
- strips all characters in cutset
from the
beginning of this string.
rstrip(cutset)
- strips all characters in cutset
from the
end of this string.
strip(cutset)
- strips all characters in cutset
from the
beginning & end of this string.
removeprefix(prefix)
- strips the exact string prefix
from the
beginning of this string.
removesuffix(suffix)
- strips the exact string suffix
from the
end of this string.
find(needle)
- returns the index of the first occurrence of
needle
in this string.
rfind(needle)
- returns the index of the last occurrence of
needle
in this string.
count(needle)
- returns the number of times needle
occurs
in this string.
upper()
- returns a copy of this string converted to uppercase.
lower()
- returns a copy of this string converted to lowercase.
The following are available as member functions of dictionaries:
get(key[,
default])
- returns the item with the given key, or the default (None
if that is not given).
setdefault(key[,
default])
- If the given key is in the dict, return its value, otherwise insert
it with the given value (None
if that is not
given).
keys()
- returns an iterable sequence of the keys of this dictionary, in a
consistent order.
values()
- returns an iterable sequence of the values of this dictionary, in a
consistent order.
items()
- returns an iterable sequence of pairs of the keys and values of this
dictionary, in a consistent order.
copy()
- deprecated, use a comprehension if needed.
Returns a shallow copy of this dictionary.
In addition to the python builtins, Please also has a rich set of its own functions.
Messages can be logged to Please's usual logging mechanism. These may or
may not be displayed depending on the -v
flag;
by default only warning
and above are visible.
log.debug(msg[,
args...])
- the lowest level of messages, output at this level is very verbose.
log.info(msg[,
args...])
- Informational messages, typically this is the highest level
per-target information is logged at.
log.notice(msg[,
args...])
- Messages of general interest during the build; it is rare for this
to be appropriate from a BUILD file.
log.warning(msg[,
args...])
- A warning message that something seems wrong, but it may be
recoverable.
log.error(msg[,
args...])
- A message indicating that something has gone wrong and it will not
be recoverable. This is usually followed shortly by some kind of
failure.
log.fatal(msg[,
args...])
- Indicates that something has gone catastrophically wrong, and causes
the process to exit immediately and unsuccessfully. Usually you are
better off using assert
or
fail()
to indicate failure, since plz can
handle those and annotate with additional output.
subinclude(target)
Includes the output of a build target as extra rules in this one.
This is the closest equivalent to import
in the
BUILD language. It behaves somewhat differently though in that the
contents of the subincluded file are added to the globals of the current
module so can be called directly.
The target that you attempt to subinclude is simply a normal build target, with the restriction that it must have exactly one output. The simplest form of this is a single-file filegroup or export_file rule, but it is possible to have more complex rules generating your BUILD definitions.
For example:
subinclude('//build_defs:my_build_rules')
glob(include, exclude=None, hidden=False)
Matches all filenames by a pattern, in a manner reminiscent of shell-style pattern expansion or Python's builtin glob module.
Note that the expansion patterns accepted are
*
to match an arbitrary number of non-separator
characters (i.e. not /
),
**
to match any number of
complete path components, ? to match a single character,
and [class] to match a class of character e.g. [a-z], [^0-9], or [abc].
These are often referred to as "Ant-style" patterns since Ant
introduced them.
Glob exclude patterns can be evaluated relative to the matched file or the
package root. If the exclude pattern does not contain a path separator, it
is considered relative and will be evaluated against the file name of the
match only, otherwise it will be evaluated from the directory of the build
file. This means that
glob(["**/*.go"], exclude = ["*_test.go"])
will
exclude all files ending in "test.go".
Hidden files (those starting with a .
) are not
matched by any patterns unless you pass
hidden=True
.
It bears noting that you cannot glob generated files, only source files.
Also glob will not descend into any directories that contain a BUILD file;
this maintains an invariant that each file is owned by exactly one package
(or potentially none, but then Please doesn't know or care about them). If
you want to pull in files from another package, export them there using a
filegroup
and depend on that in the package you want it.
| Argument | Default | Type | |
|---|---|---|---|
| include | list | List of paths to include. Each is globbed separately. | |
| exclude | None | list |
List of glob patterns to exclude from anything matched by
include .
|
| hidden | False | bool | Set to True to include hidden files / folders. |
get_labels(target, prefix, all=False)
Gets the unique set of labels for a rule and all its transitive dependencies.
Two formats are accepted for target: the first is a string containing just
the target name, which is resolved in the current package. This
facilitates calling them from a pre-build function, which is in fact the
only time it's safe to call this way.
The other is a full build target, which should be a transitive dependency
of the target whose pre/post build function you're in. If the target isn't
built when you ask for the labels the build will terminate.
In either case this is only safe to call from a pre / post-build function
and should never be called at initial parse time, because at that point
you generally don't have the full set of labels available yet.
Uses for this are normally fairly language-specific. The clearest example
is maybe the Python rules, where
python_binary
and
python_test
use this to identify if any of their
dependencies have marked them as not being zip-safe.
| Argument | Default | Type | |
|---|---|---|---|
| target | str | Label of the target to get labels for. | |
| prefix | None | str | Filters the returned labels to only ones starting with this prefix. |
| all | False | bool |
Returns labels from all dependencies, even past those marked as
output_is_complete .
|
has_label(target, prefix)
Returns True if the target has any matching label that would be returned by get_labels.
| Argument | Default | Type | |
|---|---|---|---|
| target | str | Label of the target to get labels for. | |
| prefix | None | str | Checks only labels that start with this prefix. |
add_licence(target, licence)
Adds a new licence to a target. The assumption (as usual) is that if multiple are added, they are options, so any one can be accepted.
| Argument | Default | Type | |
|---|---|---|---|
| target | str | Label of the target to add the licence to. | |
| licence | str | Name of the licence to add. |
get_licences(target)
Returns all the licences that are currently known to apply to a target.
| Argument | Default | Type | |
|---|---|---|---|
| target | str | Label of the target to get licences for. |
package(...)
Defines settings affecting the current package - for example, default visibility.
With this you can override any current value in
CONFIG
by name for all subsequent targets in the
current package. Only existing values can be replaced.
There are also a couple of special values which aren't normally in
CONFIG
:
default_licences
and
default_visibility
. As the names suggest these
set defaults for those attributes for all following targets that don't set
them.
This function must be called before any targets are defined.
log.warning(message, [args...])
Logs an arbitrary message at some given level. The available levels, from most quiet to most severe, are:
log.debug
log.info
log.notice
log.warning
log.error
log.fatal
These correspond to Please's built in messages and are controlled as usual
by the
-v
command-line argument.
As the name suggests, log.fatal
immediately
terminates the program with a fatal error. The others have no side effect
other than showing the message.
The message and arguments together are interpolated like Python's normal
string interpolation, similar to the builtin
logging
package.
decompose(label)
Decomposes a build label into the package and name parts.
Consider carefully when you should use this - command replacements may be
more appropriate.
Most rules should be able to accept labels without having to know anything
about their structure.
The input label can be given in either relative or absolute form. It will fail with an error if it's not a structurally valid label.
canonicalise(label)
Converts the given build label to its full form.
For example:
//package:target
->
//package:target
//package
->
//package:package
:target
->
//current_package:target
tag(name, tag)
Tags a build label name with a given tag. This can be useful to keep following the intermediate build target
naming convention when a build definition doesn't expose the tag
parameter.
For example:
tag("name", "foo")
->
"_name#foo"
tag("_name#foo", "bar")
->
"_name#foo_bar"
fail(message)
Causes an immediate failure in parsing of the current build file.
Use this where you might raise
in Python.
Miscellaneous rules that aren't language-specific.
{{ template "lexicon_entry.html" .Named "genrule" }} {{ template "lexicon_entry.html" .Named "gentest" }} {{ template "lexicon_entry.html" .Named "export_file" }} {{ template "lexicon_entry.html" .Named "filegroup" }} {{ template "lexicon_entry.html" .Named "hash_filegroup" }} {{ template "lexicon_entry.html" .Named "system_library" }} {{ template "lexicon_entry.html" .Named "remote_file" }} {{ template "lexicon_entry.html" .Named "tarball" }} {{ template "lexicon_entry.html" .Named "text_file" }}git_branch(short:bool=True)
Calls git symbolic-ref -q HEAD
and returns the
corresponding git branch. If short
is false,
show the full symbolic ref for a branch.
| Argument | Default | Type | |
|---|---|---|---|
| short | True | bool | Uses the shortened symbolic ref for a branch. |
git_commit()
Calls git rev-parse HEAD
and returns the
corresponding git commit SHA. To return a shortened commit use
git_commit()[0:8]
.
git_show(format:str)
Calls git show -s --format={format}
and returns
the result. format
is limited to a subset of
values accepted by git show
.
| Argument | Default | Type | |
|---|---|---|---|
| format | str | String format passed to git show . |
Supported format verbs are limited to:
%H
commit hash
%T
tree hash
%P
parent hashes
%an
author name
%ae
author email
%at
author date, UNIX timestamp
%cn
committer name
%ce
committer email
%ct
committer date, UNIX timestamp
%D
ref names
%e
encoding
%s
subject of commit message
%f
sanitized subject line, suitable for a
filename
%b
body of commit message
%B
raw body (unwrapped subject and body)
%N
commit notes
%GG
raw verification message from GPG for a
signed commit
%G?
show "G" for a good (valid) signature,
"B" for a bad signature, "U" for a good signature with unknown
validity, "X" for a good signature that has expired, "Y" for a good
signature made by an expired key, "R" for a good signature made by a
revoked key, "E" if the signature cannot be checked (e.g. missing key)
and "N" for no signature
%GS
show the name of the signer for a
signed commit
%GK
show the key used to sign a signed
commit
%n
newline
%%
a raw %
git_state(clean_label:str="clean", dirty_label:str="dirty")
Calls git status --porcelain
and returns the
corresponding string. If the repository is clean, the string set in
clean_label
is returned. If the repository is
dirty, the string set in dirty_label
is
returned.
| Argument | Default | Type | |
|---|---|---|---|
| clean_label | clean | str | String returned if the repository is clean. |
| dirty_label | dirty | str | String returned if the repository is dirty. |
Rules for defining subrepos. See the docs for more information on subrepos in general.
{{ template "lexicon_entry.html" .Named "http_archive" }} {{ template "lexicon_entry.html" .Named "new_http_archive" }} {{ template "lexicon_entry.html" .Named "github_repo" }} {{ template "lexicon_entry.html" .Named "arch" }}


comprehensive type checking with TypeScript
and flexible exporting in classic React, Next.js, or Gatsby.js
About ReacType
ReacType is a prototyping tool that allows users to visualize their application architecture dynamically, employing a drag-and-drop canvas display and a real-time component code preview. The user can create components and drag instances of these components and HTML elements onto the canvas. This architecture can then be published on a dashboard and exported as TypeScript files to be used as a starter template for any repository. The dashboard displays the user’s saved templates and published ReacType templates, providing a social platform where templates can be liked, commented on, and imported directly into the user’s canvas.
Download ReacType
Prototype React components compatible with Gatsby.js and Next.js applications to take advantage of server-side rendering and other features of these popular frameworks
Collaborate with others through the new interactive dashboard
View dynamically created components/HTML elements in the component tree


On April 21, 2020, a group at MIT began working on a problem and today, they want to see how you can solve it! MIT Pathfinders is an opportunity that allows pre-university students to contribute to PathCheck Foundation’s open source projects and can help the world get back on track. Be it through code or writing, we can’t wait to see how you will help us solve the world’s most unprecedented problem - SARS-CoV-2.
What
An competition with tasks ranging from research, writing, and development! Learn more about the format here.
Who
Pre-University Students aged 13+
Where
100% Virtual on the MIT Pathfinders Slack
When
December 6th to January 24th
Tracks
You can compete in one or both tracks
Open-Source Track
The MIT PathFinders open-source competition is open to 13-18 year old students. Guided by professional mentors, competitors will work on open-source tasks for PathCheck Foundation's research and development teams.
Tasks can be from various categories, including but not limited to, app development, data science, epidemiology, simulations, and documentation.
Writing Track
The MIT Pathfinders essay competition is open to 13-16 year old students. Through this contest, students will explore the uses of cutting-edge technology in digital contact tracing.
All students who submit an essay will be invited to join PathCheck Foundation’s global network of volunteers, so that they can get involved firsthand in the technologies they are writing about.
Prizes
TBA - stay tuned!
F.A.Q
-
Do I need to know how to code?
No! The essay track doesn't require programming experience, and there are also several tasks in the open-source track that do not require previous coding experience. However, for the open source track, a background in Javascript (React, Node) or Python is useful but not necessary.
-
How do the organizers pick the tasks?
The tasks were chosen to serve the real time needs of the organization. Thus, your efforts during the competition will directly contribute to the success of PathCheck’s mission to reopen society.
-
I will be turning 13 after the beginning of the contest, can I still participate?
Unfortunately, we are only allowing participants who are within the eligible age range on the day of the competition.
-
How would I become a finalist?
Finalists are chosen according to the number and difficulty of the tasks they complete. The top five performers overall will be named finalists.
-
What if I need help with my task?
Don't worry! We'll have college and professional mentors to guide you through your tasks.
-
I'm in college, can I participate?
If your age is 13-18, you can participate! If you are older than 18, you can volunteer as a mentor to help students with their tasks. Shoot us an email at<EMAIL_ADDRESS>if you're interested!
Register
Please read our Eligibility & Rules before registering for the competition.


TELLING LIES IN AMERICA
By Harvey Karten, Ph.D. Banner Entertainment Director: Guy Ferland Writer: Joe Eszterhas Cast: Kevin Bacon, Brad Renfro, Maximilian Schell, Calista Flockhart, Paul Dooley
A great many Americans nowadays are not so eager to receive the world's tired and poor. Liberals fear that massive immigration will take jobs away from long-term residents. Conservatives are wary of changes in the racial and ethnic structure of the U.S. But moderates on both sides cannot plug the extra thump in the heartbeat when they hear the classic story of immigration to U.S. shores. The story goes simply like this. Father and son, refugees in the Old World because of the vagaries of warfare and political programs, seek a better life in the land of freedom and opportunity. They join the huddled masses, generally in the larger cities of the promised land, where dad sticks to the traditional ways of thinking and son tries his darndest to become all-American cool. Being different, the recent immigrant has a foreign accent, is unaccustomed to the ways of his new location, and is if a young person, he is often harassed in school and treated like an outsider. Eventually he become more American than the natives and is accepted as an equal.
"Telling Lies in America," a semi-autobiographical from the pen of Joe Eszterhas, is the tale of the that Hungarian-American's experience during the early 1960s in the Free World, specifically in Cleveland. Eszterhas, perhaps the most highly paid screenwriter in Hollywood, is best known for his disastrous scrawl of the movie "Showgirls," panned almost universally, but earning him a very handsome $2 million dollars. While the 17-year-old Karchy Jonas (Brad Renfro), the character meant to represent Eszterhas, shows no particular talent or inclination to become a writer, he possesses one great gift that would help him to become a storyteller: he lies and lies and lies. He is not necessary a pathological fibber, but lets go with some whoppers to boost other people's esteem of him. Why does he need to do this? He feels--rightly so--that he is not accorded the respect which any human being has the right to demand.
"Telling Lies in America" is a heartwarming story which, while offering nothing particularly new to the classic formula of its genre, is boosted by remarkable performances from its principals, particularly by Kevin Bacon in the role of a cynical, hip disc jockey whose radio station WHK. He is tuned in by kids in the local Cleveland high school who swing to his music at 1960s sock hops and is idolized by Karchy Jonas. Billy Magic (Kevin Bacon) is a magnetic personality who takes payola, or bribes from record companies who want him to play their discs over and over in order to give the songs a chance to make the top 40 and thereby rake in the money. He does what he can to get ahead: he has a stable of bimbos to maintain, a big red Cadillac still owned by the bank, and a simple apartment to hold on to. But he is not a bad person. He has been fired from one city's radio station after another because he champions "race" music, giving considerable attention to the songs composed by blacks and other minorities. When he spots Karchy (Brad Renfro), a nice- looking, bland lad who is treated badly by his classmates and by his school's principal, Father Norton (Paul Dooley), he hires him to do odd jobs, but in reality he needs someone who is under the legal age to accept sinister envelopes from cigar-smoking producers.
Renfro does a smooth job representing the Hungarian immigrant who tells the girl he wants to impress that he has received a scholarship to Princeton, informs police officers that his father is a doctor, and advises Billy Magic that he has had both girls and filet mignon "lots of times." In the movie's funniest scene, he slips Spanish Fly into the ice cream soda of his date, Diney (Calista Flockhart), hoping that the alleged aphrodisiac would make him irresistible to her.  At another point he sneaks into the confession booth of Father Norton and hears the mea culpas of the young man in his class who repeatedly picks on him. Renfro holds onto to a poker-faced expression at almost every turn, whether he is using Billy's clout to get Amos (Damen Fletcher), a black kid in his class, a record contract, or when he is trying to impress a hooker hired by his idol. When he lies, Billy Magic does not chasten him but instead seems to get quite a charge from the boy. After all, Jonas was hired because Billy figures that he would never tell the truth about the payola he collects for his boss.
Maximilian Schell is convincing as the hard-working immigrant who wonders about the meaning of the words "cool" and "slick," wants his son to succeed in school, and is enthusiastic about the upcoming swearing-in to become a citizen. Despite the movie's lack of new ideas, it has a touching and intelligent story, and should boost the political agenda of people around the world who yearn to breathe free. Rated PG-13. Running Time: 101 minutes. (C) 1997 Harvey Karten
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


Do you like animals?
FAVOURITE ANIMALS
My favourite animals are: snow owls, jaguars, snakes, spiders and barracuda.
Do you have a favourite animal?
WILD AND DOMESTIC ANIMALS
Did you know that the pets in our homes are all descendants of wild animals that still run wild today?
These include
- grey wolves / dog
- bezoar / goat
- mouflon / sheep
captive ANIMALS
Some people think that zoos are bad for animals because they are enclosed and other people think that it might be good for the animals if they were abandoned or needed help breeding.


| Trees | Index | Help |
|
|---|
| Module xmlsec :: Class DSigReferenceCtx |
|
| Method Summary | |
|---|---|
Creates new <dsig:Reference/> element processing context. | |
__getattr__(self,
name)
| |
__setattr__(self,
name,
value)
| |
Prints the debug information about dsigCtx to output. | |
Prints the debug information about dsigCtx to output file in XML format. | |
Destroys <dsig:Reference/> element processing context object... | |
Cleans up <dsig:Reference/> element processing object. | |
Gets the results of <dsig:Reference/> node processing just before digesting (valid only if DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES or DSIG_FLAGS_STORE_MANIFEST_REFERENCES flags of signature context is set). | |
Initializes new <dsig:Reference/> element processing context. | |
The Reference Element (http://www.w3.org/TR/xmldsig-core/sec-Reference) Reference is an element that may occur one or more times. |
| Method Details |
|---|
__init__(self,
dsigCtx=None,
origin=None,
_obj=None)
|
debugDump(self, output)Prints the debug information about dsigCtx to output. output : the output file. |
debugXmlDump(self, output)Prints the debug information about dsigCtx to output file in XML format. output : the output file. |
destroy(self)Destroys <dsig:Reference/> element processing context object |
finalize(self)Cleans up <dsig:Reference/> element processing object. |
getPreDigestBuffer(self)Gets the results of <dsig:Reference/> node processing just before digesting (valid only if DSIG_FLAGS_STORE_SIGNEDINFO_REFERENCES or DSIG_FLAGS_STORE_MANIFEST_REFERENCES flags of signature context is set). Returns : the buffer or None if an error occurs. |
initialize(self, dsigCtx, origin)Initializes new <dsig:Reference/> element processing context. Caller is responsible for cleaning up the returned context by calling finalize method. dsigCtx : the parent <dsig:Signature/> node processing context. origin : the reference origin (<dsig:SignedInfo/> or <dsig:Manifest/> node). Returns : 0 on succes or a negative value otherwise. |
processNode(self, node)The Reference Element (http://www.w3.org/TR/xmldsig-core/sec-Reference) Reference is an element that may occur one or more times. It specifies a digest algorithm and digest value, and optionally an identifier of the object being signed, the type of the object, and/or a list of transforms to be applied prior to digesting. The identification (URI) and transforms describe how the digested content (i.e., the input to the digest method) was created. The Type attribute facilitates the processing of referenced data. For example, while this specification makes no requirements over external data, an application may wish to signal that the referent is a Manifest. An optional ID attribute permits a Reference to be referenced from elsewhere. node : the <dsig:Reference/> node. Returns : 0 on succes or aa negative value otherwise. |
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Sun Jan 1 18:42:41 2006 | http://epydoc.sf.net |


Coronavirus disease 2019 (COVID-19) is defined as illness caused by a novel coronavirus called severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2; formerly called 2019-nCoV), which was first identified amid an outbreak of respiratory illness cases in Wuhan City, Hubei Province, China.
Symptoms of COVID-19 are variable, ranging from mild symptoms to severe illness. Common symptoms include headache, loss of smell and taste, nasal congestion and runny nose, cough, muscle pain, sore throat, fever, diarrhoea, and breathing difficulties. People with the same infection may have different symptoms, and their symptoms may change over time.
COVID-19 most commonly spreads during close contact • People who are physically near (within 6 feet) a person with COVID-19 or have direct contact with that person are at greatest risk of infection. • When people with COVID-19 cough, sneeze, sing, talk, or breathe they produce respiratory droplets. These droplets can range in size from larger droplets (some of which are visible) to smaller droplets. Small droplets can also form particles when they dry very quickly in the airstream. • Infections occur mainly through exposure to respiratory droplets when a person is in close contact with someone who has COVID-19. • Respiratory droplets cause infection when they are inhaled or deposited on mucous membranes, such as those that line the inside of the nose and mouth. • As the respiratory droplets travel further from the person with COVID-19, the concentration of these droplets decreases. Larger droplets fall out of the air due to gravity. Smaller droplets and particles spread apart in the air. • With passing time, the amount of infectious virus in respiratory droplets also decreases.
The best way to prevent illness is to avoid being exposed to this virus. You can take steps to slow the spread.  • Stay 6 feet apart from others who don’t live with you. • Get a COVID-19 vaccine when it is available to you. • Avoid crowds and poorly ventilated indoor spaces. • Wash your hands often with soap and water. Use hand sanitizer if soap and water aren’t available. • Stay home and isolate from others when sick. • Routinely clean and disinfect frequently touched surfaces and take other steps to stop the spread at home.
Community spread means people have been infected with the virus in an area, including some who are not sure how or where they became infected. Each health department determines community spread differently based on local conditions.
• Continue taking care of your health and wellness • Continue your medications, and do not change your treatment plan without talking to your healthcare provider. • Continue to manage your disease the way your healthcare provider has told you. • Have at least a 2-week supply of all prescription and non-prescription medications. • Talk to your healthcare provider about whether your vaccinations and other preventative services are up to date.
Coronaviruses are thought to be spread most often by respiratory droplets. Although the virus can survive for a short period on some surfaces, it is unlikely to be spread from domestic or international mail, products, or packaging. However, it may be possible that people can get COVID-19 by touching a surface or object that has the virus on it and then touching their own mouth, nose, or possibly their eyes, but this is not thought to be the main way the virus spreads.
Although persistence in drinking-water is possible, there is no evidence from surrogate human coronaviruses that they are present in surface or groundwater sources or transmitted through contaminated drinking water.
Aftereffects from COVID-19 were seen in the respiratory system, as well as nervous system disorders, mental health problems, metabolic and cardiovascular disorders, malaise, fatigue, musculoskeletal pain and anaemia.
• It appears that the virus that causes COVID-19 can spread from people to animals in some situations. A small number of pets worldwide, including cats and dogs, reported to be infected with the virus that causes COVID-19, mostly after close contact with people with COVID-19. • At this time, the risk of COVID-19 spreading from animals to people is low.
Plasma therapy is a medical procedure that uses the blood of a recovered patient to create antibodies on those infected individuals. Medically known as convalescent plasma therapy, this treatment uses antibodies found in the blood taken from a recovered Covid-19 patient. It is then used to treat those with severe SARS-CoV-2 infection to aid recovery.
Currently, it has shown positive results in Delhi and Mumbai where COVID cases are spiking high. It has also proven to improve the ability of a person to recover from the disease. However, there is more research required to prove its full efficacy in different patient types.
CCP is procured from recovered patients (e.g., prospective donors), who donate at blood centres or other collection centres. These blood collection organizations then test the plasma for SARS-CoV-2 antibody levels and standard infectious disease markers before releasing the plasma for clinical use. Some centres use availability of screening for SARS-CoV-2 antibody levels to incentivize donors. Plasmapheresis is desirable as a means to collect large volumes of plasma. Clinical assays that measure the level of antibodies reacting against various SARS-CoV-2 proteins are widely available and may correlate, albeit imperfectly, with neutralizing antibody titers, and thus might be used to predict the potency of CCP units (data on this relationship continue to evolve). It is important to consider the assay platform as well as the specificity (e.g., reactive with spike protein vs. nucleocapsid) and the class of antibody (IgG vs. total) when evaluating results, given major differences reported for available commercial serologic assays regarding correlations with neutralizing antibody activity.
Generally, plasma donors must be 18 years of age and weigh at least 110 pounds (50kg). All individuals must pass two separate medical examinations, a medical history screening and testing for transmissible viruses, before their donated plasma can be used to manufacture plasma protein therapies.
Yes. Plasma donation in IQPP certified collection centres is performed in a highly controlled, sterile environment by professionally trained medical staff. All plasma collection equipment is sterilized and any equipment that comes into contact with you is used only once to eliminate the possibility of transmitting viral infections.
You must have a pre-donation physical which includes answering medical history questions, tests for viruses such as HIV and Hepatitis and evaluating your protein and haemoglobin levels.
Your first donation will take approximately 2 hours. Return visits on average take about 90 minutes.
• Drink plenty of water to replenish any lost fluids. • Eat a healthy meal within two hours of your visit. • Don't use tobacco for 30 minutes after donating. • Avoid heavy lifting and strenuous activity for at least 24 hours.
Blood types are also important for plasma transfusions, but the rules are different than the rules for red blood cells transfusions. For example, people with type AB blood are universal plasma donors, and they can only receive type AB plasma.
Potential donors must have had documented SARS-CoV-2 infection (either nasopharyngeal swab positivity or serologic positivity), be symptom-free for at least 14 days, and meet standard blood donor eligibility requirements. Currently, individuals who themselves were treated with CP for their own COVID-19 illness are not allowed to donate blood products, including CP, for three months. Individuals who received COVID-19 vaccines are not eligible to donate CCP. Donations can occur as frequently as weekly for several months before antibody titers begin decreasing. Allowed donation frequency varies between blood centres.


FEAR AND LOATHING IN LAS VEGAS *** OF **** grade is B-
There was once a time when drugs were funny, Cheech and Chong are living proof of this. I was reminded of this as I watched Thompson's alter ego Raoul Duke (Depp) and his lawyer Dr. Gonzo (Del Toro) try to walk into a hotel on a psychedelic mix of acid, mescaline, ether, cocaine, and alcohol. Seeing Depp react as a hotel lobby lady's face distorts and contorts into a ghastly beast and wondering if you have to be on drugs to think the Casino carpets are weird. The first half of this film has many such laughs.
Depp and Del Toro are on an assignment in Las Vegas in search of a story they never follow up, and mostly staying high on drugs and trashing everything in their path.
The film's look is that of a frenzied trip. Wide lenses and distortions in showing Las Vegas and the hallucinations the characters have while looking at everyday objects. The cinematography is off the wall, wacky as the camera spins out of control with the characters. Different lighting and colored editing processes are also used generously to compliment the acting and unusual state of mind required.
There is one moment of pure genius as Thompson drives down the road at an incredible rate after consuming mass of drugs and skipping on his hotel bill.  Instead he leads him on a chase while playing with the expectations of the cop and narrating that it gives the cop some excitement and he would prefer chasing him rather than him getting nervous and pulling over immediately. This leads to a huge laugh.
I don't know how the public will react to this film. The critics seem to love it or hate it and the constant drug use is raising some controversy and hatred towards the film. I am giving the film a marginal recommendation but the film is definitely not for everyone and may rely on if you think drugs are or could be funny. Those not familiar with the book or Thompson may have trouble deciphering the action. Others can sit back and expect to see a wacky film that will have you see the world in a frenzied light for hours after.
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


No groups
Students can join this group via URL. Only students that are part of this #{msg['label.unit'].toLowerCase()} can join the group.
Share this URL with students and they will automatically join this group:
Only students who enter the following password can join the group:
Are you sure you want to delete group "#{manageGroupsBean.groupForEdit.name}"?


|
|
|
|
Personal
Interests:
|
|
|
*
Travel: I have been to 35 states in US
|
|
|
[Florida]: (i) ORLANDO: Magic Kingdom Theme Park, Epcot Theme Park, SeaWorld,
Islands of Adventure (has my best memory), Universal Studio; (ii) MIAMI: Miami beach; (iii) TAMPA: Tampa beach, Clearwater
beach; Florida A1A.
[Geogia]: ATLANTA: CNN center, Centenial Olympic park, Geogia Tech University, World Congress Center, Geogia
Dome, some nice Chinese restaurants.
[Wyoming, Idaho, Montana]: Yellow Stone National Park (recommend the
"Yellowstone Sundae"), Grand Teton National Park.
|
|
|
|
[Nevada, Las Vegas]: nice show, terific
food (Bellagio's
buffet), wonderful Foudations (You definitely cannot miss it).
[Ulta, Arizona, New Mexico, Colorado]: Grand Canyon NP, Zion
NP, Bryce NP, Capitol Reef NP, Canyonlands NP, Arches
NP, Mesa Verde NP, Four
corners, Lake Powell NP, Horse
Shoe, Hoover Dam, Dead Horse
State Park, Glen Dam, Monument Valley, Gooseneck
State Park, Antelope Canyon, Indian reservation area.
[Washington DC, Virginia, Maryland]: White House,
the
Ellipse, Capitol Hill, Lincoln Memorial, Washington Monument,
Franklin Roosevelt Memorial, Thomas Jefferson Memorial, Korea/Vietanam Veteran
Memorial, nice
Museums, National Museum
of Natural History, National
Air and Space Museum, National
Gallery of Art, National Archives of the United States (National Treasure,
Declare of Independence, Constitution), National Sculpture Garden, National
Zoological Park (Panda), Chinese restaurants (Er Mei Xiao Guan
has my best memory), China Town.
[South Carolina]: beautiful Villa, Charleston beach, big Aircraft-Carrier.
[North Carolina]: Beaches
(fishing, crab fishing, sunlight), Carolina beach, Wrightsville beach, Kure beach, parks (BBQ), lakes (fishing), restaurants,
zoo.
[Wisconsin, Illinois, Missouri, Indiana, Ohio, West Virginia]: UIUC, WISC, Madison (a beautiful
city), Champaign (a peaceful town), Chicago (a wonderful metropolitan), St Louis, Gateway-Arche, Six Flags Theme
Park, Navi Pier,
Solider
Field (AC Milan, Chicago
fire), Casino Boats (President
and Queen), Jefferson National Memorial.
[California, Mexico]: San Diego (Beach), Tijuana (Mexico food).
[Arizona]: PHOENIX,
Mesa, Apache trail, Sedona, Lao Sichuan Chinese Restaurant.
[North Carolina, South Carolina, Geogia, Alabama,
Mississippi, Louisiana, Texas]: (i) CHARLOTTE:
outlet; (ii) ATLANTA: World
of Coca Cola, Downtown Underground Flea market, Liu Fu Chinese Restaurant, Chuan Ba Wang Chinese Restaurant; (iii) NEW ORLEANS: French
Quarter, Warehouse
District, St. Charles Ave, Bourbon
Street (fatastic), Royal Street
(gallery and antique stores, I like most), Chartres Street, Jackson Square, Moon Walk, French Market, St. Louis Cathedral, State Museums (Cabildo),
Preservation
Hall, French
cuisine, Cajun cuisine, ACME oyster and seafood restaurant (since 1910, strong
recommend), Bubba Gump
Restaurant (nice cocktails), Jazz bars, Mississippi riverwalk, Lake Pontchartrain Causeway (the longest bridge in the
world), Aquarium, IMAX theatre, Old
Street Car, Cafe
Du Monde (since year 1860), Convention center, Casino, New Orleans Super Dome, Mexico
gulf, Beach after Hurricane Katrina; (iv) HOUSTON: NASA space center (amazing technology), Moody Garden (such
a nice garden), Gelveston island and beaches, China Town, Lao
Sichuan Chinese Restaurant (Strong recommend, No.1 Sichuan Cuisine in
my list), China Doll Restaurant (warm hearted owner).
[British]: (i) London: Big Ben, Buckingham Palace, Baker Street, Hyde Park, Downing Street, Trafalgar Square, The London Eye,
Tower of London, WestMinster Abbey, Red Telephone
Cubic, Heathrow Airport; (ii) Glasgow: Museum,
SECC; (iii) Edinburgh:
Castle.
[New York, New Jersey, Pennsylvania, Delaware, Maryland, DC, Virginia,
North Carolina]: (i) New York City: Times Square,
United Nations, 5th Avenue, Broadway Avenue, 8th Avenue, Central Park, Metropliton Museum, National Histrory
and Art Museum, Columbia University, Flushing, Donghu
Restaurant, Statue of Liberty, Ellis Island, Empire State Building, The
Best Steak in Town, Wall Street, The Bull, New York Stock Exchange, China
Town, Little Italian; (ii) Washington DC: Shenandoah
National Park, George Washington Memorial Parkway, Turkey Run Park,
Clara Barton National Historic Site, Riverside Park, Potomac River, Fort
Marcy National Historic Site, Theodore Roosevelt Island, US Marine Corps
War Memorial, Canal National Historic Park.
[Nebraska]: Omaha, UNL
, Jason's Deli
Restaurant.
[Hawaii]: |
|
|
Visited 35 states (66%)
Nations/Regions: China, US, Mexico, UK, Japan, HongKong, Germany, Turkey, Korean
Note: This page is inspired by Dr. Tao Xie's
and © by World66.com
|
|
|
|
|
|
|
|


Sean Doolittle, Adam Eaton remain with Nationals on club options
by Adam ZielonkaThe Washington Nationals exercised their club options for 2020 for relief pitcher Sean Doolittle and outfielder Adam Eaton.
Doolittle has played for Washington since arriving by trade in 2017. Once the team’s regular closer, by season’s end he was sharing that role with Daniel Hudson while also sometimes playing the set-up role in the seventh or eighth inning to help the Nationals’ maligned bullpen.
He finished the season with a career-high 29 saves and figures to factor into the Nationals’ plans in one of those key roles in 2020.
Eaton became Washington’s everyday right fielder in 2019 after Bryce Harper held that corner down for most of his time in town. Eaton batted .279 with 15 home runs and 49 RBI and had a terrific postseason, with a .320 batting average and .993 on-base plus slugging (OPS) with six RBI and two home runs.
Meanwhile, the Nationals officially declined the 2020 club option on Ryan Zimmerman’s contract, which was reported over the weekend, making him a free agent. They also declined the option on catcher Yan Gomes.
Zimmerman’s option was for $18 million, but both sides are interested in bringing the man known as “Mr. Nat” back at a lower salary.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC. Click here for reprint permission.
Please read our comment policy before commenting.


|
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
| def | __init__ |
| def | get_module_names |
| def | get_versions |
| def | get_default_version |
| def | get_hostname |
| def | set_num_instances |
| def | get_num_instances |
| def | start_version |
| def | stop_version |
| def | add_event |
| def | update_event |
| def | add_request |
| def | add_async_request |
| def | send_background_request |
| Public Member Functions inherited from google.appengine.api.request_info.Dispatcher | |
| def | get_module_names |
| def | get_versions |
| def | get_default_version |
| def | get_hostname |
| def | set_num_instances |
| def | get_num_instances |
| def | start_version |
| def | stop_version |
| def | add_event |
| def | update_event |
| def | add_request |
| def | add_async_request |
| def | send_background_request |
A fake Dispatcher implementation usable by tests.
| def google.appengine.api.request_info._LocalFakeDispatcher.add_async_request | ( | self, | |
| method, | |||
| relative_url, | |||
| headers, | |||
| body, | |||
| source_ip, | |||
module_name = None , |
|||
version = None , |
|||
instance_id = None |
|||
| ) |
Dispatch an HTTP request asynchronously. Args: method: A str containing the HTTP method of the request. relative_url: A str containing path and query string of the request. headers: A list of (key, value) tuples where key and value are both str. body: A str containing the request body. source_ip: The source ip address for the request. module_name: An optional str containing the module name to service this request. If unset, the request will be dispatched to the default module. version: An optional str containing the version to service this request. If unset, the request will be dispatched to the default version. instance_id: An optional str containing the instance_id of the instance to service this request. If unset, the request will be dispatched to according to the load-balancing for the module and version.
| def google.appengine.api.request_info._LocalFakeDispatcher.add_event | ( | self, | |
| runnable, | |||
| eta, | |||
service = None , |
|||
event_id = None |
|||
| ) |
Add a callable to be run at the specified time. Args: runnable: A callable object to call at the specified time. eta: An int containing the time to run the event, in seconds since the epoch. service: A str containing the name of the service that owns this event. This should be set if event_id is set. event_id: A str containing the id of the event. If set, this can be passed to update_event to change the time at which the event should run.
| def google.appengine.api.request_info._LocalFakeDispatcher.add_request | ( | self, | |
| method, | |||
| relative_url, | |||
| headers, | |||
| body, | |||
| source_ip, | |||
module_name = None , |
|||
version = None , |
|||
instance_id = None |
|||
| ) |
Process an HTTP request. Args: method: A str containing the HTTP method of the request. relative_url: A str containing path and query string of the request. headers: A list of (key, value) tuples where key and value are both str. body: A str containing the request body. source_ip: The source ip address for the request. module_name: An optional str containing the module name to service this request. If unset, the request will be dispatched to the default module. version: An optional str containing the version to service this request. If unset, the request will be dispatched to the default version. instance_id: An optional str containing the instance_id of the instance to service this request. If unset, the request will be dispatched to according to the load-balancing for the module and version. Returns: A ResponseTuple containing the response information for the HTTP request.
| def google.appengine.api.request_info._LocalFakeDispatcher.get_default_version | ( | self, | |
| module | |||
| ) |
Returns the default version for a module. Args: module: A str containing the name of the module. Returns: A str containing the default version for the specified module. Raises: ModuleDoesNotExistError: The module does not exist.
| def google.appengine.api.request_info._LocalFakeDispatcher.get_hostname | ( | self, | |
| module, | |||
| version, | |||
instance = None |
|||
| ) |
Returns the hostname for a (module, version, instance) tuple. If instance is set, this will return a hostname for that particular instances. Otherwise, it will return the hostname for load-balancing. Args: module: A str containing the name of the module. version: A str containing the version. instance: An optional str containing the instance ID. Returns: A str containing the hostname. Raises: ModuleDoesNotExistError: The module does not exist. VersionDoesNotExistError: The version does not exist. InvalidInstanceIdError: The instance ID is not valid for the module/version or the module/version uses automatic scaling.
| def google.appengine.api.request_info._LocalFakeDispatcher.get_module_names | ( | self | ) |
Returns a list of module names.
| def google.appengine.api.request_info._LocalFakeDispatcher.get_num_instances | ( | self, | |
| module, | |||
| version | |||
| ) |
Gets the number of instances running for a version of a module. Args: module: A str containing the name of the module. version: A str containing the version. Raises: ModuleDoesNotExistError: The module does not exist. VersionDoesNotExistError: The version does not exist. NotSupportedWithAutoScalingError: The provided module/version uses automatic scaling.
| def google.appengine.api.request_info._LocalFakeDispatcher.get_versions | ( | self, | |
| module | |||
| ) |
Returns a list of versions for a module. Args: module: A str containing the name of the module. Returns: A list of str containing the versions for the specified module. Raises: ModuleDoesNotExistError: The module does not exist.
| def google.appengine.api.request_info._LocalFakeDispatcher.send_background_request | ( | self, | |
| module_name, | |||
| version, | |||
| instance, | |||
| background_request_id | |||
| ) |
Dispatch a background thread request. Args: module_name: A str containing the module name to service this request. version: A str containing the version to service this request. instance: The instance to service this request. background_request_id: A str containing the unique background thread request identifier. Raises: NotSupportedWithAutoScalingError: The provided module/version uses automatic scaling. BackgroundThreadLimitReachedError: The instance is at its background thread capacity.
| def google.appengine.api.request_info._LocalFakeDispatcher.set_num_instances | ( | self, | |
| module, | |||
| version, | |||
| instances | |||
| ) |
Sets the number of instances to run for a version of a module. Args: module: A str containing the name of the module. version: A str containing the version. instances: An int containing the number of instances to run. Raises: ModuleDoesNotExistError: The module does not exist. VersionDoesNotExistError: The version does not exist. NotSupportedWithAutoScalingError: The provided module/version uses automatic scaling.
| def google.appengine.api.request_info._LocalFakeDispatcher.start_version | ( | self, | |
| module, | |||
| version | |||
| ) |
Starts a version. Args: module: A str containing the name of the module. version: A str containing the version. Raises: ModuleDoesNotExistError: The module does not exist. VersionDoesNotExistError: The version does not exist. NotSupportedWithAutoScalingError: The provided module/version uses automatic scaling.
| def google.appengine.api.request_info._LocalFakeDispatcher.stop_version | ( | self, | |
| module, | |||
| version | |||
| ) |
Stops a version. Args: module: A str containing the name of the module. version: A str containing the version. Raises: ModuleDoesNotExistError: The module does not exist. VersionDoesNotExistError: The version does not exist. NotSupportedWithAutoScalingError: The provided module/version uses automatic scaling.
| def google.appengine.api.request_info._LocalFakeDispatcher.update_event | ( | self, | |
| eta, | |||
| service, | |||
| event_id | |||
| ) |
Update the eta of a scheduled event. Args: eta: An int containing the time to run the event, in seconds since the epoch. service: A str containing the name of the service that owns this event. event_id: A str containing the id of the event to update.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/caching.20proofs.html ---
Re @Keeley Hoek's dream. ( :warning: everything that follows should be taken with a fair amount of :four_leaf_clover:)
We now have two crawlers that spit out dependency graphs of statements in mathlib. What I wish is that this would be integrated with Lean. I don't think it is unreasonable that Lean could have some cache.sqlite
in the root of every project. It could store dependencies there (not per file, but per statement!) and also cache proofs that have been computed by hammer/big-gun tactics.
This would have the side benefit that Lean could use more fine-grained dependency management on recompilation. Currently if someone adds a lemma to some basic file like data/list/basic.lean
almost half of mathlib has to be recompiled. But nothing changed! We only added a lemma!
I understand that if you want reproducible builds, this might require some modification of the binary format, but that shouldn't be impossible.
This recompilation could also combine this cache and proof-irrelevance. If someone changed the proof of a Prop
, but left the statement alone, then one only needs to chech that the new proof is in fact a proof. But it isn't necessary to recompile everything that depended on it.
Basically, when someone adds a lemma to data/list/basic.lean
I want the recompile to be done in 5 seconds.
I definitely think dependency tracking should be per-theorem and per-definition. I think the proof changing bit could probably be taken care by tracking changes to the theorem's interface (i.e. what you see with set_option pp.all true
, #check @theorem
).
Unfortunately too much proof caching becomes dangerous, especially when combined with hammers.
Why?
The problem can be that of course merely adding a lemma can't break a proof, but it can very much break a hammer.
Perhaps my hammer spends a certain amount of time searching a graph of rewrites, but has heuristics for aborting if things starting looking too bad.
For example, adding a @[simp]
theorem can change the way simp
works?
Right, I see where this is going...
That's true.
An innocuous extra lemma can cause it to waste time searching consequences of that lemma, and not only cause it to run longer, but to actually fail.
We want to allow people to leave the big hammers in their proofs, but also to be confident these proof scripts are still correct.
I can imagine a "two pass" compilation, which we could display e.g. with two colours of sidebars instead of the current yellow one.
On a first pass, we very aggressively use cached proofs, and if they work completely ignore the "expensive to check" tactic scripts.
This leads to something I've been thinking about for a while: storing the proof structure directly to allow for fast builds.
On the second pass we actually check the tactic scripts still work.
By the way --- this discussion, which is great, definitely doesn't belong on this thread.
But that second pass has to go all over mathlib. Not just the 5 files that I have open.
Discussion continued here: https://leanprover.zulipchat.com/#narrow/stream/113488-general/subject/caching.20proofs
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


List of medieval catalogues
{% if not printing %}
Medieval catalogues > SECULAR INSTITUTIONS: Secular Colleges
{% endif %}
-
SECULAR INSTITUTIONS: Secular Colleges
-
Arundel
-
SC201 Books devised by Richard Fitzalan, 5 December 1375 (0)
-
SC202 Expenses memoranda, Michaelmas 1384-5 (0)
-
SC203 Bequest by John Neele, 10 March 1498 (0)
-
SC204 Inventory of goods, 14 June 1505 (38)
-
SC205 Inventory of goods, 1 October 1517 (0)
-
Battlefield
-
SC209 Inventory of goods, 30 October 1444 (0)
-
Eton College
-
SC227 Inventory of church goods, 10 April 1445 (0)
-
SC228 Bequest by John French, 29 April 1457 (3)
-
SC229 Inventory of goods, 7 September 1465 (84)
-
SC230 Bequest by John Bonour, 10 January 1467 (5)
-
SC231 Bequest by William Strete, 7 June 1482 (2)
-
SC232 Bequest by Robert Galon, 18 January 1485 (0)
-
SC233 Bequest by John Mower, 12 April 1489 (8)
-
SC234 Bequest by Walter Smyth, 14 February 1524 (2)
-
SC235 Inventory of church goods, before 21 October 1528 (0)
-
SC236 Inventory of service books, c. April 1531 (2)
-
SC237 Inventory of church goods, 17 March 1536 × 29 Dec. 1547 (0)
-
SC238 Bequest by Thomas Hunton, 28 June 1536 (0)
-
SC239 Bequest by Robert Cater, 22 December 1545 (1)
-
SC240 Bequest by Bishop John Longlond, 23 March 1547 (6)
-
SC241 Bequest by Richard Williat, 3 August 1550 (1)
-
SC242 Excerpts from the Audit Books, 1548-9 to 1558-9 (4)
-
SC243 List of books returned to the bursars, 8 December 1558 (27)
-
Howden
-
SC253 Inventory of church goods, May 1549 (0)
-
Irthlingborough
-
SC256 Bequest by John Pyel, 12 February 1380 (0)
-
London, Guildhall College
-
SC263 Bequest by Edmund Alynson, 3 August 1510 (0)
-
London, St Martin-le-Grand
-
London, St Peter-upon-Cornhill
-
London, Whittington's College
-
Norwich
-
SC278 Inventory of goods, 10 July 1478 (0)
-
SC279 Deed of gift by Ralph Pulvertoft, 21 October 1497 (0)
-
SC280 Bequest by Ralph Pulvertoft, 27 March 1505 (0)
-
Sudbury
-
SC301 Inventory of goods, 10 May 1391 (6)
-
SC302 Bequest by John Donemowe, 15 April 1420 (2)
-
SC303 Bequest by Henry Gressham, 29 August 1420 (1)
-
SC304 Bequest by Geoffrey Bryce, 1 April 1446 (18)
-
SC305 Bequest by Henry Sythyng, 1 May 1464 (10)
-
SC306 Bequest by John Hervy, 20 September 1465 (1)
-
SC307 Bequest by Richard Crysale, 31 December 1465 (3)
-
SC308 Bequest by John Payn, 6 May 1488 (1)
-
SC309 Bequest by William Woode, 6 April 1491 (12)
-
SC310 Bequest by Thomas Gooch, 21 September 1508 (3)
-
Tamworth
-
SC311 Record of an inquisition, 16 January 1423 (0)
-
SC312 Inventory of goods returned to the church, 4 May 1548 (0)
-
Winchester College
-
SC328 Memoranda on the purchase of books, 1394-1401 (0)
-
SC329 Bequest by William of Wykeham, 24 July 1404 (6)
-
SC330 Inventory of goods, 1 September 1405 (31)
-
SC331 Indenture of goods delivered to sacrist, 8 Dec. 1412 (0)
-
SC332 Memoranda on the purchase of books, 1412-13 (25)
-
SC333 Inventory of goods, c. 1420 (0)
-
SC334 Inventory of goods, 1421/2 (95)
-
SC335 Inventory of the library, 30 July 1428 × 24 August 1429 (83)
-
SC336 Inventory of goods, 16 August 1432 (1)
-
SC337 Deed of gift by Robert Heete, 29 September 1432 (1)
-
SC338 Inventory of books chained and unchained, 24 Jan. 1433 (26)
-
SC339 Bequest by Michael Clive, 30 September 1501 (23)
-
SC340 Inventory of goods, 1521 (4)
-
SC341 Inventory of church goods, 1526/7 (0)
-
SC342 Bequest by Archbishop William Warham, 25 November 1530 (0)
-
SC343 Excerpts from the Bursars' Rolls, 1528-9 to 1555-6 (4)
-
SC344 Bequest by Bishop John Holyman, 4 June 1558 (7)
-
SC345 Inventory of goods, 18 August 1565 (87)
-
SC346 List of books in Fromond's Chapel, 30 April 1566 (96)
-
Windsor
-
SC347 Excerpts from the Precentors' Rolls, 1363-4 to 1383-4 (1)
-
SC348 Inventory of books and church goods, 1384-5 (34)
-
SC349 Bill for books produced for the chapel, 1389 (0)
-
SC350 Excerpts from the Precentors' Rolls, 1385-6 to 1408-9 (0)
-
SC351 Inventory of books and church goods, 1409-10 (3)
-
SC352 List of service books received from King Henry V, 1415 (0)
-
SC353 Excerpts from the Precentors' Rolls, 1413-14 to 1428-9 (0)
-
SC354 Bill for bookbinding, June 1429 (0)
-
SC355 Excerpts from the account rolls, 1430-31 to 1492-3 (0)
-
SC356 Books for feasts of BVM & St Osmund, late 15th cent. (0)
-
SC357 List of service books in Somerset Chantry, 30 July 1506 (0)
-
SC358 List of books in the hall of Denton's Commons, 1520 (0)
-
SC359 Excerpts from the Precentors' Rolls, 1522-3 to 1546-7 (0)
-
SC360 Inventory of church goods, 3 October 1547 (0)
-
SC361 Excerpts from the Precentors' Rolls, 1553-4 to 1557-8 (1)
-
Wingham
-
SC363 Bequest by John Parmenter, 17 August 1479 (0)
-
SC364 Inventory of church goods, 1546 (0)
All data was derived from the List of Identifications by Professor Richard Sharpe.
{% if not printing %}
A key to codes used in the List is available (opens in new tab).{% endif %}
{% include 'includes/indexmenu.html' %}
{% if printing %}{% endif %}
{% endblock %}
{% block search %}
{% endblock %}
{% block useful_links %}
{% endblock %}


|
Frappy Birds
|
Functions | |
| void | setupGameInfo () |
| SetupGameInfo, sets up game based on difficulty. More... | |
| void | setDifficulty (int choice) |
| Sets game difficulty. More... | |
| void | updateScores () |
| Updates the scoreboard. More... | |
| void | createPipeQueue () |
| Assigns a pipe queue to the game state. More... | |
| bool | hits (Pipe *p) |
| Detects collisions. More... | |
| void | initPipes () |
| Initialises a pipe. More... | |
| void | updateAllPipes () |
| Updates all pipes in the queue. More... | |
| bool | isbirdAlive () |
| If the bird is alive or not. More... | |
| void | initBird () |
| Initialises a bird. More... | |
| void | upBirdy (void) |
| Moves the bird up. More... | |
| void | updateBirdy (void) |
| Updates the birds state. More... | |
| void | initCoin () |
| Initialises a coin. More... | |
| void | updateCoin () |
| Updates coin positioning. More... | |
| void | drawProgress () |
| Draws progress circles. More... | |
| void | drawBirdChoice () |
| Draws the bird selector. More... | |
| void | drawHighscores (void *pData) |
| Displays scores and difficulty associated with that score. More... | |
| void | displayLeaderboard (TOUCH_STATE tsc_state, GUI_RECT Rect) |
| Creates a window to display scores and select difficulty. More... | |
| void | initPregame (TOUCH_STATE tsc_state, GUI_RECT Rect) |
| Initilise pregame. More... | |
| void | drawEverything (GUI_RECT Rect) |
| Allocates memory for drawing elements. More... | |
Variables | |
| GUI_CONST_STORAGE GUI_BITMAP | bmCowboyBirdy |
| GUI_CONST_STORAGE GUI_BITMAP | bmBlueBird |
| GUI_CONST_STORAGE GUI_BITMAP | bmKingBirdy |
| GUI_CONST_STORAGE GUI_BITMAP | bmBackground |
| GUI_CONST_STORAGE GUI_BITMAP | bmCoin |
| GUI_CONST_STORAGE GUI_BITMAP | bmPregame |
| GUI_CONST_STORAGE GUI_BITMAP | bmEasy |
| GUI_CONST_STORAGE GUI_BITMAP | bmHard |
| GUI_CONST_STORAGE GUI_BITMAP | bmAbsurd |
| GUI_CONST_STORAGE GUI_BITMAP | bmArrow |
| GUI_CONST_STORAGE GUI_BITMAP | bmlogo2 |
| GUI_CONST_STORAGE GUI_BITMAP | bmEgg |
| GameInfo | gameInfo |
| int | turn = 0 |
| bool | xpSet = false |
| void createPipeQueue | ( | void | ) |
Assigns a pipe queue to the game state.
| None |
| None |
queueCreate methods is called and returned value is saved within gameinfo structs queue
| void displayLeaderboard | ( | TOUCH_STATE | tsc_state, |
| GUI_RECT | Rect | ||
| ) |
Creates a window to display scores and select difficulty.
| TOUCH_STATE | where the screen has been pressed, GUI_RECT where to display |
| None. |
Sets the game mode based on what button is pressed and calls drawHighScores to display scores and buttons.
| void drawBirdChoice | ( | ) |
Draws the bird selector.
| None |
| None. |
Gives an option on what bird the game is to be played with
| void drawEverything | ( | GUI_RECT | Rect | ) |
Allocates memory for drawing elements.
| None |
| None. |
Allocates the memory for drawGame as well as incrementing games frame-counter
| void drawHighscores | ( | void * | pData | ) |
Displays scores and difficulty associated with that score.
| None |
| None |
Method that displays all scores saved within the game state, displaying newest score first in the colour of difficulty played. Also displays the game states highest score achieved.
| void drawProgress | ( | ) |
Draws progress circles.
| None |
| None |
Draws progress circles that grow the closer the user is to obtaining the next level
| bool hits | ( | Pipe * | p | ) |
Detects collisions.
| pointer | to the head pipe |
| bool | True of False |
Takes in the head of the pipe queue to get the position on screen, if the birds position is in the same co-ordinates true is returned otherwise false.
| void initBird | ( | void | ) |
Initialises a bird.
| None |
| None |
Initialises a bird and adds it to the game states
| void initCoin | ( | void | ) |
Initialises a coin.
| None |
| None |
Initialises a coin to a random position in the game state
| void initPipes | ( | void | ) |
Initialises a pipe.
| None |
| None |
Creates a pipe and enques pipe to the game info pipe queue
| void initPregame | ( | TOUCH_STATE | tsc_state, |
| GUI_RECT | Rect | ||
| ) |
Initilise pregame.
| TOUCH_STATE | where the screen has been pressed, GUI_RECT where to display |
| None. |
Creates the window for the pregame to be drawn and waits for input
| bool isbirdAlive | ( | void | ) |
If the bird is alive or not.
| None |
| bool | true or false |
Returns the gameinfo struct alive boolean variable that is altered by updateScores
| void setDifficulty | ( | int | choice | ) |
Sets game difficulty.
| int | difficulty choice, num between 0-2 |
| None |
sets gameInfo struct game difficulty to later be used by setupGameInfo
| void setupGameInfo | ( | void | ) |
SetupGameInfo, sets up game based on difficulty.
| None |
| None |
Based on gameinfo struct difficulty variable this method sets up the speed of the game, distance between concurrent pipes and the gap between the middle of a pipe.
| void upBirdy | ( | void | ) |
Moves the bird up.
| None |
| None |
Alters the bird position based on gravity, moving it up
| void updateAllPipes | ( | void | ) |
Updates all pipes in the queue.
| None |
| None |
udpates co-ordinates for all pipes currently in the pipequeue, as well as calling hits to see if bird is still alive
| void updateBirdy | ( | void | ) |
Updates the birds state.
| None |
| None |
Updates the birds y positioning (up and down movements), as well as checking the bird hasn't fell below the screen line calling updatesScores and ending a game loop
| void updateCoin | ( | void | ) |
Updates coin positioning.
| None |
| None |
Update coins x position to move it across the screen, calling initCoin when a new coin needs initalising (every 1170 frames)
| void updateScores | ( | ) |
Updates the scoreboard.
| None |
| None |
Once a bird dies, this method updates the scoreboard in order of most recent 1st and what difficulty the score was achieved on
| GUI_CONST_STORAGE GUI_BITMAP bmHard |
| GUI_CONST_STORAGE GUI_BITMAP bmKingBirdy |
| GUI_CONST_STORAGE GUI_BITMAP bmlogo2 |
| GUI_CONST_STORAGE GUI_BITMAP bmPregame |


Using targeted facebook ads, I can help grow your business and increase your bottom line by connecting you to new clients who are ready and willing to pick up what you're puttin' down.
Ask me how I helped one client earn over $10,000 in profit from the leads generated through a single facebook campaign in 2017, and how what I learned running that campaign can help you today.


PERLBOOT
Section: Perl Programmers Reference Guide (1)Updated: 2009-05-14
Index Return to Main Contents
NAME
perlboot - Beginner's Object-Oriented TutorialDESCRIPTION
If you're not familiar with objects from other languages, some of the other Perl object documentation may be a little daunting, such as perlobj, a basic reference in using objects, and perltoot, which introduces readers to the peculiarities of Perl's object system in a tutorial way.So, let's take a different approach, presuming no prior object experience. It helps if you know about subroutines (perlsub), references (perlref et. seq.), and packages (perlmod), so become familiar with those first if you haven't already.
If we could talk to the animals...
Let's let the animals talk for a moment:
sub Cow::speak { print "a Cow goes moooo!\n"; } sub Horse::speak { print "a Horse goes neigh!\n"; } sub Sheep::speak { print "a Sheep goes baaaah!\n"; } Cow::speak; Horse::speak; Sheep::speak;
This results in:
a Cow goes moooo! a Horse goes neigh! a Sheep goes baaaah!
Nothing spectacular here. Simple subroutines, albeit from separate packages, and called using the full package name. So let's create an entire pasture:
# Cow::speak, Horse::speak, Sheep::speak as before @pasture = qw(Cow Cow Horse Sheep Sheep); foreach $animal (@pasture) { &{$animal."::speak"}; }
This results in:
a Cow goes moooo! a Cow goes moooo! a Horse goes neigh! a Sheep goes baaaah! a Sheep goes baaaah!
Wow. That symbolic coderef de-referencing there is pretty nasty. We're counting on "no strict refs" mode, certainly not recommended for larger programs. And why was that necessary? Because the name of the package seems to be inseparable from the name of the subroutine we want to invoke within that package.
Introducing the method invocation arrow
For now, let's say that "Class->method" invokes subroutine "method" in package "Class". (Here, ``Class'' is used in its ``category'' meaning, not its ``scholastic'' meaning.) That's not completely accurate, but we'll do this one step at a time. Now let's use it like so:
# Cow::speak, Horse::speak, Sheep::speak as before Cow->speak; Horse->speak; Sheep->speak;
And once again, this results in:
a Cow goes moooo! a Horse goes neigh! a Sheep goes baaaah!
That's not fun yet. Same number of characters, all constant, no variables. But yet, the parts are separable now. Watch:
$a = "Cow"; $a->speak; # invokes Cow->speak
Ahh! Now that the package name has been parted from the subroutine name, we can use a variable package name. And this time, we've got something that works even when "use strict refs" is enabled.
Invoking a barnyard
Let's take that new arrow invocation and put it back in the barnyard example:
sub Cow::speak { print "a Cow goes moooo!\n"; } sub Horse::speak { print "a Horse goes neigh!\n"; } sub Sheep::speak { print "a Sheep goes baaaah!\n"; } @pasture = qw(Cow Cow Horse Sheep Sheep); foreach $animal (@pasture) { $animal->speak; }
There! Now we have the animals all talking, and safely at that, without the use of symbolic coderefs.
But look at all that common code. Each of the "speak" routines has a similar structure: a "print" operator and a string that contains common text, except for two of the words. It'd be nice if we could factor out the commonality, in case we decide later to change it all to "says" instead of "goes".
And we actually have a way of doing that without much fuss, but we have to hear a bit more about what the method invocation arrow is actually doing for us.
The extra parameter of method invocation
The invocation of:
Class->method(@args)
attempts to invoke subroutine "Class::method" as:
Class::method("Class", @args);
(If the subroutine can't be found, ``inheritance'' kicks in, but we'll get to that later.) This means that we get the class name as the first parameter (the only parameter, if no arguments are given). So we can rewrite the "Sheep" speaking subroutine as:
sub Sheep::speak { my $class = shift; print "a $class goes baaaah!\n"; }
And the other two animals come out similarly:
sub Cow::speak { my $class = shift; print "a $class goes moooo!\n"; } sub Horse::speak { my $class = shift; print "a $class goes neigh!\n"; }
In each case, $class will get the value appropriate for that subroutine. But once again, we have a lot of similar structure. Can we factor that out even further? Yes, by calling another method in the same class.
Calling a second method to simplify things
Let's call out from "speak" to a helper method called "sound". This method provides the constant text for the sound itself.
{ package Cow; sub sound { "moooo" } sub speak { my $class = shift; print "a $class goes ", $class->sound, "!\n"; } }
Now, when we call "Cow->speak", we get a $class of "Cow" in "speak". This in turn selects the "Cow->sound" method, which returns "moooo". But how different would this be for the "Horse"?
{ package Horse; sub sound { "neigh" } sub speak { my $class = shift; print "a $class goes ", $class->sound, "!\n"; } }
Only the name of the package and the specific sound change. So can we somehow share the definition for "speak" between the Cow and the Horse? Yes, with inheritance!
Inheriting the windpipes
We'll define a common subroutine package called "Animal", with the definition for "speak":
{ package Animal; sub speak { my $class = shift; print "a $class goes ", $class->sound, "!\n"; } }
Then, for each animal, we say it ``inherits'' from "Animal", along with the animal-specific sound:
{ package Cow; @ISA = qw(Animal); sub sound { "moooo" } }
Note the added @ISA array (pronounced ``is a''). We'll get to that in a minute.
But what happens when we invoke "Cow->speak" now?
First, Perl constructs the argument list. In this case, it's just "Cow". Then Perl looks for "Cow::speak". But that's not there, so Perl checks for the inheritance array @Cow::ISA. It's there, and contains the single name "Animal".
Perl next checks for "speak" inside "Animal" instead, as in "Animal::speak". And that's found, so Perl invokes that subroutine with the already frozen argument list.
Inside the "Animal::speak" subroutine, $class becomes "Cow" (the first argument). So when we get to the step of invoking "$class->sound", it'll be looking for "Cow->sound", which gets it on the first try without looking at @ISA. Success!
A few notes about @ISA
This magical @ISA variable has declared that "Cow" ``is a'' "Animal". Note that it's an array, not a simple single value, because on rare occasions, it makes sense to have more than one parent class searched for the missing methods.If "Animal" also had an @ISA, then we'd check there too. The search is recursive, depth-first, left-to-right in each @ISA by default (see mro for alternatives). Typically, each @ISA has only one element (multiple elements means multiple inheritance and multiple headaches), so we get a nice tree of inheritance.
When we turn on "use strict", we'll get complaints on @ISA, since it's not a variable containing an explicit package name, nor is it a lexical (``my'') variable. We can't make it a lexical variable though (it has to belong to the package to be found by the inheritance mechanism), so there's a couple of straightforward ways to handle that.
The easiest is to just spell the package name out:
@Cow::ISA = qw(Animal);
Or declare it as package global variable:
package Cow; our @ISA = qw(Animal);
Or allow it as an implicitly named package variable:
package Cow; use vars qw(@ISA); @ISA = qw(Animal);
If the "Animal" class comes from another (object-oriented) module, then just employ "use base" to specify that "Animal" should serve as the basis for the "Cow" class:
package Cow; use base qw(Animal);
Now that's pretty darn simple!
Overriding the methods
Let's add a mouse, which can barely be heard:
# Animal package from before { package Mouse; @ISA = qw(Animal); sub sound { "squeak" } sub speak { my $class = shift; print "a $class goes ", $class->sound, "!\n"; print "[but you can barely hear it!]\n"; } } Mouse->speak;
which results in:
a Mouse goes squeak! [but you can barely hear it!]
Here, "Mouse" has its own speaking routine, so "Mouse->speak" doesn't immediately invoke "Animal->speak". This is known as ``overriding''. In fact, we don't even need to say that a "Mouse" is an "Animal" at all, because all of the methods needed for "speak" are completely defined for "Mouse"; this is known as ``duck typing'': ``If it walks like a duck and quacks like a duck, I would call it a duck'' (James Whitcomb). However, it would probably be beneficial to allow a closer examination to conclude that a "Mouse" is indeed an "Animal", so it is actually better to define "Mouse" with "Animal" as its base (that is, it is better to "derive "Mouse" from "Animal"").
Moreover, this duplication of code could become a maintenance headache (though code-reuse is not actually a good reason for inheritance; good design practices dictate that a derived class should be usable wherever its base class is usable, which might not be the outcome if code-reuse is the sole criterion for inheritance. Just remember that a "Mouse" should always act like an "Animal").
So, let's make "Mouse" an "Animal"!
The obvious solution is to invoke "Animal::speak" directly:
# Animal package from before { package Mouse; @ISA = qw(Animal); sub sound { "squeak" } sub speak { my $class = shift; Animal::speak($class); print "[but you can barely hear it!]\n"; } }
Note that we're using "Animal::speak". If we were to invoke "Animal->speak" instead, the first parameter to "Animal::speak" would automatically be "Animal" rather than "Mouse", so that the call to "$class->sound" in "Animal::speak" would become "Animal->sound" rather than "Mouse->sound".
Also, without the method arrow "->", it becomes necessary to specify the first parameter to "Animal::speak" ourselves, which is why $class is explicitly passed: "Animal::speak($class)".
However, invoking "Animal::speak" directly is a mess: Firstly, it assumes that the "speak" method is a member of the "Animal" class; what if "Animal" actually inherits "speak" from its own base? Because we are no longer using "->" to access "speak", the special method look up mechanism wouldn't be used, so "speak" wouldn't even be found!
The second problem is more subtle: "Animal" is now hardwired into the subroutine selection. Let's assume that "Animal::speak" does exist. What happens when, at a later time, someone expands the class hierarchy by having "Mouse" inherit from "Mus" instead of "Animal". Unless the invocation of "Animal::speak" is also changed to an invocation of "Mus::speak", centuries worth of taxonomical classification could be obliterated!
What we have here is a fragile or leaky abstraction; it is the beginning of a maintenance nightmare. What we need is the ability to search for the right method wih as few assumptions as possible.
Starting the search from a different place
A better solution is to tell Perl where in the inheritance chain to begin searching for "speak". This can be achieved with a modified version of the method arrow "->":
ClassName->FirstPlaceToLook::method
So, the improved "Mouse" class is:
# same Animal as before { package Mouse; # same @ISA, &sound as before sub speak { my $class = shift; $class->Animal::speak; print "[but you can barely hear it!]\n"; } }
Using this syntax, we start with "Animal" to find "speak", and then use all of "Animal"'s inheritance chain if it is not found immediately. As usual, the first parameter to "speak" would be $class, so we no longer need to pass $class explicitly to "speak".
But what about the second problem? We're still hardwiring "Animal" into the method lookup.
The SUPER way of doing things
If "Animal" is replaced with the special placeholder "SUPER" in that invocation, then the contents of "Mouse"'s @ISA are used for the search, beginning with $ISA[0]. So, all of the problems can be fixed as follows:
# same Animal as before { package Mouse; # same @ISA, &sound as before sub speak { my $class = shift; $class->SUPER::speak; print "[but you can barely hear it!]\n"; } }
In general, "SUPER::speak" means look in the current package's @ISA for a class that implements "speak", and invoke the first one found. The placeholder is called "SUPER", because many other languages refer to base classes as "superclasses", and Perl likes to be eclectic.
Note that a call such as
$class->SUPER::method;
does not look in the @ISA of $class unless $class happens to be the current package.
Let's review...
So far, we've seen the method arrow syntax:
Class->method(@args);
or the equivalent:
$a = "Class"; $a->method(@args);
which constructs an argument list of:
("Class", @args)
and attempts to invoke:
Class::method("Class", @args);
However, if "Class::method" is not found, then @Class::ISA is examined (recursively) to locate a class (a package) that does indeed contain "method", and that subroutine is invoked instead.
Using this simple syntax, we have class methods, (multiple) inheritance, overriding, and extending. Using just what we've seen so far, we've been able to factor out common code (though that's never a good reason for inheritance!), and provide a nice way to reuse implementations with variations.

Let's start with the code for the "Animal" class and the "Horse" class:
{ package Animal; sub speak { my $class = shift; print "a $class goes ", $class->sound, "!\n"; } } { package Horse; @ISA = qw(Animal); sub sound { "neigh" } }
This lets us invoke "Horse->speak" to ripple upward to "Animal::speak", calling back to "Horse::sound" to get the specific sound, and the output of:
a Horse goes neigh!
But all of our Horse objects would have to be absolutely identical. If we add a subroutine, all horses automatically share it. That's great for making horses the same, but how do we capture the distinctions of an individual horse? For example, suppose we want to give our first horse a name. There's got to be a way to keep its name separate from the other horses.
That is to say, we want particular instances of "Horse" to have different names.
In Perl, any reference can be an ``instance'', so let's start with the simplest reference that can hold a horse's name: a scalar reference.
my $name = "Mr. Ed"; my $horse = \$name;
So, now $horse is a reference to what will be the instance-specific data (the name). The final step is to turn this reference into a real instance of a "Horse" by using the special operator "bless":
bless $horse, Horse;
This operator stores information about the package named "Horse" into the thing pointed at by the reference. At this point, we say $horse is an instance of "Horse". That is, it's a specific horse. The reference is otherwise unchanged, and can still be used with traditional dereferencing operators.
Invoking an instance method
The method arrow can be used on instances, as well as classes (the names of packages). So, let's get the sound that $horse makes:
my $noise = $horse->sound("some", "unnecessary", "args");
To invoke "sound", Perl first notes that $horse is a blessed reference (and thus an instance). It then constructs an argument list, as per usual.
Now for the fun part: Perl takes the class in which the instance was blessed, in this case "Horse", and uses that class to locate the subroutine. In this case, "Horse::sound" is found directly (without using inheritance). In the end, it is as though our initial line were written as follows:
my $noise = Horse::sound($horse, "some", "unnecessary", "args");
Note that the first parameter here is still the instance, not the name of the class as before. We'll get "neigh" as the return value, and that'll end up as the $noise variable above.
If Horse::sound had not been found, we'd be wandering up the @Horse::ISA array, trying to find the method in one of the superclasses. The only difference between a class method and an instance method is whether the first parameter is an instance (a blessed reference) or a class name (a string).
Accessing the instance data
Because we get the instance as the first parameter, we can now access the instance-specific data. In this case, let's add a way to get at the name:
{ package Horse; @ISA = qw(Animal); sub sound { "neigh" } sub name { my $self = shift; $$self; } }
Inside "Horse::name", the @_ array contains:
($horse, "some", "unnecessary", "args")
so the "shift" stores $horse into $self. Then, $self gets de-referenced with $$self as normal, yielding "Mr. Ed".
It's traditional to "shift" the first parameter into a variable named $self for instance methods and into a variable named $class for class methods.
Then, the following line:
print $horse->name, " says ", $horse->sound, "\n";
outputs:
Mr. Ed says neigh.
How to build a horse
Of course, if we constructed all of our horses by hand, we'd most likely make mistakes from time to time. We're also violating one of the properties of object-oriented programming, in that the ``inside guts'' of a Horse are visible.  So, let's have the Horse class handle the details inside a class method:
{ package Horse; @ISA = qw(Animal); sub sound { "neigh" } sub name { my $self = shift; # instance method, so use $self $$self; } sub named { my $class = shift; # class method, so use $class my $name = shift; bless \$name, $class; } }
Now with the new "named" method, we can build a horse as follows:
my $horse = Horse->named("Mr. Ed");
Notice we're back to a class method, so the two arguments to "Horse::named" are "Horse" and "Mr. Ed". The "bless" operator not only blesses "\$name", it also returns that reference.
This "Horse::named" method is called a ``constructor''.
We've called the constructor "named" here, so that it quickly denotes the constructor's argument as the name for this particular "Horse". You can use different constructors with different names for different ways of ``giving birth'' to the object (like maybe recording its pedigree or date of birth). However, you'll find that most people coming to Perl from more limited languages use a single constructor named "new", with various ways of interpreting the arguments to "new". Either style is fine, as long as you document your particular way of giving birth to an object. (And you were going to do that, right?)
Inheriting the constructor
But was there anything specific to "Horse" in that method? No. Therefore, it's also the same recipe for building anything else that inherited from "Animal", so let's put "name" and "named" there:
{ package Animal; sub speak { my $class = shift; print "a $class goes ", $class->sound, "!\n"; } sub name { my $self = shift; $$self; } sub named { my $class = shift; my $name = shift; bless \$name, $class; } } { package Horse; @ISA = qw(Animal); sub sound { "neigh" } }
Ahh, but what happens if we invoke "speak" on an instance?
my $horse = Horse->named("Mr. Ed"); $horse->speak;
We get a debugging value:
a Horse=SCALAR(0xaca42ac) goes neigh!
Why? Because the "Animal::speak" routine is expecting a classname as its first parameter, not an instance. When the instance is passed in, we'll end up using a blessed scalar reference as a string, and that shows up as we saw it just now.
Making a method work with either classes or instances
All we need is for a method to detect if it is being called on a class or called on an instance. The most straightforward way is with the "ref" operator. This returns a string (the classname) when used on a blessed reference, and an empty string when used on a string (like a classname). Let's modify the "name" method first to notice the change:
sub name { my $either = shift; ref $either ? $$either : "Any $either"; }
Here, the "?:" operator comes in handy to select either the dereference or a derived string. Now we can use this with either an instance or a class. Note that I've changed the first parameter holder to $either to show that this is intended:
my $horse = Horse->named("Mr. Ed"); print Horse->name, "\n"; # prints "Any Horse\n" print $horse->name, "\n"; # prints "Mr Ed.\n"
and now we'll fix "speak" to use this:
sub speak { my $either = shift; print $either->name, " goes ", $either->sound, "\n"; }
And since "sound" already worked with either a class or an instance, we're done!
 Any Sheep eats grass.
An instance method with parameters gets invoked with the instance, and then the list of parameters. So that first invocation is like:
Animal::eat($horse, "hay");
More interesting instances
What if an instance needs more data? Most interesting instances are made of many items, each of which can in turn be a reference or even another object. The easiest way to store these is often in a hash. The keys of the hash serve as the names of parts of the object (often called ``instance variables'' or ``member variables''), and the corresponding values are, well, the values.But how do we turn the horse into a hash? Recall that an object was any blessed reference. We can just as easily make it a blessed hash reference as a blessed scalar reference, as long as everything that looks at the reference is changed accordingly.
Let's make a sheep that has a name and a color:
my $bad = bless { Name => "Evil", Color => "black" }, Sheep;
so "$bad->{Name}" has "Evil", and "$bad->{Color}" has "black". But we want to make "$bad->name" access the name, and that's now messed up because it's expecting a scalar reference. Not to worry, because that's pretty easy to fix up.
One solution is to override "Animal::name" and "Animal::named" by defining them anew in "Sheep", but then any methods added later to "Animal" might still mess up, and we'd have to override all of those too. Therefore, it's never a good idea to define the data layout in a way that's different from the data layout of the base classes. In fact, it's a good idea to use blessed hash references in all cases. Also, this is why it's important to have constructors do the low-level work. So, let's redefine "Animal":
## in Animal sub name { my $either = shift; ref $either ? $either->{Name} : "Any $either"; } sub named { my $class = shift; my $name = shift; my $self = { Name => $name }; bless $self, $class; }
Of course, we still need to override "named" in order to handle constructing a "Sheep" with a certain color:
## in Sheep sub named { my ($class, $name) = @_; my $self = $class->SUPER::named(@_); $$self{Color} = $class->default_color; $self }
(Note that @_ contains the parameters to "named".)
What's this "default_color"? Well, if "named" has only the name, we still need to set a color, so we'll have a class-specific default color. For a sheep, we might define it as white:
## in Sheep sub default_color { "white" }
Now:
my $sheep = Sheep->named("Bad"); print $sheep->{Color}, "\n";
outputs:
white
Now, there's nothing particularly specific to "Sheep" when it comes to color, so let's remove "Sheep::named" and implement "Animal::named" to handle color instead:
## in Animal sub named { my ($class, $name) = @_; my $self = { Name => $name, Color => $class->default_color }; bless $self, $class; }
And then to keep from having to define "default_color" for each additional class, we'll define a method that serves as the ``default default'' directly in "Animal":
## in Animal sub default_color { "brown" }
Of course, because "name" and "named" were the only methods that referenced the ``structure'' of the object, the rest of the methods can remain the same, so "speak" still works as before.
A horse of a different color
But having all our horses be brown would be boring. So let's add a method or two to get and set the color.
## in Animal sub color { $_[0]->{Color} } sub set_color { $_[0]->{Color} = $_[1]; }
Note the alternate way of accessing the arguments: $_[0] is used in-place, rather than with a "shift". (This saves us a bit of time for something that may be invoked frequently.) And now we can fix that color for Mr. Ed:
my $horse = Horse->named("Mr. Ed"); $horse->set_color("black-and-white"); print $horse->name, " is colored ", $horse->color, "\n";
which results in:
Mr. Ed is colored black-and-white
Summary
So, now we have class methods, constructors, instance methods, instance data, and even accessors. But that's still just the beginning of what Perl has to offer. We haven't even begun to talk about accessors that double as getters and setters, destructors, indirect object notation, overloading, ``isa'' and ``can'' tests, the "UNIVERSAL" class, and so on. That's for the rest of the Perl documentation to cover. Hopefully, this gets you started, though.SEE ALSO
For more information, see perlobj (for all the gritty details about Perl objects, now that you've seen the basics), perltoot (the tutorial for those who already know objects), perltooc (dealing with class data), perlbot (for some more tricks), and books such as Damian Conway's excellent Object Oriented Perl.Some modules which might prove interesting are Class::Accessor, Class::Class, Class::Contract, Class::Data::Inheritable, Class::MethodMaker and Tie::SecureHash
COPYRIGHT
Copyright (c) 1999, 2000 by Randal L. Schwartz and Stonehenge Consulting Services, Inc.Copyright (c) 2009 by Michael F. Witten.
Permission is hereby granted to distribute this document intact with the Perl distribution, and in accordance with the licenses of the Perl distribution; derived documents must include this copyright notice intact.
Portions of this text have been derived from Perl Training materials originally appearing in the Packages, References, Objects, and Modules course taught by instructors for Stonehenge Consulting Services, Inc. and used with permission.
Portions of this text have been derived from materials originally appearing in Linux Magazine and used with permission.
Index
- NAME
- DESCRIPTION
-
- If we could talk to the animals...
- Introducing the method invocation arrow
- Invoking a barnyard
- The extra parameter of method invocation
- Calling a second method to simplify things
- Inheriting the windpipes
- A few notes about @ISA
- Overriding the methods
- Starting the search from a different place
- The SUPER way of doing things
- Let's review...

- Invoking an instance method
- Accessing the instance data
- How to build a horse
- Inheriting the constructor
- Making a method work with either classes or instances
- Adding parameters to a method
- More interesting instances
- A horse of a different color
- Summary
- SEE ALSO
- COPYRIGHT
This document was created by man2html, using the manual pages.
Time: 05:29:07 GMT, December 24, 2015


See: Description
| Interface | Description |
|---|---|
| ReferenceInformation |
Identifies the reference that credit protection applies to.
|
| Class | Description |
|---|---|
| Cds |
A credit default swap (CDS), including single-name and index swaps.
|
| Cds.Builder |
The bean-builder for
Cds . |
| Cds.Meta |
The meta-bean for
Cds . |
| CdsDatesLogic |
Utility for producing sets of CDS dates.
|
| CdsTrade |
A trade in a credit default swap (CDS).
|
| CdsTrade.Builder |
The bean-builder for
CdsTrade . |
| CdsTrade.Meta |
The meta-bean for
CdsTrade . |
| FeeLeg |
The fee leg of a credit default swap (CDS).
|
| FeeLeg.Builder |
The bean-builder for
FeeLeg . |
| FeeLeg.Meta |
The meta-bean for
FeeLeg . |
| IndexReferenceInformation |
Reference data for a CDS index.
|
| IndexReferenceInformation.Builder |
The bean-builder for
IndexReferenceInformation . |
| IndexReferenceInformation.Meta |
The meta-bean for
IndexReferenceInformation . |
| PeriodicPayments |
Specifies a periodic schedule of fixed amounts
|
| PeriodicPayments.Builder |
The bean-builder for
PeriodicPayments . |
| PeriodicPayments.Meta |
The meta-bean for
PeriodicPayments . |
| ResolvedCds |
A credit default swap (CDS), resolved for pricing.
|
| ResolvedCds.Builder |
The bean-builder for
ResolvedCds . |
| ResolvedCds.Meta |
The meta-bean for
ResolvedCds . |
| ResolvedCdsTrade |
A trade in a credit default swap (CDS), resolved for pricing.
|
| ResolvedCdsTrade.Builder |
The bean-builder for
ResolvedCdsTrade . |
| ResolvedCdsTrade.Meta |
The meta-bean for
ResolvedCdsTrade . |
| SingleNameReferenceInformation |
Reference data for a CDS single-name.
|
| SingleNameReferenceInformation.Builder |
The bean-builder for
SingleNameReferenceInformation . |
| SingleNameReferenceInformation.Meta |
The meta-bean for
SingleNameReferenceInformation . |
| Enum | Description |
|---|---|
| ReferenceInformationType |
Defines the type of the CDS underlying that protection applies to.
|
| RestructuringClause |
Specifies the form of the restructuring credit event that is applicable to the credit default swap.
|
| SeniorityLevel |
Specifies the repayment precedence of a debt instrument.
|
A CDS is a financial instrument where the protection seller agrees to compensate the protection buyer if a specified specified company or Sovereign entity experiences a credit event, indicating it is or may be unable to service its debts. The protection seller is typically paid a fee and/or premium, expressed as an annualized percentage of the notional in basis points, regularly over the life of the transaction or otherwise as agreed by the parties.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at opengamma.github.io/StrataDocs.