By Ross Smith
#include "rs-core/common.hpp"
#define
RS_ASSUME
(expr)
[compiler may assume bool(expr)
is always true]#define
RS_LIKELY
(expr)
[returns bool(expr)
; compiler should optimize for the true case]#define
RS_UNLIKELY
(expr)
[returns bool(expr)
; compiler should optimize for the false case]#define
RS_NOTREACHED
[compiler may assume this line will never be reached]Optimization hints. These have no semantic effect on the program (if the
absolute conditions in RS_ASSUME
and RS_NOTREACHED
are not violated), but
give the compiler hints concerning its expected behaviour.
#define
RS_BITMASK_OPERATORS
(EC)
Defines bit manipulation and related operators for an enum class
(unary !
,
~
; binary &
, &=
, |
, |=
, ^
, ^=
).
#define
RS_ENUM
(EnumType, IntType, first_value, first_name, ...)
#define
RS_ENUM_CLASS
(EnumType, IntType, first_value, first_name, ...)
These define an enumeration, given the name of the enumeration type, the underlying integer type, the integer value of the first entry, and a list of value names. They will also define the following functions:
std::ostream&
operator<<
(std::ostream& out, EnumType t)
constexpr bool
enum_is_valid
(EnumType t) noexcept
std::vector<EnumType>
enum_values<EnumType>
()
The output operator prints the name of an enumeration constant (qualified with
the class name if this is an enum class
), or the integer value if the
argument is not a named value. The enum_is_valid()
function reports whether
or not the argument is a named value of the enumeration. The
enum_values<T>()
function returns a vector
containing a list of the
enumeration's values.
Example:
RS_ENUM(Foo, 1, alpha, bravo, charlie)
RS_ENUM_CLASS(Bar, 1, delta, echo, foxtrot)
Equivalent code:
enum Foo { alpha = 1, bravo, charlie };
std::ostream& operator<<(std::ostream& out, Foo f) { ... }
enum class Bar { delta = 1, echo, foxtrot };
std::ostream& operator<<(std::ostream& out, Bar b) { ... }
#define
RS_LDLIB
([tag:] lib ...)
This instructs the makefile to link with one or more static libraries. Specify
library names without the -l
prefix (e.g. RS_LDLIB(foo)
will link with
-lfoo
). If link order is important for a particular set of libraries, supply
them in a space delimited list in a single RS_LDLIB()
line.
Libraries that are needed only on specific targets can be prefixed with one of
the target identifiers listed below (e.g. RS_LDLIB(apple:foo)
will link
with -lfoo
for Apple targets only). Only one target can be specified per
invocation; if the same libraries are needed on multiple targets, but not on
all targets, you will need a separate RS_LDLIB()
line for each target.
apple:
linux:
mingw:
cygwin:
RS_LDLIB()
lines are picked up at the "make dep"
stage; if you change a
link library, the change will not be detected until dependencies are rebuilt.
#define
RS_MOVE_ONLY
(T)
T(const T&) = delete;
T(T&&) = default;
T& operator=(const T&) = delete;
T& operator=(T&&) = default;
#define
RS_NO_COPY_MOVE
(T)
T(const T&) = delete;
T(T&&) = delete;
T& operator=(const T&) = delete;
T& operator=(T&&) = delete;
Convenience macros for defaulted or deleted copy and move operations.
#define
RS_OVERLOAD
(f) [] (auto&&... args) { return f(std::forward<decltype(args)>(args)...); }
Creates a function object wrapping a set of overloaded functions, that can be passed to a context expecting a function (such as an STL algorithm) without having to explicitly resolve the overload at the call site. (From an idea by Arthur O'Dwyer on the C++ standard proposals mailing list, 14 Sep 2015.)
enum
ByteOrder
big_endian
little_endian
template <typename T, ByteOrder B> class
Endian
using Endian::
value_type
= T
static constexpr ByteOrder Endian::
byte_order
= B
constexpr Endian::
Endian
() noexcept
constexpr Endian::
~Endian
() noexcept
constexpr Endian::
Endian
(const Endian& e) noexcept
constexpr Endian::
Endian
(Endian&& e) noexcept
constexpr Endian& Endian::
operator=
(const Endian& e) noexcept
constexpr Endian& Endian::
operator=
(Endian&& e) noexcept
constexpr Endian::
Endian
(T t) noexcept
explicit Endian::
Endian
(const void* p) noexcept
constexpr Endian::
operator T
() const noexcept
constexpr T Endian::
get
() const noexcept
constexpr const T* Endian::
ptr
() const noexcept
T* Endian::
ptr
() noexcept
constexpr T Endian::
rep
() const noexcept
T& Endian::
rep
() noexcept
template <typename T> using
BigEndian
= Endian<T, big_endian>
template <typename T> using
LittleEndian
= Endian<T, little_endian>
template <typename T, ByteOrder B> std::ostream&
operator<<
(std::ostream& out, Endian<T, B> t)
template <typename T, ByteOrder B> class std::
hash
<Endian<T, B>>
Endian
and T
An Endian
object holds an integer in a defined byte order. This is a literal
type and can be used in constexpr
expressions.
Assignment to or from an endian integer performs any necessary reordering
transparently. The default constructor sets the value to zero; the constructor
from a pointer copies sizeof(T)
bytes into the object. The ptr()
and
rep()
functions give access to the internal, byte ordered form. The hash
function gives the same result as the underlying integer type's hash.
using
U8string
= std::string
Use U8string
for strings that are expected to be in UTF-8 (or ASCII, since
any ASCII string is also valid UTF-8), while plain std::string
is used where
the string is expected to be in some non-Unicode encoding, or where the string
is being used simply as an array of bytes rather than encoded text.
using
Strings
= std::vector<std::string>
Commonly used type defined for convenience.
#define
RS_NATIVE_WCHAR
1
- defined if the system API uses wide charactersusing
NativeCharacter
= [char on Unix, wchar_t on Windows]
using
NativeString
= [std::string on Unix, std::wstring on Windows]
These are defined to reflect the character types used in the operating system's native API.
#define
RS_WCHAR_UTF16
1
- defined if wchar_t and wstring are UTF-16#define
RS_WCHAR_UTF32
1
- defined if wchar_t and wstring are UTF-32using
WcharEquivalent
= [char16_t or char32_t]
using
WstringEquivalent
= [std::u16string or std::u32string]
These are defined to reflect the encoding represented by wchar_t
ad
std::wstring
. Systems where wide strings are neither UTF-16 nor UTF-32 are
not supported.
template <typename C> basic_string<C>
cstr
(const C* ptr)
template <typename C> basic_string<C>
cstr
(const C* ptr, size_t n)
These construct a string from a pointer to a null-terminated character
sequence, or a pointer and a length. They differ from the corresponding string
constructors in that passing a null pointer will yield an empty string, or a
string of n
null characters, instead of undefined behaviour.
template <typename C> size_t
cstr_size
(const C* ptr)
Returns the length of a null-terminated string (a generalized version of
strlen()
). This will return zero if the pointer is null.
void
rethrow
(std::exception_ptr p)
Rethrows the exception, if one is present. This is the same as
std::rethrow_exception()
, except that it does nothing if the exception
pointer is null.
class
WindowsCategory
: public std::error_category
virtual U8string WindowsCategory::
message
(int ev) const
virtual const char* WindowsCategory::
name
() const noexcept
const std::error_category&
windows_category
() noexcept
An error category instance for translating Win32 API error codes; naturally
this is only defined on builds that use the Win32 API. (MSVC provides this
through std::system_category()
, but GCC does not supply any equivalent on
Cygwin or Mingw.)
template <typename T> using
BinaryType
= [unsigned integer type]
Yields an unsigned integer type the same size as T
. This will fail to
compile if no such type exists.
template <typename T1, typename T2> using
CopyConst
= ...
Yields a type created by transferring the const
qualification (or lack of
it) from T1
to the unqualified type of T2
. For example, CopyConst<int,
const string>
yields string
, while CopyConst<const int, string>
yields
const string
.
template <size_t Bits> using
SignedInteger
= [signed integer type]
template <size_t Bits> using
UnsignedInteger
= [unsigned integer type]
Signed and unsigned integer types with the specified number of bits (the same
types as int8_t
, int16_t
, etc). These will fail to compile if Bits
is
not a power of 2 in the supported range (8-64).
These are convenience base classes that define members and
operators that would normally just be repetitive boilerplate (similar to the
ones in Boost). They all use the CRTP idiom; a class T
should derive from
Mixin<T>
to automatically generate the desired boilerplate code. The table
below shows which operations the user is required to define, and which ones
the mixin will automatically define. (Here, t
and u
are objects of type
T
, v
is an object of T
's value type, and n
is an integer.)
| Mixin | Requires | Defines |
|---|---|---|
EqualityComparable <T> |
t==u |
t!=u |
LessThanComparable <T> |
t==u, t<u |
t!=u, t>u, t<=u, t>=u |
InputIterator <T,CV> |
*t, ++t, t==u |
t->, t++, t!=u |
OutputIterator <T> |
t=v |
*t, ++t, t++ |
ForwardIterator <T,CV> |
*t, ++t, t==u |
t->, t++, t!=u |
BidirectionalIterator <T,CV> |
*t, ++t, --t, t==u |
t->, t++, t--, t!=u |
RandomAccessIterator <T,CV> |
*t, t+=n, t-u |
t->, t[n], ++t, t++, --t, t--, t-=n, t+n, n+t, t-n, t==u, t!=u, t<u, t>u, t<=u, t>=u |
FlexibleRandomAccessIterator <T,CV> |
*t, ++t, --t, t+=n, t-u, t==u |
t->, t[n], t++, t--, t-=n, t+n, n+t, t-n, t!=u, t<u, t>u, t<=u, t>=u |
In the iterator mixins, CV
is either V
or const V
, where V
is the
iterator's value type, depending on whether a mutable or const iterator is
required.
The first version of RandomAccessIterator
uses the minimal set of user
supplied operations to generate all of those required;
FlexibleRandomAccessIterator
requires more user supplied operations, but
will decay safely to one of the simpler iterator types if an underlying type
does not supply all of the corresponding operations.
In addition to the operators listed in the table above, all iterator mixins supply the standard member types:
using
difference_type
= ptrdiff_t
using
iterator_category
= [standard iterator tag type]
using
pointer
= CV*
using
reference
= CV&
using
value_type
= std::remove_const_t<CV>
template <typename T, int Def = 0> class
Movable
using Movable::
value_type
= T
Movable::
Movable
()
Movable::
~Movable
()
Movable::
Movable
(const Movable& m)
Movable::
Movable
(Movable&& m) noexcept
Movable::
Movable
(const T& t)
Movable::
Movable
(T&& t)
Movable& Movable::
operator=
(const Movable& m)
Movable& Movable::
operator=
(Movable&& m) noexcept
Movable& Movable::
operator=
(const T& t)
Movable& Movable::
operator=
(T&& t) noexcept
T& Movable::
operator*
() noexcept
const T& Movable::
operator*
() const noexcept
T* Movable::
operator->
() noexcept
const T* Movable::
operator->
() const noexcept
Movable::
operator T
() const
static T Movable::
default_value
()
This wraps a T
object and provides reset-on-move behaviour: Movable<T>
's
move constructor and move assignment operator set the value in the moved-from
object to T
's default value. If T
is explicitly convertible from an int
,
a default value other than zero can be provided. The move functions call the
corresponding functions on T
, which are assumed to not throw. If T
is also
copyable, Movable<T>
will be copyable.
template <typename T2, typename T1> bool
is
(const T1& ref) noexcept
template <typename T2, typename T1> bool
is
(const T1* ptr) noexcept
template <typename T2, typename T1> bool
is
(const unique_ptr<T1>& ptr) noexcept
template <typename T2, typename T1> bool
is
(const shared_ptr<T1>& ptr) noexcept
template <typename T2, typename T1> T2&
as
(T1& ref)
template <typename T2, typename T1> const T2&
as
(const T1& ref)
template <typename T2, typename T1> T2&
as
(T1* ptr)
template <typename T2, typename T1> const T2&
as
(const T1* ptr)
template <typename T2, typename T1> T2&
as
(unique_ptr<T1>& ptr)
template <typename T2, typename T1> T2&
as
(const unique_ptr<T1>& ptr)
template <typename T2, typename T1> T2&
as
(shared_ptr<T1>& ptr)
template <typename T2, typename T1> T2&
as
(const shared_ptr<T1>& ptr)
These are simple wrappers around dynamic_cast
. The is()
function returns
true if the pointer or reference's target has the requested dynamic type;
as()
returns a reference to the object converted to the requested dynamic
type, or throws std::bad_cast
if the dynamic_cast
fails.
template <typename T2, typename T1> T2
binary_cast
(const T1& t) noexcept
template <typename T2, typename T1> T2
implicit_cast
(const T1& t)
Type conversions. The binary_cast()
operation does a simple bitwise copy
from one type to another; it will fail to compile if the two types have
different sizes, but does no other safety checks. The implicit_cast()
operation performs the conversion only if it would be allowed as an implicit
conversion.
class
Version
using Version::
value_type
= unsigned
Version::
Version
() noexcept
template <typename... Args> Version::
Version
(unsigned n, Args... args)
explicit Version::
Version
(const U8string& s)
Version::
Version
(const Version& v)
Version::
Version
(Version&& v) noexcept
Version::
~Version
() noexcept
Version& Version::
operator=
(const Version& v)
Version& Version::
operator=
(Version&& v) noexcept
unsigned Version::
operator[]
(size_t i) const noexcept
const unsigned* Version::
begin
() const noexcept
const unsigned* Version::
end
() const noexcept
unsigned Version::
major
() const noexcept
unsigned Version::
minor
() const noexcept
unsigned Version::
patch
() const noexcept
string Version::
str
(size_t min_elements = 2) const
string Version::
suffix
() const
uint32_t Version::
to32
() const noexcept
static Version Version::
from32
(uint32_t n) noexcept
bool
operator==
(const Version& lhs, const Version& rhs) noexcept
bool
operator!=
(const Version& lhs, const Version& rhs) noexcept
bool
operator<
(const Version& lhs, const Version& rhs) noexcept;
bool
operator>
(const Version& lhs, const Version& rhs) noexcept
bool
operator<=
(const Version& lhs, const Version& rhs) noexcept
bool
operator>=
(const Version& lhs, const Version& rhs) noexcept
std::ostream&
operator<<
(std::ostream& o, const Version& v)
A version number, represented as an array of integers optionally followed by a
trailing string (e.g. 1.2.3beta
). The default constructor sets the version
number to zero; the second constructor expects one or more integers followed
by a string; the third constructor parses a string (a string that does not
start with an integer is assumed to start with an implicit zero). Results are
unspecified if a version number element is too big to fit in an unsigned
int
.
The indexing operator returns the requested element; it will return zero if
the index is out of range for the stored array. The major()
, minor()
, and
patch()
functions return elements 0, 1, and 2. The suffix()
function
returns the trailing string element.
The str()
function (and the output operator) formats the version number in
the conventional form; a minimum number of elements can be requested. The
to32()
and from32()
functions pack or unpack the version into a 32 bit
integer, with one byte per element (e.g. version 1.2.3
becomes
0x01020300
); to32()
truncates elements higher than 255 and ignores the
string element.
namespace RS::
Literals
constexpr int8_t
operator""_s8
(unsigned long long n) noexcept
constexpr uint8_t
operator""_u8
(unsigned long long n) noexcept
constexpr int16_t
operator""_s16
(unsigned long long n) noexcept
constexpr uint16_t
operator""_u16
(unsigned long long n) noexcept
constexpr int32_t
operator""_s32
(unsigned long long n) noexcept
constexpr uint32_t
operator""_u32
(unsigned long long n) noexcept
constexpr int64_t
operator""_s64
(unsigned long long n) noexcept
constexpr uint64_t
operator""_u64
(unsigned long long n) noexcept
constexpr ptrdiff_t
operator""_pt
(unsigned long long n) noexcept
constexpr size_t
operator""_sz
(unsigned long long n) noexcept
Integer literals.
constexpr const char*
ascii_whitespace
= "\t\n\v\f\r "
ASCII whitespace characters.
constexpr size_t
npos
= string::npos
Defined for convenience. Following the conventions established by the standard library, this value is often used as a function argument to mean "as large as possible" or "no limit", or as a return value to mean "not found".
constexpr bool
big_endian_target
constexpr bool
little_endian_target
One of these will be true and the other false, reflecting the target system's byte order.
constexpr unsigned
KB
= 1024
constexpr unsigned long
MB
= 1 048 576
constexpr unsigned long
GB
= 1 073 741 824
constexpr unsigned long long
TB
= 1 099 511 627 776
Powers of 210.
template <typename Container> [output iterator]
append
(Container& con)
template <typename Container> [output iterator]
overwrite
(Container& con)
These create output iterators that will append elements to a standard
container (see append_to()
below). The append()
function is similar to
std::back_inserter()
(but supports containers without push_back()
), while
overwrite()
will first clear the container and then return the append
iterator.
template <typename Container, typename T> void
append_to
(Container& con, const T& t)
Appends an item to a container; used by append()
and overwrite()
. The
generic version calls con.insert(con.end(), t)
; overloads (found by argument
dependent lookup) can be used for container-like types that do not have a
suitable insert()
method.
template <typename Range1, typename Range2> int
compare_3way
(const Range1& r1, const Range2& r2)
template <typename Range1, typename Range2, typename Compare> int
compare_3way
(const Range1& r1, const Range2& r2, Compare cmp)
Compare two ranges, returning -1 if the first range is less than the second, zero if they are equal, and +1 if the first range is greater.
template <typename Range, typename Container> void
con_append
(const Range& src, Container& dst)
template <typename Range, typename Container> void
con_overwrite
(const Range& src, Container& dst)
These are just shorthand for a std::copy()
from a range to an append or
overwrite iterator.
template <typename Container, typename T> void
con_remove
(Container& con, const T& t)
template <typename Container, typename Predicate> void
con_remove_if
(Container& con, Predicate p)
template <typename Container, typename Predicate> void
con_remove_if_not
(Container& con, Predicate p)
template <typename Container> void
con_unique
(Container& con)
template <typename Container, typename BinaryPredicate> void
con_unique
(Container& con, BinaryPredicate p)
template <typename Container> void
con_sort_unique
(Container& con)
template <typename Container, typename Compare> void
con_sort_unique
(Container& con, Compare cmp)
These carry out the same algorithms as the similarly named STL functions,
except that unwanted elements are removed from the container rather than
shuffled to the end. The con_sort_unique()
functions perform a sort followed
by removing equivalent elements from the container; like std::sort()
, its
predicate has less-than semantics (whereas that of con_unique()
, like that
of std::unique()
, has equality semantics).
template <typename Range, typename... Ranges> std::vector<[value type]>
concatenate
(const Range& range, const Ranges&... ranges)
Returns a vector composed by concatenating all of the argument ranges. The value type is that of the first argument range. If any subsequent argument has a different value type, it must be assignment compatible with the first.
template <typename F> void
do_n
(size_t n, F f)
template <typename F> void
for_n
(size_t n, F f)
These simply call the function n
times. The do_n()
loop expects a function
that takes no arguments, while for_n()
passes the iteration count (zero to
n-1
) as an argument.
template <typename Container> void
ensure_min
(Container& con, size_t n)
template <typename Container, typename T> void
ensure_min
(Container& con, size_t n, const T& t)
template <typename Container> void
ensure_max
(Container& con, size_t n)
If con.size()<n
, ensure_min()
calls con.resize(n[,t])
; otherwise, it
does nothing. If con.size()>n
, ensure_max()
calls con.resize(n)
;
otherwise, it does nothing.
template <typename M, typename K> M::mapped_type
find_in_map
(const M& map, const K& key)
template <typename M, typename K, typename T> M::mapped_type
find_in_map
(const M& map, const K& key, const T& def)
Find a key in a map, returning the corresponding value, or the supplied
default value (or a default constructed mapped_type
) if the key is not
found.
template <typename Range1, typename Range2> bool
sets_intersect
(const Range1& r1, const Range2& r2)
template <typename Range1, typename Range2, typename Compare> bool
sets_intersect
(const Range1& r1, const Range2& r2, Compare c)
Test whether two ordered ranges (sets) have any elements in common. The ranges are assumed to be ordered in accordance with the comparison predicate.
template <typename Range> [value type]
sum_of
(const Range& r)
template <typename Range> [value type]
product_of
(const Range& r)
Simple range sum and product functions, to save the trouble of calling
std::accumulate()
in trivial cases. Calling sum_of()
on an empty range
will return a default constructed value. The value type of product_of()
must
be constructible by a static_cast
from int
; an empty range will return 1.
template <typename T> Irange<[random access iterator]>
iseq
(T stop) noexcept
template <typename T> Irange<[random access iterator]>
iseq
(T init, T stop) noexcept
template <typename T> Irange<[random access iterator]>
iseq
(T init, T stop, T delta) noexcept
template <typename T> Irange<[random access iterator]>
xseq
(T stop) noexcept
template <typename T> Irange<[random access iterator]>
xseq
(T init, T stop) noexcept
template <typename T> Irange<[random access iterator]>
xseq
(T init, T stop, T delta) noexcept
Linear sequences of integers (T
must be an integer type). The generated
range starts with init
(defaulting to zero) and runs to stop
, in steps of
delta
(defaulting to 1). The iseq()
function produces an inclusive
(closed) sequence that includes stop
, while xseq()
is an exclusive (half
open) sequence that excludes it (if the exact value stop
would never be
generated, because stop-init
is not a multiple of delta
, there is no
difference between the two).
If stop=init
, or if delta=0
, the iseq()
sequence contains a single
value, while the xseq()
sequence is empty. Both sequences will be empty if
stop-init
and delta
have opposite signs.
The iterators must be able to generate a value beyond the end of the sequence
in order to check for an end iterator; for iseq()
, this means that
stop+delta
must be in range for T
.
int
mem_compare
(const void* lhs, size_t n1, const void* rhs, size_t n2) noexcept
This returns -1 if the first block is less than the second (by a
lexicographical bytewise comparison), 0 if they are equal, 1 if the first is
greater than the second. If the two blocks are equal up to the length of the
shorter one, the shorter is considered less than the longer. This is similar
to memcmp()
, except that the memory blocks being compared may have different
lengths. A null pointer is treated as less than any non-null pointer; the
length accompanying a null pointer is ignored.
size_t
mem_match
(const void* lhs, const void* rhs, size_t n) noexcept
Returns the number of leading bytes the two blocks have in common. This will return zero if either pointer is null.
void
mem_swap
(void* ptr1, void* ptr2, size_t n) noexcept
Swap two blocks of memory. This will work if the two ranges overlap or are the same, but behaviour is undefined if either pointer is null.
template <typename Range> using
RangeIterator
= ...
template <typename Range> using
RangeValue
= ...
The iterator and value types of a range.
template <typename T, size_t N> constexpr size_t
array_count
(T[N]) noexcept
template <typename Range> size_t
range_count
(const Range& r)
template <typename Range> bool
range_empty
(const Range& r)
Return the length of a range. The range_count()
function is just shorthand
for std::distance(begin(r),end(r))
, and range_empty()
has the obvious
meaning. The array_count()
version returns the same value, but only works on
C-style arrays and is constexpr
.
template <typename Iterator> struct
Irange
using Irange::
iterator
= Iterator
using Irange::
value_type
= [Iterator's value type]
Iterator Irange::
first
Iterator Irange::
second
constexpr Iterator Irange::
begin
() const { return first; }
constexpr Iterator Irange::
end
() const { return second; }
constexpr bool Irange::
empty
() const { return first == second; }
constexpr size_t Irange::
size
() const { return std::distance(first, second); }
template <typename Iterator> constexpr Irange<Iterator>
irange
(const Iterator& i, const Iterator& j)
template <typename Iterator> constexpr Irange<Iterator>
irange
(const pair<Iterator, Iterator>& p)
A wrapper for a pair of iterators, usable as a range in standard algorithms.
template <typename T> constexpr Irange<T*>
array_range
(T* ptr, size_t len)
Returns irange(ptr,ptr+len)
.
template <typename T, typename T2, typename T3> constexpr T
clamp
(const T& x, const T2& min, const T3& max) noexcept
Clamps a value to a fixed range. This returns static_cast<T>(min)
if
t<min
, static_cast<T>(max)
if t>max
, otherwise t
.
template <typename T> pair<T, T>
divide
(T x, T y) noexcept
template <typename T> T
quo
(T x, T y) noexcept
template <typename T> T
rem
(T x, T y) noexcept
These perform Euclidean division: if the division is not exact, the remainder
is always positive (regardless of the signs of the arguments), and the
quotient is the integer that satisfies x=q*y+r
(apart from rounding errors).
The pair returned by divide()
contains the quotient and remainder. For all
three functions, behaviour is undefined if y=0
or the quotient is out of
T
's representable range.
template <typename T> std::pair<T, T>
symmetric_divide
(T x, T y) noexcept
template <typename T> T
symmetric_quotient
(T x, T y) noexcept
template <typename T> T
symmetric_remainder
(T x, T y) noexcept
These perform the same operations as the division functions above, except that
the remainder is constrained to (-|y|/2,|y|/2]
instead of [0,|y|)
.
Behaviour is undefined if y=0
or the quotient is out of T
's representable
range. These functions do not make sense (and will not compile) if T
is
unsigned.
template <typename T> T
shift_left
(T t, int n) noexcept
template <typename T> T
shift_right
(T t, int n) noexcept
Multiply or divide t
by 2n
. T
may be an integer or
floating point type. Results are unspecified if the correct result would be
out of T
's representable range.
template <typename T> int
sign_of
(T t) noexcept
Returns 1 if the argument is positive, 0 if zero, and -1 if negative.
template <typename T> constexpr std::make_signed_t<T>
as_signed
(T t) noexcept
template <typename T> constexpr std::make_unsigned_t<T>
as_unsigned
(T t) noexcept
These return their argument converted to a signed or unsigned value of the
same size (the argument is returned unchanged if T
already had the desired
signedness). Behaviour is undefined if T
is not an integer or enumeration
type.
template <typename T> T
binomial
(T a, T b) noexcept
double
xbinomial
(int a, int b) noexcept
These return the binomial coefficient (a!/b!(a-b)!
if 0<=b<=a
, otherwise
zero). T
must be an integer type. Behaviour is undefined if the correct
result would be out of range for the return type.
template <typename T> constexpr T
gcd
(T a, T b) noexcept
template <typename T> constexpr T
lcm
(T a, T b) noexcept
Return the greatest common divisor or lowest common multiple of two numbers.
The argument type must be an integer. If one argument is zero, gcd()
will
return the other one, and lcm()
will return zero. The return value is always
positive (if not zero), regardless of the signs of the arguments. If the
correct result for lcm()
would be outside the range of T
, behaviour is
undefined if T
is signed, unspecified if T
is unsigned.
template <typename T> T
int_power
(T x, T y) noexcept
Calculates xy
for integer types.
00
will return 1. Behaviour is undefined if y
is
negative, or if T
is signed and the true result would be out of range.
template <typename T> T
int_sqrt
(T t) noexcept
Returns the integer square root of the argument (the true square root truncated to an integer). Behaviour is undefined if the argument is negative.
For all functions in this section that are templated on the argument type, results are unspecified if the argument is negative, and the function will fail to compile if the argument is not an integer.
template <typename T> constexpr int
ibits
(T t) noexcept
Returns the number of 1 bits in the argument.
template <typename T> constexpr T
ifloor2
(T t) noexcept
template <typename T> constexpr T
iceil2
(T t) noexcept
Return the argument rounded down or up to a power of 2. The result of
iceil2()
is unspecified if the correct answer is not representable.
template <typename T> constexpr int
ilog2p1
(T t) noexcept
Returns floor(log2(t))+1
, equal to the number of significant bits in t
,
or zero if t
is zero.
template <typename T> constexpr bool
ispow2
(T t) noexcept
True if the argument is an exact power of 2.
constexpr uint64_t
letter_to_mask
(char c) noexcept
Converts a letter to a mask with bit 0-51 set (corresponding to [A-Za-z]
.
Returns zero if the argument is not an ASCII letter.
template <typename T> constexpr T
rotl
(T t, int n) noexcept
template <typename T> constexpr T
rotr
(T t, int n) noexcept
Bitwise rotate left or right. The bit count is reduced modulo the number of
bits in T
; a negative shift in one direction is treated as a positive shift
in the other.
void
logx
(const U8string& msg) noexcept
void
logx
(const char* msg) noexcept
template <typename... Args> void
logx
(Args... args) noexcept
These write a message to standard output, followed by a line feed and an output flush. If multiple arguments are supplied, they are delimited with a space.
This is intended for use in multithreaded code that needs coherent logging output. A private mutex is used to ensure that messages from different threads are not interleaved. Output from different threads will be given different colours, chosen at random based on a hash of the thread ID. Because these are intended only for debugging the code around them, any exceptions thrown by their internal workings are silently ignored.
template <typename Function> struct
Arity
static constexpr size_t Arity::
value
template <typename Function> using
ArgumentTuple
= [tuple type]
template <typename Function, size_t Index> using
ArgumentType
= [type of given argument]
template <typename Function> using
ReturnType
= [return type]
template <typename Function> using
FunctionSignature
= [result(args...)]
template <typename Function> using
StdFunction
= function<FunctionSignature<Function>>
Properties of a function type. This will work with ordinary functions (if not
overloaded), function pointers, function objects, lambda expressions, and
std::function
instantiations.
template <typename Function> StdFunction<Function>
stdfun
(Function& f)
Wraps a function in the appropriate standard function type.
template<typename Function, typename Tuple> decltype(auto)
tuple_invoke
(Function&& f, Tuple&& t)
Calls a function, passing a tuple as the argument list.
struct
DoNothing
void
operator()
() const noexcept {}
template <typename T> void
operator()
(T&) const noexcept {}
template <typename T> void
operator()
(const T&) const noexcept {}
constexpr DoNothing
do_nothing
struct
Identity
template <typename T> T&
operator()
(T& t) const noexcept { return t; }
template <typename T> const T&
operator()
(const T& t) const noexcept { return t; }
constexpr Identity
identity
Trivial function objects.
class
Djb2a
Djb2a&
Djb2a
::operator()(const void* ptr, size_t n) noexcept
Djb2a&
Djb2a
::operator()(const string& s) noexcept
Djb2a::
operator uint32_t
() const noexcept
uint32_t
djb2a
(const void* ptr, size_t n) noexcept
A simple, efficient hash algorithm for a string of bytes.
template <typename... Args> size_t
hash_value
(const Args&... args) noexcept
template <typename... Args> void
hash_combine
(size_t& hash, const Args&... args) noexcept
template <typename Range> size_t
hash_range
(const Range& range) noexcept
template <typename Range> void
hash_range
(size_t& hash, const Range& range) noexcept
Functions for combining hashes incrementally, or for generating the hash of a
number of objects in one call, for use in implementing hash functions for
compound types. The first version of each pair of functions (hash_value()
and hash_combine()
have different names to avoid overload resolution
problems) calculates the hash of the supplied data; the second version takes
an existing hash value and mixes it with additional data. All of these call
the element type's std::hash
.
template <typename... Args> struct
TupleHash
size_t
operator()
(const tuple<Args...>& t) const
Hash function for a tuple.
template <typename T, int Def = 0> class
Resource
using Resource::
delete_function
= std::function<void(T&)>
using Resource::
resource_type
= T
using Resource::
value_type
= [dereferenced T]
[only if T is a pointer]Resource::
Resource
() noexcept
explicit Resource::
Resource
(T t) noexcept
template <typename Del> Resource::
Resource
(T t, Del d)
Resource::
Resource
(Resource&& r) noexcept
Resource::
~Resource
() noexcept
Resource& Resource::
operator=
(Resource&& r) noexcept
Resource& Resource::
operator=
(T t) noexcept
Resource::
operator T&
() noexcept
Resource::
operator T
() const noexcept
explicit Resource::
operator bool
() const noexcept
value_type& Resource::
operator*
() noexcept
[only if T is a non-void pointer]const value_type& Resource::
operator*
() const noexcept
[only if T is a non-void pointer]T Resource::
operator->
() const noexcept
[only if T is a non-void pointer]T& Resource::
get
() noexcept
T Resource::
get
() const noexcept
T Resource::
release
() noexcept
static T Resource::
def
() noexcept
template <typename T, typename Del> Resource<T>
make_resource
(T t, Del d)
This holds a resource of some kind, a deleter function that will be called on
destruction (similar to a unique_ptr
), and optionally a default value (only
usable if T
is constructible from an int
). T
is assumed to be copyable
and movable without throwing.
The deleter function passed to the constructor is expected to take a single
argument of type T
; it defaults to a null function. The destructor will call
d(t)
, unless the resource value is equal to the default or the deleter is
null. The constructor will call d(t)
if anything goes wrong, with the same
constraints (in practise this can only happen if copying D
throws).
The def()
function returns the default value of T
, which is T(Def)
if
T
is constructible from an int
, otherwise T()
. The boolean conversion
operator returns true if the stored value is not equal to the default (note
that this may give a different result from bool(T)
).
The template is specialized for pointer types; if T
is a pointer, the
deleter will never be called if the resource pointer is null.
class
ScopeExit
using ScopeExit::
callback
= function<void()>
explicit ScopeExit::
ScopeExit
(callback f)
ScopeExit::
~ScopeExit
() noexcept
void ScopeExit::
release
() noexcept
class
ScopeSuccess
using ScopeSuccess::
callback
= function<void()>
explicit ScopeSuccess::
ScopeSuccess
(callback f)
ScopeSuccess::
~ScopeSuccess
() noexcept
void ScopeSuccess::
release
() noexcept
class
ScopeFailure
using ScopeFailure::
callback
= function<void()>
explicit ScopeFailure::
ScopeFailure
(callback f)
ScopeFailure::
~ScopeFailure
() noexcept
void ScopeFailure::
release
() noexcept
These store a function object, to be called when the guard is destroyed
(passing nullptr
will just do nothing). ScopeExit
calls the function
unconditionally, ScopeSuccess
calls it only on normal exit (not when
unwinding due to an exception), and ScopeFailure
calls it only when an
exception causes stack unwinding (not on normal exit). If the constructor
throws an exception (this is only possible if the function object's copy
constructor or assignment operator throws), ScopeExit
and ScopeFailure
will call the function before propagating the exception, while ScopeSuccess
will not. Any exceptions thrown by the function call in the destructor are
silently ignored (normally the function should be written so as not to throw
anything).
The release()
function discards the saved function; after it is called, the
scope guard object will do nothing on destruction.
class
SizeGuard
: public ScopeFailure
template <typename T> explicit SizeGuard::
SizeGuard
(T& t)
Saves the current size of a container, and restores it if an exception unwinds
the stack. T
must be a container type with size()
and resize()
functions.
class
ValueGuard
: public ScopeFailure
template <typename T> explicit ValueGuard::
ValueGuard
(T& t)
Saves the current value of a variable, and restores it if an exception unwinds the stack.
class
ScopedTransaction
using ScopedTransaction::
callback
= function<void()>
ScopedTransaction::
ScopedTransaction
() noexcept
ScopedTransaction::
~ScopedTransaction
() noexcept
void ScopedTransaction::
call
(callback func, callback undo)
void ScopedTransaction::
commit
() noexcept
void ScopedTransaction::
rollback
() noexcept
This holds a stack of "undo" operations, to be carried out if anything goes
wrong during a sequence of operations. The call()
function accepts two
function objects; func()
is called immediately, while undo()
is saved on
the stack. If func()
throws an exception, its undo()
is not called, but
any pre-existing undo stack is invoked. Either function can be a null pointer
if no action is required.
Calling commit()
discards the saved undo functions; rollback()
calls them
in reverse order of insertion, silently ignoring any exceptions (normally the
undo functions should be written so as not to throw anything). The destructor
will perform a rollback if neither commit()
nor rollback()
have been
called since the last call()
.
A single ScopedTransaction
object can be used for multiple transactions.
Once commit()
or rollback()
is called, the undo stack is discarded, and
any newly added function pairs become part of a new cycle, equivalent to a
newly constructed ScopedTransaction
.


The advent of industry 4.0 has meant that there's a change in the way that we can approach personalising objects.
Technologies such as 3D printing 7 are enabling the use of computation technologies to produce objects custom designed by users without extensive setup costs.
The internet exposed the ability to be able to communicate larger and larger amounts of data between individuals, and software has been advanced to the point that the barrier to entry of object design is achieveable.
As time goes on & the community of personalised makers persists, these making machines will likely take the same route as the personalised computer and moore's law - they will become better, cheaper, and more ubiquitous8.
Let's have another look at the original question.
In reality, these spaces won't change all too much - old tools won't be replaced for quite some time, if ever. Dedicated making/fabricating/production spaces will still characteristically need high roofs, hard flooring, good noise insulation, good ventilation, ducting systems, extensive safety mechanisms and so on.


.meridian-tag[data-meridian-tag-id="546C0E032A87"] {
width: 50px;
height: 50px;
border-color: cyan;
background-color: cyan;
animation: pulsing 5s infinite;
}
body .meridian-tag-label-CT-HumanPersonnel {
border-color: yellow;
width: 50px;
height: 50px;
animation: pulsing 5s infinite;
}
Note: Labels with special characters need to be targeted accordingly. Spaces and most special characters (with the exception of underscores and dashes) are removed.
Example: For the tag label “CT-Human/Personnel”, target "meridian-tag-label-CT-HumanPersonnel".


Below is a JavaScript-generated svg drawing. You should see two red blobs: the left, a programmatically generated path and the right, its clone.


RivGraph in the wild
Some selected publications that have used RivGraph to answer some cool science questions.
Let us know if you’d like to add an application to the gallery!
Some selected publications that have used RivGraph to answer some cool science questions.
Let us know if you’d like to add an application to the gallery!


Protect or renew your sofa in a easy way, latest fabrics for sofa covers with the best adjustability
With our large selection of home goods, you're likely to find something that you'll love
Add the finishing touch to a room with a traditional rug. From Moroccan style to heritage and Aztec, discover our range
UDecor is a young and dynamic company that has more than 10 years’ experience in the furniture covers and design sector. With our accumulated knowledge and our enthusiasm for bringing quality products to our clients’ homes
UDecor Team works closely with the best brands on the market so that you will find exactly what you are looking for in our extensive catalogue. UDecor Team strives to fulfill the company’s aim of constantly improving the service it provides: to offer more and better products, an impeccable service from start to finish, and a pleasant, easy and secure online experience, so that you receive the attention you deserve from the moment you enter our online shop until you receive your order in your home.
UDecor Goal is to provide the best quality covers that perfectly redefines your sofa, gives it a new look and brings a smile to your face.
We take on new challenges every day with optimism and professionalism and with the same enthusiasm with which we began over 10 years ago. We strive constantly to offer you the product you need and the best possible service. Your satisfaction is our objective.
Sales Manager
General MAnager
Creative Manager
Trust in UDecor Team of specialists in sofa covers and reinvent your home.


I am pursuing my Master's in Computer Science at Arizona State University. I focus on Natural Language Processing and Machine Learning.
I presently work as a Full-stack engineer at the Decision Theater in ASU on analytics projects for Arizona Schools and Adidas. Previously, I worked for 3+ years as a Full-stack software engineer at Unisys biometric and biographic based identity management solutions
I primarily work on Python and Java based frameworks for general programming, data analysis and modeling, and deep learning.
I pursued my Bachelor's in Computer Science and Engineering in Bangalore Institute of Technology - Bangalore, India.
My work experience began through a Software Engineer position in Unisys. I worked as a Full-Stack engineer on the Java and MEAN frameworks. The projects I was involved with here were based on the Stealth Identity product in the Biometric Identification and Credentialing domain. I was a key part of three client deliverable identity management solutions, and research/development projects to enhance the biometric device handlers used in the product frameworks
My desire to branch out to the domain of machine learning and natural language processing led me to pursue a Master's degree at Arizona State University. Apart from these domains, my coursework included planning and learning of robots and data visualization. I'm currently working on my Master's thesis to create a question answering system using a generate-validate approach based on BERT transformers and knowledge reasoning
My second stint with software development at the Decision Theater has provided me the opportunity to work on machine learning and new technologies like docker, kubernetes, terraform and SQLAlchemy. In a short period of time, I've worked on multiple projects primarily based on python frameworks.


Image Warp Demo
glif library
source image
warp image
output
Distance: -120
120
Shape: 0.05
2.5
Angle: -180
180
Script:
big curve
mid red
rings
rings 2
redrose
bird
apply
blur


The given document could not be loaded. Check the network connection (e.g. network cable) or contact your administrator if the problem persists.


{% extends "base.html" %}
{% block title %}Post by {{ post.author.html_name_or_handle }}{% endblock %}
{% block opengraph %}
{% include "_opengraph.html" with opengraph_local=post.to_opengraph_dict %}
{% endblock %}
{% block content %}
{% for ancestor in ancestors reversed %}
{% include "activities/_post.html" with post=ancestor reply=True link_original=False %}
{% endfor %}
{% include "activities/_post.html" %}
{% for descendant in descendants %}
{% include "activities/_post.html" with post=descendant reply=True link_original=False %}
{% endfor %}
{% endblock %}


Home
Blog Posts
Kia ora!
Projects
About
Kia ora!
Home
Blog Posts
Projetcs
About
Here are some projects that I have been working on while learning HTML, CSS and Javascript.
Minesweeper Challenge
Calculator challenge
Inflate The Unicorn!


The first topic we talk about is Domain names and ICANN. A domain name is an address where Internet users can access your website. The domain is comprised of two elements, which is before and after the “.” so .com,.net,etc.. Are the top level domain and the information to the left is the domain name that must be registered. Through different, you can pay to acquire your domain name
ICANN which stands for Internet Corporation For Assigned Names and Numbers, helps deal with domain name system management. Formed in 1998, This not for profit partnership all over the world is dedicated to keeping the internet secure. How does ICANN work with domain names? it manages name system management and has contractual agreements with both registries and registrars that provide the foundation for the WHOIS system


I am a computational biologist living in Tallahassee, Florida. Born in New York, I spent most of my childhood in Fort Lauderdale, Florida, where I remained until my undergraduate studies. I earned my Bachelor's and PhD at Florida State University (FSU), and have been running a bioinformatics core facility at FSU since then.


About Me
I am a Senior Software Engineer with a primary focus on the .NET Development Framework with C#. I've been professionally developing for 10 years, and have had exposure to many different cultures and programming environments.
Outside of full time development, I also work as a TA for DeltaV Code School helping develop other's skills within the programming world. I've started doing this as I work towards my Microsoft Certified Trainer (MTT) so I can continue to grow within my career.
When not working with technology, I spend time with my wife and our 5 kids. We're a big gaming family (Board Games), and are always looking for new games to try out. It's always an interesting experience, because we have such different interests when it comes to board games.
Education
-
College
- Kaplan University
- AAS of Information Technology
- Gradutation: July, 2013
- Kaplan University
-
Certifications
- Microsoft App Developer
Work History
-
Sovos
- September 2016 - Present
- Senior Software Engineer
- I have been in charge of new development, as well as maintaining apps. Most of our applications have been wrote using MVC as the framework, with C# driving the backend.
- For stacks, we have used .NET Framework 4.x, .NET Standard and .NET Core.
- My day to day tasks include Scrum management for multiple teams, CI/CD integrations, architecture design, database schema building, and technical debt review and research
- Non-development tasks have included being a member of our Whole Living Committee, spear-heading integration meetings, and helping transition through a major aquisition. I have also been heavily tasked with training interns, junior developers, and modernizing Senior Developers to the web methodologies and frameworks.
-
My largest accomplishments:
- Converted legacy applications from WinForm application to Web Based
- Transitioned hosted Source Control to Cloud Based (MS Azure / DevOps
- Integated CI/CD into all product lines
- Modernized all web applications to using current security and frameworks
-
TEK Systems (Contract)
- September 2015 - September 2016
- Software Developer
- Contracted to Army One, I was in charge of maintaining and developing applications across multiple lines of interest
- Using C# and F#, I worked with a team to develop API's and Data/Server layer abstractions for standardized use
- For front end development, I worked mostly with Angular, but also had exposure to Knockout and MVC.
- We used standard sprint based Scrum with regular health checks for the clients in this role
-
My largest accomplishments:
- Diagnosed major calculation flaws in critical software
- Triggered updates to acceptable use policies of software to modernize and secure public facing applications
-
Off market
Due to health concerns, I was forced to take a period of no work. I did work at retail part-time towards the end before getting hired on to my next position.
-
Town News
- November 2014 - February 2015
- PHP Developer
- Developed mapping scripts with PHP to convert data feeds into standard flow
- Learned valuable lessons in training new developers
- Got exposure to multiple languages, platforms, and ways to properly use them
-
McGladrey RSM
- October 2013 - October 2014
- SharePoint Developer
- Worked on SharePoint integration for internal applications
- Created branding specs, custom pages, and server side controls for use throughout the company
- Worked remotely to Minneapolis from the Davenport office, teaching me adaptable practices and flows
- Worked with overseas teams to facilitate business needs and requirements
- Converted from SharePoint 2010 into SharePoint 2013
-
HON
- December 2013 - September 2014
- SharePoint Developer
- Worked on SharePoint sites for Customer Facing components
- Developed dynamic templates for multiple product lines to expidite deployments
My Top Ten
Ideas, Tools and Technologies
- .NET Core
- Learning from Juniors
- C#
- CI/CD
- Conferences
- Code Reviews
- Proper Scrum
- Teaching new tech
- Arduino Development
- Non-code STEM


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jasper.xmlparser.XMLEncodingDetector org.apache.jasper.xmlparser.XercesEncodingDetector
| Field Summary | |
static int |
DEFAULT_BUFFER_SIZE
|
static int |
DEFAULT_XMLDECL_BUFFER_SIZE
|
| Constructor Summary | |
XercesEncodingDetector()
Constructor |
| Method Summary | |
java.lang.Object[] |
getEncoding(java.io.InputStream in,
ErrorDispatcher err)
Autodetects the encoding of the XML document supplied by the given input stream. |
java.lang.Object[] |
getEncodingMethod(java.lang.String fname,
java.util.jar.JarFile jarFile,
JspCompilationContext ctxt,
ErrorDispatcher err)
|
boolean |
isExternal()
Returns true if the current entity being scanned is external. |
int |
peekChar()
Returns the next character on the input. |
int |
scanChar()
Returns the next character on the input. |
boolean |
scanData(java.lang.String delimiter,
org.apache.xerces.util.XMLStringBuffer buffer)
Scans a range of character data up to the specified delimiter, setting the fields of the XMLString structure, appropriately. |
int |
scanLiteral(int quote,
org.apache.xerces.xni.XMLString content)
Scans a range of attribute value data, setting the fields of the XMLString structure, appropriately. |
java.lang.String |
scanName()
Returns a string matching the Name production appearing immediately on the input as a symbol, or null if no Name string is present. |
java.lang.String |
scanPseudoAttribute(boolean scanningTextDecl,
org.apache.xerces.xni.XMLString value)
Scans a pseudo attribute. |
boolean |
skipChar(int c)
Skips a character appearing immediately on the input. |
boolean |
skipSpaces()
Skips space characters appearing immediately on the input. |
boolean |
skipString(java.lang.String s)
Skips the specified string appearing immediately on the input. |
| Methods inherited from class org.apache.jasper.xmlparser.XMLEncodingDetector |
getEncoding |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_BUFFER_SIZE
public static final int DEFAULT_XMLDECL_BUFFER_SIZE
| Constructor Detail |
public XercesEncodingDetector()
| Method Detail |
public java.lang.Object[] getEncoding(java.io.InputStream in, ErrorDispatcher err) throws java.io.IOException, JasperException
in
- The input stream to readerr
- The error dispatcher
java.io.IOException
JasperException
public java.lang.Object[] getEncodingMethod(java.lang.String fname, java.util.jar.JarFile jarFile, JspCompilationContext ctxt, ErrorDispatcher err) throws java.io.IOException, JasperException
getEncodingMethod
in class XMLEncodingDetector
java.io.IOException
JasperException
public boolean isExternal()
public int peekChar() throws java.io.IOException
Note: The character is not consumed.
java.io.IOException
- Thrown if i/o error occurs.
java.io.EOFException
- Thrown on end of file.public int scanChar() throws java.io.IOException
Note: The character is consumed.
java.io.IOException
- Thrown if i/o error occurs.
java.io.EOFException
- Thrown on end of file.public java.lang.String scanName() throws java.io.IOException
Note: The Name characters are consumed.
Note: The string returned must be a symbol. The SymbolTable can be used for this purpose.
java.io.IOException
- Thrown if i/o error occurs.
java.io.EOFException
- Thrown on end of file.SymbolTable
,
XMLChar.isName(int)
,
XMLChar.isNameStart(int)
public int scanLiteral(int quote, org.apache.xerces.xni.XMLString content) throws java.io.IOException
Note: The characters are consumed.
Note: This method does not guarantee to return the longest run of attribute value data. This method may return before the quote character due to reaching the end of the input buffer or any other reason.
Note: The fields contained in the XMLString structure are not guaranteed to remain valid upon subsequent calls to the entity scanner. Therefore, the caller is responsible for immediately using the returned character data or making a copy of the character data.
quote
- The quote character that signifies the end of the
attribute value data.content
- The content structure to fill.
java.io.IOException
- Thrown if i/o error occurs.
java.io.EOFException
- Thrown on end of file.public boolean scanData(java.lang.String delimiter, org.apache.xerces.util.XMLStringBuffer buffer) throws java.io.IOException
Note: The characters are consumed.
Note: This assumes that the internal buffer is at least the same size, or bigger, than the length of the delimiter and that the delimiter contains at least one character.
Note: This method does not guarantee to return the longest run of character data. This method may return before the delimiter due to reaching the end of the input buffer or any other reason.
Note: The fields contained in the XMLString structure are not guaranteed to remain valid upon subsequent calls to the entity scanner. Therefore, the caller is responsible for immediately using the returned character data or making a copy of the character data.
delimiter
- The string that signifies the end of the character
data to be scanned.buffer
- The data structure to fill.
java.io.IOException
- Thrown if i/o error occurs.
java.io.EOFException
- Thrown on end of file.public boolean skipChar(int c) throws java.io.IOException
Note: The character is consumed only if it matches the specified character.
c
- The character to skip.
java.io.IOException
- Thrown if i/o error occurs.
java.io.EOFException
- Thrown on end of file.public boolean skipSpaces() throws java.io.IOException
Note: The characters are consumed only if they are space characters.
java.io.IOException
- Thrown if i/o error occurs.
java.io.EOFException
- Thrown on end of file.XMLChar.isSpace(int)
public boolean skipString(java.lang.String s) throws java.io.IOException
Note: The characters are consumed only if they are space characters.
s
- The string to skip.
java.io.IOException
- Thrown if i/o error occurs.
java.io.EOFException
- Thrown on end of file.public java.lang.String scanPseudoAttribute(boolean scanningTextDecl, org.apache.xerces.xni.XMLString value) throws java.io.IOException, JasperException
scanningTextDecl
- True if scanning this pseudo-attribute for a
TextDecl; false if scanning XMLDecl. This
flag is needed to report the correct type of
error.value
- The string to fill in with the attribute
value.
java.io.IOException
JasperException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Federer avenges Wimbledon final defeat to see off Djokovic at ATP Finals
Revenge was sweet for Roger Federer as he won his shoot-out with Novak Djokovic to reach the last four at the ATP Finals.
The 38-year-old avenged his agonising Wimbledon final defeat by Djokovic in July, winning 6-4 6-3 to deny the Serbian the world number one spot in the process.
The illustrious pair, with 11 titles between them, were both expected to progress from the group stage but Dominic Thiem’s impressive form meant only one of them could join him.
It was Federer who maintained his proud record of having never failed to reach the semi-finals here at London’s 02, and he can now bid for a record seventh title over the weekend.
Four years since his last win over Djokovic, and four months since he blew those two championship points at Wimbledon, an elated Federer said: “It was a great atmosphere, a great opponent, here at the 02, incredibly special, I enjoyed it from the beginning.
“I played incredibly well and I knew I had to because that’s what Novak can do.
“What did I do differently from Wimbledon? I won the match point I guess.
“You move on, try harder next time round and hope the luck goes for you. I couldn’t be happier right now.”
It was a strange performance from Djokovic, who made three double-faults in his first two service matches, dropping the second to love.
By contrast it was a stunning first set from Federer, even by his own impeccable standards, as he fired down eight aces, hit 12 winners and made just one unforced error.
The Swiss master, a favourite with the crowd if not the bookmakers, broke again at the start and the end of the second set to wrap up a memorable win.
He can now put his feet up on Friday ahead of a semi-final showdown with Stefanos Tsitsipas, Alexander Zverev, Daniil Medvedev or Rafael Nadal, who is now guaranteed to end the year at the top of the rankings.
“You always play better as a tournament goes along,” added Federer.
“Dominic has been supreme in our group and put us in this situation, there was a lot riding on the match. I had a clear game plan and it worked to perfection. It was a great performance from me tonight.
“Am I looking forward to the weekend? A lot. I’m happy to stick around. I didn’t make any plans yet!”
Djokovic, who failed to reach the semi-finals for the first time since 2011, said: “There was not much that I did right this match, to be honest.
“I mean, realistically he was better player in all aspects and absolutely deserved to win.
“He served great, moved well, returned my serve very well. From his end, I think he did everything right.
“From my end, I was just playing too neutral. I couldn’t read his serve well. Just a pretty bad match from my side.”
In the afternoon’s dead rubber, Thiem was beaten in straight sets by Matteo Berrettini, who ended his stay in the capital on a high by becoming the first Italian to win a match at the Finals.


Foldery
Menu
Add
EDIT
Name:
Description:
Cancel
Save
Login
Username:
Password:
Cancel
Save
Foldery
Menu
Add


Florida State upsets No. 6 Florida 63-51
by The Associated PressGAINESVILLE, Fla. (AP) — Devin Vassell scored 13 points, M.J. Walker added 12 and Florida State upset No. 6 Florida 63-51 on Sunday, extending its series winning streak to six.
The Seminoles (1-1) avoided their first 0-2 start since 2000 thanks to suffocating defense that forced the rival Gators (1-1) into 16 turnovers and a woeful shooting performance. Florida was 14 of 50 from the field, including 4 of 22 from 3-point range.
Florida’s football team scored more points this week that its basketball team.
The Gators, a six-point favorite at home, expected some growing pains from a team that features graduate transfer Kerry Blackshear Jr., three sophomores and five freshmen. They clearly weren’t ready to match Florida State’s intensity.
A sellout crowd witnessed FSU take over late in the first half and really seize control after the break. The Gators went 10 minutes with just one field goal — a dunk on an inbound play — as Florida State pulled ahead 38-25 in the opening minutes of the second half. The ‘Noles went up by 14 on Anthony Polite’s 3-pointer with 9:31 to play.
Keyontae Johnson led the Gators with 19 points on 8-of-12 shooting.
NO. 5 LOUISVILLE 78, YOUNGSTOWN STATE 55
LOUISVILLE, Ky. (AP) — Jordan Nwora scored 21 points in Louisville’s home opener.
Advertising
The Cardinals (2-0) made the first 11 shots to jump out to a 24-8 lead. They then started the second half making seven of their first nine shots to put away the Penguins (1-1).
Steven Enoch added 17 points and a career-high 14 rebounds for Louisville
Naz Bohannon led the Penguins with 14 points.
NO. 18 OHIO STATE 76, UMASS-LOWELL 56
COLUMBUS, Ohio (AP) — Freshman D.J. Carton and Kaleb Wesson each had 13 points for Ohio State.
The Buckeyes (2-0) got contributions throughout the lineup in the tuneup against the Atlantic East squad ahead of Wednesday night’s matchup with No. 10 Villanova. Wesson also had 13 rebounds and five assists. Luther Muhammad added 11 points.
Obadiah Noel led UMass-Lowell (1-2) with 15 points.
___
For more AP college basketball coverage: https://apnews.com/Collegebasketball and http://twitter.com/AP_Top25
The Associated Press


Active tab in current window:
Copy title of active tab in current window as string
Copy URL of active tab in current window as string
Copy link of active tab in current window as HTML
Copy link of active tab in current window as RedNotebook
Copy link of active tab in current window as Markdown
Copy link of active tab in current window as Markdown ordered list item
Copy link of active tab in current window as Markdown unordered list item
All tabs in current window:
Copy titles of all tabs in current window as text
Copy URLs of all tabs in current window as text
Copy links of all tabs in current window as HTML ordered list
Copy links of all tabs in current window as HTML unordered list
Copy links of all tabs in current window as Markdown ordered list
Copy links of all tabs in current window as Markdown unordered list
All tabs in all windows:
Copy titles of all tabs in all windows as text
Copy URLs of all tabs in all windows as text
Copy links of all tabs in all windows as HTML ordered list
Copy links of all tabs in all windows as HTML unordered list
Copy links of all tabs in all windows as Markdown ordered list
Copy links of all tabs in all windows as Markdown unordered list


twilio.rest.video.v1.room.room_participant package¶
Submodules¶
twilio.rest.video.v1.room.room_participant.room_participant_published_track module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.video.v1.room.room_participant.room_participant_published_track.
PublishedTrackContext
(version, room_sid, participant_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
()[source]¶ Fetch the PublishedTrackInstance
Returns: The fetched PublishedTrackInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackInstance
-
-
class
twilio.rest.video.v1.room.room_participant.room_participant_published_track.
PublishedTrackInstance
(version, payload, room_sid, participant_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
fetch
()[source]¶ Fetch the PublishedTrackInstance
Returns: The fetched PublishedTrackInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackInstance
-
kind
¶ Returns: The track type Return type: PublishedTrackInstance.Kind
-
name
¶ Returns: The track name Return type: unicode
-
participant_sid
¶ Returns: The SID of the Participant resource with the published track Return type: unicode
-
room_sid
¶ Returns: The SID of the Room resource where the track is published Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
-
class
twilio.rest.video.v1.room.room_participant.room_participant_published_track.
PublishedTrackList
(version, room_sid, participant_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
(sid)[source]¶ Constructs a PublishedTrackContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackContext Return type: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of PublishedTrackInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of PublishedTrackInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackPage
-
list
(limit=None, page_size=None)[source]¶ Lists PublishedTrackInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of PublishedTrackInstance records from the API. Request is executed immediately
Parameters: Returns: Page of PublishedTrackInstance
Return type: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackPage
-
stream
(limit=None, page_size=None)[source]¶ Streams PublishedTrackInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackInstance]
-
-
class
twilio.rest.video.v1.room.room_participant.room_participant_published_track.
PublishedTrackPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of PublishedTrackInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackInstance
-
twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.
SubscribeRulesInstance
(version, payload, room_sid, participant_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
participant_sid
¶ Returns: The SID of the Participant resource for the Subscribe Rules Return type: unicode
-
room_sid
¶ Returns: The SID of the Room resource for the Subscribe Rules Return type: unicode
-
-
class
twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.
SubscribeRulesList
(version, room_sid, participant_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
fetch
()[source]¶ Fetch the SubscribeRulesInstance
Returns: The fetched SubscribeRulesInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.SubscribeRulesInstance
-
update
(rules=<object object>)[source]¶ Update the SubscribeRulesInstance
Parameters: rules (dict) – A JSON-encoded array of subscribe rules Returns: The updated SubscribeRulesInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.SubscribeRulesInstance
-
-
class
twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.
SubscribeRulesPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of SubscribeRulesInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.SubscribeRulesInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.SubscribeRulesInstance
-
twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.
SubscribedTrackContext
(version, room_sid, participant_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
()[source]¶ Fetch the SubscribedTrackInstance
Returns: The fetched SubscribedTrackInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance
-
-
class
twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.
SubscribedTrackInstance
(version, payload, room_sid, participant_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
fetch
()[source]¶ Fetch the SubscribedTrackInstance
Returns: The fetched SubscribedTrackInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance
-
kind
¶ Returns: The track type Return type: SubscribedTrackInstance.Kind
-
name
¶ Returns: The track name Return type: unicode
-
participant_sid
¶ Returns: The SID of the participant that subscribes to the track Return type: unicode
-
publisher_sid
¶ Returns: The SID of the participant that publishes the track Return type: unicode
-
room_sid
¶ Returns: The SID of the room where the track is published Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
-
class
twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.
SubscribedTrackList
(version, room_sid, participant_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
(sid)[source]¶ Constructs a SubscribedTrackContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackContext Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of SubscribedTrackInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of SubscribedTrackInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackPage
-
list
(limit=None, page_size=None)[source]¶ Lists SubscribedTrackInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of SubscribedTrackInstance records from the API. Request is executed immediately
Parameters: Returns: Page of SubscribedTrackInstance
Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackPage
-
stream
(limit=None, page_size=None)[source]¶ Streams SubscribedTrackInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance]
-
-
class
twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.
SubscribedTrackPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of SubscribedTrackInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.video.v1.room.room_participant.
ParticipantContext
(version, room_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
()[source]¶ Fetch the ParticipantInstance
Returns: The fetched ParticipantInstance Return type: twilio.rest.video.v1.room.room_participant.ParticipantInstance
-
published_tracks
¶ Access the published_tracks
Returns: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackList Return type: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackList
-
subscribe_rules
¶ Access the subscribe_rules
Returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.SubscribeRulesList Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.SubscribeRulesList
-
subscribed_tracks
¶ Access the subscribed_tracks
Returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackList Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackList
-
update
(status=<object object>)[source]¶ Update the ParticipantInstance
Parameters: status (ParticipantInstance.Status) – The new status of the resource Returns: The updated ParticipantInstance Return type: twilio.rest.video.v1.room.room_participant.ParticipantInstance
-
-
class
twilio.rest.video.v1.room.room_participant.
ParticipantInstance
(version, payload, room_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
duration
¶ Returns: Duration of time in seconds the participant was connected Return type: unicode
-
end_time
¶ Returns: The time when the participant disconnected from the room in ISO 8601 format Return type: datetime
-
fetch
()[source]¶ Fetch the ParticipantInstance
Returns: The fetched ParticipantInstance Return type: twilio.rest.video.v1.room.room_participant.ParticipantInstance
-
identity
¶ Returns: The string that identifies the resource’s User Return type: unicode
-
links
¶ Returns: The URLs of related resources Return type: unicode
-
published_tracks
¶ Access the published_tracks
Returns: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackList Return type: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackList
-
room_sid
¶ Returns: The SID of the participant’s room Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
start_time
¶ Returns: The time of participant connected to the room in ISO 8601 format Return type: datetime
-
status
¶ Returns: The status of the Participant Return type: ParticipantInstance.Status
-
subscribe_rules
¶ Access the subscribe_rules
Returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.SubscribeRulesList Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribe_rule.SubscribeRulesList
-
subscribed_tracks
¶ Access the subscribed_tracks
Returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackList Return type: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackList
-
update
(status=<object object>)[source]¶ Update the ParticipantInstance
Parameters: status (ParticipantInstance.Status) – The new status of the resource Returns: The updated ParticipantInstance Return type: twilio.rest.video.v1.room.room_participant.ParticipantInstance
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
-
class
twilio.rest.video.v1.room.room_participant.
ParticipantList
(version, room_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
(sid)[source]¶ Constructs a ParticipantContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.video.v1.room.room_participant.ParticipantContext Return type: twilio.rest.video.v1.room.room_participant.ParticipantContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of ParticipantInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of ParticipantInstance Return type: twilio.rest.video.v1.room.room_participant.ParticipantPage
-
list
(status=<object object>, identity=<object object>, date_created_after=<object object>, date_created_before=<object object>, limit=None, page_size=None)[source]¶ Lists ParticipantInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - status (ParticipantInstance.Status) – Read only the participants with this status
- identity (unicode) – Read only the Participants with this user identity value
- date_created_after (datetime) – Read only Participants that started after this date in UTC ISO 8601 format
- date_created_before (datetime) – Read only Participants that started before this date in ISO 8601 format
- limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.video.v1.room.room_participant.ParticipantInstance]
-
page
(status=<object object>, identity=<object object>, date_created_after=<object object>, date_created_before=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of ParticipantInstance records from the API. Request is executed immediately
Parameters: - status (ParticipantInstance.Status) – Read only the participants with this status
- identity (unicode) – Read only the Participants with this user identity value
- date_created_after (datetime) – Read only Participants that started after this date in UTC ISO 8601 format
- date_created_before (datetime) – Read only Participants that started before this date in ISO 8601 format
- page_token (str) – PageToken provided by the API
- page_number (int) – Page Number, this value is simply for client state
- page_size (int) – Number of records to return, defaults to 50
Returns: Page of ParticipantInstance
Return type:
-
stream
(status=<object object>, identity=<object object>, date_created_after=<object object>, date_created_before=<object object>, limit=None, page_size=None)[source]¶ Streams ParticipantInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - status (ParticipantInstance.Status) – Read only the participants with this status
- identity (unicode) – Read only the Participants with this user identity value
- date_created_after (datetime) – Read only Participants that started after this date in UTC ISO 8601 format
- date_created_before (datetime) – Read only Participants that started before this date in ISO 8601 format
- limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.video.v1.room.room_participant.ParticipantInstance]
-
-
class
twilio.rest.video.v1.room.room_participant.
ParticipantPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of ParticipantInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.video.v1.room.room_participant.ParticipantInstance Return type: twilio.rest.video.v1.room.room_participant.ParticipantInstance
-


Malaysia’s first polio case in 27 years is a child who wasn’t vaccinated. Here are 3 things to know about the incurable virus, Business Insider - Business Insider Singapore
by Lamont Mark SmithThis article was updated on Tuesday, December 10, at 11:14 A.M.
Malaysia has reported its first polio case nearly three decades after the last occurence in 1992.
Last Friday (Dec 6), The Star reported the country’s Health Ministry confirming that a three-month-old boy from Tuaran, Sabah, has been infected with vaccine-derived poliovirus type 1 (VDPV1) after being admitted into a hospital’s intensive care unit.
The Star quoted health director-general Dr Noor Hisham Abdullah who said on Sunday (Dec 8): “The patient is currently undergoing treatment in an isolation ward and is in stable condition but needs respiratory support.”
He added that the poliovirus is classified as a circulating vaccine-derived poliovirus type 1 (VDPV1), which originates from a poliovirus that has been weakened by the orally-administered polio vaccine.
The Star reported that Dr Hisham said the weakened virus excretes from the body through faeces.
However, in unsanitary environments, the virus can infect others who have not been immunised against polio and will “thus spread in communities whose polio immunisation rates are less than 95 per cent”.
He warned that if the disease is left uncontrolled, it can genetically mutate until it once again becomes an active virus.
In an article on Monday (Dec 9), The Associated Press (AP) quoted Dr Hisham as saying that vaccination will be stepped up after an investigation in the infant’s home village showed that 25 out of 204 children, aged between two months and 15 years, were not vaccinated against polio.
The New Straits Times reported that the Health Ministry will continue vaccination exercises in other risk areas as well, to ensure that immunisation is above the rate of 95 per cent.
NST stated that Malaysia’s last polio case was in 1992, before the country was declared polio-free in 2000.
Here are three things you should know about the incurable disease:
1) Polio mainly affects young children
Polio, or poliomyelitis, is a contagious disease mainly affects young children, and lives in an infected person’s throat and intestines.
It can invade an infected person’s brain and spinal cord, causing paralysis in serious cases – which can lead to permanent disability or death.
The Centers for Disease Control and Prevention (CDC) – an American public health institute – states that the virus enters the body through the mouth and spreads through contact with the faeces of an infected person.
Though less common, it can also spread through droplets from a sneeze or cough.
2) Symptoms range from flu-like to paresthesia and paralysis.
The institute noted that about one in four people with poliovirus infection will have flu-like symptoms, including: Sore throat; fever; fatigue; nausea; headache; and stomach pain.
CDC said these symptoms usually last two to five days, and “then go away on their own”.
A smaller proportion of people will develop more serious symptoms, like paresthesia (feeling pins and needles in the legs), meningitis (infection of the covering of the spinal cord and/or brain), and paralysis.
However, meningitis only occurs in about one in 25 people with polio, while paralysis occurs in about one out of 200 people.
3) Vaccination is the most effective way of prevention
Although incurable, the disease can be prevented.
Polio vaccines, given multiple times, can protect a child for life, the World Health Organisation (WHO) says.
A 2019 article by HealthHub – a web portal by Singapore’s Ministry of Health (MOH) – says that two booster doses should be given to all children, with the first at 18 months of age, and the second at 11 years of age.
As for adults, CDC recommends a series of three doses, the first two separated by one to two months, and a third dose – six to twelve after the second.
Read Also:
- Singapore is less prepared than Malaysia to deal with a pandemic, EIU report says
- Bacteria from faeces has been found in bottled water from a second Malaysian manufacturer – here’s what drinking it does to your body
- From English-speaking doctors to affordable healthcare: Malaysia ranks 1st in healthcare category of global retirement index


THE BACKGROUND OF THE AKAN LANGUAGE
Akan names are derived from Ghanian culture. Frequently in Ghana, children are given their first
name as a 'day name' which corresponds to the day in the week they were born. Here are Ghanian
day names.
The Akan people of Ghana frequently name their children after the day of the week they were born
and the order in which they were born. These "day names" have further meanings concerning the
soul and character of the person. Middle names have considerably more variety and can refer to
their birth order, twin status, or an ancestor's middle name.


Tutorial: Using free modules and vector spaces#
AUTHOR: Jason Bandlow
In this tutorial, we show how to construct and manipulate free modules and vector spaces and their elements.
Sage currently provides two implementations of free modules:
FreeModule
and CombinatorialFreeModule
. The
distinction between the two is mostly an accident in history. The
latter allows for the basis to be indexed by any kind of objects,
instead of just \(0,1,2,...\). They also differ by feature set and
efficiency. Eventually, both implementations will be merged under the
name FreeModule
. In the mean time, we focus here on
CombinatorialFreeModule
. We recommend to start by browsing
its documentation:
sage: CombinatorialFreeModule? # not tested
Construction, arithmetic, and basic usage#
We begin with a minimal example:
sage: G = Zmod(5)
sage: F = CombinatorialFreeModule(ZZ, G)
sage: F.an_element()
2*B[0] + 2*B[1] + 3*B[2]
\(F\) is the free module over the ring integers \(\ZZ\) whose canonical basis is indexed by the set of integers modulo 5.
We can use any set, finite or not, to index the basis, as long as its elements are immutable. Here are some \(\ZZ\)-free modules; what is the indexing set for the basis in each example below?
sage: F = CombinatorialFreeModule(ZZ, CC); F.an_element()
B[1.00000000000000*I]
sage: F = CombinatorialFreeModule(ZZ, Partitions(NonNegativeIntegers(), max_part=3)); F.an_element()
2*B[[]] + 2*B[[1]] + 3*B[[2]]
sage: F = CombinatorialFreeModule(ZZ, ['spam', 'eggs', '42']); F.an_element()
3*B['42'] + 2*B['eggs'] + 2*B['spam']
Note that we use ‘42’ (and not the number 42) in order to ensure that all objects are comparable in a deterministic way, which allows the elements to be printed in a predictable manner. It is not mandatory that indices have such a stable ordering, but if they do not, then the elements may be displayed in some random order.
Lists are not hashable, and thus cannot be used to index the basis; instead one can use tuples:
sage: F = CombinatorialFreeModule(ZZ, ([1],[2],[3])); F.an_element()
Traceback (most recent call last):
...
TypeError: unhashable type: 'list'
sage: F = CombinatorialFreeModule(ZZ, ((1,), (2,), (3,))); F.an_element()
2*B[(1,)] + 2*B[(2,)] + 3*B[(3,)]
The name of the basis can be customized:
sage: F = CombinatorialFreeModule(ZZ, Zmod(5), prefix='a'); F.an_element()
2*a[0] + 2*a[1] + 3*a[2]
Let us do some arithmetic with elements of \(A\):
sage: f = F.an_element(); f
2*a[0] + 2*a[1] + 3*a[2]
sage: 2*f
4*a[0] + 4*a[1] + 6*a[2]
sage: 2*f - f
2*a[0] + 2*a[1] + 3*a[2]
Inputing elements as they are output does not work by default:
sage: a[0] + 3*a[1]
Traceback (most recent call last):
...
NameError: name 'a' is not defined
To enable this, we must first get the canonical basis for the module:
sage: a = F.basis(); a
Lazy family (Term map from Ring of integers modulo 5 to Free module generated by Ring of integers modulo 5 over Integer Ring(i))_{i in Ring of integers modulo 5}
This gadget models the family
\((B_i)_{i \in \ZZ_5}\).
In particular, one can run through its elements:
sage: list(a)
[a[0], a[1], a[2], a[3], a[4]]
recover its indexing set:
sage: a.keys()
Ring of integers modulo 5
or construct an element from the corresponding index:
sage: a[2]
a[2]
So now we can do:
sage: a[0] + 3*a[1]
a[0] + 3*a[1]
which enables copy-pasting outputs as long as the prefix matches the name of the basis:
sage: 2*a[0] + 2*a[1] + 3*a[2] == f
True
Be careful that the input is currently not checked:
sage: a['is'] + a['this'] + a['a'] + a['bug']
a['a'] + a['bug'] + a['is'] + a['this']
Manipulating free module elements#
The elements of our module come with many methods for exploring and manipulating them:
sage: f.<tab> # not tested
Some definitions:
A monomial is an element of the basis \(B_i\);
A term is an element of the basis multiplied by a non zero coefficient: \(c B_i\);
The support of that term is \(i\).
The corresponding item is the
tuple
(i, c)
.The support of an element \(f\) is the collection of indices \(i\) such that \(B_i\) appears in \(f\) with non zero coefficient.
The monomials, terms, items, and coefficients of an element \(f\) are defined accordingly.
Leading/trailing refers to the greatest/least index. Elements are printed starting with the least index (for lexicographic order by default).
Let us investigate those definitions on our example:
sage: f
2*a[0] + 2*a[1] + 3*a[2]
sage: f.leading_term()
3*a[2]
sage: f.leading_monomial()
a[2]
sage: f.leading_support()
2
sage: f.leading_coefficient()
3
sage: f.leading_item()
(2, 3)
sage: f.support()
SupportView({0: 2, 1: 2, 2: 3})
sage: f.monomials()
[a[0], a[1], a[2]]
sage: f.coefficients()
[2, 2, 3]
We can iterate through the items of an element:
sage: for index, coeff in f:
....: print("The coefficient of a_{%s} is %s"%(index, coeff))
The coefficient of a_{0} is 2
The coefficient of a_{1} is 2
The coefficient of a_{2} is 3
This element can be thought of as a dictionary index–>coefficient:
sage: f[0], f[1], f[2]
(2, 2, 3)
This dictionary can be accessed explicitly with the monomial_coefficients method:
sage: f.monomial_coefficients()
{0: 2, 1: 2, 2: 3}
The map
methods are useful to transform elements:
sage: f
2*a[0] + 2*a[1] + 3*a[2]
sage: f.map_support(lambda i: i+1)
2*a[1] + 2*a[2] + 3*a[3]
sage: f.map_coefficients(lambda c: c-3)
-a[0] - a[1]
sage: f.map_item(lambda i,c: (i+1,c-3))
-a[1] - a[2]
Note: this last function should be called map_items
!
Manipulating free modules#
The free module itself (\(A\) in our example) has several utility methods for constructing elements:
sage: F.zero()
0
sage: F.term(1)
a[1]
sage: F.sum_of_monomials(i for i in Zmod(5) if i > 2)
a[3] + a[4]
sage: F.sum_of_terms((i+1,i) for i in Zmod(5) if i > 2)
4*a[0] + 3*a[4]
sage: F.sum(ZZ(i)*a[i+1] for i in Zmod(5) if i > 2) # Note coeff is not (currently) implicitly coerced
4*a[0] + 3*a[4]
Is safer to use F.sum()
than to use sum()
: in case the input
is an empty iterable, it makes sure the zero of \(A\) is returned, and
not a plain \(0\):
sage: F.sum([]), parent(F.sum([]))
(0, Free module generated by Ring of integers modulo 5 over Integer Ring)
sage: sum([]), parent(sum([]))
(0, <... 'int'>)
Todo
Introduce echelon forms, submodules, quotients in the finite dimensional case
Review#
In this tutorial we have seen how to construct vector spaces and free modules with a basis indexed by any kind of objects.
To learn how to endow such free modules with additional structure, define morphisms, or implement modules with several distinguished basis, see the Implementing Algebraic Structures thematic tutorial.


Project maps display geo-located information on a graphic base map of your choice. Maps can contain one or more layers; each layer displays locations from an associated dataset.


Players
Officials
Tournaments
CS 390 Tournament Style Database
Enter Tournament Information:
Name:
Official Name:
{% for o in officials %}
{{o[0]}} {{o[1]}}
{% endfor %}
Tournament Format:
Start Date: