Auth--The Inductive Approach to Verifying Security Protocols
Cryptographic protocols are of major importance, especially with the
growing use of the Internet. This directory demonstrates the ``inductive
method'' of protocol verification, which is described in various
papers. The operational semantics of protocol participants is defined
inductively.
This directory contains proofs concerning
- three versions of the Otway-Rees protocol
- the Needham-Schroeder shared-key protocol
- the Needham-Schroeder public-key protocol (original and with Lowe's
modification)
- two versions of Kerberos: the simplified form published in the BAN paper
and also the full protocol (Kerberos IV)
- three versions of the Yahalom protocol, including a bad one that
illustrates the purpose of the Oops rule
- a novel recursive authentication protocol
- the Internet protocol TLS
- The certified e-mail protocol of Abadi et al.
Frederic Blanqui has contributed a theory of guardedness, which is
demonstrated by proofs of some roving agent protocols.
Larry Paulson,
lcp@cl.cam.ac.uk


Mainnet Connected page
Ropsten [TestNet] Connected page
Kovan [TestNet] Connected page
Rinkeby [TestNet] Connected page


Javascript-PLY loader
Reference:
(1)3D Computer Graphics - 3rd Edition by Alan Watt, pg. 5
(2)PLY specification
(3)Devon Govett's bmp.js
(4)Tool
(5)Samples
Controls:
(1) Magnification (slider range: 1 - 10 in Chrome).
(2) Click on an arrow to rotate 10 degrees increment.
Face count:
Rotate X:
Rotate Y:
Magnification:


Faction Status: Assets Page
This tab page of the Faction Status dialog shows information on the selected faction’s territory and entities.
- The Sites box shows an overview of the selected faction’s territory.
- Owned shows the number of map sites that belong to the selected faction.
- Unowned shows the number of map sites that either belong to another faction, or that can be captured but are currently unowned.
- Conquest shows the percentage of Owned sites relative to the sum of Owned and Unowned sites.
- The Entities box shows an overview of the selected faction’s entities.
- Units shows the number of units that belong to the selected faction, both placed and unplaced.
- Terrains shows the number of terrains that belong to the selected faction, both placed and unplaced.
- Upgrades shows the number of upgrades that the selected faction has obtained.
- Choose Show Units… (Alt+U), Show Terrain… (Alt+T), Show Upgrades… (Alt+G) to show the Faction Entities dialog for the selected faction and the corresponding entity category.
- The Home Site box shows the home site of the selected faction.
- Location shows the map coordinates of the home site, or (–,–) to indicate that the selected faction does not have a home site.
- Owner indicates the current owner of the home site, if any. “Same owner” indicates that the selected faction itself owns its home site.
- Choose Select Site (Alt+S) to center the Map View on the home site of the selected faction, and to make this location the new Selected Site. This button is disabled if there is no home site.
- See Faction Status for a description of other controls in this dialog.
Remarks
1. The Show Units/Terrains/Upgrades buttons are disabled if the selected faction has already been eliminated from the game. Also, most text boxes will show dashes in this case.
2. In games with limited visibility (“fog of war”), the Show Units/Terrains/Upgrades buttons are also disabled if the selected faction is not under your control.
3. The Show Upgrades button is also disabled if the current scenario does not define any upgrades.


Syntactical Duplication
DRY, or "Don't Repeat Yourself" mostly refers to business logic, and sometimes infrastructure logic. Business logic is things such as, "a free tier user can only have 10 dashboards". Infrastructure logic might be connection strings, queue deployment code, or how to generate an authentication token. Business and infrastructure logic can be encoded as a function, variable, or some other method. The important bit is that the "information" lives in one place. If it it is "repeated", maintainers might forget to update both locations.
However, there's another type of duplication: syntactic duplication. This is when a few lines of code may superficially share a few things. This came up recently when I was writing a simple Python script to clean up some data. The script spun-off a bunch of parallel processes. Each process would handle a chunk of the total files, and write to a local file with some ID. The below code would then combine all those sub-files together.
# Concat files together.
concat_files_by_pattern(r"E:\data\Japanese\train-ocr-*", r"E:\data\Japanese\train-ocr-data.txt")
concat_files_by_pattern(r"E:\data\Japanese\test-ocr-*", r"E:\data\Japanese\test-ocr-data.txt")
concat_files_by_pattern(r"E:\data\Japanese\eval-ocr-*", r"E:\data\Japanese\eval-ocr-data.txt")
concat_files_by_pattern(r"E:\data\Korean\train-ocr-*", r"E:\data\Korean\train-ocr-data.txt")
concat_files_by_pattern(r"E:\data\Korean\test-ocr-*", r"E:\data\Korean\test-ocr-data.txt")
concat_files_by_pattern(r"E:\data\Korean\eval-ocr-*", r"E:\data\Korean\eval-ocr-data.txt")
concat_files_by_pattern(r"E:\data\Chinese\train-ocr-*", r"E:\data\Chinese\train-ocr-data.txt")
concat_files_by_pattern(r"E:\data\Chinese\test-ocr-*", r"E:\data\Chinese\test-ocr-data.txt")
concat_files_by_pattern(r"E:\data\Chinese\eval-ocr-*", r"E:\data\Chinese\eval-ocr-data.txt")
As we can see, we can compress this with a for-loop.
for language in ["Japanese", "Korean", "Chinese"]:
concat_files_by_pattern(fr"E:\data\{language}\train-ocr-*", fr"E:\data\{language}\train-ocr-data.txt")
concat_files_by_pattern(fr"E:\data\{language}\test-ocr-*", fr"E:\data\{language}\test-ocr-data.txt")
concat_files_by_pattern(fr"E:\data\{language}\eval-ocr-*", fr"E:\data\{language}\eval-ocr-data.txt")
Not bad. Let's go further.
for language in ["Japanese", "Korean", "Chinese"]:
for dataset in ["train", "test", "eval"]:
concat_files_by_pattern(fr"E:\data\{language}\{dataset}-ocr-*", fr"E:\data\{language}\{dataset}-ocr-data.txt")
We've went from 9 lines of code to 3. Less code might be appealing, and it may look more aesthetically pleasing. People generally like patterns. But did we really make the code simpler, more maintainable, or more readable? We've traded 9 lines of code, but now we have a doubly nested for-loop, as well as string interpolation. This particular example still feels like an improvement, but reducing syntactical duplication isn't always an improvement. It has to be worked out in code review by multiple sets of eyes, and even then, it's still somewhat subjective.
Because DRY is abused so much, we've come up with comebacks such as "The Rule of Three", "WET code", "prefer duplication over the wrong abstraction", and many more. I wonder how many times those retorts were referring to syntactical duplication.


MAC-Filtering
1
Step 1
2
Step 2
3
Step 3
4
Step 4
Step 1
Hostname
Domain/Zone
local.home <IP_ADDRESS>/24
fritz.box <IP_ADDRESS>/24
IP-Address
MAC-Address
Lease_Time
Step 2
Operating System
Debian
CentOS
Version
Prev
Next
Step 3
Skills
Comment
Prev
Next
Step 4
Prev
Finish!
#
MAC Address
Host Name
IP Address
Lease
Operating
{% for d in dhcp_hosts %}
{{ loop.index }}
{{ d[0] }}
{{ d[1] }}
{{ d[2] }}
{{ d[3] or '' }}
Edit
|
{{st_msg}}
|
Delete
{# Editable status #}
{{ loop.index }}
Save
|
Cancel
{% endfor %}


Unicode library for C++ by Ross Smith
#include "unicorn/regex.hpp"
This module provides Unicode-aware regular expressions, and related classes and functions. It calls the widely available PCRE (Perl Compatible Regular Expressions) library. Unicorn's regexes use the 8 bit version of the PCRE library, which must have been built with the optional UTF-8 support enabled (PCRE can also be built as 16 and 32 bit libraries, but these are not used by Unicorn). The module currently uses the traditional version of PCRE; at some point I intend to convert it to use PCRE2 instead.
Refer to the PCRE documentation for details of the regular expression syntax.
Although the regex functions in this module are specified in terms of
Ustring
arguments, Unicorn regexes support both UTF-8 and byte oriented
matching. Byte regexes (selected with the Regex::byte
flag) simply treat a
string as a sequence of arbitrary bytes, with no assumptions about content
encoding, and will work with non-Unicode strings. The \xHH
escape code
(where H is a hexadecimal digit) always matches a single byte even if the
value is greater than \x7f
(in a UTF-8 regex this would match a multibyte
encoded character); the \x{hex}
escape code can still be used, but it will
be treated as a syntax error if the value is greater than \x{ff}
.
It would have been convenient to use standard C++11 regular expressions in Unicorn, in the same way as the standard string classes have been used instead of creating a new custom string class specific to Unicorn. Unfortunately, this turns out to be impractical; for several reasons, standard regular expressions are inadequate for use with generalized Unicode strings.
The most obvious reason is that standard C++ regexes are not actually required
to support Unicode strings at all. Unlike std::basic_string
, for which
specializations for 8, 16, and 32 bit characters are required to exist, only
two specializations of std::basic_regex
are mandated, for char
(the
system's native multibyte encoding, which may or may not be UTF-8, but see
below for a caveat on this) and wchar_t
(the system's wide character
encoding, which can reasonably be expected to be either UTF-16 or UTF-32, but
which one varies with the OS). In short, standard regexes can only be relied
on to support one of the three UTF encodings, and we don't know which one.
(Strictly speaking, not even that is required; the C++ standard does not actually require the wide character encoding to be UTF-16 or 32. It is on all systems I know of, though, and the Unicorn library explicitly does not support systems on which it is not one of those.)
An implementation is allowed to instantiate std::basic_regex
for other
character types, but in practise most do not, and in any case even an
implementation that supplied specializations for all four character types
would still not be reliably usable with UTF-8 (since the plain char
encoding
is not guaranteed to be UTF-8).
The second problem with standard regexes is that, by the rules of the C++
standard, they cannot properly support UTF-8 strings. The regex grammar
(based on that of JavaScript/EcmaScript, with a few changes) matches on an
element by element basis; a "character", as far as regex matching is
concerned, is a single code unit, not a Unicode scalar value (which may be
represented by more than one code unit). This still allows literal matching of
multi-unit UTF-8 characters (the encoding will be the same in the regex and
the subject string, so they will match unit for unit), but makes it impossible
to match multi-unit characters to non-literal regex elements; for example,
std::regex(".")
will not match u8"€"
(even if the system encoding is
UTF-8). For the same reason, it is impossible to specify a character range
that includes multibyte characters (e.g. std::regex(u8"[À-ÿ]")
will not do
what you probably expected).
Finally, standard regexes don't support the \p{...}
and \P{...}
character
classes, which match on Unicode properties. This may be a minor obstacle
compared to either of the above showstoppers, but even by itself it would be a
serious handicap in a library dedicated to Unicode support.
For all of the above reasons, I felt I had no choice but to abandon standard C++ regexes, and base Unicorn's regular expressions on the widely used PCRE library instead.
| Flag | Description | PCRE equivalent |
|---|---|---|
Regex:: byte |
Match in byte mode instead of UTF-8 | ~PCRE_UTF8 |
Regex:: caseless |
Matching is case insensitive | PCRE_CASELESS |
Regex:: dfa |
Use the alternative DFA matching algorithm | pcre_dfa_exec() |
Regex:: dollarnewline |
$ may match line breaks preceding the end of the string |
~PCRE_DOLLAR_ENDONLY |
Regex:: dotinline |
. does not match line breaks |
~PCRE_DOTALL |
Regex:: extended |
Free-form mode; ignore whitespace and comments marked with # |
PCRE_EXTENDED |
Regex:: firstline |
Any match must start in the first line of the subject string | PCRE_FIRSTLINE |
Regex:: multiline |
Multiline mode; ^ and $ match the beginning and end of each line |
PCRE_MULTILINE |
Regex:: newlineanycrlf |
Any of CR, LF, or CR+LF is recognised as a line break | PCRE_NEWLINE_ANYCRLF |
Regex:: newlinecr |
Only CR is recognised as a line break | PCRE_NEWLINE_CR |
Regex:: newlinecrlf |
Only CR+LF is recognised as a line break | PCRE_NEWLINE_CRLF |
Regex:: newlinelf |
Only LF is recognised as a line break | PCRE_NEWLINE_LF |
Regex:: noautocapture |
Parentheses do not automatically capture; only named captures are recorded | PCRE_NO_AUTO_CAPTURE |
Regex:: nostartoptimize |
Disable some optimizations that affect (*COMMIT) and (*MARK) handling |
PCRE_NO_START_OPTIMIZE |
Regex:: notbol |
Do not match ^ at the start of the subject string |
PCRE_NOTBOL |
Regex:: notempty |
Do not match an empty string | PCRE_NOTEMPTY |
Regex:: notemptyatstart |
Do not match an empty string at the start of the subject string | PCRE_NOTEMPTY_ATSTART |
Regex:: noteol |
Do not match $ at the end of the subject string |
PCRE_NOTEOL |
Regex:: noutfcheck |
Skip UTF validity checks (ignored in byte mode) | PCRE_NO_UTF8_CHECK |
Regex:: optimize |
Optimize the regex using PCRE's JIT compiler | PCRE_STUDY_JIT_COMPILE |
Regex:: partialhard |
Hard partial matching; prefer a partial match to a full match | PCRE_PARTIAL_HARD |
Regex:: partialsoft |
Soft partial matching; prefer a full match to a partial match | PCRE_PARTIAL_SOFT |
Regex:: prefershort |
Quantifiers are non-greedy in NFA mode; prefer shorter matches in DFA mode | PCRE_UNGREEDY,PCRE_DFA_SHORTEST |
Regex:: ucp |
Backslash-escape character sets use Unicode properties, instead of just ASCII | PCRE_UCP |
Flags controlling regular expression matching behaviour. These are members of
the Regex
class but documented here for convenience. Most of these
correspond directly to PCRE flags, but note that all flags must be specified
when the regex is constructed (unlike PCRE, where some flags can be set at
execution time).
Note that some of the flags (Regex::byte
, Regex::dollarnewline
, and
Regex::dotinline
) have the reverse sense to the corresponding PCRE flags
(PCRE_UTF8
, PCRE_DOLLAR_ENDONLY
, and PCRE_DOTALL
, respectively). This is
simply because I felt that the reversed state was the more natural default in
these cases.
The four line breaking flags (Regex::newlineanycrlf
, Regex::newlinecr
,
Regex::newlinecrlf
, and Regex::newlinelf
) also affect the behaviour of the
\R
escape code, which matches any of CR, LF, or CR+LF if any of these flags
are set (this corresponds to the PCRE_BSR_ANYCRLF
flag). The default
behaviour, if none of these is set, recognises any Unicode line break (LF, VT,
FF, CR, CR+LF, U+0085 NEXT LINE
, U+2028 LINE SEPARATOR
, and U+2029
PARAGRAPH SEPARATOR
; the last three are not recognised in byte mode),
corresponding to the PCRE_NEWLINE_ANY
and PCRE_BSR_UNICODE
flags.
All regex constructors, and any functions that take a pattern and flags and
implicitly construct a regex, will throw std::invalid_argument
if the flags
supplied are inconsistent:
Regex::newlineanycrlf
, Regex::newlinecr
, Regex::newlinecrlf
, and Regex::newlinelf
may be used.Regex::byte
can only be used with 8-bit strings.Regex::byte
and Regex::ucp
may not be combined.Regex::notempty
and Regex::notemptyatstart
may not be combined.Regex::partialhard
and Regex::partialsoft
may not be combined.Caution: If you use the Regex::noutfcheck
flag, be careful about
sanitizing your strings; behaviour is undefined if this flag is present and
any regex pattern, subject string, or format string is not valid Unicode.
Formatting strings are used in the format()
and extract()
methods of
Regex
and RegexFormat
, to generate a modified string by using a regex to
match substrings in the original subject string, and then replacing each
matching substring with a new one generated from the format string.
Most characters in a format string are taken literally. If a format string
does not contain any $
or \
escape characters, each match will simply be
replaced by the format string without further processing.
The following escape codes are recognised in a format string:
| Code | Description |
|---|---|
$0 , $& |
The complete match |
$number , ${number} , \digit |
Capture group, identified by number |
$name , ${name} |
Capture group, identified by name |
$- |
The first non-empty capture group |
$+ |
The last non-empty capture group |
$< |
The text between the previous match and this one |
$> |
The text between this match and the next one |
$[ |
The text before the current match |
$] |
The text after the current match |
$_ |
The complete subject string |
\xHH , \x{HHH...} |
Unicode character, identified by hexadecimal code point |
\0 |
Null character (\x00 ) |
\a |
Alert character (\x07 ) |
\b |
Backspace character (\x08 ) |
\t |
Horizontal tab character (\x09 ) |
\n |
Line feed character (\x0a ) |
\v |
Vertical tab character (\x0b ) |
\f |
Form feed character (\x0c ) |
\r |
Carriage return character (\x0d ) |
\e |
Escape character (\x1b ) |
\l |
Convert the next character to lower case |
\u |
Convert the next character to upper case |
\L...\E |
Convert the delimited text to lower case |
\T...\E |
Convert the delimited text to title case |
\U...\E |
Convert the delimited text to upper case |
\Q...\E |
Copy the delimited text literally, ignoring all escape codes except \E |
$$ , \$ |
Literal dollar sign |
$\ , \\ |
Literal backslash |
Braces are only needed around a capture group number or name prefixed with $
if it is immediately followed by a literal digit or letter that would
otherwise be interpreted as part of the group number or name, or, for named
groups, if the name contains characters that are not alphanumeric. In the
\digit
form, the group number must be a single digit from 1 to 9. The $-
and $+
codes will be replaced with empty strings if there are no non-empty
captures.
The $<
, $>
, $[
, $]
, and $_
codes are mostly useful with the
extract()
method rather than format()
, since format()
copies the
unmatched parts of the subject string anyway. If this is the first match in
the subject string, $<
starts at the beginning of the string; if this is the
last match, $>
runs to the end of the string. If there is only one match,
$<
and $>
are the same as $[
and $]
.
If the number of matches is limited (by setting the n
argument in the
extract()
or format()
functions), unhandled matches are not counted; $>
runs from the end of the last handled match to the end of the subject string,
regardless of whether or not there would have been any more matches if n
had
been larger.
If a $
or \
escape prefix is followed by an unrecognised second character,
the escape character is discarded and the second character is copied literally
into the output string.
When the case conversion codes (\[luLTU]
) are used with byte mode regexes,
only ASCII characters will be converted.
If the format string contains \x{HHH...}
escape codes, an EncodingError
exception will be thrown if the hexadecimal number is not a valid Unicode
scalar value or, for byte mode regexes, if it is greater than 0xff
.
class
RegexError
: public std::runtime_error
RegexError::
RegexError
(int error, const Ustring& pattern, const Ustring& message = "")
int RegexError::
error
() const noexcept
const char* RegexError::
pattern
() const noexcept
This is thrown from a regex constructor or matching function when the underlying PCRE call reports an error.
class
Regex
The regular expression class.
Regex::
Regex
()
explicit Regex::
Regex
(const Ustring& pattern, uint32_t flags = 0)
Regex::
Regex
(const Regex& r)
Regex::
Regex
(Regex&& r) noexcept
Regex::
~Regex
() noexcept
Regex& Regex::
operator=
(const Regex& r)
Regex& Regex::
operator=
(Regex&& r) noexcept
Life cycle functions. The default constructor is equivalent to construction
from an empty pattern. The second constructor will throw
std::invalid_argument
if an invalid combination of flags is passed, or
RegexError
if the pattern is invalid. See above for full details of how the
flags are interpreted.
Match Regex::
anchor
(const Ustring& text, size_t offset = 0) const
Match Regex::
anchor
(const Utf8Iterator& start) const
Match Regex::
match
(const Ustring& text, size_t offset = 0) const
Match Regex::
match
(const Utf8Iterator& start) const
Match Regex::
search
(const Ustring& text, size_t offset = 0) const
Match Regex::
search
(const Utf8Iterator& start) const
Match Regex::
operator()
(const Ustring& text, size_t offset = 0) const
Match Regex::
operator()
(const Utf8Iterator& start) const
These are the regex matching functions. The search()
functions return a
successful match if the pattern matches anywhere in the subject string;
anchor()
matches only at the start of the subject string; match()
is
successful only if the pattern matches the complete string. The function call
operators are equivalent to search()
.
These functions can accept a starting offset into the subject string as either an integer (interpreted as an offset in code units), or a UTF iterator for Unicode regexes. The subject string itself is not explicitly required in the second version, since it can be obtained from the iterator. When a nonzero offset is passed, or an iterator that does not point to the beginning of the string, the search begins at the specified point in the string, but the text preceding it will still be taken into account in lookbehind assertions.
All of these will throw RegexError
if anything goes wrong (this will be rare
in practise since most errors will have been caught when the regex was
constructed, but a few kinds of regex error are not detected by PCRE until
execution time).
Caution: Behaviour is undefined if you use the UTF iterator versions of these functions with a byte mode regex.
size_t Regex::
count
(const Ustring& text) const
Returns the number of non-overlapping matches found in the text.
bool Regex::
empty
() const noexcept
True if the pattern is empty.
Ustring Regex::
extract
(const Ustring& fmt, const Ustring& text, size_t n = npos) const
Ustring Regex::
format
(const Ustring& fmt, const Ustring& text, size_t n = npos) const
The format()
function uses the formatting string to transform the text,
replacing the first n
matching substrings (all of them by default) with the
corresponding reformatted text, and returning the resulting string. The
extract()
function also copies the first n
matching substrings, applying
formatting in the same way as format()
, but discards the unmatched text
between matches.
MatchRange Regex::
grep
(const Ustring& text) const
This returns a range object that can be used to iterate over all matches
within the subject string. Refer to the MatchIterator
class (below) for
further details.
size_t Regex::
groups
() const noexcept
Returns the number of groups in the regex (the number of parenthesized captures, plus one for the complete match).
size_t Regex::
named
(const Ustring& name) const noexcept
If the regex includes any named captures, this returns the group index (1 based) corresponding to the given name. It will return zero if there is no capture by that name (or if the regex does not use named captures).
Ustring Regex::
pattern
() const
uint32_t Regex::
flags
() const noexcept
These return the construction arguments.
SplitRange Regex::
split
(const Ustring& text) const
This returns a range object that can be used to iterate over the substrings
delimited by matches within the subject string, effectively splitting the
string using regex matches as delimiters. Refer to the SplitIterator
class
(below) for further details.
void Regex::
swap
(Regex& r) noexcept
void
swap
(Regex& lhs, Regex& rhs) noexcept
Swap two regex objects.
template <typename F> Ustring Regex::
transform
(const Ustring& text, F f, size_t n = npos) const
template <typename F> void Regex::
transform_in
(Ustring& text, F f, size_t n = npos) const
Apply a user supplied transformation to each match (or the first n
matches)
in the text. Each match m
in text
is replaced by f(m)
. The
transformation function can take either a string
or a Match
as its
argument, but must return a string
(or something convertible to a string
).
static Ustring Regex::
escape
(const Ustring& str)
Returns a copy of the argument string, modified by inserting escape characters
where necessary to produce a pattern that will exactly match the original
string and nothing else. (You can get the same effect by enclosing the text in
"\Q...\E"
delimiters, provided the text does not contain "\E"
.)
Version Regex::
pcre_version
() noexcept
Version Regex::
unicode_version
() noexcept
These returns the version of PCRE used to build this library, and the PCRE library's version of Unicode (because the PCRE library is built separately, this is not guaranteed to be the same as the version used by the rest of the Unicorn library).
bool
operator==
(const Regex& lhs, const Regex& rhs) noexcept
bool
operator!=
(const Regex& lhs, const Regex& rhs) noexcept
bool
operator<
(const Regex& lhs, const Regex& rhs) noexcept
bool
operator>
(const Regex& lhs, const Regex& rhs) noexcept
bool
operator<=
(const Regex& lhs, const Regex& rhs) noexcept
bool
operator>=
(const Regex& lhs, const Regex& rhs) noexcept
Comparison operators. The order is approximately based on the pattern text, but should be treated as an arbitrary order; the flags are also taken into account. If two regexes are semantically the same (i.e. always match or fail to match the same text) despite differing slightly in spelling, it is unspecified whether or not they will compare equal.
namespace
Literals
Regex
operator"" _re
(const char* ptr, size_t len)
Regex
operator"" _re_b
(const char* ptr, size_t len)
- Byte modeRegex
operator"" _re_i
(const char* ptr, size_t len)
- Case insensitiveRegex literals.
class
Match
This class is returned by regex matching functions, reporting the result of the matching attempt.
Match::
Match
()
Match::
Match
(const Match& m)
Match::
Match
(Match&& m) noexcept
Match::
~Match
() noexcept
Match& Match::
operator=
(const Match& m)
Match& Match::
operator=
(Match&& m) noexcept
Life cycle functions. Normally a match object will be returned by a regex matching function rather than directly constructed by the user.
bool Match::
empty
() const noexcept
True if the match failed or matched an empty string.
Ustring Match::
first
() const
Ustring Match::
last
() const
These return the first and last non-empty capture groups (not counting the complete match), or empty strings if there are no such groups.
bool Match::
full_or_partial
() const noexcept
bool Match::
partial
() const noexcept
The partial()
function is true if a partial match was detected, while
full_or_partial()
is true if either a full or partial match was detected.
These are only meaningful if one of the Regex::partialhard
or
Regex::partialsoft
options was selected when the original regex was
compiled; otherwise, partial()
is always false and full_or_partial()
is
equivalent to matched()
.
size_t Match::
groups
() const noexcept
The number of groups in the match (the number of captures, plus one for the complete match).
bool Match::
matched
(size_t i = 0) const noexcept
explicit Match::
operator bool
() const noexcept
bool Match::
operator!
() const noexcept
The matched()
function indicates whether a capture group, identified by
number, was matched; by default, it indicates whether the match as a whole was
successful. The boolean conversion is equivalent to matched(0)
.
size_t Match::
offset
(size_t i = 0) const noexcept
size_t Match::
endpos
(size_t i = 0) const noexcept
size_t Match::
count
(size_t i = 0) const noexcept
These return the starting position, end position, and size of the match, or of
a specific capture group. These are measured in code units (not characters)
from the start of the subject string. If the match was unsuccessful, or if the
index refers to a group that does not exist in the regex or was not included
in the match, the two offsets will both be npos
and the size will be zero.
Ustring::const_iterator Match::
s_begin
(size_t i = 0) const noexcept
Ustring::const_iterator Match::
s_end
(size_t i = 0) const noexcept
Irange<Ustring::const_iterator> Match::
s_range
(size_t i = 0) const noexcept
Utf8Iterator Match::
u_begin
(size_t i = 0) const noexcept
Utf8Iterator Match::
u_end
(size_t i = 0) const noexcept
Irange<Utf8Iterator> Match::
u_range
(size_t i = 0) const noexcept
These return iterators (string or UTF) over the characters within a match. The
default versions return iterators bracketing the complete match; if the index
argument is not zero, the iterators mark the corresponding numbered capture
group. If the index corresponds to a group that was not matched, or if the
match itself was unsuccessful, begin()
and end()
will return the same
iterator (its value is otherwise unspecified).
Caution: If the match was returned by a byte-mode regex, be careful to always use the string iterators and not the UTF iterators, which are not meaningful when the string is not being interpreted as UTF-8. Behaviour is undefined in this situation.
Ustring Match::
str
(size_t i = 0) const
Ustring Match::
named
(const Ustring& name) const
Ustring Match::
operator[]
(size_t i) const
Match::
operator Ustring
() const
The str()
and named()
functions return a copy of the substring matched by
a numbered or named group, or an empty string if the group does not exist or
was not matched (note that an empty string can also be the result of a
legitimate match). The index operator is equivalent to str(i)
; the string
conversion operator is equivalent to str(0)
, which returns the complete
match.
void Match::
swap
(Match& m) noexcept
void
swap
(Match& lhs, Match& rhs) noexcept
Swap two match objects.
class
RegexFormat
The regex format class contains both a regex and a format string. It provides
operations equivalent to the Regex::format()
function, but compiling the
format string only once by constructing a regex format object will be more
efficient if the same formatting operation is going to be applied many times.
RegexFormat::
RegexFormat
()
RegexFormat::
RegexFormat
(const Regex& pattern, const Ustring& format)
RegexFormat::
RegexFormat
(const Ustring& pattern, const Ustring& format, uint32_t flags = 0)
RegexFormat::
RegexFormat
(const RegexFormat& f)
RegexFormat::
RegexFormat
(RegexFormat&& f) noexcept
RegexFormat::
~RegexFormat
() noexcept
RegexFormat& RegexFormat::
operator=
(const RegexFormat& f)
RegexFormat& RegexFormat::
operator=
(RegexFormat&& f) noexcept
Life cycle functions. The object is constructed from a regex (supplied either as a precompiled regex or a pattern and flag set) and a format string. The third constructor can throw the same exceptions as the corresponding regex constructor.
Ustring RegexFormat::
format
(const Ustring& text, size_t n = npos) const
Ustring RegexFormat::
extract
(const Ustring& text, size_t n = npos) const
Ustring RegexFormat::
operator()
(const Ustring& text, size_t n = npos) const
The format()
function (and the equivalent function call operator) uses the
formatting string to transform the text, replacing the first n
matching
substrings (all of them by default) with the corresponding reformatted text,
and returning the resulting string. The extract()
function copies only the
first n
matches, discarding the unmatched text between them.
RegexFormat(regex,fmt).format(text)
is equivalent to
regex.format(fmt,text)
, and similarly for extract()
.
Regex RegexFormat::
regex
() const
Ustring RegexFormat::
format
() const
Ustring RegexFormat::
pattern
() const
uint32_t RegexFormat::
flags
() const noexcept
These functions query the construction parameters. The pattern()
and
flags()
functions are equivalent to regex().pattern()
and
regex().flags()
.
void RegexFormat::
swap
(RegexFormat& r) noexcept
void
swap
(RegexFormat& lhs, RegexFormat& rhs) noexcept
Swap two objects.
class
MatchIterator
using MatchIterator::
difference_type
= ptrdiff_t
using MatchIterator::
iterator_category
= std::forward_iterator_tag
using MatchIterator::
pointer
= const Match*
using MatchIterator::
reference
= const Match&
using MatchIterator::
value_type
= Match
MatchIterator::
MatchIterator
()
MatchIterator::
MatchIterator
(const Regex& re, const Ustring& text)
using
MatchRange
= Irange<MatchIterator>
An iterator over the (non-overlapping) matches found within a subject string
for a given regex. These are normally returned by Regex::grep()
rather than
constructed directly by the user.
class
SplitIterator
using SplitIterator::
difference_type
= ptrdiff_t
using SplitIterator::
iterator_category
= std::forward_iterator_tag
using SplitIterator::
pointer
= const Ustring*
using SplitIterator::
reference
= const Ustring&
using SplitIterator::
value_type
= Ustring
SplitIterator::
SplitIterator
()
SplitIterator::
SplitIterator
(const Regex& re, const Ustring& text)
using
SplitRange
= Irange<SplitIterator>
An iterator over the substrings between matches for a given regex. These are
normally returned by Regex::split()
rather than constructed directly by the
user.


{% extends "withnav_template.html" %} {% from "components/file-upload.html" import file_upload %} {% from "components/page-header.html" import page_header %} {% from "govuk_frontend_jinja/components/back-link/macro.html" import govukBackLink %} {% block service_page_title %} {{ form.logo.label.text }} {% endblock %} {% block backLink %} {{ govukBackLink({"href": back_link }) }} {% endblock %} {% block maincolumn_content %} {{ page_header(form.logo.label.text) }}
Your logo must be:
We do not recommend portrait images because they’ll look very small. This is because the space for email branding has a fixed height.
{{ file_upload(form.logo, allowed_file_extensions=[form.EXPECTED_LOGO_FORMAT], button_text='Upload logo') }}


« CSS « CSS Reference
The visibility
CSS property is used for two things:
hidden
value hides an element but leaves space where it would have been. collapse
value hides rows or columns of a table. It also collapses XUL elements.visible
visual
visibility: visible | hidden | collapse |
inherit
visibility:visible
(this doesn't work in IE up to version 7).
display
: none
were applied to the column/row of the table). However, the size of other rows and columns is still calculated as though the cells in the collapsed row(s) or column(s) are present. This was designed for fast removal of a row/column from a table without having to recalculate widths and heights for every portion of the table. For XUL elements, the computed size of the element is always zero, regardless of other styles that would normally affect the size, although margins still take effect. For other elements, collapse
is treated the same as hidden
.p { visibility: hidden; } /* paragraphs won't be visible */ p.showme { visibility: visible; } /* except of these with class showme */ tr.col { visibility: collapse; } /* table rows with class col will collapse */
The support for visibility:collapse
is missing or partially incorrect in some modern browsers. In many cases it may not be correctly treated like visibility:hidden
on elements other than table rows and columns.
visibility:collapse
may change the layout of a table if the table has nested tables within the cells that are collapsed, unless visibility:visible
is specified explicitly on nested tables.
| Browser | Lowest version |
|---|---|
| Internet Explorer | 4.0 |
| Firefox (Gecko) | 1.0 (1.0) |
| Opera | 4.0 |
| Safari (WebKit) | 1.0 (85) |


About
Hi, I'm Amjith, the author of pgcli.
If you have feedback about pgcli, this site or general python questions, feel free to contact me.
I'll try my best to answer you.
Responsibility
I will:
- Be nice.
- Be courteous.
- Be respectful.
- Have an open mind.
- Never be condescending.
- Never discriminate (even if you like Emacs and Java).
If I ever fail one of the tenets above, please let me know. After all, I am human.
Exception:
There is one exception.
I don't react well when someone is being aggressive or insulting.
Caveats:
English is not my native tongue.
I don't fully grasp most colloquial slangs, but it never stops me from using it ;).
Here's an example, until very recently I thought 'pretty good' meant 'very good'. So I would compliment my friends that they did a 'pretty good' job without knowing that I was mildly insulting them. I'm told 'pretty good' means not quite good enough or there is room for improvement.
I think I'm funny (no, I think I'm hilarious). Sometimes that might come across negatively without proper context. If anything I say offends you, please let me know.
But this is not a cop out, I'd still appreciate if you call me out when I make a faux pas.


(Deprecated API)
(Deprecated API)
Includes enterprise licensing and support
Note: Before proceeding with this tutorial, make sure you've installed the Maps API for Flash SDK and obtained a Maps API key as indicated in Setting Up Your Development Environment.
This section discusses how to obtain and set up Adobe FlexBuilder, how to reference the Google Maps API for Flash library, and how to set up your development environment to get you ready to program in ActionScript and build your first Google Maps API for Flash map using Adobe's FlexBuilder IDE.
Note: If you wish to use the Free Flex SDK, see the Flex SDK Tutorial instead.
Incorporating Google Maps into your Flex application requires requires understanding not only ActionScript code but Flex MXML files. This tutorial illustrates how to get a map application up and running within FlexBuilder —Adobe's IDE for Flex development — available at the following URL:
http://www.adobe.com/products/flex/features/flex_builder/
This tutorial assumes you have purchased and set up the FlexBuilder application.
Before you begin coding your application, you should first set up a project within FlexBuilder. To do so, follow these simple steps:
Click Finish and your project will be created. FlexBuilder will also automatically
create a template MXML
file, as shown below:
Before you can compile your code, you will need to link it to the Google Maps API for Flash SWC file. To do so, select Project->Properties. A Properties dialog box will appear for your project. Click on Flex Build Path and then select the Library Path tab:
Click Add SWC... within the Library Path pane. An Add SWC dialog box
will appear. Navigate to the location where you saved the Google Maps API for Flash SDK and
select the appropriate lib/map_flex_*.swc
file and click OK. (Note: Make sure you select the correct SWC. FlexBuilder will not
be able to use the non-Flex SWC library.) Your dialog box should now look like the following:
Click OK. FlexBuilder will update your project and return you to the Flex Development Perspective showing your skeleton MXML file.
You may wish to test compilation of your skeleton MXML file at this point to ensure your development environment is working correctly.
New! The Google Maps API for Flash now offers
native support for the com.google.maps.Map
object within Flex. You no
longer need to extend the Map
class to define your Map application class,
and you can use a Map component directly within Flex.
Flex applications are defined within MXML
declarations. Generally, you
should provide these MXML
application definitions in the root of your
source code directory. By default, FlexBuilder creates a src
directory
within your project to place source code, and MXML files should reside at the root
of that directory.
Create a new MXML file by selecting File->New->MXML Application. name the MXML
file HelloWorld.mxml
. We'll fill in this skeletal MXML application in the
following sections.
Components that extend any existing Google Maps API for Flash components should generally be provided as ActionScript files within a unique namespace. Google recommends that you use a namespace which you own to prevent collisions with other applications; this is especially important if you will have many developers working on multiple flash applications at the same time. Using namespaces also allows you to bundle your application code into packages, which allow easier sharing of common code.
Packages and namespaces should be defined using your
top level domain, your organization domain, and sub-domain. For example, the Google Maps namespace is defined
as com.google.maps
and an examples
package within that namespace would be defined
as com.google.maps.examples
. You can then use this namespace to implicitly define the directory
structure of your application (e.g. com/google/maps/examples/
).
You use this namespace to define a package within your ActionScript code,
and to define your application within the MXML
declaration. Generally,
ActionScript code (*.as
files) reside within the bottommost directory
of whatever namespace is defined, while the MXML declarations (*.mxml
files)
reside at the "root" of the directory structure.
The easiest way to start learning about the Google Maps API for Flash is to see a simple example. In this tutorial, using FlexBuilder we'll create a simple MXML file, add some ActionScript code, compile that file into a SWF file using the Flex SDK, and launch the file for visual inspection.
The MXML declaration defines UI elements within a Flex application, while embedded
ActionScript code within the <mx:Script>
tag defines actions on those UI
elements. In the simplest case, you simply declare a com.google.maps.Map
object within MXML and initialize the map with ActionScript code:
Modify your HelloWorld.mxml
file until it appears as shown below. We'll
walk through and explain the code within this file.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%" key="your_api_key" sensor="true_or_false"/> <mx:Script> <![CDATA[ import com.google.maps.LatLng; import com.google.maps.Map; import com.google.maps.MapEvent; import com.google.maps.MapType; private function onMapReady(event:Event):void { this.map.setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE); } ]]> </mx:Script> </mx:Application>
This example is located at gmaps-samples-flash.googlecode.com/svn/trunk/examples/HelloWorld.html. (MXML source is located here.) Note that you'd need to build your own SWF file, with your own API key, for this example to appear on your website.
Even in this simple example, there are several things to note:
<mx:Application>
to hold all of our code,
as is required for Flex applications. Within this <mx:Application>
object,
we declare an mx
namespace to reference the standard Flex components.Map
object as a child of the <mx:Application>
and define a maps
namespace to reference code from com.google.maps.*
. We also
define parameters including an id
, a mapevent_mapready
handler,
an API key
, and a sensor
state. These parameters will be explained later.<mx:Script>
object.mapevent_mapready
event.These steps are explained in more detail below.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
Google Maps Flash applications require not only ActionScript code but also a
user interface framework to display the map and any associated UI elements on a web page. Within
the Flex framework, these UI components are specified within an MXML
declaration. An
MXML declaration consists of a configuration file with the .mxml
suffix. This
MXML
file commonly resides in the root of your ActionScript development
directory.
To display your Flash map on a webpage, you will need at least one MXML declaration.
All MXML declarations require a root <mx:Application>
component.
Additionally, the <mx:Application> also registers the mx
prefix
to reference standard Flex components.
Note that MXML declarations can be quite complex, and the layout of UI components within an MXML declaration is beyond the scope of this documentation. For more information, see the provided examples and consult the Flex SDK documentation.
<maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%" key="your_api_key" sensor="true_or_flase/>
The Google Maps API for Flash now includes native support for the Map
object defined within the com.google.maps.*
package. We add a Map
here as a child of the <mx:Application>
, define its namespace as
maps
(linking it to the com.google.maps.*
code), set an id
which we can reference the map from within the ActionScript code, and define a
mapevent_mapready
handler. (See Event Handling below.)
The <maps:Map>
declaration also specifies width
and height
parameters to define how the Map will appear within the application. More importantly, the MXML
declaration acts as a convenient location to place your unique API key
.
<mx:Script> <![CDATA[ // ActionScript Code ]]> </mx:Script>
Maps within the Google Maps API for Flash are manipulated using ActionScript 3.0 code. This tutorial will not attempt to teach the nuances of ActionScript. Online tutorials on ActionScript are available at the following locations:
The <mx:Script>
object is a Flex component that holds a reference to the
ActionScript code. Because MXML is a variant of XML, we also need to inform the MXML parser
to ignore the ActionScript code within this file through use of the <![CDATA[
and ]]>
delimiters.
Note: you may instead wish to provide your ActionScript
within separate ActionScript (*.as
) files. If you do so, you can reference the
ActionScript file by including a source
parameter in the <mx:Script>
tag:
<mx:Script> source="HelloWorld.as"></mx:Script>
Placing code within separate files often makes sense if you have large or complex applications. However, within this document base, we will show all code inline within MXML declarations for simplicity.
import com.google.maps.LatLng; import com.google.maps.Map; import com.google.maps.MapEvent; import com.google.maps.MapType;
ActionScript libraries are imported with the import
declaration. In the sample
code above, we import several Google Maps Flash libraries.
You should ensure that you import libraries for types that you use within your sample code.
We recommend that you import only those classes you need. In most of the examples within
this documentation, we structure our code so that the <mx:Application>
does not use Flex UI components. Doing so provides a basic lightweight map. Note that
including any Flex libraries may substantially increase the size of your SWF files,
even if you only need one particular Flex component (such as a button).
ActionScript, like JavaScript, is an event-driven programming language. Interactions with users within Flash objects are handled by registering event listeners on objects for specific events.
In the code snippet in the previous section, the Map
declaration added
an event listener to the Map
object for the MapEvent.MAP_READY
event
through the use of the special parameter mapevent_mapready
. This event handler
acts as the "hook" for initialization of the Google Maps API for Flash application.
When the map receives that event, it calls the onMapReady
function,
which is shown below.
function onMapReady(event:MapEvent):void { setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE); }
This onMapReady()
function passes an event
parameter of type
MapEvent
(which is ignored in this case) and then calls setCenter()
using the given parameters (which define a location, a zoom level, and the type of map to show).
In general, it is good to "initialize" your map in such a manner by intercepting and handling the
MapEvent.MAP_READY
event. Events are discussed in more detail within the
Map Events section of the Google Maps Flash documentation.
Note: You may also initialize your map by intercepting and
handling the MapEvent.MAP_PREINITIALIZE
event instead. For information on this
event, see the discussion of MapOptions
.
Events are discussed in more detail within the Map Events section of the Google Maps Flash documentation.
We now have a HelloWorld.mxml
within our source's root directory and
ActionScript code within that file's <mx:Script>
object. We are ready to
compile our code into a SWF (Shockwave Flash) file. We can do so dirctly within FlexBuilder.
To execute FlexBuilder's compiler and launch the debug version of the Flash player, click one of the Run Tools located in FlexBuilder's toolbar. There are options to launch an optimized version, a debug version, or a version for profiling.
FlexBuilder will compile the MXML application, build a SWF file, and automatically bring up your browser, displaying the following Flash SWF:
Google Maps Flash SWF files, if they are compiled with the API key included, can simply be
displayed as standalone files. This is useful for testing, but may not be practical for proper page
layout. As a result, you will likely want to set up an HTML page to contain the SWF file. To ensure
your SWF file executes within both Internet Explorer and other browsers, you should add the SWF
within both object
and embed
tags.
A simple HTML page that contains our HelloWorld.swf
file appears below. For the
map to display on a web page, we must reserve a spot for it. We do so in this example by creating
a named div
element and adding the object
element to it.
<div id="map_canvas" name="map_canvas"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800px" height="600px"> <param name="movie" value="helloworld.swf"> <param name="quality" value="high"> <param name="flashVars" value="key=your_api_key&sensor=true_or_false"> <embed width="800px" height="600px" src="helloworld.swf" quality="high" flashVars="key=your_api_key&sensor=true_or_false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"> </embed> </object> </div>
Note that we add the API key
and sensor
parameters within a
flashVars
parameter, separated by an &
character. This
registration method is an alternative to compiling your key and sensor into the SWF file
within the MXML declaration. If values are specified here, they override values contained
within the SWF file or MXML declaration. Also note that the API key must match the domain
where the SWF file is hosted, not the domain where the HTML file may be hosted.
The resulting HTML page is shown below.
Congratulations! You've written your first Google Maps Flash application!
The Google Maps API for Flash now not only supports development of Flash applications within the browser, but there's also an experimental feature that supports Adobe AIR® applications running on the desktop. AIR applications provide additional capabilities not available to applications running within a browser, including file and local network access, application state persistence, and data access.
AIR is a runtime environment that allows applications to run natively within a variety of operating systems from a common code base. An AIR Installer compiles this code into a format usable by the runtime environment. AIR applications allow you the freedom to interact directly with the desktop, providing file access, data storage, and robust user interface components across operating systems.
More information on Adobe AIR is located at http://www.adobe.com/products/air/.
To run Adobe AIR applications, you will need to download and install Adobe's AIR runtime environment. This installation includes Adobe's AIR installer, which converts Adobe AIR executable files into applications which can run on your operating system. Make sure you're also using version 1.8 or higher of the Google Maps API for Flash SWC file, which adds AIR support.
The latest AIR release is available at: http://get.adobe.com/air/. Download the file from this location and install it per Adobe's instructions. This tutorial was developed using the Adobe AIR 1.1 Installer.
(Note: Mac OS X developers who have trouble running AIR might want to check out this fix.)
FlexBuilder is capable of creating either Flash applications for use within the Flash plugin within a browser, or standalone AIR applications for use within the operating system.
Before you begin coding your AIR application, you should first set up an AIR-compatible project within FlexBuilder. To do so, follow these simple steps:
Click Next, specify an output folder (leaving the default as bin-debug
is fine), and then click Next again. You will be brought to the Source path and
Library path configuration panel. Select a name for your Main application file
and add an Application ID, which should generally be "package-like" (for example:
com.google.maps.examples.air
).
Before you can compile your code, you will need to link it to the Google Maps API for Flash
SWC file. To do so, click the Library Path tab and click Add SWC.... An
Add SWC dialog box will appear. Navigate to the location where you saved the Google Maps
API for Flash SDK and select the appropriate lib/map_flex_*.swc
file and click
OK. (Note: Make sure you select the correct SWC. FlexBuilder
will not be able to use the non-Flex SWC library.) Your dialog box should now look like the
following:
Click Finish. FlexBuilder will update your project and you return you to the Flex Development Perspective showing a skeleton MXML file.
You may wish to test compilation of your skeleton MXML file at this point to ensure your
development environment is working correctly. Since the file is empty except for a single
mx:WindowedComponent
object, you will only see a blank window appear.
Creating Google Maps API for Flash AIR applications is similar to creating SWF files for use within a browser with two exceptions:
mx:Application
, the root of the AIR application is a
mx:WindowedApplication
. This should be created by default when you create your initial project.Map
objects within AIR applications properties must have a url
property set to an online location where the purpose and scope of the application is described. This url
must be the same URL that your registered when signing up for an API key.Because AIR applications have access to the file system, they can perform tasks that browser-based applications cannot easily do. We'll add some code to our test application that responds to user clicks by writing the clicked latitude/longitude value to a text file.
Within the Flex Development Perspective of FlexBuilder, copy the following code (this code is the same
as the code in the "Hello World" tutorial above except that the mx:Application
has been changed
to an mx:WindowedApplication
and the Map.url
property has been set.
<?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%" url="http://code.google.com/apis/maps/" key="your_api_key" sensor="true_or_false"/> <mx:Script> <![CDATA[ import com.google.maps.LatLng; import com.google.maps.Map; import com.google.maps.MapEvent; import com.google.maps.MapType; private function onMapReady(event:Event):void { this.map.setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE); } ]]> </mx:Script> </mx:WindowedApplication>
Now that we have this skeleton file, we'll add the capability to process event clicks and write the current location to a text file.
Add this additional import
statement to add MapMouseEvent
functionality:
import com.google.maps.MapMouseEvent;
Within the existing onMapReady
event handler, add the following code to register an event
listener for mouse clicks, and create an onMapClick
event handler:
private function onMapReady(event:Event):void { this.map.setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE); this.map.addEventListener(MapMouseEvent.CLICK, onMapClick); } private function onMapClick(event:MapMouseEvent):void { }
Within the onMapClick
function, add the following code to process the current mouse location
as a latitude/longitude and write the output to a file named "locations.txt"
. Note that because
AIR applications are Operating-System neutral, we need to obtain a reference to this file via the
resolvePath
method.
private function onMapClick(event:MapMouseEvent):void { var file:File = File.documentsDirectory.resolvePath("airTest/locations.txt"); var fileStream:FileStream = new FileStream(); fileStream.open(file, FileMode.APPEND); fileStream.writeUTF(event.latLng.toString()); fileStream.writeUTF("\n"); fileStream.close(); }
Now we can test our application by clicking the Run button in FlexBuilder's menu bar:
FlexBuilder will compile the application and bring up a window displaying Manhattan.
Click on any point on the map. The application will then write a "locations.txt"
file within an "airTest"
directory in your Documents directory
(/Users/username/Documents/
in Mac OS, C:My Documents\
in
Windows). Opening that text file, you should see a simple latitude/longitude
for the location you clicked:
AIR applications run natively within the operating system, and often have access to sensitive information, such as the file system. Because of this, it is important to trust the applications that run on the desktop. All AIR applications must be digitally signed by a certificate authority, and FlexBuilder allows you to specify this certificate when generating the release build.
FlexBuilder also allows you to "self-sign" your own applications for testing purposes or internal applications, but if you plan to provide your application to other users, you should obtain a commercial certificate from a certification authority such as Thawte or VeriSign.
More information about digitally signing your Adobe AIR applications is available at: http://www.adobe.com/devnet/air/articles/signing_air_applications_print.html.
We'll now want to export an AIR installation file (denoted with an *.air
suffix). To do so, we'll need
to create a test certificate and generate a release build from FlexBuilder.
Within FlexBuilder, select Project->Export Release Build. The Export Release Build dialog box will appear:
Make sure the correct project and application are selected and click Next. The Digital Signature panel will appear. Ensure that Export and sign an AIR file with a digital certificate is currently selected. If you have a commercial certificate, you can browse and select that certificate, supply its password and click Finish. However, if you don't currently have a certificate, select Create and the Create Self-Signed Digital Certificate dialog box will appear:
Within the Create Self-Signed Digital Certificate dialog box, enter a Publisher name,
a password, and a filename for the certificate. Click OK and the Export Release Build
dialog box will be populated with this certificate information. Click Finish. FlexBuilder will
compile your application and generate an *.air
file. This file can then be installed as
an application via the AIR Application Installer.
We now have an AIR installation file located in our output directory. To install this AIR application:
Double-click on the MapSimple.air file. The Application Install dialog box will appear:
Since this application is self-signed, the AIR Installer will warn you that the Publisher of the application is UNKNOWN and that the application has UNRESTRICTED System Access. As we've generated this file ourselves, we don't need to worry, so click Install. The Installation dialog box will then ask you to specify an installation location:
Select an Installation Location, leave the Start application after installation checkbox checked, and the MapSimple application will appear:
Congratulations! You've written your first Google Maps AIR application!


