Unicode library for C++ by Ross Smith
#include "unicorn/string.hpp"
This module contains assorted functions related to strings that don't belong in other modules with a more specific focus.
Not all of these functions are directly related to Unicode; some, such as the
str_starts_with()
and str_ends_with()
tests or the str_replace()
function, simply operate on the string as a sequence of code units, without
needing to know anything about how it is interpreted. Functions that do need
to be aware of how Unicode encoding works usually operate on, or return, UTF
iterators (see unicorn/utf
); many of these can accept either an
actual string or a UTF iterator range as their subject string.
All of the functions here are intended to be used only with known valid
Unicode strings. They all use ignore_errors
mode internally, and do not
provide any other error handling options.
Many of the string manipulation functions in this module come in two versions,
one that takes the subject string by const
reference and returns the
modified string, and one that takes it by non-const
reference and modifies
it in place. Usually the in-place version has a name ending with _in
to
distinguish them, since in most cases they have identical argument lists apart
from the const
vs non-const
argument, and therefore would not be reliably
distinguished by overload resolution if they had the same name.
In some cases the in-place version of the function takes a non-const
reference to the subject string accompanied by one or more UTF iterators (see
unicorn/utf
) to indicate positions in the string, whereas the
return-value version of the function does not need to be passed the string
explicitly since it can obtain a const
reference to it from the iterators.
In the in-place function, behaviour is undefined if the iterators do not point
to the same string passed to the reference argument. (In all functions that
take iterators, behaviour is undefined if a pair of iterators that are
expected to mark the beginning and end of a substring do not point to the same
string or are in the wrong order.)
Any in-place function that might modify its subject string invalidates any iterators (string or UTF) and references that were pointing into that string. Note that the iterators and references should still be considered to be invalidated even if the string turns out not to actually be modified by a specific call.
Modified strings, or new strings returned by a function, are not guaranteed to preserve any particular normalization form that the original string may have been in.
Any function that implicitly compares strings uses a simple literal
comparison, making no attempt to handle Unicode's concepts of canonical or
compatibility equivalence; if your code needs to be aware of such things, you
will need to normalise your strings first (see
unicorn/normal
).
When a function can take a string argument as either a string object or a character pointer, a null pointer is always treated as equivalent to an empty string. When it takes a pointer and size, the size is ignored if the pointer is null.
Most functions that need to calculate the size of a string, in this module and others, accept one of the following flags to indicate which definition of "size" the caller wants:
| Flag | Description |
|---|---|
Length:: characters |
Count the number of Unicode characters in the string |
Length:: graphemes |
Count the number of grapheme clusters (user-perceived characters) in the string |
Length:: narrow |
Calculate the East Asian width (ambiguous characters default to narrow) |
Length:: wide |
Calculate the East Asian width (ambiguous characters default to wide) |
Functions that deal with string length usually return a count of grapheme
clusters (user-perceived characters) by default; see also
unicorn/segment
.
The two options for East Asian width determine how ambiguous width characters
are handled, defaulting to narrow (one unit) or wide (two units). The
Length::graphemes
flag can be combined with either of the East Asian width
options, giving a size based on the width of the base character of each
grapheme cluster.
The various methods of measurement are implemented in the str_length()
function and the Length
class, described below; anything else that needs a
string size will normally obtain it by calling str_length()
(or a related
function such as str_find_index()
).
Any function that accepts length flags will throw std::invalid_argument
if
an inconsistent combination of flags is passed (e.g.
Length::characters|Length::graphemes
).
template <typename C> size_t
str_length
(const basic_string<C>& str, uint32_t flags = 0)
template <typename C> size_t
str_length
(const Irange<UtfIterator<C>>& range, uint32_t flags = 0)
template <typename C> size_t
str_length
(const UtfIterator<C>& begin, const UtfIterator<C>& end, uint32_t flags = 0)
Return the length of the string, measured according to the flags supplied.
struct
Length
static constexpr uint32_t Length::
characters
static constexpr uint32_t Length::
graphemes
static constexpr uint32_t Length::
narrow
static constexpr uint32_t Length::
wide
uint32_t Length::
flags
= 0
Length::
Length
()
explicit Length::
Length
(uint32_t length_flags)
template <typename C> size_t Length::
operator()
(const std::basic_string<C>& str) const
template <typename C> size_t Length::
operator()
(const Irange<UtfIterator<C>>& range) const
template <typename C> size_t Length::
operator()
(const UtfIterator<C>& b, const UtfIterator<C>& e) const
A function object that performs the same length measurements as the
str_length()
functions.
template <typename C> UtfIterator<C>
str_find_index
(const basic_string<C>& str, size_t pos, uint32_t flags = 0)
template <typename C> UtfIterator<C>
str_find_index
(const Irange<UtfIterator<C>>& range, size_t pos, uint32_t flags = 0)
template <typename C> UtfIterator<C>
str_find_index
(const UtfIterator<C>& begin, const UtfIterator<C>& end, size_t pos, uint32_t flags = 0)
template <typename C> size_t
str_find_offset
(basic_string<C>& str, size_t pos, uint32_t flags = 0)
These return an iterator, or an offset in code units, pointing to the
character at a given position, measured according to the flags supplied. If
the requested position would be past the end of the string, an end iterator
will be returned (or npos
for str_find_offset()
). If the position can't be
adjusted to exactly the specified value (because one of the East Asian width
options was selected and wide characters are present), the first valid
position after the requested point will be returned.
template <typename C> char32_t
str_char_at
(const basic_string<C>& str, size_t index) noexcept
Returns the character at a specific index, or zero if the index is out of range.
template <typename C> char32_t
str_first_char
(const basic_string<C>& str) noexcept
template <typename C> char32_t
str_last_char
(const basic_string<C>& str) noexcept
Return the first or last character in a string, or zero if the string is empty.
bool
str_is_east_asian
(const Ustring& str)
True if the string contains any East Asian characters.
bool
str_starts_with
(const Ustring& str, const Ustring& prefix) noexcept
bool
str_ends_with
(const Ustring& str, const Ustring& suffix) noexcept
These return true if the string starts or ends with the specified substring.
struct
Strcmp
static constexpr uint32_t Strcmp::
equal
static constexpr uint32_t Strcmp::
less
static constexpr uint32_t Strcmp::
triple
static constexpr uint32_t Strcmp::
fallback
static constexpr uint32_t Strcmp::
icase
static constexpr uint32_t Strcmp::
natural
template <uint32_t Flags> struct
StringCompare
using StringCompare::
result_type
= [see below]
result_type StringCompare::
operator()
(const Ustring& lhs, const Ustring& rhs) const
This combines several options for comparing strings into a single template.
Exactly one of the first three flags must be supplied, to indicate whether
equality comparison, less-than comparison, or three-way comparison is
required. The result type is bool
for equality or less-than comparison,
int
for three-way comparison, which always returns -1, 0, or 1.
If the icase
flag is used, comparison is case insensitive. This is
equivalent to calling str_casefold()
on the strings before comparing them;
using StringCompare<icase>
is usually more efficient for a small number of
comparisons, while calling str_casefold()
and saving the case folded form of
the string will be more efficient if the same strings are going to be compared
frequently.
If the natural
flag is used, this attempts to perform a "natural" (human
friendly) comparison between two strings. It treats numbers (currently only
ASCII digits are recognised) as discrete string elements to be sorted
numerically (e.g. "abc99"
will sort before "abc100"
; leading zeros are not
significant), and ignores punctuation (significant characters are defined as
general categories L
[letters], M
[marks], N
[numbers], and S
[symbols]). Natural comparison is always case insensitive; the presence or
absence of the icase
flag has no effect.
If the fallback
flag is combined with icase
or natural
, a full case and
punctuation sensitive comparison will be done if no differences are found in
the case insensitive comparison. The fallback
flag has no effect if used
without icase
or natural
.
size_t
str_common
(const Ustring& s1, const Ustring& s2, size_t start = 0) noexcept
size_t
str_common_utf
(const Ustring& s1, const Ustring& s2, size_t start = 0) noexcept
These return the count of code units in the longest common prefix of two
strings, optionally starting at a given offset (or, equivalently, the offset,
relative to start
, of the first difference between the strings). The
str_common()
function simply finds the longest common prefix of code units
without regard to encoding, while str_common_utf()
finds the longest common
prefix of whole encoded characters (the returned count is still in code
units); this means it will return a smaller value than str_common()
if the
offset found by str_common()
is partway through an encoded character. Both
functions will return zero if start
is past the end of either string.
bool
str_expect
(Utf8Iterator& i, const Ustring& prefix)
bool
str_expect
(Utf8Iterator& i, const Utf8Iterator& end, const Ustring& prefix)
If the string starting from i
starts with prefix
, str_expect()
updates
i
to point to the end of the prefix and returns true
; otherwise, it leaves
i
unchanged and returns false
. Optionally an endpoint other than the end
of the string can be supplied. These will always return false
if prefix
is
empty.
Utf8Iterator
str_find_char
(const Ustring& str, char32_t c)
Utf8Iterator
str_find_char
(const Utf8Iterator& begin, const Utf8Iterator& end, char32_t c)
Utf8Iterator
str_find_char
(const Irange<Utf8Iterator>& range, char32_t c)
Utf8Iterator
str_find_last_char
(const Ustring& str, char32_t c)
Utf8Iterator
str_find_last_char
(const Utf8Iterator& begin, const Utf8Iterator& end, char32_t c)
Utf8Iterator
str_find_last_char
(const Irange<Utf8Iterator>& range, char32_t c)
These return an iterator pointing to the first or last occurrence of the specified character, or an end iterator if it is not found.
Utf8Iterator
str_find_first_of
(const Ustring& str, const Ustring& target)
Utf8Iterator
str_find_first_of
(const Utf8Iterator& begin, const Utf8Iterator& end, const Ustring& target)
Utf8Iterator
str_find_first_of
(const Irange<Utf8Iterator>& range, const Ustring& target)
Utf8Iterator
str_find_first_not_of
(const Ustring& str, const Ustring& target)
Utf8Iterator
str_find_first_not_of
(const Utf8Iterator& begin, const Utf8Iterator& end, const Ustring& target)
Utf8Iterator
str_find_first_not_of
(const Irange<Utf8Iterator>& range, const Ustring& target)
Utf8Iterator
str_find_last_of
(const Ustring& str, const Ustring& target)
Utf8Iterator
str_find_last_of
(const Utf8Iterator& begin, const Utf8Iterator& end, const Ustring& target)
Utf8Iterator
str_find_last_of
(const Irange<Utf8Iterator>& range, const Ustring& target)
Utf8Iterator
str_find_last_not_of
(const Ustring& str, const Ustring& target)
Utf8Iterator
str_find_last_not_of
(const Utf8Iterator& begin, const Utf8Iterator& end, const Ustring& target)
Utf8Iterator
str_find_last_not_of
(const Irange<Utf8Iterator>& range, const Ustring& target)
These find the first or last character in their subject range that is in, or
not in, the target list of characters. They return an end iterator if no
matching character is found. (They are essentially the same as the similarly
named member functions in std::string
, except that they work on characters
instead of code units.)
std::pair<size_t, size_t>
str_line_column
(const Ustring& str, size_t offset, uint32_t flags = 0)
Converts a code unit offset (0-based) into a string to a line and column
number (1-based). The flags
argument takes the same values as for
str_length()
, and determines how the column number is measured. Any of the
standard Unicode line break symbols, including the CR+LF
combination, will
be recognised as a line break. If the offset points to a line break character,
it is counted as the last character of the previous line. If the offset does
not match an encoded character boundary, the position of the character that
contains the offset will be reported. If offset>=str.size()
, this will
report what the line and column number would be for the next character
appended to the string.
Irange<Utf8Iterator>
str_search
(const Ustring& str, const Ustring& target)
Irange<Utf8Iterator>
str_search
(const Utf8Iterator& begin, const Utf8Iterator& end, const Ustring& target)
Irange<Utf8Iterator>
str_search
(const Irange<Utf8Iterator>& range, const Ustring& target)
Find the first occurrence of the target substring in the subject range, returning an iterator range marking the located substring, or a pair of end iterators if it was not found.
size_t
str_skipws
(Utf8Iterator& i)
size_t
str_skipws
(Utf8Iterator& i, const Utf8Iterator& end)
Advances i
to point to the next non-whitespace character, or the end of the
string if no such character was found. Optionally an endpoint other than the
end of the string can be supplied. The return value is the number of
characters skipped.
template <typename C> void
str_append
(Ustring& str, const basic_string<C>& suffix)
template <typename C> void
str_append
(Ustring& str, const Irange<UtfIterator<C>>& suffix)
template <typename C> void
str_append
(Ustring& str, const UtfIterator<C>& suffix_begin, const UtfIterator<C>& suffix_end)
template <typename C> void
str_append
(Ustring& str, const C* suffix)
template <typename C> void
str_append
(Ustring& dst, const C* ptr, size_t n)
template <typename C, typename... Chars> void
str_append_char
(Ustring& dst, C c, Chars... chars)
void
str_append_chars
(Ustring& dst, size_t n, char32_t c)
These append one or more characters to a Unicode string, performing any necessary encoding conversions.
Ustring
str_char
(char32_t c)
Ustring
str_chars
(size_t n, char32_t c)
Return a string containing n
copies of the character.
template <typename C, typename... Strings> Ustring
str_concat
(const basic_string<C>& s, const Strings&... ss)
template <typename C, typename... Strings> Ustring
str_concat
(const C* s, const Strings&... ss)
template <typename C, typename... Strings> Ustring
str_concat_with
(const basic_string<C>& delim, const Strings&... ss)
template <typename C, typename... Strings> Ustring
str_concat_with
(const C* delim, const Strings&... ss)
These concatenate one or more strings, which can be an arbitrary mixture of
different Unicode encodings. The str_concat_with()
versions insert a
delimiter between each pair of strings.
Ustring
str_drop_prefix
(const Ustring& str, const Ustring& prefix)
void
str_drop_prefix_in
(Ustring& str, const Ustring& prefix) noexcept
Ustring
str_drop_suffix
(const Ustring& str, const Ustring& suffix)
void
str_drop_suffix_in
(Ustring& str, const Ustring& suffix) noexcept
If the first argument string starts or ends with the given prefix or suffix, remove it; otherwise, just return the original string unchanged.
Ustring
str_erase_left
(const Ustring& str, size_t length)
void
str_erase_left_in
(Ustring& str, size_t length) noexcept
Ustring
str_erase_right
(const Ustring& str, size_t length)
void
str_erase_right_in
(Ustring& str, size_t length) noexcept
Erase the specified number of Unicode characters from the beginning or end of
the string. These will return an empty string if length
is greater than the
number of characters in str
.
Ustring
str_expand_tabs
(const Ustring& str)
template <typename IntList> Ustring
str_expand_tabs
(const Ustring& str, const IntList& tabs, uint32_t flags = 0)
template <typename IntType> Ustring
str_expand_tabs
(const Ustring& str, initializer_list<IntType> tabs, uint32_t flags = 0)
void
str_expand_tabs_in
(Ustring& str)
template <typename IntList> void
str_expand_tabs_in
(Ustring& str, const IntList& tabs, uint32_t flags = 0)
template <typename IntType> void
str_expand_tabs_in
(Ustring& str, initializer_list<IntType> tabs, uint32_t flags = 0)
Expand tab characters to spaces. If the input string contains multiple lines
(delimited by any of the standard Unicode line break characters), each line
will be expanded separately. The tabs
argument is a list of tab positions,
passed either as a range of integers, or as an explicit braced initializer
list of integers. The flags
argument indicates which units will be used to
measure horizontal position.
By default, a tab stop every 8 columns is assumed. Tab stop positions that are
less than or equal to the previous tab stop are ignored. If more tab stops
beyond the last one listed are needed, the difference between the last two tab
stops is used to increment the last one (e.g. {5,10,20}
will be expanded to
{5,10,20,30,40,...}
). An implicit tab stop at position zero is always
assumed.
Ustring
str_fix_left
(const Ustring& str, size_t length, char32_t c = U' ', uint32_t flags = 0)
void
str_fix_left_in
(Ustring& str, size_t length, char32_t c = U' ', uint32_t flags = 0)
Ustring
str_fix_right
(const Ustring& str, size_t length, char32_t c = U' ', uint32_t flags = 0)
void
str_fix_right_in
(Ustring& str, size_t length, char32_t c = U' ', uint32_t flags = 0)
Pad or truncate a string to a specific length; the character argument c
is
used for padding (converted to UTF-8). The str_fix_left()
function anchors
the string on the left and pads or truncates on the right; this is similar to
std::string::resize()
, except that the flags determine how the length of the
string is measured. The str_fix_right()
function anchors the string on the
right and pads or truncates on the left. If the string can't be adjusted to
exactly the specified size (because one of the East Asian width options was
selected and wide characters are present), the result will be one unit longer
than the requested length.
Ustring
str_insert
(const Utf8Iterator& dst, const Ustring& src)
Ustring
str_insert
(const Utf8Iterator& dst, const Irange<Utf8Iterator>& src)
Ustring
str_insert
(const Utf8Iterator& dst, const Utf8Iterator& src_begin, const Utf8Iterator& src_end)
Ustring
str_insert
(const Irange<Utf8Iterator>& dst, const Ustring& src)
Ustring
str_insert
(const Irange<Utf8Iterator>& dst, const Irange<Utf8Iterator>& src)
Ustring
str_insert
(const Utf8Iterator& dst_begin, const Utf8Iterator& dst_end, const Ustring& src)
Ustring
str_insert
(const Utf8Iterator& dst_begin, const Utf8Iterator& dst_end, const Utf8Iterator& src_begin, const Utf8Iterator& src_end)
Irange<Utf8Iterator>
str_insert_in
(Ustring& dst, const Utf8Iterator& where, const Ustring& src)
Irange<Utf8Iterator>
str_insert_in
(Ustring& dst, const Utf8Iterator& where, const Irange<Utf8Iterator>& src)
Irange<Utf8Iterator>
str_insert_in
(Ustring& dst, const Utf8Iterator& where, const Utf8Iterator& src_begin, const Utf8Iterator& src_end)
Irange<Utf8Iterator>
str_insert_in
(Ustring& dst, const Irange<Utf8Iterator>& range, const Ustring& src)
Irange<Utf8Iterator>
str_insert_in
(Ustring& dst, const Irange<Utf8Iterator>& range, const Irange<Utf8Iterator>& src)
Irange<Utf8Iterator>
str_insert_in
(Ustring& dst, const Utf8Iterator& range_begin, const Utf8Iterator& range_end, const Ustring& src)
Irange<Utf8Iterator>
str_insert_in
(Ustring& dst, const Utf8Iterator& range_begin, const Utf8Iterator& range_end, const Utf8Iterator& src_begin, const Utf8Iterator& src_end)
These insert a copy of the source string into the destination string, either
at a specified location or replacing a specified substring. (For the versions
that return the result, the source string is not needed as an explicit
argument since it can be obtained from the iterator.) The effect is similar to
the std::string::insert()
and replace()
methods, except that positions
within the string are specified by UTF iterators instead of ordinary string
iterators or offsets. The str_insert_in()
functions return a pair of
iterators delimiting the newly inserted replacement string within the updated
dst
.
template <typename FwdRange> Ustring
str_join
(const FwdRange& r)
template <typename FwdRange> Ustring
str_join
(const FwdRange& r, const Ustring& delim, bool term = false)
These concatenate a list of strings, optionally inserting a delimiter between
each pair of strings. The value type of the range must be Ustring
or
convertible to it. If the term
argument is set, an extra delimiter will be
added after the last element (useful when joining lines to form a text that
would be expected to end with a line break).
Ustring
str_pad_left
(const Ustring& str, size_t length, char32_t c = U' ', uint32_t flags = 0)
void
str_pad_left_in
(Ustring& str, size_t length, char32_t c = U' ', uint32_t flags = 0)
Ustring
str_pad_right
(const Ustring& str, size_t length, char32_t c = U' ', uint32_t flags = 0)
void
str_pad_right_in
(Ustring& str, size_t length, char32_t c = U' ', uint32_t flags = 0)
Pad a string on the left or right to a specified length; the character
argument c
is used for padding (converted to UTF-8). The string will be
returned unchanged if it is already equal to or longer than the required
length. If the string can't be adjusted to exactly the specified size (because
one of the East Asian width options was selected and wide characters are
present), the result will be one unit longer than the requested length.
bool
str_partition
(const Ustring& str, Ustring& prefix, Ustring& suffix)
bool
str_partition_at
(const Ustring& str, Ustring& prefix, Ustring& suffix, const Ustring& delim)
bool
str_partition_by
(const Ustring& str, Ustring& prefix, Ustring& suffix, const Ustring& delim)
These split a string into two parts at the first occurrence of a given
delimiter. If the delimiter is found, the two parts are written into prefix
and suffix
(the delimiter itself is discarded), and the function returns
true
; otherwise, the original string is copied into prefix
, suffix
is
made empty, and the function returns false
. The str_partition()
function
splits the string on the first contiguous sequence of whitespace characters;
str_partition_at()
splits it at the first occurrence of the delim
string;
and str_partition_by()
splits it at the first contiguous sequence of
characters that are in the delim
list. An empty delimiter string will be
treated as never being found.
Ustring
str_remove
(const Ustring& str, char32_t c)
Ustring
str_remove
(const Ustring& str, const Ustring& chars)
template <typename Pred> Ustring
str_remove_if
(const Ustring& str, Pred p)
template <typename Pred> Ustring
str_remove_if_not
(const Ustring& str, Pred p)
void
str_remove_in
(Ustring& str, char32_t c)
void
str_remove_in
(Ustring& str, const Ustring& chars)
template <typename Pred> void
str_remove_in_if
(Ustring& str, Pred p)
template <typename Pred> void
str_remove_in_if_not
(Ustring& str, Pred p)
These remove all occurrences of a specific character, all characters in a set, or characters matching (or not matching) a condition from the string.
Ustring
str_repeat
(const Ustring& str, size_t n)
void
str_repeat_in
(Ustring& str, size_t n)
Return a string formed by concatenating n
copies of the original string.
Ustring
str_replace
(const Ustring& str, const Ustring& target, const Ustring& sub, size_t n = npos)
void
str_replace_in
(Ustring& str, const Ustring& target, const Ustring& sub, size_t n = npos)
These return a copy of the first argument string, with the first n
substrings that match target
replaced with sub
. By default, all matches
are replaced. The string will be returned unchanged if target
is empty or
n=0
.
template <typename OutIter> void
str_split
(const Ustring& src, OutIter dst)
template <typename OutIter> void
str_split_at
(const Ustring& src, OutIter dst, const Ustring& delim)
template <typename OutIter> void
str_split_by
(const Ustring& src, OutIter dst, const Ustring& delim)
Strings
str_splitv
(const Ustring& src)
Strings
str_splitv_at
(const Ustring& src, const Ustring& delim)
Strings
str_splitv_by
(const Ustring& src, const Ustring& delim)
These split a string into substrings, using the specified delimiter to mark
the substring boundaries, and copying the resulting substrings into the
destination defined by the output iterator. The splitv
versions return a
vector instead of writing to an existing container. The str_split[v]()
function splits the string on each contiguous sequence of whitespace
characters; str_split[v]_at()
splits it at each occurrence of the delim
string; and str_split[v]_by()
splits it at each contiguous sequence of
characters that are in the delim
list. Nothing will be written if the
original source string is empty; if the delimiter string is empty (but the
source string is not), a single string will be written.
template <typename OutIter> void
str_split_lines
(const Ustring& src, OutIter dst)
Strings
str_splitv_lines
(const Ustring& src)
Split a string at each line break, copying lines into the output iterator. Any
character that passes char_is_line_break()
is counted as a line break. The
line break characters are not included in the output strings. The CR+LF
combination is counted as a single line break; any other sequence of multiple
line breaks will generate empty lines in the output. An empty line will not be
generated at the end if the last character in the input was a line break.
Ustring
str_squeeze
(const Ustring& str)
Ustring
str_squeeze
(const Ustring& str, const Ustring& chars)
Ustring
str_squeeze_trim
(const Ustring& str)
Ustring
str_squeeze_trim
(const Ustring& str, const Ustring& chars)
void
str_squeeze_in
(Ustring& str)
void
str_squeeze_in
(Ustring& str, const Ustring& chars)
void
str_squeeze_trim_in
(Ustring& str)
void
str_squeeze_trim_in
(Ustring& str, const Ustring& chars)
These replace every sequence of one or more characters from chars
with the
first character in chars
. By default, if chars
is not supplied, every
sequence of whitespace characters will be replaced with a single space. The
str_squeeze_trim()
functions do the same thing, except that leading and
trailing characters from chars
are removed completely instead of reduced to
one character. In all cases, the original string will be left unchanged if
chars
is empty.
Ustring
str_substring
(const Ustring& str, size_t offset, size_t count = npos)
Ustring
utf_substring
(const Ustring& str, size_t index, size_t length = npos, uint32_t flags = 0)
These return a substring of the original string. The str_substring()
function returns the same string as basic_string::substr()
, except that an
offset out of bounds will yield an empty string instead of undefined
behaviour; utf_substring()
does the same thing, except that the position and
length of the substring are measured according according to the flags
argument instead of by code units (the flags are the same as for
str_length()
, defaulting to characters).
Ustring
str_translate
(const Ustring& str, const Ustring& target, const Ustring& sub)
void
str_translate_in
(Ustring& str, const Ustring& target, const Ustring& sub)
These return a copy of the first argument string, with any characters that
occur in target
replaced with the corresponding character in sub
. The
string will be returned unchanged if either target
or sub
is empty. If
target
is longer than sub
, sub
will be extended to match the length of
target
by repeating its last character; if target
is shorter than sub
,
the extra characters in sub
are ignored. If the same character occurs more
than once in target
, only the first is used. (This function is similar to
the Unix tr
utility.)
 By
default, any whitespace characters (according to the Unicode property) are
stripped; alternatively, you can supply a string containing the list of
unwanted characters, or a predicate function that takes a character and
returns true
if the character should be trimmed. The predicate takes a
Unicode character, i.e. a char32_t
, not a code unit.
 Any
Unicode line or paragraph breaking character is recognised and replaced; the
CR+LF
sequence is also treated as a single line break. Unless the original
string was completely empty, a line break will be added at the end if it was
not already there.
class
Wrap
Wrap::
Wrap
()
template <typename... Args> Wrap::
Wrap
(Args... args)
Ustring Wrap::
wrap
(const Ustring& src) const
void Wrap::
wrap_in
(Ustring& src) const
Ustring Wrap::
operator()
(const Ustring& src) const
template <typename... Args> Ustring
str_wrap
(const Ustring& str, Args... args)
template <typename... Args> void
str_wrap_in
(Ustring& str, Args... args)
The Wrap
class, and the two str_wrap*()
functions, wrap the text in a
string to a given width. The class stores a set of wrapping parameters,
supplied as keyword arguments to the constructor; the two free functions may
be more convenient when only a single call is needed and the parameters do not
need to be saved. The function call operator is equivalent to the wrap()
method.
The following keyword arguments are recognised:
| Keyword | Type | Description | Default |
|---|---|---|---|
Wrap:: enforce |
bool |
Enforce right margin strictly | false |
Wrap:: lines |
bool |
Treat every line as a paragraph | false |
Wrap:: preserve |
bool |
Preserve layout on already indented lines | false |
Wrap:: flags |
uint32_t |
Flags for string length | Length::graphemes |
Wrap:: margin |
size_t |
Margin for first line | 0 |
Wrap:: margin2 |
size_t |
Margin for subsequent lines | same as margin |
Wrap:: width |
size_t |
Wrap width | see below |
Wrap:: newline |
Ustring |
Line break on output | "\n" |
Wrap:: newpara |
Ustring |
Paragraph break on output | two newline |
Wrapping is done separately for each paragraph. Words are simply delimited by whitespace, which may not be appropriate for all languages; no attempt is made at anything more sophisticated such as hyphenation or locale-specific word breaking rules.
Paragraphs are normally delimited by two or more line breaks; if the lines
flag is set, every line break is interpreted as a paragraph break. As usual,
CR+LF
is counted as a single line break.
Width is measured using the usual rules for string length, controlled by the
flags
argument. By default, the width is set to two characters less than the
current terminal width, obtained from the COLUMNS
environment variable; the
terminal width is assumed to be 80 characters if COLUMNS
is undefined or
invalid. The margin
and margin2
arguments determine the number of spaces
used to indent the first and subsequent lines, respectively, of a paragraph
(the width includes the indentation); if margin2
is not supplied, it
defaults to the same value as margin
. The function will throw
std::length_error
if either margin is greater than or equal to the width.
The newline
value is used for all line breaks in the output; any line
breaking already present in the input text is discarded. The newpara
value
is used for paragraph breaks in the output; the default is two line breaks. A
single line break is inserted at the end of the output. If the preserve
flag
is used, any paragraphs that start with an indented line are left in their
original layout.
If a single word is too long to fit on one line, the default behaviour is to
allow it to violate the right margin. If the enforce
flag is used, this will
cause the function to throw std::length_error
instead.
Ustring
str_uppercase
(const Ustring& str)
void
str_uppercase_in
(Ustring& str)
Ustring
str_lowercase
(const Ustring& str)
void
str_lowercase_in
(Ustring& str)
Ustring
str_titlecase
(const Ustring& str)
void
str_titlecase_in
(Ustring& str)
Ustring
str_casefold
(const Ustring& str)
void
str_casefold_in
(Ustring& str)
Ustring
str_case
(const Ustring& str, Case c)
void
str_case_in
(Ustring& str, Case c)
These convert a string to upper case, lower case, title case, or the case folded form (the form recommended by Unicode for case insensitive string comparison; this is similar, but not always identical, to the lower case form). These use the full Unicode case mappings; the returned string will not necessarily be the same length as the original string (measured either in code units or characters). These functions only perform the default case mappings recommended by the Unicode standard; they do not make any attempt at localisation.
Ustring
str_initial_titlecase
(const Ustring& str)
void
str_initial_titlecase_in
(Ustring& str)
These change just the first character of a string to title case, leaving the rest of the string unchanged.
| Flag | Description |
|---|---|
Escape:: ascii |
Escape all non-ASCII characters |
Escape:: nostdc |
Do not use standard C symbols such as \n |
Escape:: pcre |
Use \x{...} instead of \u and \U (implies ascii ) |
Escape:: punct |
Escape all ASCII punctuation |
Flags recognised by str_escape()
and related functions.
Ustring
str_encode_uri
(const Ustring& str)
Ustring
str_encode_uri_component
(const Ustring& str)
void
str_encode_uri_in
(Ustring& str)
void
str_encode_uri_component_in
(Ustring& str)
These replace some characters in the string with percent encoding. These are
similar to the correspondingly named JavaScript functions, except that they
follow the slightly more stringent rules from RFC
3986. Characters outside the graphic
ASCII range (0x21-0x7e
) will always be encoded; ASCII alphanumeric
characters will never be encoded. ASCII punctuation is selectively encoded:
| Characters | Behaviour |
|---|---|
"%<>\^ `{|} |
Encoded by both str_encode_uri() and str_encode_uri_component() |
!#$&'()*+,/:;=?@[] |
Encoded by str_encode_uri_component() but not by str_encode_uri() |
-._~ |
Left unencoded by both functions |
These functions only apply percent encoding; they do not make any attempt to support IDNA domain names.
Ustring
str_unencode_uri
(const Ustring& str)
void
str_unencode_uri_in
(Ustring& str)
These perform the reverse transformation to str_encode_uri()
and
str_encode_uri_component()
, replacing percent escape codes with the original
characters.
Ustring
str_escape
(const Ustring& str, uint32_t flags = 0)
void
str_escape_in
(Ustring& str, uint32_t flags = 0)
Replace some of the characters in the string with escape codes using a leading
backslash. By default, only C0 and C1 control characters, plus the backslash
itself, will be escaped, and conventional C codes such as "\n"
will be used
instead of "\x..."
for the relevant control characters. These behaviour
settings can be changed by using the flags listed above.
Ustring
str_unescape
(const Ustring& str)
void
str_unescape_in
(Ustring& str)
These perform the reverse transformation to str_escape()
, replacing escape
codes with the original characters. If a backslash is followed by a character
not recognised as an escape code, the backslash will simply be discarded and
the second character left unchanged. Any of "\xHH"
, "\x{HHH...}"
,
"\uHHHH"
, and "\UHHHHHHHH"
can be used to encode hexadecimal code points.
These will throw EncodingError
if a hex code does not represent a valid
Unicode scalar value.
Ustring
str_quote
(const Ustring& str, uint32_t flags = 0, char32_t quote = '\"')
void
str_quote_in
(Ustring& str, uint32_t flags = 0, char32_t quote = '\"')
These perform the same operation as str_escape()
, except that quote marks
are added around the string, and internal quotes are escaped.
 In each set of four overloaded functions, the first two versions write the result into a variable passed by reference, and return the number of bytes read from the string, or an iterator marking the end of the number; the last two versions return the result, require the return type to be explicitly specified at the call site, and do not return any indication of where the number ended.
