| CONTENTS |
When my young daughter is struggling to understand the meaning of an idiomatic expression, such as, "Someone let the cat out of the bag," before I tell her what it means, I have to tell her that it's an expression, that she's not to interpret it literally. (As a consequence, she also uses "That's just an expression" to qualify her own remarks, especially when she is unsure about what she has just said.)
An expression, even in computer terminology, is not something to be interpreted literally. It is something that needs to be evaluated.
Many Unix programs use a special "regular expression syntax" for specifying what you could think of as "wildcard searches" through files. Regular expressions describe patterns, or sequences of characters, without necessarily specifying the characters literally. You'll also hear this process referred to as " pattern matching."
In this chapter, we depart a bit from the usual "tips and tricks" style of the book to provide an extended tutorial about regular expressions that starts in Section 32.4. We did this because regular expressions are so important to many of the tips and tricks elsewhere in the book, and we wanted to make sure that they are covered thoroughly.
This tutorial article is accompanied by a few snippets of advice (Section 32.16 and Section 32.18) and a few tools that help you see what your expressions are matching (Section 32.17). There's also a quick reference (Section 32.21) for those of you who just need a refresher.
For tips, tricks, and tools that rely on an understanding of regular expression syntax, you have only to look at:
O'Reilly's Mastering Regular Expressions, by Jeffrey Friedl, is a gold mine of examples and specifics.
DD and TOR
Before we even start talking about regular expressions, a word of caution for beginners: regular expressions can be confusing because they look a lot like the file-matching patterns ("wildcards") the shell uses. Both the shell and programs that use regular expressions have special meanings for the asterisk (*), question mark (?), parentheses (( )), square brackets ([ ]), and vertical bar (|, the "pipe").
Some of these characters even act the same way almost.
Just remember, the shells, find, and some others generally use filename-matching patterns and not regular expressions.[1]
You also have to remember that shell wildcards are expanded before the shell passes the arguments to the program. To prevent this expansion, the special characters in a regular expression must be quoted (Section 27.12) when passed as an argument from the shell.
The command:
$ grep [A-Z]*.c chap[12]
could, for example, be interpreted by the shell as:
grep Array.c Bug.c Comp.c chap1 chap2
and so grep would then try to find the pattern "Array.c" in files Bug.c, Comp.c, chap1, and chap2.
The simplest solution in most cases is to surround the regular expression with single quotes ('). Another is to use the echo command to echo your command line to see how the shell will interpret the special characters.
BB and DG, TOR
You are probably familiar with the kinds of expressions that a calculator interprets. Look at the following arithmetic expression:
2 + 4
"Two plus four" consists of several constants or literal values and an operator. A calculator program must recognize, for instance, that 2 is a numeric constant and that the plus sign represents an operator, not to be interpreted as the + character.
An expression tells the computer how to produce a result. Although it is the sum of "two plus four" that we really want, we don't simply tell the computer to return a six. We instruct the computer to evaluate the expression and return a value.
An expression can be more complicated than 2+4; in fact, it might consist of multiple simple expressions, such as the following:
2 + 3 * 4
A calculator normally evaluates an expression from left to right. However, certain operators have precedence over others: that is, they will be performed first. Thus, the above expression evaluates to 14 and not 20 because multiplication takes precedence over addition. Precedence can be overridden by placing the simple expression in parentheses. Thus, (2+3)*4 or "the sum of two plus three times four" evaluates to 20. The parentheses are symbols that instruct the calculator to change the order in which the expression is evaluated.
A regular expression, by contrast, is descriptive of a pattern or sequence of characters. Concatenation is the basic operation implied in every regular expression. That is, a pattern matches adjacent characters. Look at the following example of a regular expression:
ABE
Each literal character is a regular expression that matches only that single character. This expression describes "an A followed by a B followed by an E" or simply the string ABE. The term "string" means each character concatenated to the one preceding it. That a regular expression describes a sequence of characters can't be emphasized enough. (Novice users are inclined to think in higher-level units such as words, and not individual characters.) Regular expressions are case-sensitive; A does not match a.
Programs such as grep (Section 13.2) that accept regular expressions must first evaluate the syntax of the regular expression to produce a pattern. They then read the input, line by line, trying to match the pattern. An input line is a string, and to see if a string matches the pattern, a program compares the first character in the string to the first character of the pattern. If there is a match, it compares the second character in the string to the second character of the pattern. Whenever it fails to make a match, it compares the next character in the string to the first character of the pattern. Figure 32-1 illustrates this process, trying to match the pattern abe on an input line.
A regular expression is not limited to literal characters. There is, for instance, a metacharacter the dot (.) that can be used as a "wildcard" to match any single character. You can think of this wildcard as analogous to a blank tile in Scrabble where it means any letter. Thus, we can specify the regular expression A.E, and it will match ACE, ABE, and ALE. It matches any character in the position following A.
The metacharacter * (the asterisk) is used to match zero or more occurrences of the preceding regular expression, which typically is a single character. You may be familiar with * as a shell metacharacter, where it also means "zero or more characters." But that meaning is very different from * in a regular expression. By itself, the metacharacter * does not match anything in a regular expression; it modifies what goes before it. The regular expression .* matches any number of characters. The regular expression A.*E matches any string that matches A.E but it also matches any number of characters between A and E: AIRPLANE, A, FINE, AE, A 34-cent S.A.S.E, or A LONG WAY HOME, for example.
If you understand the difference between . and * in regular expressions, you already know about the two basic types of metacharacters: those that can be evaluated to a single character, and those that modify how characters that precede it are evaluated.
It should also be apparent that by use of metacharacters you can expand or limit the possible matches. You have more control over what is matched and what is not. In Section 32.4 and after, Bruce Barnett explains in detail how to use regular expression metacharacters.
DD
Summary BoxThere are three important parts to a regular expression:
The following regular expression demonstrates all three parts: ^#* The caret (^) is an anchor that indicates the beginning of the line. The hash mark is a simple character set that matches the single character #. The asterisk (*) is a modifier. In a regular expression, it specifies that the previous character set can appear any number of times, including zero. As you will see shortly, this is a useless regular expression (except for demonstrating the syntax!). There are two main types of regular expressions: simple (also known as basic) regular expressions and extended regular expressions. (As we'll see in the next dozen articles, the boundaries between the two types have become blurred as regular expressions have evolved.) A few utilities like awk and egrep use the extended regular expression. Most use the simple regular expression. From now on, if I talk about a "regular expression" (without specifying simple or extended), I am describing a feature common to both types. For the most part, though, when using modern tools, you'll find that extended regular expressions are the rule rather than the exception; it all depends on who wrote the version of the tool you're using and when, and whether it made sense to worry about supporting extended regular expressions. [The situation is complicated by the fact that simple regular expressions have evolved over time, so there are versions of "simple regular expressions" that support extensions missing from extended regular expressions! Bruce explains the incompatibility at the end of Section 32.15. TOR] The next eleven articles cover metacharacters and regular expressions:
BB |
Most Unix text facilities are line-oriented. Searching for patterns that span several lines is not easy to do. [But it is possible (Section 13.9, Section 11.10). JP] You see, the end-of-line character is not included in the block of text that is searched. It is a separator, and regular expressions examine the text between the separators. If you want to search for a pattern that is at one end or the other, you use anchors. The caret (^) is the starting anchor, and the dollar sign ($) is the end anchor. The regular expression ^A will match all lines that start with an uppercase A. The expression A$ will match all lines that end with uppercase A. If the anchor characters are not used at the proper end of the pattern, they no longer act as anchors. That is, the ^ is an anchor only if it is the first character in a regular expression. The $ is an anchor only if it is the last character. The expression $1 does not have an anchor. Neither does 1^. If you need to match a ^ at the beginning of the line or a $ at the end of a line, you must escape the special character by typing a backslash (\) before it. Table 32-1 has a summary.
|
Pattern |
Matches |
|---|---|
|
^A |
An A at the beginning of a line |
|
A$ |
An A at the end of a line |
|
A |
An A anywhere on a line |
|
$A |
A $A anywhere on a line |
|
^\^ |
A ^ at the beginning of a line |
|
^^ |
Same as ^\^ |
|
\$$ |
A $ at the end of a line |
|
$$ |
Same as \$$[2] |
The use of ^ and $ as indicators of the beginning or end of a line is a convention other utilities use. The vi editor uses these two characters as commands to go to the beginning or end of a line. The C shell uses !^ to specify the first argument of the previous line, and !$ is the last argument on the previous line (Section 30.8 explains).
It is one of those choices that other utilities go along with to maintain consistency. For instance, $ can refer to the last line of a file when using ed and sed. cat -v -e (Section 12.5, Section 12.4) marks ends of lines with a $. You might also see it in other programs.
BB
The simplest character set is a single character. The regular expression the contains three character sets: t, h, and e. It will match any line that contains the string the, including the word other. To prevent this, put spaces (·) before and after the pattern: ·the·.
You can combine the string with an anchor. The pattern ^From:· will match the lines of a mail message (Section 1.21) that identify the sender. Use this pattern with grep to print every address in your incoming mailbox. [If your system doesn't define the environment variable MAIL, try /var/spool/mail/$USER or possibly /usr/spool/mail/$USER. SJC]
$USER Section 35.5
% grep '^From: ' $MAIL
Some characters have a special meaning in regular expressions. If you want to search for such a character as itself, escape it with a backslash (\).
BB
The dot (.) is one of those special metacharacters. By itself it will match any character except the end-of-line character. The pattern that will match a line with any single character is ^.$.
BB
If you want to match specific characters, you can use square brackets, [ ], to identify the exact characters you are searching for. The pattern that will match any line of text that contains exactly one digit is ^[0123456789]$. This is longer than it has to be. You can use the hyphen between two characters to specify a range: ^[0-9]$. You can intermix explicit characters with character ranges. This pattern will match a single character that is a letter, digit, or underscore: [A-Za-z0-9_]. Character sets can be combined by placing them next to one another. If you wanted to search for a word that:
started with an uppercase T,
was the first word on a line,
had a lowercase letter as its second letter,
was three letters long (followed by a space character (·)), and
had a lowercase vowel as its third letter,
the regular expression would be:
^T[a-z][aeiou]·
To be specific: a range is a contiguous series of characters, from low to high, in the ASCII character set.[3] For example, [z-a] is not a range because it's backwards. The range [A-z] matches both uppercase and lowercase letters, but it also matches the six characters that fall between uppercase and lowercase letters in the ASCII chart: [, \, ], ^, _, and '.
BB
You can easily search for all characters except those in square brackets by putting a caret (^) as the first character after the left square bracket ([). To match all characters except lowercase vowels, use [^aeiou].
Like the anchors in places that can't be considered an anchor, the right square bracket (]) and dash (-) do not have a special meaning if they directly follow a [. Table 32-2 has some examples.
|
Regular expression |
Matches |
|---|---|
|
[0-9] |
Any digit |
|
[^0-9] |
Any character other than a digit |
|
[-0-9] |
Any digit or a - |
|
[0-9-] |
Any digit or a - |
|
[^-0-9] |
Any character except a digit or a - |
|
[ ]0-9] |
Any digit or a ] |
|
[0-9]] |
Any digit followed by a ] |
|
[0-99-z] |
Any digit or any character between 9 and z |
|
[ ]0-9-] |
Any digit, a -, or a ] |
Many languages have adopted the Perl regular expression syntax for ranges; for example, \w is equivalent to "any word character" or [A-Za-z0-9_], while \W matches anything but a word character. See the perlre(1) manual page for more details.
BB
The third part of a regular expression is the modifier. It is used to specify how many times you expect to see the previous character set. The special character * (asterisk) matches zero or more copies. That is, the regular expression 0* matches zero or more zeros, while the expression [0-9]* matches zero or more digits.
This explains why the pattern ^#* is useless (Section 32.4), as it matches any number of #s at the beginning of the line, including zero. Therefore, this will match every line, because every line starts with zero or more #s.
 Not so. Looking for an unknown number of characters is very important. Suppose you wanted to look for a digit at the beginning of a line, and there may or may not be spaces before the digit. Just use ^·* to match zero or more spaces at the beginning of the line. If you need to match one or more, just repeat the character set. That is, [0-9]* matches zero or more digits and [0-9][0-9]* matches one or more digits.