Welcome to Dorothy's DMA 107 Home Page!
This is Dorothy's DMA 107 home page for her fancy, fabulous website.
| Class Number | Name & Credits | Yea or Nay | |
|---|---|---|---|
| DMA 107 | Digital Media Arts | 5 | Yea |
| PHYS 114 | Physics: Mechanics | 6 | Meh |
| ENG 271 | Expository Writing | 5 | Heck Yea |
| Random Pokemon drawing | I drew this two years ago | Its a Pokemon named Mimikyu | |
| I'm bad at creative content | Help | More filling |


|
Xerces-C++
3.1.4
|
This class defines the core information of an element declaration. More...
Public Types | |
| enum | CreateReasons { NoReason, Declared, AttList, InContentModel, AsRootElem, JustFaultIn } |
| enum | CharDataOpts { NoCharData, SpacesOk, AllCharData } |
| enum | objectType { Schema, DTD, UnKnown } |
Public Member Functions | |
| virtual XMLElementDecl::objectType | getObjectType () const =0 |
Destructor | |
| virtual | ~XMLElementDecl () |
Virual ElementDecl interface | |
| virtual XMLAttDefList & | getAttDefList () const =0 |
| Get a list of attributes defined for this element. More... | |
| virtual CharDataOpts | getCharDataOpts () const =0 |
| The character data options for this element type. More... | |
| virtual bool | hasAttDefs () const =0 |
| Indicate whether this element type defined any attributes. More... | |
| virtual const ContentSpecNode * | getContentSpec () const =0 |
| Get a pointer to the content spec node. More... | |
| virtual ContentSpecNode * | getContentSpec ()=0 |
| Get a pointer to the content spec node. More... | |
| virtual void | setContentSpec (ContentSpecNode *toAdopt)=0 |
| Set the content spec node object for this element type. More... | |
| virtual XMLContentModel * | getContentModel ()=0 |
| Get a pointer to the abstract content model. More... | |
| virtual void | setContentModel (XMLContentModel *const newModelToAdopt)=0 |
| Set the content model object for this element type. More... | |
| virtual const XMLCh * | getFormattedContentModel () const =0 |
| Geta formatted string of the content model. More... | |
Getter methods | |
| const XMLCh * | getBaseName () const |
| Get the base name of this element type. More... | |
| XMLCh * | getBaseName () |
| unsigned int | getURI () const |
| Get the URI id of this element type. More... | |
| const QName * | getElementName () const |
| Get the QName of this element type. More... | |
| QName * | getElementName () |
| const XMLCh * | getFullName () const |
| Get the full name of this element type. More... | |
| CreateReasons | getCreateReason () const |
| Get the create reason for this element type. More... | |
| XMLSize_t | getId () const |
| Get the element decl pool id for this element type. More... | |
| bool | isDeclared () const |
| Indicate whether this element type has been declared yet. More... | |
| bool | isExternal () const |
| Indicate whether this element type has been declared externally. More... | |
| MemoryManager * | getMemoryManager () const |
| Get the memory manager. More... | |
Setter methods | |
| void | setElementName (const XMLCh *const prefix, const XMLCh *const localPart, const int uriId) |
| Set the element name object for this element type. More... | |
| void | setElementName (const XMLCh *const rawName, const int uriId) |
| Set the element name object for this element type. More... | |
| void | setElementName (const QName *const elementName) |
| Set the element name object for this element type. More... | |
| void | setCreateReason (const CreateReasons newReason) |
| Update the create reason for this element type. More... | |
| void | setId (const XMLSize_t newId) |
| Set the element decl pool id for this element type. More... | |
| void | setExternalElemDeclaration (const bool aValue) |
| Set the element decl to indicate external declaration. More... | |
| Public Member Functions inherited from XMemory | |
| void * | operator new (size_t size) |
| This method overrides operator new. More... | |
| void * | operator new (size_t size, MemoryManager *memMgr) |
| This method defines a custom operator new, that will use the provided memory manager to perform the allocation. More... | |
| void * | operator new (size_t size, void *ptr) |
| This method overrides placement operator new. More... | |
| void | operator delete (void *p) |
| This method overrides operator delete. More... | |
| void | operator delete (void *p, MemoryManager *memMgr) |
| This method provides a matching delete for the custom operator new. More... | |
| void | operator delete (void *p, void *ptr) |
| This method provides a matching delete for the placement new. More... | |
Static Public Member Functions | |
| static void | storeElementDecl (XSerializeEngine &serEng, XMLElementDecl *const element) |
| static XMLElementDecl * | loadElementDecl (XSerializeEngine &serEng) |
Static Public Attributes | |
| static const unsigned int | fgInvalidElemId |
| static const unsigned int | fgPCDataElemId |
| static const XMLCh | fgPCDataElemName [] |
Protected Member Functions | |
| XMLElementDecl (MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager) | |
| Protected Member Functions inherited from XMemory | |
| XMemory () | |
| Protected default constructor. More... | |
This class defines the core information of an element declaration.
Each validator (DTD, Schema, etc...) will have its own information that it associations with the declaration of an element, but they must all share at least this core information, i.e. they must all derive from this class. The set of info enforced at this level is driven by the needs of XML 1.0 spec validation and well formedness checks.
This class defines some special element id values for invalid elements and PCDATA elements, as well as a string for the special PCDATA element name. All validators must honor these special values in order to allow content models to work generically (i.e. to let code know when its dealing with invalid or PCDATA element ids without having to know what type of validator its messing with.)
|
virtual |
|
protected |
|
pure virtual |
Get a list of attributes defined for this element.
The derived class should return a reference to some member object which implements the XMLAttDefList interface. This object gives the scanner the ability to look through the attributes defined for this element.
It is done this way for efficiency, though of course this is not thread safe. The scanner guarantees that it won't ever call this method in any nested way, but the outside world must be careful about when it calls this method, and optimally never would.
| const XMLCh * XMLElementDecl::getBaseName | ( | ) | const |
Get the base name of this element type.
Return the base name part of the element's name. This is the same regardless of whether namespaces are enabled or not.
References QName::getLocalPart().
| XMLCh * XMLElementDecl::getBaseName | ( | ) |
References QName::getLocalPart().
|
pure virtual |
The character data options for this element type.
The derived class should return an appropriate character data opts value which correctly represents its tolerance towards whitespace or character data inside of its instances. This allows the scanner to do all of the validation of character data.
|
pure virtual |
Get a pointer to the abstract content model.
This method will return a const pointer to the content model object of this element. This class is a simple abstraction that allows an element to define and use multiple, specialized content model types internally but still allow the outside world to do simple stuff with them.
|
pure virtual |
Get a pointer to the content spec node.
This method will return a const pointer to the content spec node object of this element.
|
pure virtual |
Get a pointer to the content spec node.
This method is identical to the previous one, except that it is non const.
| XMLElementDecl::CreateReasons XMLElementDecl::getCreateReason | ( | ) | const |
Get the create reason for this element type.
This method returns an enumeration which indicates why this element declaration exists. Elements can be used before they are actually declared, so they will often be faulted into the pool and marked as to why they are there.
| const QName * XMLElementDecl::getElementName | ( | ) | const |
| QName * XMLElementDecl::getElementName | ( | ) |
|
pure virtual |
Geta formatted string of the content model.
This method is a convenience method which will create a formatted representation of the content model of the element. It will not always exactly recreate the original model, since some normalization or or reformatting may occur. But, it will be a technically accurate representation of the original content model.
| const XMLCh * XMLElementDecl::getFullName | ( | ) | const |
Get the full name of this element type.
Return the full name of the element. If namespaces are not enabled, then this is the qName. Else it is the {uri}baseName form. For those validators that always require namespace processing, it will always be in the latter form because namespace processing will always be on.
References QName::getRawName().
| XMLSize_t XMLElementDecl::getId | ( | ) | const |
Get the element decl pool id for this element type.
This method will return the element decl pool id of this element declaration. This uniquely identifies this element type within the parse event that it is declared within. This value is assigned by the grammar whose decl pool this object belongs to.
| MemoryManager * XMLElementDecl::getMemoryManager | ( | ) | const |
Get the memory manager.
This method returns the configurable memory manager used by the element declaration for dynamic allocation/deallocation.
|
pure virtual |
| unsigned int XMLElementDecl::getURI | ( | ) | const |
Get the URI id of this element type.
Return the URI Id of this element.
References QName::getURI().
|
pure virtual |
Indicate whether this element type defined any attributes.
The derived class should return a boolean that indicates whether this element has any attributes defined for it or not. This is an optimization that allows the scanner to skip some work if no attributes exist.
| bool XMLElementDecl::isDeclared | ( | ) | const |
Indicate whether this element type has been declared yet.
This method returns a boolean that indicates whether this element has been declared yet. There are a number of reasons why an element declaration can be faulted in, but eventually it must be declared or its an error. See the CreateReasons enumeration.
References Declared.
| bool XMLElementDecl::isExternal | ( | ) | const |
Indicate whether this element type has been declared externally.
This method returns a boolean that indicates whether this element has been declared externally.
|
static |
|
pure virtual |
Set the content model object for this element type.
This method will adopt the based content model object. This is called by the actual validator which is parsing its DTD or Schema or whatever a creating an element decl. It will build what it feels is the correct content model type object and store it on the element decl object via this method.
| newModelToAdopt | This method will adopt the passed content model object. Any previous object is destroyed. |
|
pure virtual |
Set the content spec node object for this element type.
This method will adopt the based content spec node object. This is called by the actual validator which is parsing its DTD or Schema or whatever and store it on the element decl object via this method.
| toAdopt | This method will adopt the passed content node spec object. Any previous object is destroyed. |
| void XMLElementDecl::setCreateReason | ( | const CreateReasons | newReason | ) |
Update the create reason for this element type.
This method will update the 'create reason' field for this element decl object. As the validator parses its DTD, Schema, etc... it will encounter various references to an element declaration, which will cause the element declaration to either be declared or to be faulted into the pool in preparation for some future declaration. As it does so,it will update this field to indicate the current status of the decl object.
| void XMLElementDecl::setElementName | ( | const XMLCh *const | prefix, |
| const XMLCh *const | localPart, | ||
| const int | uriId | ||
| ) |
Set the element name object for this element type.
This method will adopt the based content spec node object. This is called by the actual validator which is parsing its DTD or Schema or whatever and store it on the element decl object via this method.
| prefix | Prefix of the element |
| localPart | Base Name of the element |
| uriId | The uriId of the element |
| void XMLElementDecl::setElementName | ( | const XMLCh *const | rawName, |
| const int | uriId | ||
| ) |
Set the element name object for this element type.
This method will adopt the based content spec node object. This is called by the actual validator which is parsing its DTD or Schema or whatever and store it on the element decl object via this method.
| rawName | Full Name of the element |
| uriId | The uriId of the element |
| void XMLElementDecl::setElementName | ( | const QName *const | elementName | ) |
Set the element name object for this element type.
This method will adopt the based content spec node object. This is called by the actual validator which is parsing its DTD or Schema or whatever and store it on the element decl object via this method.
| elementName | QName of the element |
| void XMLElementDecl::setExternalElemDeclaration | ( | const bool | aValue | ) |
Set the element decl to indicate external declaration.
| void XMLElementDecl::setId | ( | const XMLSize_t | newId | ) |
Set the element decl pool id for this element type.
This method will set the pool id of this element decl. This is called by the grammar which created this object, and will provide this decl object with a unique id within the parse event that created it.
|
static |
|
static |
|
static |
|
static |