Any characters after a valid number are ignored. Note that, unlike the
otherwise similar strtol()
and related functions, these do not skip leading
whitespace. For the versions that take a string and offset, results are
unspecified if the offset does not point to an encoded character boundary.
The only flag recognised is Utf::throws
. By default, a value out of range
for the return type will be clamped to the nearest end of its valid range, and
the result will be zero if the string does not contain a valid number. If
Utf::throws
is set, an invalid number will throw std::invalid_argument
,
and a result out of range will throw std::range_error
. The versions that
return the result by value will also throw std::invalid_argument
if
Utf::throws
is set and there are any other characters following the number.
In the versions that take the result as a reference argument, this will be
left unchanged if an exception is thrown.


Delay
Mode
Stats
Set DELAY to 10
Set DELAY to 30
Set DELAY to 60
KITT MODE
COP MODE
MULTICOLOUR MODE
LIGHTS OFF


GDit Documentation
GDit - The Automatic Megacollab Merger
The goal of the GDit project is to provide easy to use tools
for megacollab hosts and creators to securely, easily and quickly take
care of the part distribution and merging process, to make sure that
creators can focus on the important part: creating.
Contents


Abe Zimmerman
Profile.
Abraham Zimmerman is a Front-End Developer looking to transition from his current career in Newsprint to Web Development.
Abe believes that delivering a quality product is paramount to success. This is achieved by developing in cutting edge technologies while also ensuring backward compatibility with older browser versions.
Abe holds a degree in Supervision and Management and Computer Programing and Analysis from Florida Southwestern State College.


This method does many things
- listening to the incoming data on $ip:$port
- gives the data to the ScanConversion class in order to get the scan converted data
- transforms the scan converted data into an image via EchoIntImage class
- creates the bitmap from some instance of EchoIntImage
- refreshes the UI with the data in a new thread
This is done via an AsyncTask because you can't play with UDP in the main thread


Company profile - Canadian Company Capabilities
Third-Party Information Liability Disclaimer
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
Profile Marketing Inc.
Mailing Address:
53-720 Commonwealth RdKELOWNA, British Columbia
V4V 1R6
Location Address:
53-720 Commonwealth RdKELOWNA, British Columbia
V4V 1R6
Tel.:<PHONE_NUMBER>
Tel.:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
Logo
Company Profile
Profile Marketing offers a full line of logoed and imprinted products.
We supply promotional products of all types... pens, mugs, bags, clothing. Our products may be used as teamwear, customer incentives, employee rewards, volunteer recognition, safety programs and fund raising programs.
As print brokers we can handle almost any print job from simple to complex. We source the printer that is best suited for your job.
We also supply banners, including retractable display banners, small signs, vinyl lettering, decals, labels and display stands.
When you need promotional products for your business contact Profile Marketing Inc.
Full profile
Full profile
Contact information
Company description
323115 - Digital Printing
418990 - All Other Wholesaler-Distributors
541430 - Graphic Design Services
541899 - All Other Services Related to Advertising
Product / Service / Licensing
Market profile
Industry sector market interests:
- Wholesale/Retail
Geographic markets:
Export experience:
- United States
Sector information
Unique applications:
Resort Enjoys a Banner YearThe Situation
This client had ordered several banners from a competitor. After only a few weeks in the outdoors several of the banners were shredded by the wind. The client wanted something that would last longer.
The Requirements
The banners would be located outdoors in a very windy location and would be exposed year round to intense sunshine and frequent rain. They would have to resist fading due to the UV from the sun, and tearing caused by the wind.
The Solution
We supplied banners digitally printed on heavy-weight vinyl. The edges were double taped. Extra grommets were provided so that the banners would have improved support on the banner holders. Wind slits were cut into the banners to allow airflow without tearing. The banners were much costlier than the originals, but the value was reflected in the end result.
The End Result
The customer was very satisfied with the banners as delivered. After more than two years the banners remain in use, resulting in excellent value for the money spent.
Key / Major clients:
Provincial Health Services Authority (British Columbia)Interior Health authority (British Columbia)
Holiday Park Resort
Testimonial:
Thank you for your great service, your attention to detail and your calmness! Over the last year you have provided me with many promotional products: staff uniforms, glasses, pens, picnic sets and more. Each sale was handled with professionalism. If the item I wanted wasn't available, you searched until you found a comparable one. You also checked items among different suppliers, factoring the shipping costs so we would know the true and final cost. And, as much as I try to be organized, it hasn't always happened and a couple of times have been rush jobs - which you have handled with calmness and ease.I highly recommend you and Profile Marketing to anyone in need of promotional items to market their businesses. Please provide my name to anyone requiring a further reference.
Katherine H, October 2010
Third-Party Information Liability Disclaimer
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
Contacts
Contact information
Description
Company description
323115 - Digital Printing
418990 - All Other Wholesaler-Distributors
541430 - Graphic Design Services
541899 - All Other Services Related to Advertising
Products, services and licensing
Product / Service / Licensing
Market
Market profile
Industry sector market interests:
- Wholesale/Retail
Geographic markets:
Export experience:
- United States
Sector
Sector information
Unique applications:
Resort Enjoys a Banner YearThe Situation
This client had ordered several banners from a competitor. After only a few weeks in the outdoors several of the banners were shredded by the wind. The client wanted something that would last longer.
The Requirements
The banners would be located outdoors in a very windy location and would be exposed year round to intense sunshine and frequent rain. They would have to resist fading due to the UV from the sun, and tearing caused by the wind.
The Solution
We supplied banners digitally printed on heavy-weight vinyl. The edges were double taped. Extra grommets were provided so that the banners would have improved support on the banner holders. Wind slits were cut into the banners to allow airflow without tearing. The banners were much costlier than the originals, but the value was reflected in the end result.
The End Result
The customer was very satisfied with the banners as delivered. After more than two years the banners remain in use, resulting in excellent value for the money spent.
Key / Major clients:
Provincial Health Services Authority (British Columbia)Interior Health authority (British Columbia)
Holiday Park Resort
Testimonial:
Thank you for your great service, your attention to detail and your calmness! Over the last year you have provided me with many promotional products: staff uniforms, glasses, pens, picnic sets and more. Each sale was handled with professionalism. If the item I wanted wasn't available, you searched until you found a comparable one. You also checked items among different suppliers, factoring the shipping costs so we would know the true and final cost. And, as much as I try to be organized, it hasn't always happened and a couple of times have been rush jobs - which you have handled with calmness and ease.I highly recommend you and Profile Marketing to anyone in need of promotional items to market their businesses. Please provide my name to anyone requiring a further reference.
Katherine H, October 2010


Next: Reentrant Syscalls, Up: Syscalls [Contents][Index]
This is the complete set of system definitions (primarily subroutines)
required; the examples shown implement the minimal functionality
required to allow libc
to link, and fail gracefully where OS
services are not available.
Graceful failure is permitted by returning an error code. A minor
complication arises here: the C library must be compatible with
development environments that supply fully functional versions of these
subroutines. Such environments usually return error codes in a global
errno
. However, the Red Hat newlib C library provides a macro
definition for errno
in the header file errno.h, as part
of its support for reentrant routines (see Reentrancy).
The bridge between these two interpretations of errno
is
straightforward: the C library routines with OS interface calls
capture the errno
values returned globally, and record them in
the appropriate field of the reentrancy structure (so that you can query
them using the errno
macro from errno.h).
This mechanism becomes visible when you write stub routines for OS interfaces. You must include errno.h, then disable the macro, like this:
#include <errno.h> #undef errno extern int errno;
The examples in this chapter include this treatment of errno
.
_exit
Exit a program without cleaning up files. If your system doesn’t
provide this, it is best to avoid linking with subroutines that require
it (exit
, system
).
close
Close a file. Minimal implementation:
int close(int file) { return -1; }
environ
A pointer to a list of environment variables and their values. For a minimal environment, this empty list is adequate:
char *__env[1] = { 0 }; char **environ = __env;
execve
Transfer control to a new process. Minimal implementation (for a system without processes):
#include <errno.h> #undef errno extern int errno; int execve(char *name, char **argv, char **env) { errno = ENOMEM; return -1; }
fork
Create a new process. Minimal implementation (for a system without processes):
#include <errno.h> #undef errno extern int errno; int fork(void) { errno = EAGAIN; return -1; }
fstat
Status of an open file. For consistency with other minimal implementations in these examples, all files are regarded as character special devices. The sys/stat.h header file required is distributed in the include subdirectory for this C library.
#include <sys/stat.h> int fstat(int file, struct stat *st) { st->st_mode = S_IFCHR; return 0; }
getpid
Process-ID; this is sometimes used to generate strings unlikely to conflict with other processes. Minimal implementation, for a system without processes:
int getpid(void) { return 1; }
isatty
Query whether output stream is a terminal. For consistency with the
other minimal implementations, which only support output to
stdout
, this minimal implementation is suggested:
int isatty(int file) { return 1; }
kill
Send a signal. Minimal implementation:
#include <errno.h> #undef errno extern int errno; int kill(int pid, int sig) { errno = EINVAL; return -1; }
link
Establish a new name for an existing file. Minimal implementation:
#include <errno.h> #undef errno extern int errno; int link(char *old, char *new) { errno = EMLINK; return -1; }
lseek
Set position in a file. Minimal implementation:
int lseek(int file, int ptr, int dir) { return 0; }
open
Open a file. Minimal implementation:
int open(const char *name, int flags, int mode) { return -1; }
read
Read from a file. Minimal implementation:
int read(int file, char *ptr, int len) { return 0; }
sbrk
Increase program data space. As malloc
and related functions
depend on this, it is useful to have a working implementation. The
following suffices for a standalone system; it exploits the symbol
_end
automatically defined by the GNU linker.
caddr_t sbrk(int incr) {
extern char _end; /* Defined by the linker */
static char *heap_end;
char *prev_heap_end;
if (heap_end == 0) {
heap_end = &_end;
}
prev_heap_end = heap_end;
if (heap_end + incr > stack_ptr) {
write (1, "Heap and stack collision\n", 25);
abort ();
}
heap_end += incr;
return (caddr_t) prev_heap_end;
}
stat
Status of a file (by name). Minimal implementation:
int stat(char *file, struct stat *st) { st->st_mode = S_IFCHR; return 0; }
times
Timing information for current process. Minimal implementation:
int times(struct tms *buf) { return -1; }
unlink
Remove a file’s directory entry. Minimal implementation:
#include <errno.h> #undef errno extern int errno; int unlink(char *name) { errno = ENOENT; return -1; }
wait
Wait for a child process. Minimal implementation:
#include <errno.h> #undef errno extern int errno; int wait(int *status) { errno = ECHILD; return -1; }
write
Write to a file. libc subroutines will use this
system routine for output to all files, including
stdout
—so if you need to generate any output, for example to a
serial port for debugging, you should make your minimal write
capable of doing this. The following minimal implementation is an
incomplete example; it relies on a outbyte
subroutine (not
shown; typically, you must write this in assembler from examples
provided by your hardware manufacturer) to actually perform the output.
int write(int file, char *ptr, int len) { int todo; for (todo = 0; todo < len; todo++) { outbyte (*ptr++); } return len; }
Next: Reentrant Syscalls, Up: Syscalls [Contents][Index]


Wenwei Weng's Blog
A small corner to record learning journey and share with others!
-
Create a docker container for Jekyll blog site
I haven’t updated my blog for various reasons, one of them is due to my laptop changed including while I was at Cisco and then moved to Palao Alto networks. Jekyll is a very nice framework for blog site. However setting up the development eviroment is not trial while all...
-
IP BGP Routing Configuration
BGP routing is an important aspect of IP routing, which is the only one exterior gayeway routing protocol. There are two flavors: iBGP and eBGP, depennding on if the beighbors are in the same AS. Especially EBGP, this is the routing protocol which routes the entire internet, connects between different...
-
IP Multicast Routing Configuration
Multicast routing is an important aspect of IP routing. It can be used to distribute data (for example, audio/video streaming broadcasts) to multiple recipients in a very efficient way. Two key protocols of multicast routing Multicast Group Membership Discovery protocol: used by clients (receivers) to advertise their group membership to...
-
OSPF Routing with Quagga
Quagga is a very popular open source routing software. It supports all main IGP protocols like RIP, OSFP, IS-IS, also EGP protocol like BGP. I thought it is interesting to try it out… Quagga software architecture The Quagga architecture consists of a core daemon (zebra) which is an abstraction layer...
-
Jekyll update for my blog site
My blog site was shutdown for quite a while for certain reasons. However I strongly feel this is a good way for me to capture what I learned along the way and share with anyone who might feel helpful for them. Thanks to all people who provided postivie feedback. After...


Normally, if a node has multiple IP addresses, Jenkins selects the first public address and if there are no public addresses, the first private address. This fits 99% of all use cases. If your network setup is more complex, then you can specify an address/prefix here. If this matches one of the node's addresses, the first matching address is chosen for connecting via ssh. Otherwise (or if you keep this field empty), Jenkins falls back to its original selection.