BB
You cannot specify a maximum number of sets with the * modifier. However, some programs (Section 32.20) recognize a special pattern you can use to specify the minimum and maximum number of repeats. This is done by putting those two numbers between \{ and \}.
Having convinced you that \{ isn't a plot to confuse you, an example is in order. The regular expression to match four, five, six, seven, or eight lowercase letters is:
[a-z]\{4,8\}
Any numbers between 0 and 255 can be used. The second number may be omitted, which removes the upper limit. If the comma and the second number are omitted, the pattern must be duplicated the exact number of times specified by the first number.
|
You must remember that modifiers like * and \{1,5\} act as modifiers only if they follow a character set. If they were at the beginning of a pattern, they would not be modifiers. Table 32-3 is a list of examples and the exceptions.
|
Regular expression |
Matches |
|---|---|
|
* |
Any line with a * |
|
\* |
Any line with a * |
|
\\ |
Any line with a \ |
|
^* |
Any line starting with a * |
|
^A* |
Any line |
|
^A\* |
Any line starting with an A* |
|
^AA* |
Any line starting with one A |
|
^AA*B |
Any line starting with one or more A's followed by a B |
|
^A\{4,8\}B |
Any line starting with four, five, six, seven, or eight A's followed by a B |
|
^A\{4,\}B |
Any line starting with four or more A's followed by a B |
|
^A\{4\}B |
Any line starting with an AAAAB |
|
\{4,8\} |
Any line with a {4,8} |
|
A{4,8} |
Any line with an A{4,8} |
BB
Searching for a word isn't quite as simple as it at first appears. The string the will match the word other. You can put spaces before and after the letters and use this regular expression: ·the·. However, this does not match words at the beginning or the end of the line. And it does not match the case where there is a punctuation mark after the word.
There is an easy solution at least in many versions of ed, ex, vi, and grep. The characters \< and \> are similar to the ^ and $ anchors, as they don't occupy a position of a character. They anchor the expression between to match only if it is on a word boundary. The pattern to search for the words the and The would be: \<[tT]he\>.
Let's define a "word boundary." The character before the t or T must be either a newline character or anything except a letter, digit, or underscore ( _ ). The character after the e must also be a character other than a digit, letter, or underscore, or it could be the end-of-line character.
BB
Another pattern that requires a special mechanism is searching for repeated words. The expression [a-z][a-z] will match any two lowercase letters. If you wanted to search for lines that had two adjoining identical letters, the above pattern wouldn't help. You need a way to remember what you found and see if the same pattern occurs again. In some programs, you can mark part of a pattern using \( and \). You can recall the remembered pattern with \ followed by a single digit.[4] Therefore, to search for two identical letters, use \([a-z]\)\1. You can have nine different remembered patterns. Each occurrence of \( starts a new pattern. The regular expression to match a five-letter palindrome (e.g., "radar") is: \([a-z]\)\([a-z]\)[a-z]\2\1. [Some versions of some programs can't handle \( \) in the same regular expression as \1, etc. In all versions of sed, you're safe if you use \( \) on the pattern side of an s command and \1, etc., on the replacement side (Section 34.11). JP]
BB
Before I discuss the extensions that extended expressions (Section 32.15) offer, I want to mention two potential problem areas.
The \< and \> characters were introduced in the vi editor. The other programs didn't have this ability at that time. Also, the \{min,max\} modifier is new, and earlier utilities didn't have this ability. This makes it difficult for the novice user of regular expressions, because it seems as if each utility has a different convention. Sun has retrofitted the newest regular expression library to all of their programs, so they all have the same ability. If you try to use these newer features on other vendors' machines, you might find they don't work the same way.
The other potential point of confusion is the extent of the pattern matches (Section 32.17). Regular expressions match the longest possible pattern. That is, the regular expression A.*B matches AAB as well as AAAABBBBABCCCCBBBAAAB. This doesn't cause many problems using grep, because an oversight in a regular expression will just match more lines than desired. If you use sed, and your patterns get carried away, you may end up deleting or changing more than you want to. Perl answers this problem by defining a variety of "greedy" and "non-greedy" regular expressions, which allow you to specify which behavior you want. See the perlre(1) manual page for details.
BB
At least two programs use extended regular expressions: egrep and awk. [perl uses expressions that are even more extended. JP] With these extensions, special characters preceded by a backslash no longer have special meaning: \{, \}, \<, \>, \(, \), as well as \digit. There is a very good reason for this, which I will delay explaining to build up suspense.
The question mark (?) matches zero or one instance of the character set before it, and the plus sign (+) matches one or more copies of the character set. You can't use \{ and \} in extended regular expressions, but if you could, you might consider ? to be the same as \{0,1\} and + to be the same as \{1,\}.
By now, you are wondering why the extended regular expressions are even worth using. Except for two abbreviations, there seem to be no advantages and a lot of disadvantages. Therefore, examples would be useful.
The three important characters in the expanded regular expressions are (, |, and ). Parentheses are used to group expressions; the vertical bar acts an an OR operator. Together, they let you match a choice of patterns. As an example, you can use egrep to print all From: and Subject: lines from your incoming mail [which may also be in /var/spool/mail/$USER. JP]:
% egrep '^(From|Subject): ' /usr/spool/mail/$USER
All lines starting with From: or Subject: will be printed. There is no easy way to do this with simple regular expressions. You could try something like ^[FS][ru][ob][mj]e*c*t*: and hope you don't have any lines that start with Sromeet:. Extended expressions don't have the \< and \> characters. You can compensate by using the alternation mechanism. Matching the word "the" in the beginning, middle, or end of a sentence or at the end of a line can be done with the extended regular expression (^| )the([^a-z]|$). There are two choices before the word: a space or the beginning of a line. Following the word, there must be something besides a lowercase letter or else the end of the line. One extra bonus with extended regular expressions is the ability to use the *, +, and ? modifiers after a (...) grouping.
[If you're on a Darwin system and use Apple Mail or one of the many other clients, you can grep through your mail files locally. For Mail, look in your home directory's Library/Mail/ directory. There should be a subdirectory there, perhaps named something like<EMAIL_ADDRESS>with an IMAP directory tree beneath it. IMAP stores messages individually, not in standard Unix mbox format, so there is no way to look for all matches in a single mailbox by grepping a single file, but fortunately, you can use regular expressions to construct a file list to search. :-) SJC]
Here are two ways to match "a simple problem", "an easy problem", as well as "a problem"; the second expression is more exact:
% egrep "a[n]? (simple|easy)? ?problem" data % egrep "a[n]? ((simple|easy) )?problem" data
I promised to explain why the backslash characters don't work in extended regular expressions. Well, perhaps the \{...\} and \<...\> could be added to the extended expressions, but it might confuse people if those characters are added and the \(...\) are not. And there is no way to add that functionality to the extended expressions without changing the current usage. Do you see why? It's quite simple. If ( has a special meaning, then \( must be the ordinary character. This is the opposite of the simple regular expressions, where ( is ordinary and \( is special. The usage of the parentheses is incompatible, and any change could break old programs.
If the extended expression used (...|...) as regular characters, and \(...\|...\) for specifying alternate patterns, then it is possible to have one set of regular expressions that has full functionality. This is exactly what GNU Emacs (Section 19.1) does, by the way it combines all of the features of regular and extended expressions with one syntax.
BB
Writing regular expressions involves more than learning the mechanics. You not only have to learn how to describe patterns, but you also have to recognize the context in which they appear. You have to be able to think through the level of detail that is necessary in a regular expression, based on the context in which the pattern will be applied.
The same thing that makes writing regular expressions difficult is what makes writing them interesting: the variety of occurrences or contexts in which a pattern appears. This complexity is inherent in language itself, just as you can't always understand an expression (Section 32.1) by looking up each word in the dictionary.
The process of writing a regular expression involves three steps:
Knowing what you want to match and how it might appear in the text.
Writing a pattern to describe what you want to match.
Testing the pattern to see what it matches.
This process is virtually the same kind of process that a programmer follows to develop a program. Step 1 might be considered the specification, which should reflect an understanding of the problem to be solved as well as how to solve it. Step 2 is analogous to the actual coding of the program, and step 3 involves running the program and testing it against the specification. Steps 2 and 3 form a loop that is repeated until the program works satisfactorily.
Testing your description of what you want to match ensures that the description works as expected. It usually uncovers a few surprises. Carefully examining the results of a test, comparing the output against the input, will greatly improve your understanding of regular expressions. You might consider evaluating the results of a pattern-matching operation as follows:
The lines that I wanted to match.
The lines that I didn't want to match.
The lines that I didn't match but wanted to match.
The lines that I matched but didn't want to match.
Trying to perfect your description of a pattern is something that you work at from opposite ends: you try to eliminate the "hits that should be misses" by limiting the possible matches, and you try to capture the "misses that should be hits" by expanding the possible matches.
The difficulty is especially apparent when you must describe patterns using fixed strings. Each character you remove from the fixed-string pattern increases the number of possible matches. For instance, while searching for the string what, you determine that you'd like to match What as well. The only fixed-string pattern that will match What and what is hat, the longest string common to both. It is obvious, though, that searching for hat will produce unwanted matches. Each character you add to a fixed-string pattern decreases the number of possible matches. The string them is going to produce fewer matches than the string the.
Using metacharacters in patterns provides greater flexibility in extending or narrowing the range of matches. Metacharacters, used in combination with literals or other metacharacters, can be used to expand the range of matches while still eliminating the matches that you do not want.
DD
One of the toughest things to learn about regular expressions is just what they do match. The problem is that a regular expression tends to find the longest possible match which can be more than you want.
Go to http://examples.oreilly.com/upt3 for more information on: showmatch
Here's a simple script called showmatch that is useful for testing regular expressions, when writing sed scripts, etc. Given a regular expression and a filename, it finds lines in the file matching that expression, just like grep, but it uses a row of carets (^^^^) to highlight the portion of the line that was actually matched. Depending on your system, you may need to call nawk instead of awk; most modern systems have an awk that supports the syntax introduced by nawk, however.
#! /bin/sh # showmatch - mark string that matches pattern pattern=$1; shift awk 'match($0,pattern) > 0 { s = substr($0,1,RSTART-1) m = substr($0,1,RLENGTH) gsub (/[^\b- ]/, " ", s) gsub (/./, "^", m) printf "%s\n%s%s\n", $0, s, m }' pattern="$pattern" $*
For example:
% showmatch 'CD-...' mbox and CD-ROM publishing. We have recognized ^^^^^^ that documentation will be shipped on CD-ROM; however, ^^^^^^
Go to http://examples.oreilly.com/upt3 for more information on: xgrep
xgrep is a related script that simply retrieves only the matched text. This allows you to extract patterned data from a file. For example, you could extract only the numbers from a table containing both text and numbers. It's also great for counting the number of occurrences of some pattern in your file, as shown below. Just be sure that your expression matches only what you want. If you aren't sure, leave off the wc command and glance at the output. For example, the regular expression [0-9]* will match numbers like 3.2 twice: once for the 3 and again for the 2! You want to include a dot (.) and/or comma (,), depending on how your numbers are written. For example: [0-9][.0-9]* matches a leading digit, possibly followed by more dots and digits.
|
The xgrep shell script runs the sed commands below, replacing $re with the regular expression from the command line and $x with a CTRL-b character (which is used as a delimiter). We've shown the sed commands numbered, like 5>; these are only for reference and aren't part of the script:
1> \$x$re$x!d 2> s//$x&$x/g 3> s/[^$x]*$x// 4> s/$x[^$x]*$x/\ /g 5> s/$x.*//
Command 1 deletes all input lines that don't contain a match. On the remaining lines (which do match), command 2 surrounds the matching text with CTRL-b delimiter characters. Command 3 removes all characters (including the first delimiter) before the first match on a line. When there's more than one match on a line, command 4 breaks the multiple matches onto separate lines. Command 5 removes the last delimiter, and any text after it, from every output line.
Greg Ubben revised showmatch and wrote xgrep.
JP, DD, andTOR
A regular expression tries to match the longest string possible, which can cause unexpected problems. For instance, look at the following regular expression, which matches any number of characters inside quotation marks:
".*"
Let's imagine an HTML table with lots of entries, each of which has two quoted strings, as shown below:
<td><a href="#arts"><img src="d_arrow.gif" border=0></a>
All the text in each line of the table is the same, except the text inside the quotes. To match the line through the first quoted string, a novice might describe the pattern with the following regular expression:
<td><a href=".*">
However, the pattern ends up matching almost all of the entry because the second quotation mark in the pattern matches the last quotation mark on the line! If you know how many quoted strings there are, you can specify each of them:
<td><a href=".*"><img src=".*" border=0></a>
Although this works as you'd expect, some line in the file might not have the same number of quoted strings, causing misses that should be hits you simply want the first argument. Here's a different regular expression that matches the shortest possible extent between two quotation marks:
"[^"]*"
It matches "a quote, followed by any number of characters that do not match a quote, followed by a quote." Note, however, that it will be fooled by escaped quotes, in strings such as the following:
$strExample = "This sentence contains an escaped \" character.";
The use of what we might call "negated character classes" like this is one of the things that distinguishes the journeyman regular expression user from the novice.
DD and JP
Once you know regular expression syntax, you can match almost anything. But sometimes, it's a pain to think through how to get what you want. Table 32-4 lists some useful regular expressions that match various kinds of data you might have to deal with in the Unix environment. Some of these examples work in any program that uses regular expressions; others only work with a specific program such as egrep. (Section 32.20 lists the metacharacters that each program accepts.) The · means to use a space as part of the regular expression. Bear in mind that you may also be able to use \< and \> to match on word boundaries.
Note that these regular expressions are only examples. They aren't meant to match (for instance) every occurrence of a city and state in any arbitrary text. But if you can picture what the expression does and why, that should help you write an expression that fits your text.
|
Item |
Example |
Regular expression |
|---|---|---|
|
U.S. state abbreviation |
(NM) |
·[A-Z][A-Z]· |
|
U.S. city, state |
(Portland, OR) |
^.*,·[A-Z][A-Z] |
|
Month day, year |
(JAN 05, 1993); (January 5, 1993) |
[A-Z][A-Za-z]\{2,8\}·[0-9]\{1,2\},·[0-9]\{4\} |
|
U.S. Social Security number |
(123-45-6789) |
[0-9]\{3\}-[0-9]\{2\}-[0-9]\{4\}= |
|
U.S. telephone number |
(547-5800) |
[0-9]\{3\}-[0-9]\{4\} |
|
Unformatted dollar amounts |
($1); ($ 1000000.00) |
\$·*[0-9]+(\.[0-9][0-9])? |
|
HTML/SGML/XML tags |
(<h2>); (<UL COMPACT>) |
<[^>]*> |
|
troff macro with first argument |
(.SH "SEE ALSO") |
^\.[A-Z12].·"[^"]*" |
|
troff macro with all arguments |
(.Ah "Tips for" "ex & vi") |
^\.[A-Z12].·".*" |
|
Blank lines |
^$ |
|
|
Entire line |
^.*$ |
|
|
One or more spaces |
··* |
DD and JP
Some regular expression metacharacters are valid for one program but not for another. Those that are available to a particular Unix program are marked by a check () in Table 32-5. Quick reference descriptions of each of the characters can be found in Section 32.21.
[Unfortunately, even this table doesn't give the whole story. For example, Sun has taken some of the extensions originally developed for ed, ex, and vi (such as the \< \> and \{min, max\} modifiers) and added them to other programs that use regular expressions.  In addition, there are many programs that recognize regular expressions, such as perl, emacs, more, dbx, expr, lex, pg, and less, that aren't covered in Daniel's table. TOR]
|
Symbol |
ed |
ex |
vi |
sed |
awk |
grep |
egrep |
Action |
|---|---|---|---|---|---|---|---|---|
|
. |
Match any character. |
|||||||
|
* |
Match zero or more preceding. |
|||||||
|
^ |
Match beginning of line. |
|||||||
|
$ |
Match end of line. |
|||||||
|
\ |
Escape character following. |
|||||||
|
[ ] |
Match one from a set. |
|||||||
|
\(\) |
Store pattern for later replay. |
|||||||
|
\{\} |
Match a range of instances. |
|||||||
|
\<\> |
Match word's beginning or end. |
|||||||
|
+ |
Match one or more preceding. |
|||||||
|
? |
Match zero or one preceding. |
|||||||
|
| |
Separate choices to match. |
|||||||
|
( ) |
Group expressions to match. |
In ed , ex, and sed, note that you specify both a search pattern (on the left) and a replacement pattern (on the right). The metacharacters in Table 32-5 are meaningful only in a search pattern. ed, ex, and sed support the additional metacharacters in Table 32-6 that are valid only in a replacement pattern.
|
Symbol |
ex |
sed |
ed |
Action |
|---|---|---|---|---|
|
\ |
Escape character following. |
|||
|
\n |
Reuse pattern stored by \( \) pair number \n. |
|||
|
& |
Reuse previous search pattern. |
|||
|
~ |
Reuse previous replacement pattern. |
|||
|
\u \U |
Change character(s) to uppercase. |
|||
|
\l \L |
Change character(s) to lowercase. |
|||
|
\E |
Turn off previous \U or \L. |
|||
|
\e |
Turn off previous \u or \l. |
DG
Section 32.4 gives an introduction to regular expressions. This article is intended for those of you who need just a quick listing of regular expression syntax as a refresher from time to time. It also includes some simple examples. The characters in Table 32-7 have special meaning only in search patterns.
|
Pattern |
What does it match? |
|---|---|
|
. |
Match any single character except newline. |
|
* |
Match any number (including none) of the single characters that immediately precede it. The preceding character can also be a regular expression. For example, since . (dot) means any character, .* means "match any number of any character." |
|
^ |
Match the following regular expression at the beginning of the line. |
|
$ |
Match the preceding regular expression at the end of the line. |
|
[ ] |
Match any one of the enclosed characters. |
|
A hyphen (-) indicates a range of consecutive characters. A caret (^) as the first character in the brackets reverses the sense: it matches any one character not in the list. A hyphen or a right square bracket (]) as the first character is treated as a member of the list. All other metacharacters are treated as members of the list. |
|
|
\{n,m\} |
Match a range of occurrences of the single character that immediately precedes it. The preceding character can also be a regular expression. \{n\} will match exactly n occurrences, \{n,\} will match at least n occurrences, and \{n,m\} will match any number of occurrences between n and m. |
|
\ |
Turn off the special meaning of the character that follows (except for \{ and \(, etc., where it turns on the special meaning of the character that follows). |
|
\( \) |
Save the pattern enclosed between \( and \) into a special holding space. Up to nine patterns can be saved on a single line. They can be "replayed" in substitutions by the escape sequences \1 to \9. |
|
\< \> |
Match characters at beginning (\<) or end (\>) of a word. |
|
+ |
Match one or more instances of preceding regular expression. |
|
? |
Match zero or one instances of preceding regular expression. |
|
| |
Match the regular expression specified before or after. |
|
(' ) |
Apply a match to the enclosed group of regular expressions. |
The characters in Table 32-8 have special meaning only in replacement patterns.
|
Pattern |
What does it do? |
|---|---|
|
\ |
Turn off the special meaning of the character that follows. |
|
\n |
Restore the nth pattern previously saved by \( and \). n is a number from 1 to 9, with 1 starting on the left. |
|
& |
Reuse the string that matched the search pattern as part of the replacement pattern. |
|
\u |
Convert first character of replacement pattern to uppercase. |
|
\U |
Convert replacement pattern to uppercase. |
|
\l |
Convert first character of replacement pattern to lowercase. |
|
\L |
Convert replacement pattern to lowercase. |
Note that many programs, especially perl , awk, and sed, implement their own programming languages and often have much more extensive support for regular expressions. As such, their manual pages are the best place to look when you wish to confirm which expressions are supported or whether the program supports more than simple regular expressions. On many systems, notably those with a large complement of GNU tools, the regular expression support is astonishing, and many generations of tools may be implemented by one program (as with grep, which also emulates the later egrep in the same program, with widely varying support for expression formats based on how the program is invoked). Don't make the mistake of thinking that all of these patterns will work everywhere in every program with regex support, or of thinking that this is all there is.
When used with grep or egrep, regular expressions are surrounded by quotes. (If the pattern contains a $, you must use single quotes from the shell; e.g., 'pattern'.) When used with ed, ex, sed, and awk, regular expressions are usually surrounded by / (although any delimiter works). Table 32-9 has some example patterns.
|
Pattern |
What does it match? |
|---|---|
|
bag |
The string bag. |
|
^bag |
bag at beginning of line. |
|
bag$ |
bag at end of line. |
|
^bag$ |
bag as the only word on line. |
|
[Bb]ag |
Bag or bag. |
|
b[aeiou]g |
Second letter is a vowel. |
|
b[^aeiou]g |
Second letter is a consonant (or uppercase or symbol). |
|
b.g |
Second letter is any character. |
|
^...$ |
Any line containing exactly three characters. |
|
^\. |
Any line that begins with a . (dot). |
|
^\.[a-z][a-z] |
Same, followed by two lowercase letters (e.g., troff requests). |
|
^\.[a-z]\{2\} |
Same as previous, grep or sed only. |
|
^[^.] |
Any line that doesn't begin with a . (dot). |
|
bugs* |
bug, bugs, bugss, etc. |
|
"word" |
A word in quotes. |
|
"*word"* |
A word, with or without quotes. |
|
[A-Z][A-Z]* |
One or more uppercase letters. |
|
[A-Z]+ |
Same, extended regular expression format. |
|
[A-Z].* |
An uppercase letter, followed by zero or more characters. |
|
[A-Z]* |
Zero or more uppercase letters. |
|
[a-zA-Z] |
Any letter. |
|
[^0-9A-Za-z] |
Any symbol (not a letter or a number). |
|
[567] |
One of the numbers 5, 6, or 7. |
|
Extended regular expression patterns: |
|
|
five|six|seven |
One of the words five, six, or seven. |
|
80[23]?86 |
One of the numbers 8086, 80286, or 80386. |
|
compan(y|ies) |
One of the words company or companies. |
|
\<the |
Words like theater or the. |
|
the\> |
Words like breathe or the. |
|
\<the\> |
The word the. |
|
0\{5,\} |
Five or more zeros in a row. |
|
[0-9]\{3\}-[0-9]\{2\}-[0-9]\{4\} |
U.S. Social Security number (nnn-nn-nnnn). |
Table 32-10 shows the metacharacters available to sed or ex. (ex commands begin with a colon.) A space is marked by ·; a TAB is marked by tab.
|
Command |
Result |
|---|---|
|
s/.*/( & )/ |
Redo the entire line, but add parentheses. |
|
s/.*/mv & &.old/ |
Change a word list into mv commands. |
|
/^$/d |
Delete blank lines. |
|
:g/^$/d |
ex version of previous. |
|
/^[·tab]*$/d |
Delete blank lines, plus lines containing only spaces or TABs. |
|
:g/^[·tab]*$/d |
ex version of previous. |
|
s/··*/·/g |
Turn one or more spaces into one space. |
|
:%s/·*/·/g |
ex version of previous. |
|
:s/[0-9]/Item &:/ |
Turn a number into an item label (on the current line). |
|
:s |
Repeat the substitution on the first occurrence. |
|
:& |
Same. |
|
:sg |
Same, but for all occurrences on the line. |
|
:&g |
Same. |
|
:%&g |
Repeat the substitution globally. |
|
:.,$s/Fortran/\U&/g |
Change word to uppercase, on current line to last line. |
|
:%s/.*/\L&/ |
Lowercase entire file. |
|
:s/\<./\u&/g |
Uppercase first letter of each word on current line (useful for titles). |
|
:%s/yes/No/g |
Globally change a word to No. |
|
:%s/Yes/~/g |
Globally change a different word to No (previous replacement). |
|
s/die or do/do or die/ |
Transpose words. |
|
s/\([Dd]ie\) or \([Dd]o\)/\2 or \1/ |
Transpose, using hold buffers to preserve case. |
DG
[1] Recent versions of many programs, including find, now support regex via special command-line options. For example, find on my Linux server supports the -regex and -iregex options, for specifying filenames via a regular expression, case-sensitive and -insensitive, respectively. But the find command on my OS X laptop does not. SJC
[2] Beware! If your regular expression isn't properly quoted, this means "process ID of current process." Always quote your expressions properly.
[3] Some languages, notably Java and Perl, do support Unicode regular expressions, but as Unicode generally subsumes the ASCII 7-bit character set, regular expressions written for ASCII will work as well.
[4] In Perl, you can also use $1 through $9 and even beyond, with the right switches, in addition to the backslash mechanism.
| CONTENTS |


BusMall Market
Add items to your cart from the dropdown menu.


PyTidyLib: A Python Interface to HTML Tidy¶
PyTidyLib is a Python package that wraps the HTML Tidy library. This allows you, from Python code, to “fix” invalid (X)HTML markup. Some of the library’s many capabilities include:
- Clean up unclosed tags and unescaped characters such as ampersands
- Output HTML 4 or XHTML, strict or transitional, and add missing doctypes
- Convert named entities to numeric entities, which can then be used in XML documents without an HTML doctype.
- Clean up HTML from programs such as Word (to an extent)
- Indent the output, including proper (i.e. no) indenting for
pre
elements, which some (X)HTML indenting code overlooks.
The maintenance of HTML Tidy has been transferred and is now active. Please see http://www.html-tidy.org/documentation/ for information about HTML Tidy.
Naming conventions¶
HTML Tidy is a longstanding open-source library written in C that implements the actual functionality of cleaning up (X)HTML markup. It provides a shared library (so
, dll
, or dylib
) that can variously be called tidy
, libtidy
, or tidylib
, as well as a command-line executable named tidy
. For clarity, this document will consistently refer to it by the project name, HTML Tidy.
PyTidyLib is the name of the Python package discussed here. As this is the package name, pip install pytidylib
is correct (they are case-insenstive). The module name is tidylib
, so import tidylib
is correct in Python code. This document will consistently use the package name, PyTidyLib, outside of code examples.
Installing HTML Tidy¶
You must have both HTML Tidy and PyTidyLib installed in order to use the functionality described here. There is no affiliation between the two projects. The following briefly outlines what you must do to install HTML Tidy. See the HTML Tidy web site for more information.
Linux/BSD or similar: First, try to use your distribution’s package management system (apt-get
, yum
, etc.) to install HTML Tidy. It might go under the name libtidy
, tidylib
, tidy
, or something similar. Otherwise see Building from Source, below.
OS X: You may already have HTML Tidy installed. In the Terminal, run locate libtidy
and see if you get any results, which should end in dylib
. Otherwise see Building from Source, below.
Windows: You may be able to find prebuild DLLs. The DLL sources that were linked to in previous versions of this documentation have since gone 404 without obvious replacements.
Once you have a DLL (which may be named tidy.dll
, libtidy.dll
, or tidylib.dll
), you must place it in a directory on your system path. If you are running Python from the command-line, placing the DLL in the present working directory will work, but this is unreliable otherwise (e.g. for server software).
See the articles How to set the path in Windows 2000/Windows XP (ComputerHope.com) and Modify a Users Path in Windows Vista (Question Defense) for more information on your system path.
Building from Source: Please see http://www.html-tidy.org/documentation/
Installing PyTidyLib¶
PyTidyLib is available on the Python Package Index:
pip install pytidylib
You can also download the latest source distribution from PyPI manually.
Small example of use¶
The following code cleans up an invalid HTML document and sets an option:
from tidylib import tidy_document
document, errors = tidy_document('''
fõo ''',
options={'numeric-entities':1})
print document
print errors
Configuration options¶
The Python interface allows you to pass options directly to HTML Tidy. For a complete list of options, see the HTML Tidy Configuration Options Quick Reference or, from the command line, run tidy -help-config
.
This module sets certain default options, as follows:
BASE_OPTIONS = {
"indent": 1, # Pretty; not too much of a performance hit
"tidy-mark": 0, # No tidy meta tag in output
"wrap": 0, # No wrapping
"alt-text": "", # Help ensure validation
"doctype": 'strict', # Little sense in transitional for tool-generated markup...
"force-output": 1, # May not get what you expect but you will get something
}
If you do not like these options to be set for you, do the following after importing tidylib
:
tidylib.BASE_OPTIONS = {}


Easton spends most of his time hunting down bounties and making cool gadgets. He's also super patient, communicative, and helpful. Outside of work, he loves hatching elaborate schemes and going running.
Robyn is the most fearsome warrior this side of the Willamette. He's also an expert at being focused, helpful, and easy to work with. When not taking everything literally, he enjoys biking and playing video games.
While at first glance he might seem rather quiet, Injoong can become overly excited about certain topics, such as cool software, hardware, and the cultural relevance of video games. He enjoys cooking, biking, and reading patch notes.


Daily Scan Status:
Total Cattle
{{total_cattle}}
{% include 'dashboard/widgets/category_distribution.html' %}
{% include 'dashboard/widgets/monthly_progress.html' %}
{% include 'dashboard/widgets/weight_distribution.html' %}
{% include 'dashboard/widgets/need_care.html' %}
{% include 'dashboard/widgets/need_care_pie.html' %}


schema {# The schema’s entry-point for queries. This acts as the public, top-level API # from which all queries must start.query: Query# The schema’s entry-point for mutations. This acts as the public, top-level API # from which all mutation queries must start.mutation: Mutation}


Splits are controlled by remote timekeepers, this is a realtime display of the results.
| Jersey | Team | Name | {% for split in splits %}Split | {{split}} | {% endfor %}Split | Finish |
|---|---|---|---|---|---|---|
| {{runner.jersey}} | {{runner.team}} | {{runner.name}} | {% for split in splits %}{% endfor %} |


-
Initial Patient Population =
- AND: "Patient Characteristic Birthdate: birth date" >= 65 year(s) starts before start of "Measurement Period"
- AND:
- OR: "Encounter, Performed: Office Visit"
- OR: "Encounter, Performed: Face-to-Face Interaction"
- OR: "Encounter, Performed: Annual Wellness Visit"
- OR: "Encounter, Performed: Home Healthcare Services"
- OR: "Encounter, Performed: Preventive Care Services - Established Office Visit, 18 and Up"
- OR: "Encounter, Performed: Preventive Care Services-Initial Office Visit, 18 and Up"
- during "Measurement Period"
-
Denominator =
- AND: "Initial Patient Population"
-
Denominator Exclusions =
-
Numerator =
- AND:
- OR: "Medication, Administered: Pneumococcal Vaccine"
- OR: "Procedure, Performed: Pneumococcal Vaccine Administered"
- OR: "Risk Category Assessment: History of Pneumococcal Vaccine"
- starts before or during "Measurement Period"
-
Denominator Exceptions =
-
"Encounter, Performed: Annual Wellness Visit" using "Annual Wellness Visit Grouping Value Set (2.16.840.1.113883.3.526.3.1240)"
-
"Encounter, Performed: Face-to-Face Interaction" using "Face-to-Face Interaction Grouping Value Set (2.16.840.1.113883.3.464.1<IP_ADDRESS>8)"
-
"Encounter, Performed: Home Healthcare Services" using "Home Healthcare Services Grouping Value Set (2.16.840.1.113883.3.464.1<IP_ADDRESS>6)"
-
"Encounter, Performed: Office Visit" using "Office Visit Grouping Value Set (2.16.840.1.113883.3.464.1<IP_ADDRESS>1)"
-
"Encounter, Performed: Preventive Care Services - Established Office Visit, 18 and Up" using "Preventive Care Services - Established Office Visit, 18 and Up Grouping Value Set (2.16.840.1.113883.3.464.1<IP_ADDRESS>5)"
-
"Encounter, Performed: Preventive Care Services-Initial Office Visit, 18 and Up" using "Preventive Care Services-Initial Office Visit, 18 and Up Grouping Value Set (2.16.840.1.113883.3.464.1<IP_ADDRESS>3)"
-
"Medication, Administered: Pneumococcal Vaccine" using "Pneumococcal Vaccine Grouping Value Set (2.16.840.1.113883.3.464.1<IP_ADDRESS>7)"
-
"Patient Characteristic Birthdate: birth date" using "birth date LOINC Value Set (2.16.840.1.113883.3.560.100.4)"
-
"Procedure, Performed: Pneumococcal Vaccine Administered" using "Pneumococcal Vaccine Administered Grouping Value Set (2.16.840.1.113883.3.464.1<IP_ADDRESS>4)"
-
"Risk Category Assessment: History of Pneumococcal Vaccine" using "History of Pneumococcal Vaccine Grouping Value Set (2.16.840.1.113883.3.464.1<IP_ADDRESS>8)"
-
"Patient Characteristic Ethnicity: Ethnicity" using "Ethnicity CDC Value Set (2.16.840.1.114<IP_ADDRESS>7)"
-
"Patient Characteristic Payer: Payer" using "Payer Source of Payment Typology Value Set (2.16.840.1.114<IP_ADDRESS>91)"
-
"Patient Characteristic Race: Race" using "Race CDC Value Set (2.16.840.1.114<IP_ADDRESS>6)"
-
"Patient Characteristic Sex: ONC Administrative Sex" using "ONC Administrative Sex Administrative Sex Value Set (2.16.840.1.1137<IP_ADDRESS>)"


arc(x, y, radius, range=None, ccw=False, close=False, plot=True, **style)
Draws a full circle or partial arc centered at (x,y). The range
argument allows you to draw only a portion of the circle. It can be either a number defining the angle (from 0°) or a 2-tuple with a start- and stop-angle. By default the endpoints of the range will be connected in a clockwise direction, but this can be inverted by passing ccw=True
. If the close
argument is set to True
, the endpoints of the arc will be connected via a pie-slice through the origin.
fill(.9) arc(125,125, 125) fill(.2) arc(40,40, 20)
nofill() stroke(.2) arc(60,60, 40, range=180) arc(60,60, 30, range=90, ccw=True) stroke('red') arc(60,60, 20, range=270, close=True)


Eric D. Torres
Day Planner
Day Planner
Task List
Task List
Search NY Times
Search NY Times
Password Generator
Password Generator
JS Code Quiz
JS Code Quiz
Responsive Portfolio:
Home Page
About Me
Portfolio
Contact
Weather Dashboard
Current Conditions:
City Date:
Feels Like:
Temperature:
Humidity:
wind speed:
UV Index:
Five-Day Forecast:


This app can only be run inside of Bullhorn as a Custom Tab. Please contact your admin if this is in error.
{{errorMessage}}
{{errorDetails}}
Example Edit Like Tab
This tab is an example of what can be done when App Bridge is used to read and write data in a Bullhorn record,
and Novo Elements is used to display that data in a form, along with supporting toasts, required fields and modal dialogs.


[El-Kabong Home]
Main Page Compound List File List Compound Members File Members
ekhtml_attr_t Member List
This is the complete list of members for ekhtml_attr_t, including all inherited members.
Generated on Sun Nov 10 15:54:34 2002 for ekhtml by
1.2.14 written by Dimitri van Heesch,
© 1997-2002


| DOSE: |
3 hits |
oral |
LSD |
(blotter / tab) |
| |
3.5 g |
oral |
Mushrooms |
(dried) |
Me and my friends had been raving quite often and we decided we were going to take one of our 'newer' friends down to a free rave in memory of a girl.
We were all excited to go down and see our friend roll. We get down and the place is dry of E. I hadnt tried mushrooms before, so when asking around for Ecstasy I found mushrooms and I decided to buy an 1/8. My friends bought 2 pills of E (1 was bunk).
We kept asking around hoping to find some E for everyone. We walked around for a while, and then a guy came selling UFO acid. We bought a total of about 20 hits. We all took 3. The guy that I bought it from told me to only take 2. But I figured I knew what I was getting myself into, so I took 3. We then walked back to his car that was parked on the hill, and waited to see what would happen. I didnt think anything was happening, and then stuff started getting weird, very weird. I wont even describe the visuals, because I cant. OFF THE WALL. A smashed plastic sack was between me & a friend in the back seat. Suddenly it started growing, and pulsing. I could actually see the back melting and creasing. It looked very alive. Me and my freind were tripping out on this, and then he smashed it. It looked dead. very dead. not at all like a bag.
I remember looking my mask that had Tiger Balm on the inside and I could see it moving aorund on the mask, it would rise off the mask about 2 inches and just start spinning towards my face. My friends hair all stood out on end and started spinning.
After this, I went insane. I felt a very strong pain right above the back of my mouth. This pain was the worst feeling I have ever had. I felt that I was losing my mind. I was very scared. It was very intense. I have had this same feeling but not as bad after that when tripping (on acid).  After about 2 hours of this I was still in the car, which was probably my biggest mistake.
I had waaaaaayyyy to much acid for my first time. Anything that gave my brain stimulation seemed to overload it, all I wanted to do was curl up in a ball and sleep, but I couldnt do anything. I wouldnt leave the car.
The moral of the story is, w/ acid or any strong drug, make sure your first time you take a handleable dosage.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


{% extends "section_docs.html" %} {% block title %}Adding a new collection{% endblock %} {% block content %}
Consider having your SCL reviewed by a professional to check if it works correctly. Your SCL then gets an approved tag and will be shown with higher priority in the Directory. To have your SCL approved, click the Request a Review button in the detail of your SCL. Please ensure it meets the requirements mentioned below.
All packages need to meet the requirements specified in the Packaging Software Collections chapter of the Packaging Guide.
You can use the rpmlint
tool with the SCLCheck
module to help you check your packages. An example command would be:
$ rpmlint -c SCLCheck python27-python-2.7.5-12.el7.centos.src.rpm
Your project must comply with the Licensing Guide.
{% endblock %}


| DOSE: |
1.0 g |
smoked |
Cannabis |
(plant material) |
I have smoked pot many times before over the last couple of years, and also enjoyed experimenting with hallucinogens such as salvia and magic mushrooms on a handful of occasions. Although I have experienced mild paranoia from cannabis before, neither I nor any of my friends have had real adverse psychological reactions to it at any dosage. Personally cannabis alone has never caused me to vomit before, even when I have smoked far higher doses.
Yesterday was a pretty typical weekday holiday afternoon, apart from the fact I was a little tired from staying up and watching JFK in the early hours. I had been relaxing and playing some computer games with two friends and we both had some bud left over from the night before that we decided to smoke. We headed to the garden armed with rolling papers and a novelty bong with a huge metal bell shaped cap, and he began to roll a joint as I emptied the contents of my baggie into the bowl. We laughed at the fact that my whole gram had not quite filled the cap and I started to take some very deep breaths and exhaled completely to prepare myself, as I had never hit anything this large before.
As I slurped the bong, the smoke seemed to keep coming endlessly and my hopes of sucking the burned ash down into the water disappeared about thirty seconds later when I realised my lungs were completely full. I spluttered and coughed and felt a very intense head rush which I knew would subside once I got some oxygen to my brain. I remember saying 'I think my lungs are bleeding' as a joke and after a deep breath or two I felt quite wasted, but ready to finish my hit. However, there was nothing but a large clump of ash left in the bowl so I disregarded it in favour for some rather conservative tokes on my friend's joint. I was starting to feel quite shitfaced.
Suddenly I felt an intense paranoia. I felt alienated and couldn't seem to look at my friendís faces as they chatted in a mildly stoned manner. I was fixated with some small plants growing through the brickwork, they filled me with deja vu, but also an intense feeling of dread. I couldn't move my eyes from this point. I also remember thinking that I had become brain damaged from oxygen deprivation, or maybe that I had become schizophrenic or suddenly induced cannabis psychosis. The tiny voice of reason that remained told me I must be having some kind of bad trip and to ride it out.
We made our way inside for more gaming which was difficult for me as I was very unsteady on my feet. They started playing a fighting game, and I realised to my alarm that I was seeing double. I convinced myself that my eyes had become misaligned or that I was going blind. Around this time my friend asked me why I hadn't spoken in the last hour and realised with some alarm that my eyes were rolling back in my head. My friends offered me a turn on the games console, but looking at the screen was too disorientating for me to handle.
About two silent hours later, I went to the toilet and vomited myself empty. Two more good friends arrived, exclaiming that they'd never seen me so stoned.  After about six hours, I was still probably more stoned than I'd ever been, but I went home anyway looking very ill, ate everything I could find and went to sleep at about 8pm.
I awoke today still feeling stoned and a little paranoid. I decided that my bad 'trip' must have simply been a result of inhaling too much smoke, damaging my body, and consuming more THC at once than ever before sending my body and mind into some sort of shock. If I have learned anything from this experience, it is that even cannabis, a drug that I previously considered myself invincible against, must be treated with respect.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


{% extends 'base.html' %} {% import 'macros.html' as macro %} {%block styles%} {{ super() }} {%endblock%} {%block content%}
Do you wish to nail the interview in just a few words? welcome.
Do you want to talk about your products? we're here for you!!
Do you really need Promotion? yo welcome


Estimated Number of Cells : the number of barcodes considered as cell-associated.
Fraction Reads in Cells : the fraction of uniquely-mapped-to-transcriptome reads with cell-associated barcodes.
Mean Reads per Cell : the number of valid reads divided by the estimated number of cells.
Median UMI per Cell : the median number of UMI counts per cell-associated barcode.
Total Genes : the number of genes with at least one UMI count in any cell.
Median Genes per Cell : the median number of genes detected per cell-associated barcode.
Saturation : the fraction of UMI originating from an already-observed UMI.


Version <IP_ADDRESS> (18th Jul 2018)
CHANGES
- Updated scripts and styles incusions to include when Add-On is enabled
Version 1.0.2 (16th Sep 2017)
CHANGES
- Scripts will only be enqueued now if Add-On is officially enabled from the Slider settings
Version 1.0.1 (11th May 2017)
CHANGES
- Added option to toggle background image views for slide admin


Copyright James Mead 2006
You may use, copy and redistribute this library under the same terms as Ruby itself or under the MIT license.
Copyright James Mead 2006
You may use, copy and redistribute this library under the same terms as Ruby itself or under the MIT license.


|
Proton DotNet
|
Interface for proton buffer primitive type accessors that can be used with custom types to extend or otherwise customize buffer access. More...
Public Member Functions | |
| bool | GetBoolean (long index) |
| Reads a single byte from the given index and returns a boolean value indicating if the byte was zero (false) or greater than zero (true). More... | |
| sbyte | GetByte (long index) |
| Reads a single signed byte from the given index and returns it. More... | |
| byte | GetUnsignedByte (long index) |
| Reads a single unsigned byte from the given index and returns it. More... | |
| char | GetChar (long index) |
| Reads a single 2 byte char from the given index and returns it. More... | |
| short | GetShort (long index) |
| Reads a single 2 byte short from the given index and returns it. More... | |
| ushort | GetUnsignedShort (long index) |
| Reads a single 2 byte unsigned short from the given index and returns it. More... | |
| int | GetInt (long index) |
| Reads a single 4 byte int from the given index and returns it. More... | |
| uint | GetUnsignedInt (long index) |
| Reads a single 4 byte unsigned int from the given index and returns it. More... | |
| long | GetLong (long index) |
| Reads a single 8 byte long from the given index and returns it. More... | |
| ulong | GetUnsignedLong (long index) |
| Reads a single 8 byte unsigned long from the given index and returns it. More... | |
| float | GetFloat (long index) |
| Reads a single 4 byte float from the given index and returns it. More... | |
| double | GetDouble (long index) |
| Reads a single 8 byte double from the given index and returns it. More... | |
| IProtonBuffer | SetByte (long index, sbyte value) |
| Write the given byte value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetUnsignedByte (long index, byte value) |
| Write the given unsigned byte value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetBoolean (long index, bool value) |
| Write the given boolean value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetChar (long index, char value) |
| Write the given 2 byte char value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetShort (long index, short value) |
| Write the given 2 byte short value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetUnsignedShort (long index, ushort value) |
| Write the given 2 byte unsigned short value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetInt (long index, int value) |
| Write the given 4 byte int value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetUnsignedInt (long index, uint value) |
| Write the given 4 byte unsigned int value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetLong (long index, long value) |
| Write the given 8 byte long value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetUnsignedLong (long index, ulong value) |
| Write the given 8 byte unsigned long value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetFloat (long index, float value) |
| Write the given 4 byte float value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| IProtonBuffer | SetDouble (long index, double value) |
| Write the given 8 byte double value at the given location in the buffer backing store without modifying the write offset of this buffer. More... | |
| sbyte | ReadByte () |
| Read a signed byte from the buffer and advance the read offset. More... | |
| byte | ReadUnsignedByte () |
| Read a unsigned byte from the buffer and advance the read offset. More... | |
| bool | ReadBoolean () |
| Reads the next byte from the buffer and returns the boolean value. More... | |
| char | ReadChar () |
| Reads the two bytes from the buffer and returns the char value. More... | |
| short | ReadShort () |
| Reads the next two bytes from the buffer and returns the short value. More... | |
| ushort | ReadUnsignedShort () |
| Reads the next two bytes from the buffer and returns the unsigned short value. More... | |
| int | ReadInt () |
| Reads the next four bytes from the buffer and returns the int value. More... | |
| uint | ReadUnsignedInt () |
| Reads the next four bytes from the buffer and returns the unsigned int value. More... | |
| long | ReadLong () |
| Reads the next eight bytes from the buffer and returns the long value. More... | |
| ulong | ReadUnsignedLong () |
| Reads the next eight bytes from the buffer and returns the unsigned long value. More... | |
| float | ReadFloat () |
| Reads the next four bytes from the buffer and returns the float value. More... | |
| double | ReadDouble () |
| Reads the next eight bytes from the buffer and returns the double value. More... | |
| IProtonBuffer | WriteByte (sbyte value) |
| Writes the given byte value into this buffer and increases the write offset. More... | |
| IProtonBuffer | WriteUnsignedByte (byte value) |
| Writes the given unsigned byte value into this buffer and increases the write offset. More... | |
| IProtonBuffer | WriteBoolean (bool value) |
| Writes the given boolean value into this buffer as a single byte and increases the write offset. More... | |
| IProtonBuffer | WriteShort (short value) |
| Writes the given two byte short value into this buffer and increases the write offset. More... | |
| IProtonBuffer | WriteUnsignedShort (ushort value) |
| Writes the given two byte unsigned short value into this buffer and increases the write offset. More... | |
| IProtonBuffer | WriteInt (int value) |
| Writes the given four byte int value into this buffer and increases the write offset. More... | |
| IProtonBuffer | WriteUnsignedInt (uint value) |
| Writes the given four byte unsigned int value into this buffer and increases the write offset. More... | |
| IProtonBuffer | WriteLong (long value) |
| Writes the given eight byte long value into this buffer and increases the write offset. More... | |
| IProtonBuffer | WriteUnsignedLong (ulong value) |
| Writes the given eight byte unsigned long value into this buffer and increases the write offset. More... | |
| IProtonBuffer | WriteFloat (float value) |
| Writes the given four byte float value into this buffer and increases the write offset. More... | |
| IProtonBuffer | WriteDouble (double value) |
| Writes the given eight byte double value into this buffer and increases the write offset. More... | |
Properties | |
| byte | this[long i] [get, set] |
| Indexed access to single unsigned byte values within the buffer which does not modify the read or write index value. The given index must adhere to the same constraints as the get byte and set byte level APIs in this buffer class. More... | |
Interface for proton buffer primitive type accessors that can be used with custom types to extend or otherwise customize buffer access.
| bool Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetBoolean | ( | long | index | ) |
Reads a single byte from the given index and returns a boolean value indicating if the byte was zero (false) or greater than zero (true).
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| sbyte Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetByte | ( | long | index | ) |
Reads a single signed byte from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| char Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetChar | ( | long | index | ) |
Reads a single 2 byte char from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| double Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetDouble | ( | long | index | ) |
Reads a single 8 byte double from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| float Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetFloat | ( | long | index | ) |
Reads a single 4 byte float from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| int Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetInt | ( | long | index | ) |
Reads a single 4 byte int from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| long Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetLong | ( | long | index | ) |
Reads a single 8 byte long from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| short Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetShort | ( | long | index | ) |
Reads a single 2 byte short from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| byte Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetUnsignedByte | ( | long | index | ) |
Reads a single unsigned byte from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| uint Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetUnsignedInt | ( | long | index | ) |
Reads a single 4 byte unsigned int from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| ulong Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetUnsignedLong | ( | long | index | ) |
Reads a single 8 byte unsigned long from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| ushort Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.GetUnsignedShort | ( | long | index | ) |
Reads a single 2 byte unsigned short from the given index and returns it.
| index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| bool Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadBoolean | ( | ) |
Reads the next byte from the buffer and returns the boolean value.
| IndexOutOfRangeException | If there are not enough readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| sbyte Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadByte | ( | ) |
Read a signed byte from the buffer and advance the read offset.
| IndexOutOfRangeException | If the buffer has no more readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| char Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadChar | ( | ) |
Reads the two bytes from the buffer and returns the char value.
| IndexOutOfRangeException | If there are not enough readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| double Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadDouble | ( | ) |
Reads the next eight bytes from the buffer and returns the double value.
| IndexOutOfRangeException | If there are not enough readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| float Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadFloat | ( | ) |
Reads the next four bytes from the buffer and returns the float value.
| IndexOutOfRangeException | If there are not enough readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| int Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadInt | ( | ) |
Reads the next four bytes from the buffer and returns the int value.
| IndexOutOfRangeException | If there are not enough readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| long Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadLong | ( | ) |
Reads the next eight bytes from the buffer and returns the long value.
| IndexOutOfRangeException | If there are not enough readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| short Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadShort | ( | ) |
Reads the next two bytes from the buffer and returns the short value.
| IndexOutOfRangeException | If there are not enough readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| byte Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadUnsignedByte | ( | ) |
Read a unsigned byte from the buffer and advance the read offset.
| IndexOutOfRangeException | If the buffer has no more readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| uint Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadUnsignedInt | ( | ) |
Reads the next four bytes from the buffer and returns the unsigned int value.
| IndexOutOfRangeException | If there are not enough readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| ulong Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadUnsignedLong | ( | ) |
Reads the next eight bytes from the buffer and returns the unsigned long value.
| IndexOutOfRangeException | If there are not enough readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| ushort Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.ReadUnsignedShort | ( | ) |
Reads the next two bytes from the buffer and returns the unsigned short value.
| IndexOutOfRangeException | If there are not enough readable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetBoolean | ( | long | index, |
| bool | value | ||
| ) |
Write the given boolean value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetByte | ( | long | index, |
| sbyte | value | ||
| ) |
Write the given byte value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetChar | ( | long | index, |
| char | value | ||
| ) |
Write the given 2 byte char value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetDouble | ( | long | index, |
| double | value | ||
| ) |
Write the given 8 byte double value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetFloat | ( | long | index, |
| float | value | ||
| ) |
Write the given 4 byte float value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetInt | ( | long | index, |
| int | value | ||
| ) |
Write the given 4 byte int value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetLong | ( | long | index, |
| long | value | ||
| ) |
Write the given 8 byte long value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetShort | ( | long | index, |
| short | value | ||
| ) |
Write the given 2 byte short value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetUnsignedByte | ( | long | index, |
| byte | value | ||
| ) |
Write the given unsigned byte value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetUnsignedInt | ( | long | index, |
| uint | value | ||
| ) |
Write the given 4 byte unsigned int value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetUnsignedLong | ( | long | index, |
| ulong | value | ||
| ) |
Write the given 8 byte unsigned long value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.SetUnsignedShort | ( | long | index, |
| ushort | value | ||
| ) |
Write the given 2 byte unsigned short value at the given location in the buffer backing store without modifying the write offset of this buffer.
| index | The index in the buffer where the write should occur |
| value | The value to be written at the specified index |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteBoolean | ( | bool | value | ) |
Writes the given boolean value into this buffer as a single byte and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteByte | ( | sbyte | value | ) |
Writes the given byte value into this buffer and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteDouble | ( | double | value | ) |
Writes the given eight byte double value into this buffer and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteFloat | ( | float | value | ) |
Writes the given four byte float value into this buffer and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteInt | ( | int | value | ) |
Writes the given four byte int value into this buffer and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteLong | ( | long | value | ) |
Writes the given eight byte long value into this buffer and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteShort | ( | short | value | ) |
Writes the given two byte short value into this buffer and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteUnsignedByte | ( | byte | value | ) |
Writes the given unsigned byte value into this buffer and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteUnsignedInt | ( | uint | value | ) |
Writes the given four byte unsigned int value into this buffer and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteUnsignedLong | ( | ulong | value | ) |
Writes the given eight byte unsigned long value into this buffer and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
| IProtonBuffer Apache.Qpid.Proton.Buffer.IProtonBufferAccessors.WriteUnsignedShort | ( | ushort | value | ) |
Writes the given two byte unsigned short value into this buffer and increases the write offset.
| value | The value to write into this buffer |
| IndexOutOfRangeException | If there are not enough writable bytes |
Implemented in Apache.Qpid.Proton.Buffer.ProtonCompositeBuffer, and Apache.Qpid.Proton.Buffer.ProtonByteBuffer.
|
getset |
Indexed access to single unsigned byte values within the buffer which does not modify the read or write index value. The given index must adhere to the same constraints as the get byte and set byte level APIs in this buffer class.
| i |
| IndexOutOfRangeException | If the index is negative or larger than buffer capacity |


Dr. Clockwork
Text me any question
@Model.Count
questions answered to date
Created By
Matt Ross
Mat McLoughlin
Macs Dickinson
@Each.Questions
Dr Clockwork
@Current.Answer
@Current.From
@!Current.Content
@EndEach