Sample Application
Enter your Name:
Hello
!
Stores to buy from:
{{ 'Store: ' + store.name}}
Item
Amount
Price
Total
{{item.name}}
{{item.amount}}
{{item.price}}
{{item.amount * item.price}}


Home
About Us
Services
Product Gallery
Service Map
Contact Us
We service several areas in the Los Angeles area
Search


debugging the ds-d6 smartwatch
The ds-D6 has a serial port.
The blackmagicprobe can lauch a debugger : west debug –runnerblackmagicprobe. The probe has a serial port /dev/ttyACM1 (linux : minicom -b 115200 -D /dev/ttyACM1)
The Segger Jlink, which is kind of standard in zephyr can use the the swd-connector for debug messages as well.
Note
The Segger JLink offers the JLinkRTTViewer. In order to use it, you can set this in ds_d6_defconfig (boardconfig) CONFIG_LOG=y CONFIG_USE_SEGGER_RTT=y CONFIG_SHELL=y CONFIG_SHELL_BACKEND_RTT=y
sniffing memory
The JLink probe allowed to check memory at 0x5000504 and 0x50000514.
#mem32 0x5000504 0x1
or write a value
#w4 0x50000504 0x12345678
This allowed me to check GPIO ports.


--- layout: documentation title: NetworkFlowLabelType ---
The NetworkFlowLabelType contains elements that are common to all flow record formats. It builds off of network layer information (a 5-tuple that commonly defines a flow) and includes ingress and egress interface indexes and IP protocol information (not present if all flow record formats). Egress information is usually not thought of as part of the extended 7-tuple, but we include it for organizational purposes. Because these fields are defined here, they are excluded from the fields associated directly with each different flow record format type.
| Field Name | Type | Description |
|---|---|---|
| Src_Socket_Address0..1 | SocketAddressObjectType |
Represents the source IP socket address, consisting of an IP address and port number, for the network flow expressed. Note that not all flow protocols support IPv6 addresses. |
| Dest_Socket_Address0..1 | SocketAddressObjectType |
Represents the destination IP socket address, consisting of an IP address and port number, for the network flow expressed. Note that not all flow protocols support IPv6 addresses. |
| IP_Protocol0..1 | IANAAssignedIPNumbersType |
The IP Protocol of the network flow. This is usually TCP, UDP, or SCTP, but can include others as represented in NetFlow as an integer from 0 to 255. Please refer to http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml for reference. |
| Ingress_Interface_Index0..1 | IntegerObjectPropertyType |
Represents the index (in SNMP, by default) of the network interface card where the flows entered the router. |
| Egress_Interface_Index0..1 | IntegerObjectPropertyType |
Represents the index (in SNMP, by default) of the network interface card where the flows leave the router. |
| IP_Type_Of_Service0..1 | HexBinaryObjectPropertyType |
Type of service field from the IP header. Specifies the IP Type of Service (ToS). See RFC 1349 for more information. |