Call Transfer
The Call Transfer example contains a demonstration of how to use a REFER request to transfer an established call to a different destination.
The example uses REFER requests as specified in RFC3515.
The example is the same as the Client User Agent example up until the point the call is answered. In the transfer example once the call is answered there is a brief pause before a REFER request is constructed and used to request that the remote call party transfer to a different SIP URI.
The key piece of code is:
// At this point the call is established. We'll wait for a few seconds and then transfer.
Task.Delay(DELAY_UNTIL_TRANSFER_MILLISECONDS).Wait();
SIPRequest referRequest = GetReferRequest(uac, SIPURI.ParseSIPURI(TRANSFER_DESTINATION_SIP_URI));
SIPNonInviteTransaction referTx = sipTransport.CreateNonInviteTransaction(referRequest, referRequest.RemoteSIPEndPoint, referRequest.LocalSIPEndPoint, null);
referTx.NonInviteTransactionFinalResponseReceived += (SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPTransaction sipTransaction, SIPResponse sipResponse) =>
{
if (sipResponse.Header.CSeqMethod == SIPMethodsEnum.REFER && sipResponse.Status == SIPResponseStatusCodesEnum.Accepted)
{
Log.LogInformation("Call transfer was accepted by remote server.");
isCallHungup = true;
rtpCts.Cancel();
}
};
referTx.SendReliableRequest();
// At this point the call transfer has been initiated and everything will be handled in an event handler or on the RTP
// receive task. The code below is to gracefully exit.
The method used to construct the REFER request is:
private static SIPRequest GetReferRequest(SIPClientUserAgent uac, SIPURI referToUri)
{
SIPDialogue sipDialogue = uac.SIPDialogue;
SIPRequest referRequest = new SIPRequest(SIPMethodsEnum.REFER, sipDialogue.RemoteTarget);
SIPFromHeader referFromHeader = SIPFromHeader.ParseFromHeader(sipDialogue.LocalUserField.ToString());
SIPToHeader referToHeader = SIPToHeader.ParseToHeader(sipDialogue.RemoteUserField.ToString());
int cseq = sipDialogue.CSeq + 1;
sipDialogue.CSeq++;
SIPHeader referHeader = new SIPHeader(referFromHeader, referToHeader, cseq, sipDialogue.CallId);
referHeader.CSeqMethod = SIPMethodsEnum.REFER;
referRequest.Header = referHeader;
referRequest.Header.Routes = sipDialogue.RouteSet;
referRequest.Header.ProxySendFrom = sipDialogue.ProxySendFrom;
SIPViaHeader viaHeader = new SIPViaHeader(uac.ServerTransaction.LocalSIPEndPoint, CallProperties.CreateBranchId());
referRequest.Header.Vias.PushViaHeader(viaHeader);
referRequest.Header.ReferTo = referToUri.ToString();
referRequest.Header.Contact = new List<SIPContactHeader>() { new SIPContactHeader(null, uac.ServerTransaction.TransactionRequest.Header.Contact.First().ContactURI) };
referRequest.RemoteSIPEndPoint = uac.ServerTransaction.RemoteEndPoint;
return referRequest;
}
Within that method the most important part is the setting of the ReferTo
header. It's what determines where the remote user agent will is being asked to place a new call to.
It's important to note that a REFER request "asks" the remote user agent to try placing a new call to the SIP URI specified. There is no guarantee it will or that the call will succeed. It's important to deal with cases where the REFER request is rejected.
Below is the console output of a successful call transfer using the exmaple code and a local Asterisk\FreePBX server.
C:\Dev\sipsorcery\sipsorcery-core\examples\CallTransfer>dotnet run
SIPSorcery client user agent example.
Press ctrl-c to exit.
[21:41:05 INF] Call destination<EMAIL_ADDRESS>[21:41:05 DBG] SIPUDPChannel listener created <IP_ADDRESS>:6060.
[21:41:05 DBG] SIPUDPChannel socket on udp:<IP_ADDRESS>:6060 listening started.
[21:41:05 DBG] Request sent: udp:<IP_ADDRESS>:6060->udp:<IP_ADDRESS>:5060
[21:41:05 DBG] OPTIONS<EMAIL_ADDRESS>SIP/2.0
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;branch=z9hG4bK606f5c765d9d430a9ac6a7325cb8fe0c;rport
To<EMAIL_ADDRESS>From: <sip:<IP_ADDRESS>:6060>;tag=HYSDCANLXD
Call-ID: db3bbb46071c41968c623a3d7ab01489
CSeq: 1 OPTIONS
Contact: <sip:<IP_ADDRESS>:6060>
Max-Forwards: 70
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, REGISTER, SUBSCRIBE
Content-Length: 0
[21:41:05 DBG] Response received: udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060
[21:41:05 DBG] SIP/2.0 200 OK
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;rport=6060;received=<IP_ADDRESS>;branch=z9hG4bK606f5c765d9d430a9ac6a7325cb8fe0c
To: <sip:100@<IP_ADDRESS>>;tag=z9hG4bK606f5c765d9d430a9ac6a7325cb8fe0c
From: <sip:<IP_ADDRESS>>;tag=HYSDCANLXD
Call-ID: db3bbb46071c41968c623a3d7ab01489
CSeq: 1 OPTIONS
Accept: application/dialog-info+xml, application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/pidf+xml, application/dialog-info+xml, application/simple-message-summary, application/sdp, message/sipfrag;version=2.0
Accept-Encoding: text/plain
Accept-Language: en
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Length: 0
Server: FPBX-<IP_ADDRESS>(16.4.1)
[21:41:05 DBG] Response received udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060: OPTIONS 200 OK
[21:41:05 DBG] Successfully bound RTP socket <IP_ADDRESS>:49000.
[21:41:05 DBG] Listening on RTP socket <IP_ADDRESS>:49000.
[21:41:05 DBG] Attempting to resolve <IP_ADDRESS>.
[21:41:05 DBG] Switching to sip:100@<IP_ADDRESS>:5060 via udp:<IP_ADDRESS>:5060.
[21:41:05 DBG] SDP on UAC could not be mangled, using original RTP socket of <IP_ADDRESS>:49000.
[21:41:05 DBG] Send Request reliable udp:<IP_ADDRESS>:6060->udp:<IP_ADDRESS>:5060: INVITE<EMAIL_ADDRESS>SIP/2.0
[21:41:05 DBG] Request sent: udp:<IP_ADDRESS>:6060->udp:<IP_ADDRESS>:5060
[21:41:05 DBG] INVITE<EMAIL_ADDRESS>SIP/2.0
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;branch=z9hG4bK76c11432449d48e6805fb89adb686752;rport
To<EMAIL_ADDRESS>From: <sip:thisis@anonymous.invalid>;tag=FEDPDHKAQK
Call-ID: a5b30d51d07d42dfb39b4fe8d02f6f6a
CSeq: 1 INVITE
Contact: <sip:Anonymous@pcdodo:6060>
Max-Forwards: 70
User-Agent: www.sipsorcery.com
Supported: 100rel
Content-Length: 143
Content-Type: application/sdp
v=0
o=- 49124 0 IN IP4 <IP_ADDRESS>
s=sipsorcery
c=IN IP4 <IP_ADDRESS>
t=0 0
m=audio 49000 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=sendrecv
[21:41:06 DBG] Response received: udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060
[21:41:06 DBG] SIP/2.0 100 Trying
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;rport=6060;received=<IP_ADDRESS>;branch=z9hG4bK76c11432449d48e6805fb89adb686752
To<EMAIL_ADDRESS>From: <sip:thisis@anonymous.invalid>;tag=FEDPDHKAQK
Call-ID: a5b30d51d07d42dfb39b4fe8d02f6f6a
CSeq: 1 INVITE
Content-Length: 0
Server: FPBX-<IP_ADDRESS>(16.4.1)
[21:41:06 DBG] Received Response udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060: INVITE 100 Trying
[21:41:06 DBG] Information response 100 Trying for<EMAIL_ADDRESS>[21:41:06 INF]<EMAIL_ADDRESS>Trying: 100 Trying.
[21:41:06 DBG] SIP/2.0 100 Trying
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;rport=6060;received=<IP_ADDRESS>;branch=z9hG4bK76c11432449d48e6805fb89adb686752
To<EMAIL_ADDRESS>From: <sip:thisis@anonymous.invalid>;tag=FEDPDHKAQK
Call-ID: a5b30d51d07d42dfb39b4fe8d02f6f6a
CSeq: 1 INVITE
Content-Length: 0
Server: FPBX-<IP_ADDRESS>(16.4.1)
[21:41:06 DBG] Response received: udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060
[21:41:06 DBG] SIP/2.0 180 Ringing
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;rport=6060;received=<IP_ADDRESS>;branch=z9hG4bK76c11432449d48e6805fb89adb686752
To: <sip:100@<IP_ADDRESS>>;tag=b2b886e3-84f5-4bbc-8c05-74b115d7edcb
From: <sip:thisis@anonymous.invalid>;tag=FEDPDHKAQK
Call-ID: a5b30d51d07d42dfb39b4fe8d02f6f6a
CSeq: 1 INVITE
Contact: <sip:<IP_ADDRESS>:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Content-Length: 0
Server: FPBX-<IP_ADDRESS>(16.4.1)
[21:41:06 DBG] Received Response udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060: INVITE 180 Ringing
[21:41:06 DBG] Information response 180 Ringing for<EMAIL_ADDRESS>[21:41:06 INF]<EMAIL_ADDRESS>Ringing: 180 Ringing.
[21:41:06 DBG] Response received: udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060
[21:41:06 DBG] SIP/2.0 180 Ringing
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;rport=6060;received=<IP_ADDRESS>;branch=z9hG4bK76c11432449d48e6805fb89adb686752
To: <sip:100@<IP_ADDRESS>>;tag=b2b886e3-84f5-4bbc-8c05-74b115d7edcb
From: <sip:thisis@anonymous.invalid>;tag=FEDPDHKAQK
Call-ID: a5b30d51d07d42dfb39b4fe8d02f6f6a
CSeq: 1 INVITE
Contact: <sip:<IP_ADDRESS>:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Content-Length: 0
Server: FPBX-<IP_ADDRESS>(16.4.1)
[21:41:06 DBG] Received Response udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060: INVITE 180 Ringing
[21:41:06 DBG] Information response 180 Ringing for<EMAIL_ADDRESS>[21:41:06 INF]<EMAIL_ADDRESS>Ringing: 180 Ringing.
[21:41:10 DBG] Response received: udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060
[21:41:10 DBG] Initial RTP packet recieved from <IP_ADDRESS>:15300.
[21:41:10 DBG] SIP/2.0 200 OK
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;rport=6060;received=<IP_ADDRESS>;branch=z9hG4bK76c11432449d48e6805fb89adb686752
To: <sip:100@<IP_ADDRESS>>;tag=b2b886e3-84f5-4bbc-8c05-74b115d7edcb
From: <sip:thisis@anonymous.invalid>;tag=FEDPDHKAQK
Call-ID: a5b30d51d07d42dfb39b4fe8d02f6f6a
CSeq: 1 INVITE
Contact: <sip:<IP_ADDRESS>:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Length: 169
Content-Type: application/sdp
Server: FPBX-<IP_ADDRESS>(16.4.1)
v=0
o=- 49124 2 IN IP4 <IP_ADDRESS>
s=Asterisk
c=IN IP4 <IP_ADDRESS>
t=0 0
m=audio 15300 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=ptime:20
a=maxptime:150
a=sendrecv
[21:41:10 DBG] Received Response udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060: INVITE 200 OK
[21:41:10 DBG] Send Request udp:<IP_ADDRESS>:6060->udp:<IP_ADDRESS>:5060: ACK sip:<IP_ADDRESS>:5060 SIP/2.0
[21:41:10 DBG] Request sent: udp:<IP_ADDRESS>:6060->udp:<IP_ADDRESS>:5060
[21:41:10 DBG] ACK sip:<IP_ADDRESS>:5060 SIP/2.0
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;branch=z9hG4bK26032492c2af40f9963efa80577642e9;rport
To: <sip:100@<IP_ADDRESS>>;tag=b2b886e3-84f5-4bbc-8c05-74b115d7edcb
From: <sip:thisis@anonymous.invalid>;tag=FEDPDHKAQK
Call-ID: a5b30d51d07d42dfb39b4fe8d02f6f6a
CSeq: 1 ACK
Max-Forwards: 70
Content-Length: 0
[21:41:10 DBG] Response 200 OK for<EMAIL_ADDRESS>[21:41:10 DBG] SDP on UAC response could not be mangled, RTP socket <IP_ADDRESS>:15300.
[21:41:11 INF]<EMAIL_ADDRESS>Answered: 200 OK.
[21:41:11 DBG] Remote RTP socket <IP_ADDRESS>:15300.
[21:41:16 DBG] Request sent: udp:<IP_ADDRESS>:6060->udp:<IP_ADDRESS>:5060
[21:41:16 DBG] REFER sip:<IP_ADDRESS>:5060 SIP/2.0
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;branch=z9hG4bKcb147fd53f5149678c0c52908f2f5d9c;rport
To: <sip:100@<IP_ADDRESS>>;tag=b2b886e3-84f5-4bbc-8c05-74b115d7edcb
From: <sip:thisis@anonymous.invalid>;tag=FEDPDHKAQK
Call-ID: a5b30d51d07d42dfb39b4fe8d02f6f6a
CSeq: 2 REFER
Contact: <sip:Anonymous@pcdodo:6060>
Max-Forwards: 70
Content-Length: 0
Refer-To<EMAIL_ADDRESS>[21:41:16 DBG] Response received: udp:<IP_ADDRESS>:6060<-udp:<IP_ADDRESS>:5060
[21:41:16 DBG] SIP/2.0 202 Accepted
Via: SIP/2.0/UDP <IP_ADDRESS>:6060;rport=6060;received=<IP_ADDRESS>;branch=z9hG4bKcb147fd53f5149678c0c52908f2f5d9c
To: <sip:100@<IP_ADDRESS>>;tag=b2b886e3-84f5-4bbc-8c05-74b115d7edcb
From: <sip:thisis@anonymous.invalid>;tag=FEDPDHKAQK
Call-ID: a5b30d51d07d42dfb39b4fe8d02f6f6a
CSeq: 2 REFER
Contact: <sip:<IP_ADDRESS>:5060>
Expires: 600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Length: 0
Server: FPBX-<IP_ADDRESS>(16.4.1)
[21:41:16 INF] Call transfer was accepted by remote server.
[21:41:16 INF] Exiting...
[21:41:16 DBG] Initialising DNS resolver with operating system DNS server entries.
[21:41:16 DBG] DNS server <IP_ADDRESS>:53
[21:41:16 DBG] DNS server <IP_ADDRESS>:53
[21:41:16 DBG] DNSManager Stopping.
[21:41:16 INF] Shutting down SIP transport...
[21:41:16 DBG] Closing SIP UDP Channel udp:<IP_ADDRESS>:6060.
[21:41:16 DBG] SIPUDPChannel socket on udp:<IP_ADDRESS>:6060 listening halted.