America
1) Little America Hotel - Wyoming
About this hotel
Off I-80, this unfussy rural hotel is 39 miles from
Seedskadee National Wildlife Refuge and 60 miles
from Fossil Butte National Monument.
Frilly rooms and suites offer free Wi-Fi, flat-screen
TVs and minifridges, plus microwaves, en suite
bathrooms and coffeemakers. Some have sitting areas.
Amenities include a restaurant, an outdoor pool and
play areas, plus coin-operated laundry facilities, a
gas station and a convenience shop. Parking is available.
Check-in time: 3:00 PM
Check-out time: 12:00 PM
Address & contact information
Location: Interstate 80, exit 68, Little America, WY 82929, United States
Phon No.: +1<PHONE_NUMBER>


TV Show The Rachael Ray TV Show is Shot in New York City and. Free Tickets To The Show Are Available To The Public WEDNESDAY - 12PM. and 4PM Sep 27, 2011 modeling Sofia Vergara's new clothing line on the "Rachael Ray" show! Rachael Ray Promo for Wednesday, September 28th 2011!
Rachel ray's show is one of the most. popular cooking shows on television. Get rachels recipes from her show, find out about. who her guests are and get details
The latest from Rachael Ray. Show (@RachaelRayShow) The official Twitter profile for Rachael Ray's. Emmy award-winning daytime TV show! New York. Never miss Rachael Ray! Find out where and when you can watch the show on TV or online, get the best Chat and cooking advice with Rachael Ray 31 Thu ; 1 Fri; 2 Sat; 3 Sun; 4 Mon; 5 Tue; 6 Wed; 7 Thu; 8 Fri; 9 Sat; 10 Sun; 11 Mon
A documentary about wounded veterans that Roger championed gets a screening at the Rehabilitation Institute of Chicago and screenings in New York and Los Angeles…
Oct 25, 2006 David Boreanaz on Rachael Ray's talk show Wednesday Check local listings -- time and channel will vary Frankly, I'm not sure if I'll be able to
Oct 18, 2013 She's not doing a full hour like last year but celebrity chef Rachael Ray has sent a TV crew. back to Wilmington for her Wednesday show (11 Rachael Ray chats with Californication star David Duchovny Bobby Flay shares his healthy eating. and exercise tips with Rachael Ray.


Target Group¶
If your task requires a target group, the targetGroup
field must be used to create a new target group named after your package and branch (i.e. packagename-branch
).
For reference, see the CreateTargetGroup API Reference.
{
"targetGroup": {
"VpcId": "vpc-a8b4c4cf",
"Port": 3000,
"Protocol": "HTTP",
"HealthCheckProtocol": "HTTP",
"HealthCheckPort": "traffic-port",
"HealthCheckPath": "/",
"HealthCheckIntervalSeconds": 10,
"HealthCheckTimeoutSeconds": 5,
"HealthyThresholdCount": 2,
"UnhealthyThresholdCount": 3,
"Matcher": {
"HttpCode": "200"
},
"Attributes": [
{
"Value": "false",
"Key": "stickiness.enabled"
},
{
"Value": "0",
"Key": "deregistration_delay.timeout_seconds"
}
]
}
}


EventListeners are able to respond to events that occur in the course of a test run, usually by recording information of some kind. Note that EventListeners called asynchronously with respect to test execution and are not able to affect the actual execution of the test.
Addins use the host to access this extension point by name:
IExtensionPoint listeners = host.GetExtensionPoint( "EventListeners" );
The extension object passed to Install must implement the EventListener interface:
public interface EventListener { void RunStarted( string name, int testCount ); void RunFinished( TestResult result ); void RunFinished( Exception exception ); void TestStarted(TestName testName); void TestFinished(TestResult result); void SuiteStarted(TestName testName); void SuiteFinished(TestResult result); void UnhandledException( Exception exception ); void TestOutput(TestOutput testOutput); }
You must provide all the methods, but the body may be empty for any that you have no need of.


Variations of Trade Simulators:
Trade What?
One Stock
Buy and Sell
Buy only
Sell only
One Sector or Industry
Build list of all symbols in sector or industry X
Assign a variable value to each like marketcap (billions)
can also try operators like marketcap^2, log(marketcap) or marketcap/var2
Variable Requirements:
if marketcap is between 500 and 600 B, then buy.
if Price is 3% higher than yesterday, then sell
Variable in a probability density function:
P(BUY AAPL)=vol*price of AAPL / vol*price of SECTOR and try random int for each stock.
Set rules for buy and sell.
When can a trade occur?
fixed interval:
on every 5th day at 10:30am- Buy stock with highest marketcap and sell stock with lowest market cap
fixed interval + condition:
every morning, noon, and afternoon check if a stock is
Other options:
sell stocks we dont own? (recommended for simulation purposes)


How to Will your assets to loved ones
In the absence of a Will, succession laws decide who will inherit your estate
Raghvendra Nath Life is full of uncertainties and hence it is very important to plan things. While we place a lot of importance on asset creation, most of us don’t focus on how those assets would transition to our loved ones when we are not around. In the absence of a Will, the succession law decide whom your estate will go to and it might not be aligned to your wishes.
 Further, your father will get a share in your estate only if your wife, children and mother are not there.
After your mother’s death, your mother’s share in your wealth will not come back to your wife and children.
Rather, your siblings and father would be the rightful claimants. If you are a Hindu female, in the absence of your husband and children, your parents-in-law will be entitled to get a share in your property. Only if they are not there, your own parents be authorised to exercise any rights over your property.
If you have young children, and your spouse also passes away shortly after your demise, also without making a Will, the court will appoint a guardian for your minor children.
The court knows neither who will be a better guardian to your children or whom they are close to nor how you want your children to be raised. All these problems can be resolved with a little bit of planning.
How a Will helps
If a Hindu male wants to ensure that his parents benefit from his property, and after them, it comes back to his wife and children, a life estate can be created in favour of the parents.
Similarly, for a Hindu female, her parents can be made the beneficiaries or a life estate interest can be created in their favour so that they can enjoy the property during their lifetime, and it can come back to her chosen beneficiaries after their demise.
There may be a case where your children inherit a large amount of money under intestacy. However, they might not necessarily have the maturity to deal with this situation, especially when they have suddenly lost someone dear to them.
By making a Will, you can defer the distribution of your estate to them until a later time or in stages, or you can set up a trust which allows for control over how and when their inheritance can be used.
In your Will, you can appoint a guardian for your children, and an alternative guardian if the first guardian is unable or unwilling to act.
Further, if you believe in philanthropy and want to do something for a charitable cause, the same can be done wherein you can dedicate some amount of money for such cause and/or you can have a charitable trust created if you wish.
Thus, an estate plan is necessary for everyone who wishes to execute a smooth transfer of assets due to one’s demise or incapacitation, irrespective of current age or size of estate. So, if you belong to the majority who haven’t planned their estate yet, it’s time to collect your thoughts and make a plan. After all, we all want to take care of our loved ones. Writing a Will is one way to make sure they are cared for even when you are gone.
The writer is Managing Director, Ladderup Wealth Management
- Get Free Trial
- Hurry! Prices Increase Soon
Existing users, please Sign in here
Thank you for being a loyal user of Portfolio.
Portfolio will be a paid section hereon.
Please Subscribe to get access to one of our early bird packs. Or click on Free Trial to get 14 days free trial.
What You'll Get
-
Web + Mobile
Access exclusive content of the Hindu Businessline across desktops, tablet and mobile device.
-
Exclusive Portfolio and Investment Advice, Banking, Lifestyle and Specials
Get diverse set of perspectives from our trusted experts on Portfolio, Banking, Economy, Environment and others.
-
Ad free experience
Experience cleaner site with zero ads and faster load times.
-
Personalised dashboard
Customize your preference and get a personalized recommendation of stories based on your interest.
- Get Free Trial
- Hurry! Prices Increase Soon
Existing users, please Sign in here