Logger
public class Logger: LogGenerator
A share instance for gengrate log infos
-
Show log date or not
Declaration
Swift
public var showDate = true
-
Show log fileInfo or not
Declaration
Swift
public var showFileInfo = true
-
Log date formatter, ‘yyyy-MM-dd HH:mm:ss’ by defualt
Declaration
Swift
public var dateFormatter = DateFormatter.init().then
-
A closure for store log if you need, will call in Logger.share.queue SEE ‘GSLogger’
Declaration
Swift
public var storeClosure: ((LogEntity) -> Void)? = nil
-
Declaration
Swift
public class Logger: LogGenerator
-
Declaration
Swift
public class Logger: LogGenerator
-
Console a verbose level log
Declaration
Swift
public static func verbose(_ items: Loggerable..., file: String = #file, function: String = #function, line: Int = #line)
-
Console a info level log
Declaration
Swift
public static func info(_ items: Loggerable..., file: String = #file, function: String = #function, line: Int = #line)
-
Console a warning level log
Declaration
Swift
public static func warning(_ items: Loggerable..., file: String = #file, function: String = #function, line: Int = #line)
-
Console a error level log
Declaration
Swift
public static func error(_ items: Loggerable..., file: String = #file, function: String = #function, line: Int = #line)


For custom orders, questions, or concerns, please fill out this form.
Name
Email
Message
Upload Image


--- layout: default ---
Participate in any discussion in the course Slack.
If there's no interesting discussion ongoing, start a new topic! For example:
Please paste your Slack post as the submission in Canvas.


Join or start an Ionic Meetup
Ionic meetups are all around the world. They’re a great way to meet other Ionic developers and share ideas. Find one near you, or start your own and we’ll send our starter kit and help you promote it.
- Ionic ZürichZürich, Switzerland
- Ionic BerlinBerlin, Germany
- Ionic IsraelTel Aviv-Yafo, Israel
- Ionic UKLondon, UK {#
- Ionic RioRio de Janeiro #}
- Ionic UtahSalt Lake City, US
- Ionic NederlandUtrecht, Netherlands
- Ionic MadridMadrid, Spain
- Ionic AmsterdamAmsterdam, Netherlands
- Ionic MumbaiMumbai, India
- Ionic VancouverVancouver, Canada {#
- Ionic IstanbulIstanbul, Turkey #} {#
- Ionic AustraliaSydney, Australia #}
- Ionic DenmarkÅrhus, Denmark {#
- Ionic HungaryBudapest, Hungary #}
- Ionic ColombiaColombia
- Ionic JapanTokyo, Japan
- Ionic Hong KongHong Kong
- Ionic LagosLagos, Nigeria
- Ionic AtlantaAtlanta, US
- Ionic TanzaniaDar es Salaam, Tanzania
- Ionic ThailandBangkok, Thailand
Ionic Community Leaders
Here are just a few of the awesome people who make the Ionic Community better through the expert content they create, and the knowledge they share.
-
Simon Grimm
Ionic expert, educator, consultant, speaker. Creator of Ionic Academy.
-
Josh Morony
Author of Building Mobile Apps with Ionic. Creator of Elite Ionic.
-
Jorge Vergara
Mobile Dev. Author of Building Firebase powered Ionic apps.
-
Veni Kunche
Curator of Code With Veni. Working on Ionic Kits.
-
Ashteya Biharisingh
Writer on Ionic Framework and Angular. Creator of Gone Hybrid.
-
Paul Halliday
Author. Developer Advocate. Instructor at developer.school.
-
Sani Yusuf
GDE, author, speaker, trainer for Ionic. Founder of Haibrid Co.
-
Leif Wells
Presenter, author, web & mobile developer based in Atlanta.
-
David Dal Busco
Ionic Developer. Organizer of the Ionic Zürich Meetup
-
Chris Griffith
Presenter and author of Mobile App Development with Ionic.
-
Dayana Jabif
Full stack developer and JS lover. Running Ionic Themes.
-
Aaron Saunders
Author, instructor, community builder, CEO of Clearly Innovative.
Join the Ionic Community
Connect and engage with a worldwide community of Ionic developers, teachers, educators, and experts all around the world.
- Worldwide Slack Connect and chat with other Ionic devs
- Ionic Forum One of the best places to get help
- Twitter The latest updates, news, and content
- GitHub Official Ionic Framework GitHub repo’s
- Stack Overflow Find answers to the hardest questions
- Facebook Official Facebook page for Ionic news
- YouTube The official Ionic YouTube channel
- Ionic Blog Official Blog for Ionic Framework news
- Medium Official Medium blog for Ionic posts
The Latest from the Community
Get the latest blog posts, articles, tutorials, and videos from some of Ionic’s biggest community contributors and educators.
Tutorials
{#-
Ionic Tutorial: Building a complete mobile app with Ionic 3
In this Ionic tutorial we will build an example...
Dayana Jabif June 17, 2018 -
10 Simple Ionic Hacks
Even years after starting with Ionic we can learn something new that can safe us time or just...
Simon Grimm June 26, 2018 -
How To Build An Ionic App With A Graphcool Backend - Part 5
In the previous parts of this tutorial, we created...
Ashteya Biharisingh February 20, 2018 -
Building Your First Firebase Powered Ionic Framework App
A 7 post series that will teach you how to bui...
Jorge Vergara July 2, 2018 -
Creating a Custom Scroll Vanish Directive with Ionic Web
Components
As I was scrolling through Twitter’s PWA...
Josh Morony July 11, 2018 -
Ionic and Wordpress Integration using Wordpress REST API
Let's build an Ionic app for your Wordpress site...
Dayana Jabif December 31, 2017 -
The Ionic 4 Migration Survival Guide
In the most recent Ionic Dev Newsletter, the Ionic team stated that they are fast...
Josh Morony July 10, 2018 -
Creating Ionic Datatable With ngx-datatable
If you are working with a lot of data you might have encountered the problem of presenting...
Simon Grimm July 10, 2018 -
Testing in Ionic: Code Coverage
Today, an update made to the ionic-unit-testing-example project that will be...
Leif Wells September 5, 2017
Videos
{#-
Style and Theme Ionic Applications
Theming Ionic applications is a topic that is often left undiscussed. Ionic has a robust API...
Chris Griffith Egghead.io -
Saving Data in Ionic
In order to persist data throughout different sessions, there are multiple different methods...
Josh Morony YouTube -
Building an Ionic Image Gallery
Easily integrate a Gallery preview of your Images within your Ionic app!
Simon Grimm YouTube -
Component and Template Interaction in Ionic
In this video tutorial, I introduce the concepts of Property Binding, Event Binding, Interpolation...
Josh Morony YouTube -
Creating Ionic Datatable With ngx-datatable
Video Courses, Project Templates, Community & the Support you deserve to learn Ionic!
Simon Grimm YouTube -
Ionic 3 and AngularFire v5 - Creating a Project and Installing
Dependencies
Welcome to the newly updated AngularFire...
-
Ionic 4 and Capacitor
In this video we look at integrating Capacitor with our Ionic projects...
Paul Halliday YouTube -
Setting up your dev environment to start building Ionic Apps
Learn how to set up your development...
IonicThemes YouTube -
Ionic Form Handling & Validation
You can find the step by step tutorial and download the code for free in...
IonicThemes YouTube
Community Education
Extend your knowledge of Ionic from premium educational material made by community members.
-
Course
Elite Ionic
A course for building complex, well tested, high performing, beautiful, and useable mobile applications.
-
Course
Ionic Academy
Learn Ionic through step-by-step expert screencasts. Build for the Web and Mobile with JS, HTML and CSS.
-
Book
Ionic Cookbook
Recipes for creating cutting edge, real time hybrid mobile apps with Ionic.
-
Book
Mobile App Development with Ionic
Cross-platform apps with Ionic, Angular, and Cordova.
-
Book
Building Firebase Powered Ionic Apps
Everything you need to build Ionic apps using Firebase.
-
Course
Ionic 3 for Mobile App Developers
Develop highly performant mobile apps targeting iOS, Android, and Windows with a single code base.
-
Course
Build iOS & Android Apps with Angular & Ionic
Build Native iOS and Android Apps with Angular 2+, Cordova and the Ionic 3 Framework. Build 4 Complete Apps!
-
Tutorial
Building a complete mobile app with Ionic
Build an example app with a Q&A format similar to StackOverflow.


Apple MacBook Air Early 2020 Model Z0YJ1 With Touch ID, 10th Gen-Intel Core i7 Quad Core,
13.3 Inch Retina IPS Display With True Tone, 256GB PCIe SSD, 16GB LPDDR4X, Eng-KB, macOS,
Space Gray, International Version
by Apple, Laptops & Notebooks
1 / 2
2 / 2
❮
❯
34,999.00 EGP
FREE Shipping
Brand:
Apple
Color:
Grey
Condition:
New
Sold by:
Tech Shop
Description:
Computer CPU Manufacturer : Apple
External Product ID :<PHONE_NUMBER>37
Hard Disk Interface : SSD
Processor Speed (GHz) : 1.2 Up To 3.8
Model Number : Z0YJ1
Platform : Mac OSHardware
Processor Type : Core i7 (10th Generation)
USB : USB C
Brand : Apple
Laptop Family : Laptop
Video Controller Manufacturer : Intel
Graphics Card Capacity : Shared - Built in
Memory Card Reader : No
Keyboard Languages : ...
Add to cart
PRODUCT INFORMATION
SPECIFICATIONS
Brand
Apple
Hardware Platform
Mac OS
Package thickness
32.2 centimeters
Package weight in KGs
2000 grams
PRODUCT FEATURES
Computer CPU Manufacturer : Apple
External Product ID :<PHONE_NUMBER>37
Hard Disk Interface : SSD
Processor Speed (GHz) : 1.2 Up To 3.8
Model Number : Z0YJ1
Platform : Mac OSHardware
Processor Type : Core i7 (10th Generation)
USB : USB C
Brand : Apple
Laptop Family : Laptop
Video Controller Manufacturer : Intel
Graphics Card Capacity : Shared - Built in
Memory Card Reader : No
Keyboard Languages : English
Touch screen : No
Hard Disk Interface : Solid State
Usage : Multi
Memory Technology : LPDDR4
Screen Size Range : 13 - 13.9 inches
Display Size (Inch) : 13.3 inches
External Product ID Type : UPC-A
Optical Drive Type : Without Optical Drive
Number of Processor Core : Quad Core
RAM Type : LPDDR4X
RAM Size : 16 GB
Operating System Type : Mac OS
Processor Family : Intel Core i7


These weekend workshops target potential GeekChic Programming students seeking an introduction to code. The all-female demographic provides a comfortable environment for women to network, learn about computer programming, and see if computer science may be a field they’re interested in pursuing - all without the traditional barriers to entry. In just one weekend, we’ll introduce a new development skill, demonstrate the command line, and start coding!
These workshops take place on evenings and weekends, convienient for your busy schedule. They provide specific instruction and discussion on a topic related to technology and are intended for beginner and intermediate programmers. Many seminars are coed, but in order to encourage women to participate, we provide them a significantly decreased cost.
Find an event that's perfect for you! Comming up soon:
GeekChic Programming encourages women to transform technology by applying the skills they learn in our programming workshops and classes to explore innovative solutions to real-world problems. Over the last three years, President Obama has continued to emphasize the importance of STEM in education reform. The White House is committed to expanding STEM education and career opportunities for underrepresented groups, including women and girls, and the global job marketplace shows that these technical skills are in extremely high demand. There is a demonstrated need for women in the fields of science, technology, engineering, and math, and software is at the center of every STEM project.
{% endblock %} {% block sidebar %} {{ block.super }} {% endblock %}


forum
Forum
chat
Chat
edit
Add Trail
All Trails
arrow_forward
>View Discussions in Mongolia
Forum content here
Chat
arrow_forward
Enter a new message:
Submit
Chat content here
arrow_backward
Article content here
Mongolia


Genome completeness and contamination, and taxonomy were estimated unsing CheckM2.
{div[QualityScore]}For all the information see the file {div[input_file]}
"Good quality" refers to the standard of Completeness > 90% and Contamination < 5%. Also called high-quality or near-complete. But t-RNA/r-RNA presence is not evaluated. It is less stingent than Quality Score > 90.


Legal Impact Hackathon is a unique event for everyone who thinks that technology can have impact on legal matters. We believe that together we can make a real impact on our world.
Our main goal is to create projects that can become a spark for the better future. You and your team will have 24 hours to prepare something that works (proof of concept is fine!) and show it to others! Challenge accepted?
There's no technological restriction on what you can use to build your project, however, there are going to be some special categories like:
- legal document processing
- best blockchain-based solution
- crowd-based solution
- the craziest idea
- GDPR solution
We want you to join us on this exciting adventure! No matter if you are an experienced developer or the beginning one. You don't even have to be a programmer to take part! We'll be more than happy to invite graphic & UX designers, tech enthusiasts, community workers & social activists.
You don't have a team? Don't worry! You'll have an opportunity to create one and make new friends.
If you have any questions feel free to contact us<EMAIL_ADDRESS>Day 1st (5th June)
Day 2nd (6th June)
Project evaluation criteria
-
50% - real impact on solving a legal problem
-
20% - approach to the problem and target group analysis
-
20% - completion of the project
-
10% - innovativeness of the solution
COMPLETE RULES AND REGULATIONS


test 1.1 (no space)
xxyy
test 1.2 (with space)
xx yy
test 1.3 (with non breaking space)
xx yy
test 2.1 (no space)
xxyy
test 2.2 (with space)
xx yy
test 2.3 (with non breaking space)
xx yy
test 3 (no space)
x
x
test 4 (<br>)
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
xx
test 5 (no space in the front)
aa
test 6 (no space in the front)
aa


Returns the ActiveSpeakerDetector for this audio-video controller.
Returns the AudioMixController for this audio-video controller.
Returns the session configuration for this audio-video controller.
Returns the EventController for this audio-video controller.
Returns the Logger for this audio-video controller.
Returns the MediaStreamBroker for this audio-video controller.
Returns the RealtimeController for this audio-video controller.
Returns the RTCPeerConnection for this audio-video controller if there is one.
Returns the VideoTileController for this audio-video controller.
Remove the promoted attendee from the Primary meeting. This client will stop sharing audio, video, and data messages.
This will revert the end-user to precisely the state they were before a call to promoteToPrimaryMeeting
This will have no effect if there was no previous successful call to promoteToPrimaryMeeting
. This
may result in AudioVideoObserver.audioVideoWasDemotedFromPrimaryMeeting
but there is no need to wait for that callback
to revert UX, etc.
Iterates through each observer, so that their notification functions may be called.
This API will be deprecated in favor of ClientMetricReport.getRTCStatsReport()
.
It makes an additional call to the getStats
API and therefore may cause slight performance degradation.
Please subscribe to metricsDidReceive(clientMetricReport: ClientMetricReport)
callback,
and get the raw RTCStatsReport
via clientMetricReport.getRTCStatsReport()
.
Get all the remote video sending sources.
Handles the meeting session status and returns true if it will restart the session.
Pauses receiving stream on peer connection by streamId
Allows an attendee in a Replica meeting to immediately transition to a Primary meeting attendee without need for reconnection. The promise should always return a session status even upon failure (i.e. it should never reject). See the guide for more information.
The resolved MeetingSessionStatus
will contain a MeetingSessionStatusCode
of the following:
MeetingSessionStatusCode.OK
: The promotion was successful (i.e. session token was valid,
there was room in the Primary meeting, etc.), audio will begin flowing
and the attendee can begin to send data messages, and content/video if the call is not already at limit.MeetingSessionStatusCode.AudioAuthenticationRejected
: Credentials provided
were invalid when connection attempted to Primary meeting. There may be an issue
with your mechanism which allocates the Primary meeting attendee for the Replica
meeting proxied promotion. This also may indicate that this API was called in a
non-Replica meeting.MeetingSessionStatusCode.AudioCallAtCapacity
: Credentials provided were correct
but there was no room in the Primary meeting. Promotions to Primary meeting attendee take up a slot, just like
regular Primary meeting attendee connections and are limited by the same mechanisms.MeetingSessionStatusCode.SignalingBadRequest
or MeetingSessionStatusCode.SignalingInternalServerError
:
Other failure, possibly due to disconnect or timeout. These failures are likely retryable.Application code may also receive a callback on AudioVideoObserver.videoAvailabilityDidChange
to indicate they
can begin to share video.
chime::DeleteAttendee
on the Primary meeting attendee will result in AudioVideoObserver.audioVideoWasDemotedFromPrimaryMeeting
to indicate the attendee is no longer able to share.
Any disconnection will trigger an automatic demotion to avoid unexpected or unwanted promotion state on reconnection.
If the attendee still needs to be an interactive participant in the Primary meeting, promoteToPrimaryMeeting
should be called again with the same credentials.
This function should not be called until the first one resolves.
The credentials for the Primary meeting. This needs to be obtained out of band.
Promise which resolves to a session status for the request. See possible options above.
Restarts the peer connection and/or the session.
Restarts the local audio. This function assumes the peer connection is established and an active audio stream must be chosen in DeviceController
The audio stream to be replaced with
Replaces the local video device without a WebRTC negotiation on the sender side and
avoids that all video subscribers to re-negotiate at the same time.
This is an optimized way of replacing video stream and requires WebRTC Unified Plan
.
The video stream to be replaced with
Restarts the local video device. The callback is called when the device has been restarted.
Resumes receiving stream on peer connection by streamId
Sets the audio profile to use for audio. The new audio profile takes effect
on the next call to start
or if already started, upon the next reconnect.
Set codec preferences for this clients send stream in order of most preferred to least preferred. The controller will fallback for one of two reasons
If there is no overlap between what is passed in and what is supported by the browser, this function may not have any effect, and the default set of codecs for this browser will be used.
Sets the max bandwidth for video publishing
Start the meeting session. By default this will connect and begin sending and receiving audio, depending on the implementation.
This method also allows you to provide options for how connection occurs.
The only supported option is signalingOnly
. Specifying this option will
cause the controller to only connect the meeting signaling channel. This
can be performed relatively early in the join lifecycle (e.g., prior to
choosing audio devices), which can improve join latency.
Your code is responsible for calling start
again without signalingOnly
to complete connection.
Passing signalingOnly: true
will cause only the initial signaling connection to occur.
Updates the peer connection when video tiles have changed. If needsRenegotiation
is set explicitly to false, we may skip SDP negotiation if it is not necessary.
Generated using TypeDoc
AudioVideoController manages the signaling and peer connections.


Bowling ScoreCard
Running Score
Next Frame
Frame
Roll
Knocked Down
Running Total
1
1
1
2
Calculate Score
2
1
2
2
Calculate Score
3
1
3
2
Calculate Score
4
1
4
2
Calculate Score
5
1
5
2
Calculate Score
6
1
6
2
Calculate Score
7
1
7
2
Calculate Score
8
1
8
2
Calculate Score
9
1
9
2
Calculate Score
10
1
10
2
10
3
Calculate Score


Isak subjected to racist abuse in Romania as Sweden qualify
Sweden's joy at qualifying for Euro 2020 thanks to a 2-0 win away to Romania on Friday was tarnished by the racist abuse suffered by their striker Alexander Isak when he replaced Marcus Berg in the 78th minute.
STOCKHOLM: Sweden's joy at qualifying for Euro 2020 thanks to a 2-0 win away to Romania on Friday was tarnished by the racist abuse suffered by their striker Alexander Isak when he replaced Marcus Berg in the 78th minute.
The game was stopped briefly by the referee and an announcement was made over the public address system.
"I heard a number of racist shouts from the stands, and I asked the referee if he heard what was happening. He hadn't heard anything," the 20-year-old Isak, whose parents are from Eritrea, told Swedish radio.
"A few minutes later he stopped the game and asked. We had a small discussion, the match went on and I am OK with that, and I'm happy we won. Obviously it hurts, it's a shame but we were prepared for it."
Undaunted by the taunting from the stands, Isak continued to seek possession and had the ball at his feet as the final whistle went to confirm Sweden's qualification as runners-up behind Spain in Group F.
"I don't let things like that affect me in that way. It's better to ignore it.
Sweden travel to Stockholm on Saturday ahead of their final group game against Faroe Islands at the Friends Arena on Monday.
(Reporting by Philip O'Connor; editing by Ken Ferris)


Use this dialog to configure your .properties file. This file contains lists of catalog.xml files. The catalog.xml files contain the information on how to resolve various PUBLIC and SYSTEM identifiers during XML processing.


Happy to see you try out Super Productivity!
After familiarizing you with the basic functionality, you might want head over to the settings to adjust everything to your personal needs and to set up the Jira integration. You can find them under the cog icon in the upper right.
If you need it there is also help on every page.
Enjoy yourself!


This tests to see if a mouse click inside an editable, focusable node focuses that node. Normally, we focus a node on mouse down, but to make it easier to drag selections containing editable pieces we delay focus until mouse up. The editable table cell should be focused and you should see a 'Success' message below.
| non-editable | editable |


home
Home
memory
Hardware
Operating System
settings
Settings
ALE
.
RUN
Debug
Assistant
terminal
×
Assistant
×
Nothing here
welcome
Select an activity or tutorial below to start learning RISC-V assembly language!
Tutorials
RISC-V Resources
SoC
Device:
Western Digital SweRV
ISAs:
A
C
D
F
I
M
S
U
Bus Frequency Scaling:
1/∞
Memory Map
Memory slot
Device
External Devices
add
New
Name
Description
Enable Operating System
Startup Configuration
Stack Pointer:
Standard IO
STDIN
STDOUT
STDERR
refresh
file_upload
file_download
Syscalls
add
New
number
Description
Configuration Export
Home URL:
Assistant Script:
generate LINK
copy to clipboard
Auto-compile options
C code extension:
Asm code extension:
Object file extension:
ELF extension:
Enable Auto-Compile


User instructions
The data here is provided from our CERT environment, not Production. This data is believed to be the best effort to privide a view into production as possible.
The CERT environment is backloaded from production every Wednesday.
How to use this app
- From the Client tab
- Select a client from the list on the left.
- All available information on that client will display in the large area
- Clicking a link in the Client information grid wil provide you with a list of all clients with that feature
- From the Feature Tab
- Select a feature from the list on the left
- That feature will appear at the top of the main section
- Click the refresh button to see all clients with the selected features
If you are experience a problem or you have a feature request for this applicaiton please contact DTO Team Wolfpack


There are so many conflicted reports about the potential of leonotis leonurus, so I am writing this to put an end to the argument once and for all.  It works. Simple as that. I live in the one of the southernmost regions of Australia, so my knowledge of American Indians is extremely limited, but I know they wouldn’t smoke anything unless it had effects…and this does.
I am 18, and I have been a daily pot smoker for the last 2 years, not to mention countless cookies, I have taken Acid, Shrooms, Ecstasy, Ketamine, DMT, Diazepam and have tried as many legal highs as I could lay my hands on, Codeine, Pseudoephidrene, DXM, nutmeg *shudder*, Bugmansia Sanguinae, Absinthe (yummy) and others not even worth listing.
Note: I am currently taking Lexapro (escitalopram oxelate[?]) 20mg daily for Social Anxiety Disorder. I don’t know if it changes the effects of drugs or not, but I havn’t noticed anything with any other substances.
Now, I discovered quite a while ago that my house is rife with Dagga plants. 4 or 5 scattered plants that have grown to what I can only assume is the full size, as they have been this big for as long as I can remember. Recently I was given the task of pruning them, and I delightfully went about my task and collected a large quantity of both leaves and beautifully orange flowers, to which I have been, and plan to continue, experimenting with.
From my experiences, getting a high off the leaves is about as fruitless as getting high off chimney fumes. And very similar tasting. There is absolutely no point in using them as anything more than a tobacco substitute to keep mix lit, and even then I wouldn’t recommend it.
The flowers, ah, the flowers…I tried eating them once, and yes there is an effect. However, the taste is absolutely horrid, and the aftertaste even worse…but the aftertaste DOESN’T GO AWAY for a long while. I do not recommend this either.
Now we come to -smoking- the beautiful flowers. As with any good pot mix, these things need to be cut up as fine as humanly possible. Doesn’t make the hit stronger, but the burn is faster and easier to shotgun. Add pot, tobacco, etc. as you wish, but the stuff alone works. I add very small amounts of tobacco to assist burning, but if it’s fine enough it isn’t really essential. Contrary to other reports, I found smoking Dagga flowers –easier- to handle than smoking pot. And it doesn’t stink like the green either, a lot more perfumey and easier to explain to those meddling parents.
I found that two of these cones is very similar in effect to a single of pot. The high isn’t as psychological as pot, and you can remain fairly lucid and controlled under its effect. In fact, in the same way pot makes me nervous around people, I found social interaction easier with Dagga, almost comparable to a small amount of alcohol. The body high is by far the most potent effect, however. It makes one feel relaxed, somewhat numb but without (much) effect on motor functions, perhaps comparable to moderate amounts of codeine (<60mg). The effects are cumulative, but I’ve only tried roughly 5 cones of this at any one time, but I plan to see if I can get messed up, but I doubt it.>
Bear in mind, that if you’re looking to trip balls then this is not for you. This is no placebo, but it is by no means a hard drug in status or effect. It works, it’s mild, but it’s pleasant.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


By using nested arrays you can show multiple events per row (with tooltips).
This goes in the documents header:<script src="RGraph.common.core.js"></script> <script src="RGraph.common.dynamic.js"></script> <script src="RGraph.common.tooltips.js"></script> <script src="RGraph.gantt.js"></script>Put this where you want the chart to show up:
<canvas id="cvs" width="800" height="350"> [No canvas support] </canvas>This is the code that generates the chart - it should be placed AFTER the canvas tag(s):


Vote Center Siting Tool
Developed by the California Civic Engagement Project (CCEP), this new mapping tool is designed to provide assistance to California county election offices seeking to implement the Voter's Choice Act in the June and November 2018 elections. The goal of this tool is to help election officials identify optimal sites for potential Vote Center and Vote-by-Mail drop boxes. The tool uses a facility allocation model that incorporates the siting criteria included in the California Voter's Choice Act. The resulting interactive web maps are intended to supplement what election officials and stakeholders already know about their counties' profiles and needs. The Vote Center Siting Tool was made available at the end of February 2018. Some counties adopting the Voter’s Choice Act may have already made their vote center and drop box siting choices for the June 2018 election.
County Selection
Go to the map, or to the link below, and click on a county. This will take you to the interactive web-based tool for the county you have selected. The five counties available here have all chosen to implement the Voter's Choice Act in time for the 2018 election cycle.
Currently Participating Counties
What is the Voter's Choice Act?
In 2016, Governor Jerry Brown signed Senate Bill 450 which allows counties to chose to adopt a new voting system. Known as the Voter's Choice Act, this new model enables counties to mail every registered voter a vote-by-mail ballot which the voter can mail in, drop off at a secure ballot box, or drop off at a newly established Vote Center. At Vote Centers, voters can cast their ballots in person, drop off their vote-by-mail ballots, access same-day voter registration, receive replacement ballots, and access additional services. Of California’s 58 counties, 14 counties are eligible to opt in during the 2018 election, while the remaining counties are eligible to adopt the model in 2020. The following counties have adopted the VCA for the 2018 election cycle: Madera, Napa, Nevada, Sacramento and San Mateo.


| Package | Description |
|---|---|
| com.tailf.dp.services |
Service callback specific context and utilities.
|
| com.tailf.proto |
Package containing java classes representation of
Erlang datatypes or terms which
is used internally in the communication between the Library and
ConfD/NCS.
|
| Constructor and Description |
|---|
ServiceContextImpl(DpTrans dpTrans,
Dp dp,
ConfEObject eObject,
ServiceOperationType operation)
Internally called constructor to create a ServiceContext
|
ServiceModificationContextImpl(DpTrans dpTrans,
Dp dp,
ConfEObject eObject)
Internally used constructor
|
| Modifier and Type | Method and Description |
|---|---|
byte |
ConfELong.byteValue()
Get this number as a byte.
|
char |
ConfELong.charValue()
Get this number as a char.
|
float |
ConfEDouble.floatValue()
Get the value, as a float.
|
int |
ConfELong.intValue()
Get this number as an int.
|
short |
ConfELong.shortValue()
Get this number as a short.
|
int |
ConfELong.uIntValue()
Get this number as a non-negative int.
|
short |
ConfELong.uShortValue()
Get this number as a non-negative short.
|
| Constructor and Description |
|---|
ConfEByte(ConfInputStream buf)
Create an E integer from a stream containing an integer encoded in E
external format.
|
ConfEChar(ConfInputStream buf)
Create an E integer from a stream containing an integer encoded in E
external format.
|
ConfEFloat(ConfInputStream buf)
Create an E float from a stream containing a float encoded in E external
format.
|
ConfEInt(ConfInputStream buf)
Create an E integer from a stream containing an integer encoded in E
external format.
|
ConfEShort(ConfInputStream buf)
Create an E integer from a stream containing an integer encoded in E
external format.
|
ConfEUInt(ConfInputStream buf)
Create an E integer from a stream containing an integer encoded in E
external format.
|
ConfEUInt(int i)
Create an E integer from the given value.
|
ConfEUShort(ConfInputStream buf)
Create an E integer from a stream containing an integer encoded in E
external format.
|
ConfEUShort(short s)
Create an E integer from the given value.
|


Unsatisfied, Satisfied, Unsatisfied, Satisfied, Unsatisfied, Unsatisfied Satisfied, Satisfied, Unsatisfied, Satisfied, Unsatisfied, Unsatisfied
Parent Tax Transcript
Satisfied, Satisfied, Unsatisfied, Satisfied, Unsatisfied, Received


Private key
Server certificate
Certificate chain
Configuration in server.xml
.pem .crt .cer .key
ASCII
Key, certificate or chain
.der
Binary form of .pem
Key, certificate or chain
.p7b (PKCS7)
ASCII
Certificate or chain
No keys
.p12 (PKCS12)
Binary
Key, certificate or chain
.jks .keystore
Binary
Java specific (deprecated)
Key, certificate or chain
Tomcat 7.0.x or 8.0.x
BIO, NIO or NIO2
JSSE implementation, JSSE configuration
Keystore
PKCS12 with Java 7+
Tomcat 7.0.x or 8.0.x
APR/Native
OpenSSL implementation, OpenSSL configuration
PEM
Tomcat 8.5.x or 9.0.x
NIO or NIO2
JSSE or OpenSSL implementation
JSSE or OpenSSL configuration (can't mix)
Keystore, PKCS12 (JSSE config)
PEM (OpenSSL config)
Tomcat 8.5.x or 9.0.x
APR/Native
OpenSSL implementation, OpenSSL configuration
PEM
Was 1 connector, 1 host name, 1 certificate
Now each connector can have multiple host names
Each host name can have multiple certificates
Change in configuration style
Old style is supported but deprecated
OpenSSL for Linux - package manager
OpenSSL for Windows - Tomcat Native binary
Keytool - JRE/JDK
openssl.cnf - Github
Create APR/native key and certificate
Create keystore key and certificate
Show 8.5.x, NIO working with both in turn


Tan Le
Front-End Developer
Portfolio
This is a portfolio dashboard showing all my front-end projects
- Technology used: HTML, CSS, JavaScript
- Concept: Responsive Pattern, Media Query, FlexBox
Movie
This project is a movie dashboard showing favorite movies
- Technology used: Python, JavaScript, Bootstrap, HTML, CSS
Weather
This is a weather mobile app for Android
- Technology used: Java, Gradle
- Concept: Unit Testing
2048
This is a webapp game
- Technology used: HTML, CSS, JavaScript