My name is Laura Artiles and I am currently a Senior iOS Engineer at Disney Streaming. I graduated from the University of Texas at Austin with degrees in Computer Science and Economics. Growing up with two engineers as parents, my mind was always very driven towards math, science, and technology. Throughout middle school and high school I also began to develop an interest in the business world. Upon arriving to college, I wasn't sure what I wanted to do yet, but I decided to take a programming course. Unsuprisingly, I fell in love with it! My programming assignments were always the ones I wanted to do first when I had a long list of things to do and I was eager to learn more. I declared Computer Science as my major and eventually added Economics to fulfil my lingering interest of the business world. Now, as a developer, I strive to be continuously learning and exploring my personal interests within technology.
Proficient
Proficient
Proficient
Intermediate
Intermediate
Beginner


this is a nice test text
Test duration
Test duration in minutes
00m:10s
QRN bandwith
Processing bandwith of the QRN bits in bits/sec
16 b/sec
Processing bandwith of the QRN bits in bits/sec


SSCM
Main memory
Block {{$index}}
Empty
Cache memory
Group
Line
Block
G{{$index}}
L{{$index}}
None
Block {{currentLine($parent.$index, $index).block}}
Empty
Size of main memory(bytes):
Block size(bytes):
Number of lines of the cache memory:
N:
Sequence access to M.M. blocks (separated by space):
Run blocks sequentially
Run blocks step by step
Run
Next
Reset
It will be shown here the logs of access to M.M. and C.M.
Block
{{log.block}}
already exists
in the C.M. in group
{{log.group}}
line
{{log.groupLine}}
Block
{{log.block}}
copied
to the C.M. in group
{{log.group}}
line
{{log.groupLine}}
replacing
the
block
{{log.oldBlock}}
Block
{{log.block}}
copied
to the C.M. in group
{{log.group}}
line
{{log.groupLine}}


Dmytro Soroka
Looking for a job:
-
in IT-companies:
- Frontend Developer
- PE-accountant
- position of the financial sector
-
in banking sector:
- Project Manager
- Leading Business Development spesialist
- Leading spesialist of Customer Service/PE Department
Work Expiriens
Senior Customer Service Expert OTP Bank JSC
July 2017 - February 2020 | Ukraine
- Opening accaunts for PE-clients
- Consulting service for PE-clients
- Assistance in installing and using the program "Client-bank"
- Assisting in service Premium-clients
- Accepting payments
- Accepting foreign currency operations
Senior Retail Service Expert OTP Bank JSC
January 2017 - July 2017 | Ukraine
- Opening accaunts for PI-clients
- Consulting service for PI-clients
- Work with clients-holders of mortgage loans and car loans
- Assisting in service Premium-clients
- Issuing a car loans
Retail Service Expert OTP Bank JSC
September 2011 - January 2017 | Ukraine
- Opening accaunts for PI-clients
- Consulting service for PI-clients
- Workwork with clients-holders of mortgage loans and car loans
Education
-
Go.IT Academy
Full-Stack Development
June 2020 - May 2021 | Ukraine
-
National Univercity of State Tax Service of Ukraine
Financial activities
September 2010 - June 2011 | Ukraine
-
National Univercity of State Tax Service of Ukraine
State finance
September 2006 - June 2010 | Ukraine


--- layout: post title: The Average Man's Tax Dollars date: 2009-04-08 00:53:09.000000000 -05:00 comments: true categories: - Finance - Infographic - the economy published: true --- The Toilet Paper.com has a very good article on the breakdown of the tax dollars that the average man makes and exactly what the dollars go to. Here are a preview of some of them:


--- title: The World's Most Powerful Rocket author: Sean Nguyen date: '2018-02-09' slug: the-world-s-most-powerful-rocket categories: - R - Visualization tags: - SpaceX - rvest - Scraping subtitle: '' summary: '' authors: [] featured: yes image: caption: "Image credit: [**SpaceX**](https://spacex.com/)" focal_point: 'Center' preview_only: false projects: [] ---
SpaceX launched Falcon Heavy this week and I remembered how Elon Musk noted that it would have twice the thrust of any rocket currently in existence. I was intrigued by this statement and decided to look further and compare the thrusts of other rockets of the past and rockets that are planned in the future.
{{% tweet "726651603906785285" %}}First, I used the rvest package to scrape the data then get the information in a dataframe using the tidyverse. Next I used stringr to clean up the strings in the dataframe and plotted it using ggplot (tidyverse) as well as cowplot and RColorBrewer to improve the look of the plot.
library(rvest)
library(stringr)
library(cowplot)
library(tidyverse)
library(RColorBrewer)
theme_set(theme_cowplot())
One of the first steps is to find a website that has the information of interest, in my case I found an article on CNN.com and then I used the selector gadget tool to determine the correct xpath to get the information I wanted. Since the information I wanted wasn’t in a table format I had a rather long xpath.
site <- read_html("http://money.cnn.com/2018/02/06/technology/future/biggest-rockets-falcon-heavy-comparison/index.html")
data <- '//p[(((count(preceding-sibling::*) + 1) = 67) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 66) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 65) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 64) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 59) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 60) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 58) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 57) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 51) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 50) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 49) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 48) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 43) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 42) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 41) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 40) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 35) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 34) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 33) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 32) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 26) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 25) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 24) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 23) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 17) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 16) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 15) and parent::*)] |
//p[(((count(preceding-sibling::*) + 1) = 14) and parent::*)] |
//*[contains(concat( " ", @class, " " ), concat( " ", "inStoryHeading", " " ))]'
Next I used rvest to read scrape the information extract the text and make it into a tibble. The tibble wasn’t in the proper format so I had to do some data wrangling to tidy it up so I used mutate to create another column so I could extract out the rocket names and make another dataframe and then perform a join with the original dataset.
table <- site %>%
html_nodes(xpath = data) %>%
html_text() %>%
tibble() %>%
mutate(ID = seq(1,5,1) %>% rep(7) %>% as.factor())
table
## # A tibble: 35 x 2
## . ID
## <chr> <fct>
## 1 Falcon Heavy 1
## 2 " Status: First test flight took place February 6 " 2
## 3 " Height: 229.6 feet (70 meters) " 3
## 4 " Liftoff thrust: 5 million pounds " 4
## 5 " Capability: 140,660 pounds (63,800 kilograms) to LEO " 5
## 6 Space Launch System 1
## 7 " Status: No earlier than late 2019 " 2
## 8 " Height: 322 - 365 feet (98.1 - 111.3 meters) " 3
## 9 " Liftoff thrust: up to 11.9 million pounds (5 million kg) " 4
## 10 " Capability: 150,000 - 290,000 pounds (70,000 - 130,000 kilograms) to… 5
## # … with 25 more rows
After the rocket names were isolated I needed to repeat them multiple times to match with the ‘table’ dataframe.
names <- table %>%
filter(ID == 1) %>%
slice(rep(1:7, each=4)) # Repeats each row 4 times
names
## # A tibble: 28 x 2
## . ID
## <chr> <fct>
## 1 Falcon Heavy 1
## 2 Falcon Heavy 1
## 3 Falcon Heavy 1
## 4 Falcon Heavy 1
## 5 Space Launch System 1
## 6 Space Launch System 1
## 7 Space Launch System 1
## 8 Space Launch System 1
## 9 "Saturn V " 1
## 10 "Saturn V " 1
## # … with 18 more rows
The next step is to combine the ‘names’ dataframe with the original ‘table’ and then clean up the column names using rename. One of the trickiest parts of data wrangling is string manipulations and regular expressions (regex) which can be hard to grasp at first. Typically when you scrape data, you’ll inevitably get more information than you want or need so we can use regex to extract the specific information that we want. In this case, I used str_replace_all to find a specific pattern and replace it with nothing so I just have the infromation that I want (numerical values in my case).
df <- table %>%
filter(!ID == 1) %>%
bind_cols(names) %>%
rename(Data = ".", Rocket = ".1") %>%
separate(Data , into = c("Feature","Value"), sep =":") %>%
select(Rocket, Feature, Value) %>%
mutate(Value = str_replace_all(Value, "\\s*\\([^\\)]+\\)|[:alpha:]|\\s*",""), # regex
Feature = str_trim(Feature))
df
## # A tibble: 28 x 3
## Rocket Feature Value
## <chr> <chr> <chr>
## 1 Falcon Heavy Status 6
## 2 Falcon Heavy Height 229.6
## 3 Falcon Heavy Liftoff thrust 5
## 4 Falcon Heavy Capability 140,660
## 5 Space Launch System Status 2019
## 6 Space Launch System Height 322-365
## 7 Space Launch System Liftoff thrust 11.9
## 8 Space Launch System Capability 150,000-290,000
## 9 "Saturn V " Status 1973
## 10 "Saturn V " Height 363
## # … with 18 more rows
Now that we have a tidy dataframe we can graph it by filtering the liftoff thrust data and then changing the Value column type to numeric and make sure we reorder the Rockets by value with the fct_reorder function. I manually specified the y axis scale and added the YlOrRd pallette to exentuate the thrust of the various rockets.
thrust_plot <- df %>%
filter(Feature == "Liftoff thrust") %>%
mutate(Value = Value %>% as.numeric(),
Rocket = fct_reorder(Rocket,Value)) %>%
ggplot(aes(x = Rocket, y = Value, fill = Rocket )) +
geom_col()+
coord_flip() +
scale_y_continuous(expand= c(0,0), limits = c(0,12),breaks = seq(0,12,2))+
guides(fill = FALSE) +
scale_fill_brewer(palette="YlOrRd") +
labs(title = "Rocket Thrust",
x = "",
y = "Thrust (Millions of pounds)")
thrust_plot
We can see that Falcon Heavy may very well be the currently world’s most powerful rocket but we see that the decommissioned Saturn V, Space Shuttle had more thrust and the soon to be built Space Launch System will have the most thrust by far. Although Falcon Heavy isn’t the most poweful rocket of all time it is definitely one of the coolest, just take a look at the booster rockets landing simultaneously after launch!


Tutorial stuff
Warning, I may or may not be very mature... I'm mostly testing things however I want to.
{{message}}
Hover here!
Now you see me
{{todo.text}}
{{message}}
CLICK ME
{{message}}


Leaf-level responses to warming and drought treatments including ( A) the number of leaves produced, ( B) leaf carbon content (%) in leaf tissue, ( C) SLA (mm 2 mg −1) and ( D) intrinsic WUE ( Δ). Mean values and SEM bars are denoted for each treatment (grey = ambient, orange = warming, yellow = drought, pink = warming + drought).


Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer. --Fred Brooks, Jr.[ source]