Consult the main WMPInt.html file for an introduction and practical examples.
The source code of this software is published under the MIT license.
Copyright (c) 2019 Juha Nieminen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The library consists of the header file WMPInt.hh
and the source file
WMPInt.cc
(the latter of which should be compiled into the program.)
To use the class, include the WMPInt.hh
header file in your code.
#include "WMPInt.hh"
Class declaration:
template<std::size_t kSize> class WMPUInt;
The classes work very similarly to std::array<std::uint64_t, kSize>
,
containing an array of 64-bit integers inside them. The template parameter specifies the size
of the array. They work like integers of kSize*64
bits. They provide most of the
integer operators, and aim for maximum efficiency and speed. Like std::array
,
their size is determined at compile time, and they do not perform any dynamic memory
allocations.
Instances of these classes can be used like unsigned and signed integers respectively. For example:
WMPUInt<16> a(10), b(20), c(30); // 1024-bit integers
c += b;
c -= a;
a *= c;
b = a*a + b*b + c*c;
Note, however, the tips about the most efficient ways to use these classes at the end of this documentation.
Instances can be initialized with a value with either direct numerical values or from an ASCII string. Consult the value initialization section below for details.
These classes use x86-64 and ARM64 inline assembly for efficiency. They have been tested with the following platforms and compilers:
Note that the classes require C++17, so the -std=c++17
compiler
option or bigger may be necessary.
When using gcc or clang, the library should compile automatically for either x86-64 or ARM64
without requiring any configuration. This is done by examining the __x86_64
and
__aarch64__
precompiler macros, which these compilers set for those target platforms.
Thus, usually, no configuration is required.
However, if for some reason one of the two supported target architectures should be chosen explicitly,
this can be done by declaring the precompiler macro WMPINT_CPU_TYPE
to expand as either
one of the names:
WMPINT_CPU_TYPE_X86_64 WMPINT_CPU_TYPE_ARM64
For example:
g++ -std=c++17 -Wall -Ofast -march=native -DWMPINT_CPU_TYPE=WMPINT_CPU_TYPE_X86_64 test.cc WMPInt/WMPInt.cc
Currently the only difference between the two targets is in the parameter type of the division and modulo
operators and functions. While a parameter of type std::uint64_t
is supported on x86-64, on
ARM64 only a parameter type of std::uint32_t
is currently supported.
There are two main ways to initialize an instance of WMPUInt
with a value:
Providing std::uint64_t
values to its constructor or the assign()
function, or with an ASCII string containing the number in either decimal or hexadecimal.
std::uint64_t
valuesMember functions:
WMPUInt(); explicit WMPUInt (std::uint64_t); template<typename... Values_t> explicit WMPUInt (std::uint64_t, Values_t...); explicit WMPUInt (std::initializer_list<std::uint64_t>); template<typename... Values_t> void assign (std::uint64_t, Values_t...); void assign (std::initializer_list<std::uint64_t>);
The default constructor will leave this object uninitialized (thus its value will
be unspecified, just as with basic types.) To zero-initialize the object, simply
give the constructor the value 0
.
The constructor can be given at most kSize
values of type
std::uint64_t
, which will form the value of this object. The values
are listed from most-significant to least-significant. If there are less values
specified than kSize
, the given values will form the least-significant
elements of this object (the remaining most-significant elements will be initialized
to zero.) Examples:
WMPUInt<3> v1(10); WMPUInt<3> v2(0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF); WMPUInt<3> v3(0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF);
These are the values of the three example objects above, in decimal:
v1
: 10
v2
:<PHONE_NUMBER>20938463463374607431768211455
v3
:<PHONE_NUMBER>386680763835789423207666416102355444464034512895
Alternatively, the objects can be constructed or assigned a value using an
initializer list of std::uint64_t
values.
Note that the data()
member function returns a pointer to the internal
array of the object. This can also be used to directly set (and read) these components.
Alternatively, the object can be initialized with an ASCII string containing a number in either decimal or hexadecimal.
Member functions:
const char* assignFromHexStr (const char*); const char* assignFromDecStr (const char*);
The functions will do very little sanity checks on the strings. They will simply scan the string until they find a non-hexadecimal (in the first case) or non-decimal (in the second case) character, or the null character, and interpret the characters up to that point. Hexadecimal characters can be in uppercase or lowercase. They return a pointer to the position in the string where the scan was stopped.
Currently a leading '-'
character is not supported.
If the string contains a value that's larger than fits the current object, its least-significant part will be assigned (in other words, the value will be truncated, ie. taken modulo the maximum value of this object). Currently no direct mechanism is implemented to know if this happens, but this can be deduced in the following manner:
maxHexadecimalDigits()
, then the value was truncated,
else it was not.maxDecimalDigits()
then it was truncated. If it's smaller than that value then
it was not truncated. If it's exactly that value, then it might or might not have been
truncated. (Currently there is no mechanism implemented to know this for sure.)Note, however, that this does not take into account possible leading '0'
characters
in the input string. If determining whether truncation happened is important, these leading
characters should be skipped prior to calling these functions.
(If it's absolutely crucial to know if the value of an input decimal string was truncated,
then one sure way is to use a temporary WMPUInt
object that's one larger than
the target object, then read the decimal string value into it, and if the difference between
pointers is exactly maxDecimalDigits()
of the target object, check if
data()[0]
of this temporary object is zero. If it's not, then the value
was truncated. After this, the temporary object can be assigned to the target object
using assign()
.)
If possible, using assignFromHexStr()
is recommended because it's
significantly more efficient than assignFromDecStr()
.
Examples (which are equivalent to the previous examples above):
v1.assignFromHexStr("A"); v2.assignFromHexStr("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"); v3.assignFromHexStr("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"); v1.assignFromDecStr("10"); v2.assignFromDecStr("340282366920938463463374607431768211455"); v3.assignFromDecStr("6277101735386680763835789423207666416102355444464034512895");
WMPUInt
objectMember functions:
template<std::size_t kSize2>
void assign (const WMPUInt<kSize2>&);
An object of one size can also be assigned with the value of an object of another size. If the size of the parameter is larger than the size of this object, the least-significant components will be assigned (in other words, the parameter value will be taken modulo the size of this object.)
Member functions:
constexpr static std::size_t size(); constexpr static std::size_t bits(); std::uint64_t* data(); const std::uint64_t* data() const;
size()
simply returns kSize
.
bits()
returns the size of this object in bits (which is always
kSize*64
, but provided for convenience.)
data()
returns a pointer to the internal array of component values.
The calling code is free to read and modify these values. data()[0]
is
the most-significant component, and data()[kSize-1]
is the least-significant
component.
Member functions:
template<std::size_t kSize2> bool operator== (const WMPUInt<kSize2>&) const; template<std::size_t kSize2> bool operator!= (const WMPUInt<kSize2>&) const; template<std::size_t kSize2> bool operator< (const WMPUInt<kSize2>&) const; template<std::size_t kSize2> bool operator<= (const WMPUInt<kSize2>&) const; template<std::size_t kSize2> bool operator> (const WMPUInt<kSize2>&) const; template<std::size_t kSize2> bool operator>= (const WMPUInt<kSize2>&) const; bool operator== (std::uint64_t) const; bool operator!= (std::uint64_t) const; bool operator< (std::uint64_t) const; bool operator<= (std::uint64_t) const; bool operator> (std::uint64_t) const; bool operator>= (std::uint64_t) const;
Comparisons are supported between WMPUInt
objects of any size.
 Calling the bit-shift operators
(operator<<=
etc.) with a bit size equal to or larger than
bits()
is undefined behavior (like it is with basic types), and will result
in an out-of-bounds access. If these functions might be called with an amount that exceeds
that limit, the calling code needs to check for this situation.
 The division and modulo operators do not check for division by zero. Dividing by zero will most probably cause the CPU to throw an exception (which eg. in Linux will cause the program to throw a SIGFPE signal.) Checking if the divisor is zero (before calling the division operators) is up to the calling code.
Note 1: The postfix versions of operator++
and operator--
are deliberately omitted because of their (needless) overhead.
Note 2: If possible, always use the neg()
function instead of using the
unary negation operator, as neg()
negates the number in-place, while
the unary negation operator will calculate the result into and return a temporary.
Member functions:
constexpr static std::size_t multiplyBufferSize (); void multiply (std::uint64_t rhs, WMPUInt<kSize>& result) const; void multiply (const WMPUInt<kSize>& rhs, WMPUInt<kSize>& result, std::uint64_t* tempBuffer) const;
Note that the multiplication operators operator*()
and operator*=()
use internally a stack-allocated WMPUInt<kSize>
and, if necessary, a buffer of
multiplyBufferSize()
std::uint64_t
values. For values of
kSize
up to the hundreds, perhaps even thousands, this shouldn't pose a problem.
However, if kSize
is extremely large (in the tens of thousands or more), this
may pose a problem because in most platforms stack size is limited, and this could cause a stack
overflow. It might also potentially have some efficiency implications (even when the stack
does not overflow).
These two member functions are provided to circumvent this problem.
tempBuffer
should be a (separate) array of at least
multiplyBufferSize()
std::uint64_t
values. (This array doesn't
need to be initialized with anything.)
Note: multiplyBufferSize()
may return 0. Take this into
account if using an inbuilt array as the buffer. (Since multiplyBufferSize()
is a
static constexpr
function, its result can be resolved at compile time, and the decision
of whether to use a temp buffer at all likewise, eg. using an if constexpr
expression or
similar.) If the return value is 0, then it's ok to pass nullptr
as the tempBuffer
parameter.
Important! result
cannot be this object or the
rhs
object. It must be a third, separate object, else the result will be
completely incorrect. (Likewise tempBuffer
cannot point to any of those three
objects.)
The idea with these functions is that they can be used with temporary buffers that are statically or dynamically (but not stack) allocated, avoiding the problem of stack overflows. For example:
namespace
{
const std::size_t kSize = 10000;
thread_local WMPUInt<kSize> multResult;
thread_local std::uint64_t multTempBuf
[WMPUInt<kSize>::multiplyBufferSize()];
}
void foo(const WMPUInt<kSize>& value1,
const WMPUInt<kSize>& value2)
{
value1.multiply(value2, multResult, multTempBuf);
// The result of the multiplication will be in multResult
}
Member functions:
template<std::size_t kSize2> constexpr static std::size_t fullMultiplyBufferSize (); template<std::size_t kSize2> void fullMultiply (const WMPUInt<kSize2>&, WMPUInt<kSize+kSize2>& result) const; template<std::size_t kSize2> void fullMultiply (const WMPUInt<kSize2>& rhs, WMPUInt<kSize+kSize2>& result, std::uint64_t* tempBuffer) const;
The multiplication operators (operator*()
and operator*=()
)
and the multiply()
function will return the result of the multiplication
truncated to the same size as the input operands. The fullMultiply()
function
can be used to get the full result of the multiplication of two values of any size.
Given two values WMPUInt<size1>
and WMPUInt<size2>
,
the result of their product will be an object of type
WMPUInt<size1+size2>
.
(Note that there is no version of the fullMultiply()
function that would
take a multiplier of type std::uint64_t
. However, the exact same result
(exactly as efficiently) can be obtained by using a multiplier of type
WMPUInt<1>
instead.)
Example usage:
WMPUInt<64> value1, value2; WMPUInt<128> result; value1.fullMultiply(value2, result);
The second version of the function takes a temporary buffer for intermediate result
calculations (like the regular multiply()
function does), which may be necessary
for very large values, or in some cases for efficiency. The size of the buffer can be retrieved
with fullMultiplyBufferSize()
, which is a template function taking the size of the
second operand as parameter.
Note: fullMultiplyBufferSize()
may return 0. Take this into
account if using an inbuilt array as the buffer. (Since fullMultiplyBufferSize()
is a
static constexpr
function, its result can be resolved at compile time, and the decision
of whether to use a temp buffer at all likewise, eg. using an if constexpr
expression or
similar.) If the return value is 0, then it's ok to pass nullptr
as the tempBuffer
parameter.
Example usage:
WMPUInt<512> value1; WMPUInt<1000> value2; WMPUInt<512+1000> result; const std::size_t kTempBufferSize = WMPUInt<512>::template fullMultiplyBufferSize<1000>(); std::uint64_t tempBuffer[kTempBufferSize]; value1.fullMultiply(value2, result, tempBuffer);
(Note: This section is still incomplete. It will be updated as the functions get implemented.)
Member functions:
x86-64 specific:
std::uint64_t divide (std::uint64_t, WMPUInt<kSize>& result) const; std::uint64_t modulo (std::uint64_t rhs) const;
ARM64 specific:
std::uint32_t divide (std::uint32_t, WMPUInt<kSize>& result) const; std::uint32_t modulo (std::uint32_t rhs) const;
If you need the quotient and remainder of a division operation, it's much more
efficient to get them both at the same time with a single function call, rather than calling
operator/()
and operator%()
separately (as doing so would be
calculating the exact same division twice).
The divide()
member function taking a std::uint64_t
divisor value
works similarly in usage to the equivalent multiply()
function does, except that
it also returns the remainder of the division. (Calling this function is essentially "free"
in terms of efficiency even if you don't use the return value for anything. The compiler will
be able to optimize the assignment of the return value completely away if it's not used.)
Example:
WMPUInt<64> value, result; std::uint64_t divisor = 1234567; std::uint64_t remainder = value.divide(divisor, result);
If you only require the remainder of the WMPUInt
object divided by a
std::uint64_t
value, using the modulo()
function is more convenient
and slightly more optimal (because the quotient will not be needlessly stored anywhere).
Example:
WMPUInt<64> value; std::uint64_t divisor = 1234567; std::uint64_t remainder = value.modulo(divisor);
Important! Note that divide()
and modulo()
do not check if the divisor is zero. If it is, this will most probably cause a CPU
exception to be thrown. Doing this check is up to the calling code, if needed, before calling
these functions.
Note: Currently on the ARM64 only a std::uint32_t
parameter is supported.
Member functions:
template<std::size_t kBits> void shiftLeft (); template<std::size_t kBits> void shiftRight ();
These functions do essentially the same thing as operator<<=
and
operator>>=
, except that the amount of bits to shift is determined
at compile time, as a secondary template parameter. When this amount is known at compile
time, it may lead to more more efficient code.
Note that unlike with the operators, with these functions shifting by an amount larger
than or equal to bits()
is not undefined behavior (instead, the object will be
zeroed).
Example:
WMPUInt<64> value;
value.shiftLeft<192>(); // Shift left by 192 bits
Member functions:
constexpr static std::size_t maxHexadecimalDigits (); void printAsHexStr (char* destination) const;
printAsHexStr()
can be used to print the value of this object as an
ASCII string in hexadecimal format. The length of the output can be determined using
the maxHexadecimalDigits()
constexpr function (the return value is always
kSize*16
, but this function is provided for convenience.).
This function will always print maxHexadecimalDigits()
characters
(with leading '0'
characters if needed).
Note that this function does not output an ending null character.
Example:
WMPUInt<8> number; char str[number.maxHexadecimalDigits() + 1] = {}; number.printAsHexStr(str); std::cout << "The number is " << str << "\n";
Member functions:
constexpr static std::size_t maxDecimalDigits (); char* printAsDecStr (char* destination) const; char* printAsDecStr (char* destination, WMPUInt<kSize>& temp) const; char* printAsDecStrAndReset (char* destination);
These functions can be used to output the value in decimal format. The destination
char array must contain at least maxDecimalDigits()
elements.
Note that these functions will output the characters at the end of the destination
array. The return value is a pointer to the beginning of the outputted string. The contents
of the array prior to that point will be unmodified. The result will have no leading
'0'
characters.
Note that these functions do not output an ending null character.
Example:
WMPUInt<4> value; value.assignFromDecStr("123456789012345678901234567890"); const std::size_t kMaxDigits = WMPUInt<4>::maxDecimalDigits(); char str[kMaxDigits + 1]; str[kMaxDigits] = 0; std::cout << value.printAsDecStr(str) << "\n";
Note that in order to create the output string, printAsDecStr()
needs to copy
the value into a temporary buffer in order to modify it. The second version of the function
takes this temporary buffer as parameter (which may be necessary for very large values).
Example:
WMPUInt<1024> value, temp; value.printAsDecStr(destination, temp);
This temporary buffer can be avoided completely if it's acceptable for the object that's
being printed to be zeroed. This can be done with the printAsDecStrAndReset()
function. This version does not require any temporary buffer, and the value will be set to
zero when it returns.
Expanding std::ostream
to support (relatively small) WMPUInt
values could be done for example like this:
template<std::size_t kSize> std::ostream& operator<<(std::ostream& os, const WMPUInt<kSize>& value) { const std::size_t kMaxDigits = WMPUInt<kSize>::maxDecimalDigits(); char str[kMaxDigits + 1]; str[kMaxDigits] = 0; return os << value.printAsDecStr(str); } void foo() { WMPUInt<2> value; value.assignFromDecStr("123456789012345678901234567890"); std::cout << "Value is: " << value << "\n"; }
These missing features will be added in a later update:
divmod()
function that returns both the result and remainder of division.WMPInt
.Possible future improvements:
These classes behave in the exact same way as
std::array<std::uint64_t, kSize>
, so the same considerations apply
with regards to storage and copying.
For maximum efficiency, needless temporaries and copying should be avoided. The larger the classes are, the more important to avoid them. For example, instead of:
a = b + c + d - e;
prefer:
a = b; a += c; a += d; a -= e;
Note that the unary negation operator will always calculate the result into
and return a temporary. Thus it ought to be avoided if possible, and the member function
neg()
used instead. In other words, instead of doing:
a = -a;
prefer:
a.neg();
Also avoid passing objects of these types to functions by value and prefer passing them by reference, unless you really need a local copy of the parameter. In other words, instead of doing:
void foo(WMPUInt<128> value1, WMPUInt<128> value2);
prefer:
void foo(const WMPUInt<128>& value1, const WMPUInt<128>& value2);
In general, the versions of the operators and functions that take a std::uint64_t
as parameter are significantly faster then the ones that take a WMPUInt
as
parameter. Therefore if the value of the right-hand-side operand is small enough to fit in
a 64-bit value, it should be used as such.
In other words, instead of:
WMPUInt<256> value1, value2, value3; WMPUInt<256> operand(10); value1 += operand; value2 -= operand; value3 *= operand;
prefer:
WMPUInt<256> value1, value2, value3;
std::uint64_t operand = 10;
value1 += operand;
value2 -= operand;
value3 *= operand;
// or simply:
value1 += 10;
value2 -= 10;
value3 *= 10;
Take note of the earlier section Multiplying very large integers.
While this is important with very large objects, the copying that's happening with
operator*()
and operator*=()
may also be an efficiency concern even
with more moderately-sized objects. If this copying of objects turns out to have a negative
impact on efficiency, the multiply()
member function can be used to elide this
copying completely, for example like this:
WMPUInt<128> v1, v2, result; // 8192-bit integers // Multiply without any data copying: std::uint64_t tempBuffer[WMPUInt<128>::multiplyBufferSize()]; v1.multiply(v2, result, tempBuffer);
(Note that v1
and v2
above can not be used
as the second (ie. result) parameter to the function, as this would simply give a completely
incorrect result. The result must always be calculated into a third object.)
Note that even though these classes behave like they were integers, the compiler will not consider them such, and therefore will be unable to perform any expression optimizations. Any such optimizations should be done by hand.
For example, the compiler will not be able to optimize repeated expressions to be calculated only once, such as:
result = (a + b + c) * (a + b + c);
Such an expression will needlessly make those summations twice. It should be optimized manually into something like:
result = a; result += b; result += c; result *= result;
Also, multiplications are genuinely and significantly slower than additions, and such the former should be manually optimized into the latter whenever possible. For example, instead of doing:
a *= 2;
prefer:
a += a;
The fullMultiply()
function, which calculates the full non-truncated result
of the product of two values, will use either the long multiplication or the Karatsuba
multiplication algorithm, depending on the size of the operands. The heuristic to choose
between the two is relatively simplistic, and the faster one might not always be chosen
in every single case. Calling either algorithm directly is supported, to give the user the
possibility of bypassing this simplistic heuristic in cases where the chosen one is not
actually the more efficient, for a particular pair of sizes.
This is mostly relevant only if you are using fullMultiply()
on values of
different sizes. If they are of the same size, you most likely don't need to worry about it.
However, if you are multiplying values of very different sizes, especially if these values
are very large (the kSize
template parameter in the thousands or more), it may
be worth checking if calling one of the algorithms or the other directly might be faster
than relying on the default choice.
The current choice heuristic is the following. The long multiplication algorithm will be chosen if any of these is true:
kSize
of both numbers is the same, and this size is less than 16.kSize
is less than 50, and the smaller kSize
is less
than half the larger one.kSize
is between 50 and 199, and the smaller kSize
is
less than a third of the larger one.kSize
is 200 or more, and the smaller kSize
is
less than a quarter of the larger one.Else the Karatsuba algorithm will be used.
If you are using fullMultiply
on very large numbers of very different sizes,
and using the optimal algorithm is crucial, it may be worth trying calling one algorithm or
the other directly.
Member functions:
template<std::size_t kSize2> void fullMultiply_longMultiplication (const WMPUInt<kSize2>&, WMPUInt<kSize+kSize2>& result) const; template<std::size_t kSize2> constexpr static std::size_t fullMultiply_karatsubaBufferSize(); template<std::size_t kSize2> void fullMultiply_karatsuba (const WMPUInt<kSize2>&, WMPUInt<kSize+kSize2>& result, std::uint64_t* tempBuffer) const;
Long multiplication does not require a temporary buffer, but the Karatsuba multiplication does. Take this into account when choosing the algorithm.
Example:
WMPUInt<2048> value1; WMPUInt<256> value2; WMPUInt<2048+256> result; constexpr std::size_t kTempBufferSize = WMPUInt<2048>::template fullMultiply_karatsubaBufferSize<256>(); std::uint64_t tempBuffer[kTempBufferSize]; value1.fullMultiply_karatsuba(value2, result, tempBuffer);
WMPUInt
works in the same way as an std::array
of
std::uint64_t
values, in that all the data is kept as a member array
(rather than being dynamically allocated). This is very efficient with relatively
small values (up to sizes in the thousands), but may become a problem with extremely
large values because of limited stack space.
In the case of such enormous values it's more advisable to allocate the WMPUInt
objects dynamically. It's recommended to use for example std::unique_ptr
or
std::shared_ptr
to manage them.
Example of WMPUInt
values of size 65536 (4194304 bits):
/* Constants and types*/ const std::size_t kSize = 65536; using UInt_t = WMPUInt<kSize>; using Result_t = WMPUInt<kSize*2>; const std::size_t kFullMultBufferSize = UInt_t::fullMultiplyBufferSize<kSize>(); /* Dynamically allocated big numbers */ std::unique_ptr<UInt_t> value1(new UInt_t); std::unique_ptr<UInt_t> value2(new UInt_t); std::unique_ptr<Result_t> result(new Result_t); std::unique_ptr<std::uint64_t[]> tempBuffer (new std::uint64_t[kFullMultBufferSize]);
Example use of the above (multiply the two values, measure the time):
/* Initialize with random values */ std::mt19937_64 rng; for(std::size_t i = 0; i < kSize; ++i) value1->data()[i] = rng(); for(std::size_t i = 0; i < kSize; ++i) value2->data()[i] = rng(); /* Multiply and measure time */ auto startTime = std::chrono::high_resolution_clock::now(); value1->fullMultiply(*value2, *result, tempBuffer.get()); auto endTime = std::chrono::high_resolution_clock::now(); std::chrono::duration<double> diff = endTime - startTime; const double seconds = diff.count(); std::cout << "Duration: " << seconds << " seconds\n";


With FindaTutor360, which we love to call FAT360, we are here to help you achieve your aspirations.
Browse to find tutors or institutions in subject & skill areas needed using the available filters.
Choose the tutor or institution that is best for you. You can also message them directly.
Flexibly pay for the tuitions and start studying according to your agreed flexible schedule.
If you are satisfied please always remember to leave a positive review & ratings.
You can also post a book for sale or buy books at the bookstore & earn on the side .
You can enjoy your life better if you had this skill. Well, what are you waiting for?
You have put off that hobby for too long. Now you can learn it
Your career isn't going anywhere without that course. Quick! connect with the tutor and learn it.
We offer you the convenience of choosing from an ever growing community of tutors and institutions on everything tuition from skills to subjects to hobbies.
You choose your learning mode most convenient to you, from Online to Offline. One-on-one or one-on-many study format , exchange files & assignments or better still share screen with tutor.
We are crazy about your tutor’s accountability & teaching methods, hence we have features such as reviewing your tutors or institutions. Please be candid and score their performance!
We also hold your money intact in our escrow system and we only pay at the end of the session when you are satisfied with the tution received. Wooyaaaah!!! choose findatutor360 today.
While you study with us, you can also teach a skill or sell old unused books using our sell books option on your dashboard and make some money on the side.


As the Child Abuse Royal Commission examines the serious issue of sexual abuse in junior sport, we should all be thinking about the other risks that need to be addressed to make sure all children can enjoy the benefits of sport and recreation in a safe environment.
Since founding BlueQ, I have been in contact with countless sporting organisations ranging from small clubs to large leagues. I have spoken to many administrators in these organisations and discovered that alarmingly few of them have reliable processes in place to ensure their officials – be it coaches, umpires, trainers or volunteers – are appropriately qualified to be involved in junior sport. I have heard of organisations storing important qualification information like Working With Children Checks on mobile phones or as photocopies that are filed away and forgotten about or lost. It is processes like this that expose children to an unacceptable risk of harm and that need to be improved.
Throughout Australia, 1.7 million children aged 5 to 14 participate in organised sport – a remarkable level of engagement of which all sporting codes can be proud. With this level of participation, it is concerning that junior sporting organisations and their governing bodies do not have the best practices in place to ensure a safe environment in which children can participate. Perhaps one of the causes of this issue is that important administrative tasks are often neglected because they can be time consuming and tedious. Indeed, collating qualification information, maintaining up-to-date medical records or implementing a complaint handling process are hardly the tasks that parents have in mind when volunteering to help out with their child’s sports team. However, the reality is that these administrative tasks are integral in ensuring that children are safe when participating in junior sport.
Fortunately, there are now a number of tailored products that can assist sporting organisations in maintaining a safe sporting environment for children. For example, Play By The Rules offers free online training in child protection, harassment and discrimination, complaint handling and member protection. Our platform, BlueQ, makes it easy for organisations to store the qualifications and accreditations of all coaches, officials and volunteers, enabling both clubs and governing bodies to ensure that everyone involved in junior sport is qualified to do so. In addition to this, organisations like Play by the Rules are working hard to assist all involved in junior sport prevent and deal with discrimination, harassment, child safety and integrity issues in sport.
The current Royal Commission should prompt all sporting clubs and leagues at all levels to examine their current processes to ensure that the best practices are implemented to ensure a safe environment for junior sport to take place.
For more information on how BlueQ could assist your sporting organisation please contact us at<EMAIL_ADDRESS>Hugh Krantz is the co-founder of BlueQ which is now helping over 1,000 junior sporting teams manage compliance of their coaches, trainers and volunteers.


This user guide explains EasySpin's capabilities regarding shaped pulses, i.e. pulses with shapes other than rectangular monochromatic. Although EasySpin does currently not have the capability to simulate pulse EPR spectra obtained with sequences containing shaped pulses, EasySpin can calculate a wide range of pulse shapes, up- and downconvert them, calculate the associated excitation profiles and adapt the frequency and amplitude modulation functions to compensate for effects of the resonator transfer function and transmitter nonlinearity. The corresponding functionality is provided by the functions pulse, rfmixer, exciteprofile, resonator, and transmitter.
In the following, we go over the following topics:
EasySpin provides a range of shaped pulses through the function pulse. The parameters that define the pulse shape are supplied in a structure. Here is the most basic example
Par.tp = 0.100; % us Par.Type = 'rectangular/none'; [t,IQ] = pulse(Par);
This will calculate the shape of a simple monochromatic rectangular pulse. Par.tp
contains the pulse length, in microseconds. Par.Type
is a character array specifying the type of pulse shape, with the amplitude modulation (AM) function given before the slash (/
), and the frequency modulation (FM) function after it. Here, 'rectangular'
for the AM specifies a simple rectangular shape, and 'none'
for the FM specifies that there is no frequency moduation, i.e. the pulse is monochromatic.
pulse returns two things, the time axis and the IQ modulation data. The time axis is in microseconds and goes from 0 to Par.tp
. The number of points is chosen automatically to accommodate the AM and FM without aliasing, but you can override this and specify the time step in Par.TimeStep
. IQ
is a complex vector that contains the in-phase (I) and quadrature (Q) signals needed to drive an IQ mixer to generate the final pulse shape at microwave frequencies. I is the real part of IQ
, and Q is the imaginary part.
The overall pulse amplitude (in MHz) can be given in Par.Amplitude
. Alternatively, you can give the nominal flip angle in Par.Flip
, in radians. This value is converted to an amplitude as described in the documentation for pulse. If neither an amplitude nor a flip angle is given, the function assumes a flip angle of pi by default.
If pulse is called without requesting outputs, then the pulse shape is plotted, including the AM and FM functions and the excitation profile:
pulse(Par); % plots the pulse shape and excitation profile
Many different AM and FM functions are implemented and can be combined arbitrarily. For example, a standard hyperbolic secant pulse can be obtained with
Par.tp = 0.100; % us Par.Type = 'sech/tanh'; Par.Frequency = [-50 50]; % MHz Par.beta = 5; pulse(Par);
Here, the AM function is sech
, and the FM function is tanh
. Par.Frequency
contains the start and end frequency of the frequency sweep, -50 and +50 MHz in this case. To fully define the AM and FM functions, the truncation parameter beta
is necessary. Different AM and FM functions require different additional parameters, which can be found in the documentation of the pulse function.
To generate a chirp pulse with a linear frequency downsweep and a WURST amplitude profile, use the following:
Par.tp = 0.200; % us Par.Type = 'WURST/linear'; Par.Frequency = [80 20]; % MHz Par.nwurst = 10; [t,IQ] = pulse(Par);
In Par.Frequency
, the start frequency is higher than the end frequency. Therefore, a down-sweep will be generated. The WURST amplitude envelope also needs an additional parameter, nwurst
.
It is possible to combine two AM functions. For example,
Par.tp = 0.200; % us Par.Type = 'WURST*sech/linear'; Par.Frequency = [0 60]; Par.nwurst = 10; Par.beta = 5; pulse(Par);
generates a pulse shape with an AM that is the product of a WURST and a sech amplitude profile.
The pulse phase can be set in Par.Phase
, in radians.
The function can also incorporate bandwidth compensation for resonators. For this, you need to provide the resonator transfer function and the corresponding frequency axis in Par.FrequencyResponse
, as well as the microwave frequency in Par.mwFreq
(see below for details).
Par.tp = 0.200; % us Par.Type = 'WURST/linear'; Par.Frequency = [-50 50]; Par.nwurst = 10; [tIQ,IQ] = pulse(Par);
Now you can feed these IQ data into rfmixer, together with a microwave LO (local oscillator) frequency, to get the actual microwave pulse.
mwFreq = 3; % GHz [t,V] = rfmixer(tIQ,IQ,mwFreq,'IQmod');
The last input 'IQmod'
tells the function to perform IQ modulation, that's what is needed to convert IQ data to a microwave signal. rfmixer supports many other modes, including IQ demodulation ('IQdemod'
; modelling a quadrature mixture as typically used in a pulse EPR detector), single-sideband up- and down-conversion ('USB'
, 'LSB'
), etc.
rfmixer can take a series of options in a optional structure. The most important one is the time step, in Opt.dt
:
Opt.dt = 0.0001; % us [t,V] = rfmixer(tIQ,IQ,mwFreq,'IQmod',Opt);
If it is not given, a time step appropriate for the microwave frequency and the input data is determined automatically.
You can calculate the excitation profile of a pulse of arbitrary shape using EasySpin's function exciteprofile. At minimum, it requires the time axis t
and the IQ data IQ
as inputs. Let's take a WURST pulse with a linear frequency sweep:
Par.tp = 0.100; % us Par.Type = 'WURST/linear'; Par.Frequency = [0 100]; Par.nwurst = 20; [t,IQ] = pulse(Par);
The output from pulse can be fed directly into exciteprofile:
exciteprofile(t,IQ);
This will plot the excitation profile, showing the x, y and z components of the magnetic moment after the pulse, as a function of frequency offset. This is the actual excitation profile of the pulse, calculated using quantum dynamics, and not just the Fourier transform of the pulse shape (which is a decent approximation only for small flip angles).
To obtain the excitation profile, ask exciteprofile for outputs:
[offsets,M] = exciteprofile(t,IQ);
M
contains the x, y, and z components of the magnetic moments, one per row. offsets
is a vector of frequency offsets, in MHz. You can use this to plot the excitation profile:
Mz = M(3,:); % z component plot(offsets,Mz);
The ideal pulse shapes provided by pulse generally differ from the pulses experienced by the spins in the sample due to phase and amplitude distortions caused by the resonator transfer function (limited bandwidth of the resonator). The functions resonator and pulse can be used to simulate these effects or to adapt the pulses to compensate for them.
The effect of the resonator transfer function on a pulse can be modelled using the resonator function with the 'simulate'
option. First, the ideal pulse shape is calculated using pulse and then fed into resonator with additional information on the resonator properties:
ResFreq = 9.50; % resonator center frequency, GHz ResQL = 300; % resonator loaded Q-value mwFreq = 9.49; % GHz [t_distorted,signal_distorted] = resonator(t_ideal,signal_ideal,mwFreq,ResFreq,ResQL,'simulate');
To adapt the pulse shape to compensate for this distortion, use the option 'compensate'
:
[t_compensated,signal_compensated] = resonator(t_ideal,signal_ideal,mwFreq,ResFreq,ResQL,'compensate');
If an experimental resonator transfer function has been determined, this can be used in resonator by supplying the corresponding frequency axis and the transfer function instead of the resonator center frequency and loaded Q-value.
In the case of frequency-swept pulses, the sweep rate can be adapted to account for the resonator bandwidth limitations and achieve offset-independent adiabaticity. This sweep rate adaptation is implemented within pulse.
In addition to defining the pulse properties, the microwave center frequency of the pulse needs to be defined in Par.mwFreq
and the resonator profile and corresponding frequency axis need to be supplied in Par.FrequencyResponse
:
Par.Type = 'sech/tanh'; Par.tp = 0.200; % µs Par.Frequency = [-80 80]; % MHz Par.beta = 8; Par.mwFreq = 33.85; % GHz Par.FrequencyResponse = [nu; resonatorprofile]; pulse(Par);
In addition to the resonator, another source of non-linear distortions is the transmitter, mostly the high-power amplifier. Often, the amplifier is driven in partial saturation. In this case, its output power is not a linear function of the input power.
The transmitter function allows to simulate the effect of this distortion on a pulse shape, and also to compensate a pulse shape to account for this. In either case, you need to provide the power transfer curve that maps the input amplitude (Ain
) to the output amplitude (Aout
). To simulate the effect, provide the pulse shape input signal and use the 'simulate'
option. Be careful to properly scale the input signal so it is within the range of Ain
.
[t,signal_ideal] = pulse(Par); % generate an ideal pulse shape signal_distorted = transmitter(signal_ideal,Ain,Aout,'simulate');
To compensate for the distortion, provide the desired output signal (ideal pulse) on the scale of the output signal amplitudes (Aout
in the example below) and use the 'compensate'
option:
[t,signal_ideal] = pulse(Par); % generate an ideal pulse shape signal_compensated = transmitter(signal_ideal*max(Aout)/Par.Amplitude,Ain,Aout,'compensate');
This will return an amplitude-compensated signal.
Additional details can be found in the reference page of transmitter and in the Examples.


4 references to WriteDebug
System.Management.Automation (4)
engine\MshCommandRuntime.cs (1)
472
WriteDebug
(new DebugRecord(text));
engine\remoting\commands\ReceiveJob.cs (1)
840
mshCommandRuntime.
WriteDebug
(d, true);
engine\remoting\common\psstreamobject.cs (2)
138
mshCommandRuntime.
WriteDebug
(debugRecord, overrideInquire);
383
mshCommandRuntime.
WriteDebug
(debugRecord, overrideInquire);


black and blue
"I will see you @ the protest" I will shed a blinded eye but not a tear full without the salt in the wound to taste you at (on) the sidewalk broken and chipping tripping the passerby three blocks in the future one for each of the crooked street corners missing a square the laws of physics start deteriorating before the sun comes up, they're already down for the count past nightfall and the numbers haven't added up since 3/5ths a waltz or an Eric Dolphy lullaby the world's been screaming for a minute or two all black and (or) blue in the face all blue all blues pardon the ex-(press-i-on)-perience at the prote-an station all lined up single file if not for the angels with their wings on the scales (or vice versa) the metal weighs like scales and b(l)ind like justice -- here or there draw the curtains and you're scribbling ink already blood on the translucent panes no more a window than a soul tax see you @tension for the lack of black of pandora's deafen(ing)ed s-cream and other muted tones resist a- res(pi)t(e) and pit(y) the p(us) a peach too sweet [like rotten meat?] O-DIE[Or-Does It Explode?]us


--- title: MLP keywords: fastai sidebar: home_sidebar summary: "This is an unofficial PyTorch implementation by Ignacio Oguiza<EMAIL_ADDRESS>based on **Fawaz, H. I., Forestier, G., Weber, J., Idoumghar, L., & Muller, P. A. (2019). Deep learning for time series classification: a review. Data Mining and Knowledge Discovery, 33(4), 917-963.** Official MLP TensorFlow implementation in https://github.com/hfawaz/dl-4-tsc/blob/master/classifiers/mlp.py" description: "This is an unofficial PyTorch implementation by Ignacio Oguiza<EMAIL_ADDRESS>based on **Fawaz, H. I., Forestier, G., Weber, J., Idoumghar, L., & Muller, P. A. (2019). Deep learning for time series classification: a review. Data Mining and Knowledge Discovery, 33(4), 917-963.** Official MLP TensorFlow implementation in https://github.com/hfawaz/dl-4-tsc/blob/master/classifiers/mlp.py" nb_path: "nbs/103_models.MLP.ipynb" ---
bs = 16
nvars = 3
seq_len = 128
c_out = 2
xb = torch.rand(bs, nvars, seq_len)
model = MLP(nvars, c_out, seq_len)
test_eq(model(xb).shape, (bs, c_out))
model


Side Story 8.
5 . Your daily routine (3).
Ding, dong . Ding, dong…
From the elementary school kids who’d find the embrace of their mothers more comfortable than their respective classrooms, right up to those teachers with greying hair and only a little bit left on their clock until retirement….
… . The sound of the end-of-school bell, capable of re-energising pretty much everyone who heard it, rang around noisily throughout the school
Most of the kids in the classroom formed expressions of ecstasy as if they were about to fly away . Meanwhile, Jin-Woo, sitting among them, carried a carefree face as he greeted the end to his school day in this place
“Everyone, don’t go home late because you want to hang out with new friends you made today, okay! Understand?”.
Yeees-!.
After the token replies, half consisting of mischievous voices of the male students and the other half high-pitched tones of the girls were made, the classroom became empty in no time at all now that the day’s schedule had come to its end
Jin-Woo deliberately took his time packing up his bag, before he spotted Young-Gil hesitantly and slowly approaching him like a full-bellied tortoise
‘… . ?’.
Jin-Woo stopped packing his bag when Young-Gil cautiously asked him a question
“Uhm… I’m heading off in the direction of the ‘Gigamart’, but what about you?”.
‘Ah, I guess he wants to get close to me . ’.
An easy-to-read relaxed smile formed on Jin-Woo’s face
‘A minor favour shown when young can also become the start of a relationship later on like this, huh?’.
Jin-Woo smiled for a little while, before shaking his head
“Well, yeah, it’s in the same direction, but there’s something I gotta do first . ”.
“Oh… . ”.
As Young-Gil stood there in disappointment, Jin-Woo lightly tapped the boy on the shoulder and grinned brightly
“Let’s go . ”.
Not too long afterwards, both of them exited from the school building
“What? Track and field club??”.
Young-Gil asked with a surprised voice, while Jin-Woo nodded calmly as his reply
“Yup . ”.
The reason why Jin-Woo chose this school, far from his home, instead of those nearby was because it was only this particular one that happened to have a track and field athletics department
Young-Gil could only tilt his head when Jin-Woo replied that he’d join the track and field team from today
‘Was Jin-Woo good at track in the past?’.
He remembered hanging around Jin-Woo for only about a month or so . The memories of him playing that game really well were the only thing that came to the boy’s head, but he just couldn’t recall Jin-Woo doing anything particularly outstanding during physical training or club activities
No, Young-Gil simply remembered Jin-Woo doing pretty much everything at his pace – which was leisurely
‘A high school track and field club should be operated by only the talented students, though… . ?’.
The boy suddenly felt worried about Jin-Woo and found himself unconsciously chasing after his friend . Meanwhile, Jin-Woo crossed the athletics field and approached the group of athletes loosening themselves up in the corner of the field
“Mm…?”.
Their attention soon shifted towards the incoming duo of freshmen . They initially expected the two to walk past them or change their heading, but their expectation turned out to be off the mark . The senior with the biggest physique took a step forward and ‘greeted’ the duo
“What do you two want now?”.
Jin-Woo briefly scanned the atmosphere of the team members and replied with a smile
“I’d like to join the athletics club . ”.
The senior with big physique, the captain of the track and field team Choi Tae-Woong, alternated his gaze between Jin-Woo and a shorter kid with a rather unhealthy complexion
“You wanna join the club?”.
“Yes . ”.
“Both of you?”.
Jin-Woo looked behind, and Young-Gil hurriedly shook his head
“…No, just me . ”.
After seeing Jin-Woo’s continuously-smiling mug, the seniors grew interested and gathered around the freshmen
“Ohh, what’s this? We have an applicant wanting to join us?”.
“This is my first time seeing a freshman barging in here and wanting to join the team, though . ”.
“He’s not playing around, is he?”.
Choi Tae-Woong scratched the top of his head and scanned Jin-Woo from top to bottom before asking another question
“You a student-athlete?”.
“No, I’m not . ”.
“Okay, you have experience running track in middle school?”.
Although Jin-Woo was rather experienced in running all over the gap between dimensions to kill Sovereigns, that wasn’t something he could refer to as his middle school days, or running track competitively, so he could only shake his head with a wry smile
“No, I don’t . ”.
The seniors in the athletics club were ready to welcome this enthusiastic newcomer right up until that answer . But now, their complexions were hardening drastically
A freshman who hadn’t even run track competitively wanted to enter the athletics club comprised only of student-athletes?.
Wasn’t this kid taking high school track & field way too lightly?.
One of the seniors blessed with a short fuse suddenly jumped into the conversation from the side
“You haven’t run track before, so why do you want to enter the team?”.
Jin-Woo’s reply was rather simple
“There’s someone I’d like to meet during the athletic meet, you see . ”.
She was still in the middle school division, but without a doubt, she possessed enough talent to participate in the regional competition
Well, she used to be an excellent athlete before she had to give up on that dream after becoming a high-ranked Hunter, didn’t she?.
If it was an athletic meet featuring participants from both middle and high schools, then wouldn’t he be able to naturally run into her there?.
Jin-Woo judged that, rather than forcibly get close to her and insert himself into her life that way, this might be a far better approach for both of them
However, judging from the expressions of the seniors, it seemed that they didn’t share his thought process
“Athletic meet… . ??”.
The expression of the senior with the short fuse, Jeong Gu-Shik, hardened like stone .  ”.
Jeong Gu-Shik looked back at his captain with an expression of a man failing to comprehend the situation
“What?!”.
“However, there is a condition . ”.
Choi Tae-Woong used an expression that said ‘Be quiet’ to defeat Jeong Gu-Shik, and pointed at a glasses-wearing student busy stretching his muscles over yonder
“You see that friend over there?”.
Jin-Woo followed after the pointing finger and nodded his head
“Yes . ”.
“That friend is the worst runner in our team, a reserve from the second year . Meaning, you gotta at least beat that friend to earn the right to enter our team . ”.
That was a bold-faced lie
Even before he heard the explanation, Jin-Woo had already analysed that particular second-year student’s abilities, and as a result, he began chuckling inwardly
‘At first glance, that student’s thighs and calves look lean and thin, but they are actually hard and well trained . And confidence simply oozes from the rest of his body… . ’.
Spying from the student’s steady, relaxed breathing or his upright posture, Jin-Woo knew immediately that he was looking at no ordinary athlete here
Meaning, the third year seniors were trying to make fun of him . How could Jin-Woo not laugh when their intentions were so easy to read like this?.
Jeong Gu-Shik also belatedly realised what Choi Tae-Woong was trying to do and quickly changed his expression
“Ahh, right! You said that you’re aiming to enter the athletic meet, right? Well, in that case, a simple little admittance test like this is no problem for you, right?”.
Jin-Woo didn’t like the way this guy was grinning slyly like that, but still, asked back in a calm manner nonetheless
“That senior… . Is he really a reserve?”.
“I guarantee it . ”.
Choi Tae-Woong replied in a confident voice, and the rest of the athletic team members had to try their best to hold back their laughter
‘He’s a reserve, alright . Well, the truth is, he did finish third place in last year’s regional meet, but he sprained his ankle during winter training so he’s been demoted to a reserve spot, for the time being . ’.
If he were to get technical here, then Choi Tae-Woong wasn’t really, really lying by saying that the glasses-wearing guy was the worst ‘runner’ here due to the lengthy unscheduled lay-off, and that he was in the reserve spot because of the injury
Jin-Woo then replied in an easy-going manner to captain Choi Tae-Woong and his insidious smile
“Very well, I understand . Let me try . ”.
This b*stard, he fell for it!!.
Not just Jeong Gu-Shik, but everyone in the athletics club shouted out “Hooray!” in their heads
‘A guy who can’t even recognise the third-place finisher from the regionals last year wants to join the track and field team? Gimme a break . ’.
Choi Tae-Woong, standing in front of the group to deal with Jin-Woo, did his utmost best to hide his laughter threatening to break through his lips
“Very good . However, just running the track like that wouldn’t be any fun, so… . How about this? If you win, you get to join the team, but if you lose, you do the team’s laundry and cleaning for one month, free of charge . ”.
“Sounds good . ”.
“J-Jin-Woo… . ”.
Young-Gil tried to stop him, but Jin-Woo simply formed a smile that said: “It’s fine . ”.
‘Let’s see how long you can keep that relaxed face of yours . ’.
Choi Tae-Woong looked towards the ‘reserve’ student and shouted out loudly
“Hey, Sahng-In-ah! Looks like you’ll have to take to the track for this one . ”.
The ace of the team, Woo Sahng-In finished his stretching exercise and raised his body up
“It’s not a problem . ”.
He took off his glasses and entrusted it to another member of the club, suspiciously ominous aura shooting out from his eyes . Jin-Woo held the senior’s fierce gaze while handing over his school bag and his jacket to Young-Gil next to him
While the members of the track and field club were thinking that here was a chance to let a freshman taste the bitterness of life, Jin-Woo was deeply pondering inwardly just how seriously he should run so that the sheer mental shock his seniors no doubt feel wouldn’t be as high
“Hey, freshman, are you ready?”.
“Yes, I am . ”.
“Sahng-In, what about you?”.
“I’m ready . ”.
Jin-Woo and Woo Sahng-Min stood side by side on the starting line
The former assumed a posture that best optimised one’s ability to rapidly change directions and enter a battle at any time, while the latter assumed a posture solely designed for track competition
This time, the team members didn’t bother to hide their ridiculing laughter at Jin-Woo’s weird posture
“What the hell is up with this idiot?”.
“And he still wants to join the athletics club? But, isn’t he a d*mn beginner who doesn’t even know anything about running track?”.
Jin-Woo didn’t pay any attention to their mocking words and controlled his breathing
“Ready?”.
Soon, Choi Tae-Woong’s baritone voice signalling the start could be heard
“Start!”.
***.
“Teacher-nim? How are you feeling now?”.
“Ah… . yes, well… . ”.
‘Venomous Snake’ Teacher Park Gi-Sool replied half-heartedly at his colleague’s question after they ran into each other on the corridor, and with hurried steps, he quickly walked past the confused-looking fellow teacher
Park Gi-Sool’s crumpled expression easily spoke of his current mood
‘I ended up making a fool of myself in front of all the gathered students today… . ’.
He definitely must have made a mistake . Without a doubt, his strange hallucination was the fault of not eating a proper breakfast earlier today
It felt as if every student was laughing at his expense . He quickly evaded their gazes and slipped into the teacher’s lounge, before spitting out a sigh rushing out from the deepest part of his chest
“Fuu-woo… . ”.
‘Should I smoke to take the edge off?’.
Since almost every teacher was a smoker, smoking in the lounge was permitted, which meant that this place was like a safe haven for the current Park Gi-Sool
He stuffed a cigarette between his lips and stood next to the windows while lighting it up . Just as he mindlessly shifted his gaze down to the athletics field… .
… . His eyes grew extra large and he hurriedly lowered himself below the windows while spinning around
‘W-what the hell?! Why is that kid running around the track with the rest of the athletics club members??’.
It was then, the director of the track and field team entered the lounge and discovered crouching Park Gi-Sool
“Ah, Park Teacher-nim!”.
Wondering if the dizzy spell from the morning had come back again, the director hurriedly ran over to Park Gi-Sool and helped him up
“Are you alright? You sure you don’t need to stop by at a hospital?”.
“I, I’m fine, thank you . Just feeling a bit dizzy, that’s all… . ”.
Park Gi-Sool made an evasive answer before asking back
“B-by the way… . Why is the student named Seong Jin-Woo running together with the kids from the athletics team?”.
“Ahhh… . That? So, that student’s name is Seong Jin-Woo?”.
The director took a look outside the window over Park Gi-Sool’s shoulder and formed a wry chuckle as if he still couldn’t believe it
“It seems that a freshman just showed up and said that he wanted to join the team . Kids tested him out, and as it turned out, he has a talent, so they just couldn’t chase him away . Apparently, what they are doing now is to test his stamina . ”.
“H-his stamina, you say??”.
“Yes . That’s his 20th lap already . Just watching him going around is exhausting, so I quit first and came up here . ”.
Sports, and sports clubs
There was no better alternative to get rid of one’s overflowing hot-bloodedness of youth than sports
Several thoughts crisscrossed within Teacher Park Gi-Sool’s mind, then . Student Seong Jin-Woo, the one he pre-judged to be a troublemaker, seemed to be trying his best to discipline himself by joining a sports club
‘It’s possible that… . That I have been holding the wrong idea about him… . ’.
Now that he thought about it closely, there was simply no way that a boy walking around with monsters would exist in reality
Student Seong Jin-Woo was just another exceedingly normal learner still searching for a place to call home within the fields of academia and sports, after a lengthy spell of aimlessly wandering around in his life
But here was a teacher busy going on about seeing monsters and phantoms and whatnot from a regular student like that… . The reputation of the ‘Venomous Snake’ had been thoroughly stained with this matter, indeed
Park Gi-Sool chuckled meekly, stopped hiding, and stood back up
‘That’s right… . I should look at him without judging him first . I’m sure that will help resolve all the misunderstanding . ’.
Seeing Park Gi-Sool form a serious expression before breaking into a chuckle, the director looked at him with a concerned face
“Park Teacher-nim… . ?”.
“Ah, no . It’s fine now . I don’t feel dizzy anymore . ”.
“Oh… In that case, that’s a relief . ”.
Park Gi-Sool successfully made the director withdraw and slowly turned around to look behind him . He could now see a boy, covered in sweat and running diligently around the track while being showered by the bright, warm spring sunlight
How could anyone point fingers at such a boy?.
He focused his gaze on Jin-Woo, currently running steadily and unflustered even after lapping the panting and breathless members of the track and field team several times already
‘Indeed, this morning was… . ’.
Too bad, even before he could celebrate himself….
… . Without any warning whatsoever, Park Gi-Sool’s entire field of vision was dyed in black and the spectacular sight of the Shadow Army stretching on endlessly entered his eyes
He nearly toppled over from fright, but he forced his legs to steady himself and gritted his teeth
‘This, this is a hallucination . This isn’t real!!’.
It was then
A certain ant monster standing in the front-most row of the soldiers kitted out in black armour, gazed straight at him and opened its maw wide
[Khak!!].
“U-uwaahk?!”.
In the end, Teacher Park Go-Sool did fall on his butt and lost consciousness
[… . ].
Within the subspace in Jin-Woo’s shadow, Igrit watched Beru’s action and used his elbow to rib the former ant king in the side
[I told you to stop that, didn’t I?].
[Kiieehh… . That human can really see us, can’t he?].

Late at night
Detective Woo Jin-Cheol and the youngest detective in the squad stopped by a diner that served ‘gopchang’
Once enough alcohol entered their bloodstreams, stories they found hard to talk about during the day came out – mostly from the youngest’s mouth, actually
“Excuse me, Senior Woo… . ?”.
“Mm?”.
“You’ve been investigating that missing prisoner case until now, yes?”.
What was this guy trying to say here?.

“What day?”.
Woo Jin-Cheol played dumb deliberately, but the youngest simply grinned and replied
“Eii, senior, you… You already know, don’t you? I’m talking about that day when the suspect went missing . Didn’t you really see something that day?”.
This kid, he had this habit of catching people off-guard when they least expected it
‘Well, that’s a good talent to have as a detective . ’.
Woo Jin-Cheol recalled his own newbie days and formed a slight chuckle as he replied
“What if I did?”.
“Really?”.
The youngest looked to be adequately drunk until then, but his eyes suddenly began sparkling and his ears even physically perked up . That wasn’t so surprising, considering that the youngest was closer in age to being a student than a full-fledged member of society, anyway
That was probably why he applied to the Violent Crimes Investigation Unit of the National Police Agency, reputed to be the worst paid but with the highest amount of workload
Maybe the power of the booze circulating in him was to blame, or maybe, he just wanted to use this opportunity to get some stuff off his chest – Woo Jin-Cheol began speaking of things that he’d never even think about uttering in normal times
“An ant… . Ant monsters . ”.
Gulp
The noise of saliva sliding down the throat of the youngest detective could be heard from where he was sitting
“Even I can’t tell for sure what I saw back then . In any case, those things looked like ants . ”.
“Ant monsters, is it? Are you saying that giant insects like ants came out?”.
“No, not that . Well, they were ants, but… . ”.

The heads of the two detectives, Woo Jin-Cheol and his junior, raised up towards the owner of the voice
< Chapter 251 > Fin


The emotional stress takes its toll and the girls begin to exhibit impossible new abilities. An explanation comes from an unexpected place: the new chair of the women's studies department. Harry Greenwood reveals that the three are powerful witches, and he is their whitelighter, there to advise and guide them as they battle dark forces.


LiteList
An awesome progress-tracking web app that lets you set goals and track your progress.
Sign up
Login
Why choose us?


Welcome to
~Brittany Rausch's~
Portfolio
Home Page
Current Projects
Wiki
Disneyland
My Favorite band
Resume
Blog about blogging Bloggers
Awesomely boring lecture
Cupcake*landia
Vacation
Waffles Muppet Rausch
About Me:
Professional
Personal
Feel free to take a look around
On this page you will find lots of information about
me
!
You can learn about my
professional life
.
As well as my
personal life
.
You can check out the
projects
I've been working on.
And be sure to take a glance at some of my favorite
pictures
.


Members
(constant) getCategories
Fetch all categories
Methods
Category(category) → {Bootstrap:Card}
Component for showing an individual category
Parameters:
| Name | Type | Description |
|---|---|---|
category |
Object | A category object that is fetched from the backend |
Returns:
returns a bootstrap card Component for whatever category is passed in
- Type
- Bootstrap:Card
CheckoutSteps(step1, step2, step3, step4) → {Bootstrap:Nav}
Component for showing which step of the chechout process the user is at
Parameters:
| Name | Type | Description |
|---|---|---|
step1 |
Boolean | step1 of the checkout process, signing in |
step2 |
Boolean | step2 of the checkout process, entering shipping information |
step3 |
Boolean | step3 of the checkout process, payment |
step4 |
Boolean | step4 of the checkout process, placing order |
Returns:
returns a bootstrap nav item for each step of the checkout process that is passed into the component
- Type
- Bootstrap:Nav
Footer()
Component for displaying the footer of the web application
- Source:
Returns:
copyright footer at the bottom of the web applications.
FormContainer(children) → {Bootstrap:Container}
A Component that creaters a bootstrap container with a Row and Col
Parameters:
| Name | Type | Description |
|---|---|---|
children |
Object | children to be displaying inside a row and col inside of a container |
Returns:
returns a Bootstrap Container Row and Col
- Type
- Bootstrap:Container
Header()
Navbar Component using bootstrap
- Source:
Returns:
Bootstrap Navbar with LinkContainers for each link
Loader() → {Bootstrap:Spinner}
A Component using a boostrap spinner to use when part of the application is loading
- Source:
Returns:
a Bootstrap spinner used when part of the application is loading
- Type
- Bootstrap:Spinner
Message(variant, children) → {Bootstrap:Alert}
Parameters:
| Name | Type | Description |
|---|---|---|
variant |
propType | a variant prop passed to decide which type of message to return |
children |
propType | a children prop passed to the component which is displayed as a bootstrap alert |
Returns:
returns an alert which is used to display message in the application such as Errors or Successes
- Type
- Bootstrap:Alert
Example
variant = danger
variant = success
Meta(title, description, keywords) → {Helmet}
A Component which handles the meta tags of the web Application using react helmet
Parameters:
| Name | Type | Description |
|---|---|---|
title |
propType | the title that is passed in to be used as a meta tag for react-helmet |
description |
propType | the description that is passed in to be used as a meta tag for react-helmet |
keywords |
propType | the keywords passed in to be used as meta tags for react-helmet |
- Source:
Returns:
returns a component consisting of React-Helmet to handle the meta for the site
- Type
- Helmet
Paginate(pages, page, isAdmin, keyword, isCategories, isCategoriesAndAdmin, name, isCategory) → {Bootstrap:Pagination}
A component for adding pagination to a page
Parameters:
| Name | Type | Description |
|---|---|---|
pages |
Number | number of total pages to paginate through |
page |
Number | current page |
isAdmin |
Boolean | a boolean that is true when the page being paginated is for an Admin |
keyword |
String | keyword used in the search bar for paginating search results |
isCategories |
Boolean | passed in true when paginating through categories instead of products |
isCategoriesAndAdmin |
Boolean | passed in true when paginating through categories on the admin screens |
name |
String | name of category passed into the link for pagenating through products of a single category |
isCategory |
Boolean | passed in true when paginating through products of a single category |
Returns:
returns a bootstrap Pagination component and Link-Container for handling the links
- Type
- Bootstrap:Pagination
Product(product) → {Bootstrap:Card}
Component for showing an individual product
Parameters:
| Name | Type | Description |
|---|---|---|
product |
Object | A product object that is fetched from the backend |
Returns:
returns a bootstrap card Component for whatever product is passed in
- Type
- Bootstrap:Card
ProductCarousel()
A component that pulls the top products from the redux state and displayes them in a carousel
Returns:
A Bootstrap Carousel with the current top products
Rating(value, text, color)
A Rating component that returns the correct number of stars based on a products rating
Parameters:
| Name | Type | Description |
|---|---|---|
value |
Number | the rating from 0-5 for a given product |
text |
Text | text displayed under the starts, in this case the number of ratings |
color |
Text | a color passed into the component which sets the color of the stars in the component |
- Source:
Returns:
Number of stars to be displayed for a given products rating
SearchBox(history) → {Bootstrap:Form}
A searchbox component for searching through all the products
Parameters:
| Name | Type | Description |
|---|---|---|
history |
history | destructured from match, used to push the url after searching for a product |
Returns:
returns a Bootstrap Form and button for searching
- Type
- Bootstrap:Form


Namespace Bifrost.Domain
Classes
AggregateRoot
Represents the base class used for aggregated roots in your domain
AggregateRootRepository<T>
Defines a concrete implementation of IAggregateRootRepository<T>
InvalidAggregateException
The exception that is thrown when there is something invalid with an AggregateRoot
MissingAggregateRootException
The exception that is thrown when an AggregatedRoot is missing
Interfaces
IAggregateRoot
Defines the very basic functionality needed for an aggregated root
IAggregateRootRepository<T>
Defines the basic functionality for finding and getting aggregated roots
IDynamicOriginator
Defines an origin, typically for aggregated roots when needing to create mementos and set them
This interface represents the mementos dynamically
IMemento
Marker interface for mementos
IOriginator
Defines an origin, typically for aggregated roots when needing to create mementos and set them


Pokémon Sword And Shield's Japanese Launch Event Has Been Canned
All down to "operational reasons", apparently
by Damien McFerranPokémon Sword And Shield is shaping up to be one of the biggest launches of the year, and nowhere is that truer than in Japan, where the series enjoys so much fame that 'mon are given positions of authority and no one blinks an eye.
Taking this into account, any and all launch events relating to the franchise are going to be very popular indeed – but The Pokémon Company has just pulled the plug on one of its biggest shindigs due to take place on November 15th in Ikebukuro, Tokyo.
According to a statement issued by The Pokémon Company, the event has been cancelled due to "operational reasons". Producer Junichi Masuda and game director Shigeru Ohmori were scheduled to appear at the event. An apology has been offered to "customers who were planning to visit".
[via pokemon.co.jp]


This is some sample text writtein in markdown
Sure why note, let's just add more text in here
This should work...


<<
insert username here
Start Chat
View Friends
Exit Profile
Logout
First Name
Last Name
Email
Age
Bio
Pic
Edit
Save


Interface IEvent
Defines the basics of an event.
Namespace:Bifrost.Events
Assembly:Bifrost.dll
Syntax
public interface IEvent : IConvention
Remarks
Types inheriting from this interface can be used in event sourcing and will be picked up by the event migration system. You most likely want to subclass Event.
Properties
| Improve this Doc View SourceCausedBy
Gets or sets who or what the event was caused by.
Typically this would be the name of the user or system causing it
Declaration
string CausedBy { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
CommandContext
Gets or sets the Id of CommandContext in which the event originated from
Declaration
Guid CommandContext { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Guid |
CommandName
Gets or sets the name of the command causing the event
Declaration
string CommandName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
EventSource
Gets and sets the eventsource
Declaration
string EventSource { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
EventSourceId
Gets the EventSource id (Aggregate Root) to which these events belong.
Declaration
Guid EventSourceId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Guid |
Id
Gets or sets the id of the event
Declaration
long Id { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
Name
Gets or sets the name of the event
Declaration
string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Occured
Gets or sets the time the event occured
Declaration
DateTime Occured { get; set; }
Property Value
| Type | Description |
|---|---|
| System.DateTime |
Origin
Gets or sets the origin of the event.
Typically this would be what part of the system the event indirectly is coming from
Declaration
string Origin { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Version
Gets or sets the version of the event (ChangeSet or something)
Declaration
EventSourceVersion Version { get; set; }
Property Value
| Type | Description |
|---|---|
| EventSourceVersion |


Germanium telluride is used as a stable thermoelectric material and a component of thermoelectric alloys (thermo-emf 50 μV / K).


Object Detection in 20 years: A Survey
authors: Zhengxia Zou, Zhenwei Shi, Yuhong Guo, et al.. Notes by Lingkangjie, 2019-06-05
Abstract: Introduce the milestone detectors in history, detection datasets, metrics, fundamental building blocks of the detection system, speed up techniques, and state-of-the-art detection methods, and applications, such as pedestrian detection, face detection, text detection, etc.
Introduction
- Object detection techniques form the basis of many other computer vision task, such as instance segmentation, image captioning, object tracking, etc. Object detection has now been widely used in many real-world applications, such as autonomous driving, robot vision, video, surveillance, etc.
- Milestone detectors: VJ detector (2001), HOG detector (2005), DPM + Bounding box regression (2008,2010), two-stage detector {RCNN (2014), SPPNet (2014), Fast RCNN (2015), Pyramid Networks (2017)}, one-state detector {YOLO (2016,2017), SSD (2016), Retina-Net (2017)}
- What are the difficulties and challenges in object detection? Some Common challenges includes objects under different viewpoints, illuminations, intraclass variations, object rotation, scale changes(e.g., small objects), accurate object localization, dense and occluded object detection, speed up of detection, etc. As different detection tasks have totally different objectives and constraints, their difficulties vary from each other.
Object detection in 20 years
Detectors
- VJ detector introduced three important techniques: integral image, feature selection, detection cascades.
- HOG detector introduces multiple times image scaling technique while keeping the size of detection window unchanged. HOG detector was motivated primarily by the problem of pedestrian detection.
- Deformable Part-based Model (DPM), is the winners of VOC-07, -08, and -09 detection challenges. The key idea behind DPM is “divide and conquer”, where the training can be simply considered as the learning of a proper way of decomposing an object, and the inference can be considered as an ensemble of detections on different object parts. A typical DPM detector consists of a root-filter and a number of part-filters. Later, some new ideas merged into DPM such as mixture models, hard negative mining, bounding box regression, etc.
- The key idea behind RCNN is simple: get object proposals by selective search, and each proposal is rescaled to a fixed size image and fed into a CNN model trained on ImageNet to extract features, finally use linear SVM classifiers to classify. There are total 2000 boxes from one image.
- SPPNet introduces a Spatial Pyramid Pooling (SPP) layer, which enable a CNN to generate a fixed-length representation regardless of the size of image/region of interest without rescaling it.
- Inspired by R-CNN and SPPNet, a new network called Fast RCNN which enables us to simultaneously train a detector and a bounding box regressor under the same network configurations was proposed. Fast RCNN still uses proposal detection technique.
- “Can we generate object proposals with a CNN model”, So Faster RCNN came into being. The main contribution of Faster-RCNN is the introduction of Region Proposal Network (RPN) that enables nearly cost-free region proposals.
- Most individual blocks of an object detection system, e.g., proposal detection, feature extraction, bounding box regression, etc, have been gradually integrated into a unified, end-to-end learning framework called one-stage detection.
- You Only Look Once (YOLO), divides the image into regions and predicts bounding boxes and probabilities for each region simultaneously. YOLO suffers from a drop of the localization accuracy compared with two-stage detectors, especially for some small objects. As YOLO use pre-defined anchors to locate an object.
- Single Shot MultiBox Detector (SSD). The main contribution of SSD is the introduction of the multi-reference and multi-resolution detection techniques. Any previous detectors detect objects of different scales on different layers of the network (e.g, YOLO has three heads to detect three kinds of scaling), and SSD only runs detection on their top layers.
- RetinaNet introduces a new loss function suited for one-stage detection called “focal loss”. Focal loss enables the one-stage detectors to achieve comparable accuracy of two-stage detectors while maintaining very high detection speed.
Datasets
- Pascal VOC (PASCAL Visual Object Classes), tasks including image classification, object detection, semantic segmentation and action detection.
- ILSVRC (ImageNet Large Scale Visual Recognition Challenge)
VOC07: 5k training images, 12k annotated objects, 20 classes.
VOC12: 11k training images, 27k annotated objects, 20 classes.
ILSVRC: 517k images, 534k annotated objects, 200 classes.
MS-COCO-17: 164k images, 897k annotated objects, 80 classes.
OID (Open Images Detection): 1910k images, 15440k annotated objects, 600 categories.
- Object detection tasks: pedestrian detection, remote sensing target detection, face detection, text detection, traffic sign/light detection, etc.
Metrics
- In the early time, use “miss rate vs. false positives per-window (FPPW)”. From VOC2007, introduces Average Precision (AP) and mean AP (mAP). MS-COCO AP is averaged over multiple IoU thresholds between 0.5 (coarse localization) and 0.95 (perfect localization).
Technical Evolution in Object Detection
- Early time, Recognition-by-components is the core idea of image recognition and object detection. The researchers propose rule-based or template based approaches by comparing the similarity between the object components, shapes and contours. In 1998-2005, people use wavelet feature representations to do object detection by transforming an image from pixels to a set of wavelet coefficients. Later (2005-2012), gradient-based representations of statistical model have been popular.
- The history of using CNN to detecting objects can be traced back to 1990s. In the early day, some Y. LeCun et al. works can be considered as the prototype of today’s fuuly convolutional networks (FCN).
- Technical evolution of multi-scale detection:
T1: feature pyramids and silding windows (VJ Det., HOG, DPM, etc.)
T2: detection with object proposals (RCNN, SPPNet, Fast RCNN, Faster RCNN)
T3: deep regression (YOLO)
T4: multi-reference detection (SSD, YOLOv2)
T5: multi-resolution detection (FPN, RetinaNet)
years: --2001-...-2010--2011--2012--2013---2014---2015---2016---2017---2018---2019
------------ T1 ------------------>|
|<------------- T2------------->|
|<--------- T3 ----->|
|<------- T4--------
|<------ T5----------
- To answer the question “ is there a unified multi-scale approach to detect objects of different aspect ratios?”, then researchers introduce “object proposals” (T2).
- Pros of T3: simple, easy. Cons of T3: the localization may not be accurate enough especially for some small objects (T4 has latter solved this problem).
-
Multi-reference/Multi-resolution detection. The main idea of T4 is to pre-define a set of reference boxes (anchor boxes) with different sizes and aspect-ratios at different locations of an image, and then predict the detection box based on these reference. T5 is a technique to detect objects of different scales at different layers of the network. T5 Detects larger objects in deeper layers and smaller ones in shallower layers.
- Technical evolution of bounding box regression. BB aims to refine the location of a predicted bounding box based on the initial proposal or the anchor box.
T1: without bounding box regression(VJ Det., HOG, etc.)
T2: from bounding box to bounding box (DPM)
T3: from feature to bounding box (SPPNet, Fast RCNN,
Faster RCNN, YOLO, SSD, FPN, RetinaNet, TridentNet, etc.)
years: --2001-........--2008---------------2013---2016---2017---2018---2019
---- T1 ------->|
|<----- T2-------->|
|<--------- T3 -------
- Technical evolution of context priming. Visual objects are usually embedded in a typical context with the surrounding environments. We use the associations among objects and environments to perform object detection. This kind of method called context priming.
- Detection with local context. Some researchers found that by incorporating a small amount of background information improves the accuracy of pedestrian detection early in 2005.
- Detection with global context. The first way is to take advantage of large receptive field (even larger than the input image) or global pooling operation of a CNN feature. The second way is to think of the global context as a kind of sequential information such as in video, and learn it with recurrent neural networks.
- Context interactive. Context interactive refers to the piece of information that conveys by the interactions of visual elements, such as the constrains and dependencies.
- Technical evolution of non-maximum suppression. NMS has been gradually developed into three groups of methods:
- traditional greedy selection ( DPM, RCNN, Fast RCNN, Faster RCNN, YOLO, SSD, FPN, RetinaNet etc.): for a set of overlapped detections, the bounding box with the maximum detection score is selected while its neighoring boxes are removed according to a predefined overlap threshold (say, 0.5). Cons of this method: the top-scoring box may not be the best fit, it may suppress nearby objects, it does not suppress false positives.
- bounding box aggregation: takes full consideration of object relationships and their spatial layout.
- learning to NMS: think of NMS as a filter to re-score all raw detections and to train the NMS as part of a network in an end-to-end fashion.
- Technical evolution of hard negative mining (HNM). In real scene of object detection, the imbalance between backgrounds and objects could be as extreme as 104 ~ 105 background windows to every object. HNM aims to deal with the problem of imbalanced data during training.
- Bootstrap. Bootstrap in object detection refers to a group of training techniques in which the training starts with a small part of background samples and then iteratively add new misclassified backgrounds during the training process.
- balance the weights between the positive and negative windows. However, this kind of method cannot completely solve the imbalanced data problem.
- design new loss functions, put more focus on hard, misclassified examples.
Acceleration of object detection
- Level 1: speed up of numerical computations (integral image, FFT, vector quantization, reduced rank approx)
- Level 2: speed up of detector engine (network pruning and quantification, lightweight network design)
- Level 3: speed up of detection pipeline (feature map shared computation, speed up of classifier, cascaded detection)
feature map shared computation
Compute the feature map of the whole image only once before sliding window on it, such as how HOG feature map comes. Another example coming from CNN, weight sharing. Scale computational redundancy, directly scale the features rather than the images.
speed up of classifiers
Linear classifiers are low computational complexity, while kernel-based SVM has higher accuracy. Use reduced Set Vectors, piece-wise linear approximation for decision boundary, sparse encoding to speed up traditional SVM.


|
CotC C# SDK for Unity
v<IP_ADDRESS>
Making social games is easy !
|
Represents a key/value system, also known as virtual file system, to be used for game properties. This class is scoped by domain, meaning that you can call .Domain("yourdomain") and perform additional calls that are scoped.
Public Member Functions | |
| GameVfs | Domain (string domain) |
Sets the domain affected by this object. You should typically use it this way: gamer.GamerVfs.Domain("private").SetKey(...); More... | |
| Promise< Bundle > | GetAll () |
| Retrieves all keys from the key/value system for the current domain. More... | |
| Promise< Bundle > | GetKey (string key) |
| Retrieves an individual key from the key/value system. More... | |
| Promise< Bundle > | GetValue (string key=null) |
| Retrieves an individual key or all keys from the key/value system. More... | |
| Promise< byte[]> | GetBinary (string key) |
| Retrieves the binary data of game key from the key/value system. More... | |
| GameVfs CotcSdk.GameVfs.Domain | ( | string | domain | ) |
Sets the domain affected by this object. You should typically use it this way: gamer.GamerVfs.Domain("private").SetKey(...);
| domain | Domain on which to scope the VFS. Defaults to private if not specified. |
Retrieves all keys from the key/value system for the current domain.
string value = result.Value["key"];
.This method is obsolete, use GetValue instead.
| Promise<byte[]> CotcSdk.GameVfs.GetBinary | ( | string | key | ) |
Retrieves the binary data of game key from the key/value system.
| key | The name of the key to be fetched. |
Retrieves an individual key from the key/value system.
| key | The name of the key to be fetched. |
This method is obsolete, use GetValue instead.
Retrieves an individual key or all keys from the key/value system.
| key | The name of the key to be fetched. |


Introduction
Social Login Script for Facebook, Google, LinkedIn
It is often required that, a user register’s or sign up to login to a particular website or application. It is a tedious job to fill those long forms with user basic details. To avoid filling long forms, Cuppa Angular 2 OAuth provides a module to login using social OAuth services like google OAtuh, Facebook OAuth and LinkedIn OAuth. Using this your application will be able to recieve basic details of the user from social networking sites and you can store in your application environment.
Getting Started
Installation
Cuppa Angular social login script is available as an npm package ng2-social-login
npm install ng2-social-login
Initialization
- Import
CuppaOAuthModule
in your app root module.import { CuppaOAuthModule } from './cuppaOAuth/cuppaOAuth.module'; @NgModule({ imports: [ BrowserModule, HttpModule, CuppaOAuthModule // this is the cuppa oauth module ], declarations: [ ], providers: [], bootstrap: [ AppComponent ] }) export class AppModule { }
- Secure your app routes by applying the
AuthService
on your routescanActivate
property.ImportAuthService
in app router module before setting thecanActivate
property withAuthService
import { AuthService } from './cuppaOAuth/auth.service';
const appRoutes: Routes = [
{
path: '',
component: LoginComponent },
{
path: 'login',
component: LoginComponent },
{
path: 'admin',
component: AdminComponent,
canActivate: [AuthService],
children: [
{
path: '',
canActivateChild: [AuthService],
children: [
{
path: '',
component: AdminDashboardComponent
}
]
}
]
},
{
path:'projects',
component: ProjectsComponent,
canActivate:[AuthService]
}
];
@NgModule({
imports: [
RouterModule.forRoot(appRoutes)
],
exports: [
RouterModule
],
providers: [
PreloadSelectedModules
]
})
export class AppRoutingModule {}
- Now, it’s time we place the cuppa auth view, containing the login buttons. For example you have your login component where you want the
cupp oauth
to show the login options, place thecuppa-oauth
tag there with config options as below
<cuppa-oauth [authConfig]="config"></cuppa-oauth>
- You login component class should have the config object as below:
import { Component } from '@angular/core';
@Component({
template: `

<cuppa-oauth [authConfig]="config"></cuppa-oauth>

`
})
export class LoginComponent {
private authServerBaseUrl = 'https://cuppa-angular2-oauth.herokuapp.com';
private config = {
"loginRoute":"login",
"linkedin":{
"authEndpoint": this.authServerBaseUrl+"/auth/linkedin",
"clientId":"8176r44lz2ewos",
"redirectURI" : "https://cuppa-angular2-oauth.herokuapp.com/admin"
},
"facebook":{
"authEndpoint": this.authServerBaseUrl+"/auth/facebook",
"clientId":"929055083862567",
"redirectURI" : "https://cuppa-angular2-oauth.herokuapp.com/admin"
},
"google":{
"authEndpoint": this.authServerBaseUrl+"/auth/google",
"clientId":"77954512562-eftl8up04q1g3aha2mjg5h6bgel9svkk.apps.googleusercontent.com",
"redirectURI" : "https://cuppa-angular2-oauth.herokuapp.com/admin"
}
};
}
Once you have done this, you should see the login page with cuppa oauth
login features.
Config Options
| Property | Type | Description |
|---|---|---|
| loginRoute | String | The route to redirect when not logged in |
| authEndpoint | String | Endpoint to make a call to login the user. This is Oauth Server which generates the token for the logged in user. By default it points to https://cuppa-angular2-oauth.herokuapp.com . To setup server in your environment follow steps in below section. |
| clientId | String | The client id of your application. You will get this once you create you application with any of the provider viz., Google, Facebook, LinkedIn |
| redirectUI | String | The route to redirect the user after successful login. Not: This should match exactly with the redirect URL specified at the time of application creation with the respective providers viz., Google, Facebook and LinkedIn. |
API Methods
logout()
- To logout the user from current session.- Example:
import { Component } from '@angular/core'; import { AuthService } from '../cuppaOAuth/auth.service'; @Component({ template: ` <h1>Projects Page</h1> <button (click)="logout()">logout</button> ` }) export class ProjectsComponent { constructor(private authService: AuthService ){ } public logout(){ this.authService.logout(); } }
Auth Server Setup.
- To run the auth server in your environment instead of
https://cuppa-angular2-oauth.herokuapp.com
follow the below steps. - Download
auth-server.js
from the github repository. - Open command line and change location to the file directory.
- Run
node auth-server
- Server would start on http://
:5000 - Replace
authServerBaseUrl
withhttp://<yourhost>:5000
in your angular login component class config object.
Auth Server Config
- The auth server needs a set of configuration options as below. All the options are self explanatory in themselves. Refer to Documentation to learn how to create facebook, google, linkedin apps.
module.exports = { MONGO_URI: process.env.MONGO_URI || 'mongodb://<username>:<password>@<mongodb host url>:<port>/<DB Name>', TOKEN_SECRET: process.env.TOKEN_SECRET || 'YOUR_UNIQUE_JWT_TOKEN_SECRET', FACEBOOK_SECRET: process.env.FACEBOOK_SECRET || 'YOUR_FB_APP_SECRET', GOOGLE_SECRET: process.env.GOOGLE_SECRET || 'YOUR_GOOGLE_APP_SECRET', LINKEDIN_SECRET: process.env.LINKEDIN_SECRET || 'YOUR_LINKEDIN_APP_SECRET', };
Mongo DB Schema
var userSchema = new mongoose.Schema({
email: { type: String, lowercase: true },
password: { type: String, select: false },
displayName: String,
picture: String,
provider: String,
provider_id: String
});
Locally Build and Run
1) Clone git repository.
2) Configure auth-config.js
with your mongoDB environment details and app secrets.
3) replace authServerBaseUrl
in login component with your environment details.

5) Provide your application name, URL of your app origin and redirect URL and Click Create.
6) On creating successfully, you will see the following screen with client ID and client secret.
Create Facebook Application
1) Visit Facebook Apps
2) Click "Add a New App" button.Fill the details and click "Create ID"
3) Select "Facebook Login" from product list and click "Get Started"
4) Provide redirect URL.

6) On creating successfully, you will see the following screen with client ID and client secret.
Create LinkedIn Application
1) Visit LinkedIn Apps
2) Click "Create Application" button.Fill the details and click "Create"
6) On creating successfully, you will see the following screen with client ID and client secret.
Ahh !!! Now you are ready to make your app up and running.
Licence
This project is licensed under the MIT license. See the LICENSE file for more info.
Credits
Thanks to Font Awesome the library.
Author
Pradeep Kumar Terli
Web UI Developer, Blogger, Thinker , Entrepreneur. Loves to explore technology with focus on web technologies.


JBL Link Drive review: Google Assistant in your car still has rough edges
by Corbin DavenportGoogle Assistant is everywhere these days: phones, tablets, speakers, Chromebooks, and more. The first Assistant devices for cars were unveiled earlier this year, and the first model from Anker launched in April. The other device, JBL's Link Drive, was announced at CES and seemed like it wasn't going to come out. Of course, JBL is no stranger to delays, and the Link Drive just became available recently. So, how is the JBL Link Drive? It's an almost identical experience to the Anker Roav Bolt, but with more hardware disadvantages and a higher price.
Specs
| Bluetooth | 4.2 |
| Dimensions | 42mm x 109mm x 33mm (WxHxD) |
| Weight | 31g |
| Connectivity | 1x USB Type-A (5V/2.1A) |
| Price | $59.95 |
Design, hardware, what's in the box
The JBL Link Drive is a small black device that connects to the charging port in a car. The front has a single microphone button, with indicator lights that mirror those found on a Google Nest Mini. On the top is a 3.5mm jack, used for streaming audio to your car's stereo system. If your car doesn't have an AUX port, you can also use Bluetooth, but JBL recommends going with a wired connection if possible.
The tiny microphone button on the front has multiple functions. Pressing it once will read out notifications from your phone, or if the device is already talking, pressing the button will stop Assistant. Double-pressing it will mute/unmute the microphone, and holding it down will activate Assistant manually. Finally, holding it down for about 12 seconds will reset the device.
As with the Anker Roav Bolt, there are no dedicated media playback controls, so you can't pause or skip songs by pressing a button — you have to use voice commands. I complained about this with the Roav Bolt, and I'm disappointed JBL hasn't changed anything (though the decision may be up to Google).
So, what's different compared to Anker's product, you may ask? Well... nothing good. First, the Link Drive is longer than the Roav Bolt, so much so that it slightly obstructed the cup holder in my compact Nissan Leaf. The design might not be as much of an inconvenience to you, depending on the positioning of your car's charging ports, but I think most will agree that Anker's more compact design is nicer.
The greatest disadvantage of the Link Drive compared to Anker's adapter is the charging capacity. The Anker Roav Bolt offers two USB Type-A ports, both capable of 5V/2.4A charging (even at the same time). The JBL Link Drive only has one USB port, with a slower maximum capacity of 5V/2.1A—no charging multiple devices, no quick charge support, and no USB Type-C connector. Yikes. In the box, you get the JBL Link Drive and a male-to-male 3.5mm cable. That's it.
Software and performance
I won't go into overwhelming detail about the software experience on the JBL Link Drive, because it is identical to the software on the Anker Roav Bolt in every way. If you want all the nitty-gritty details, you can see our previous review here.
In summary, once you pair the Link Drive to your phone via Bluetooth, the Google app should automatically open and walk you through the setup process. Once that's done, the Link Drive becomes an always-on microphone for your phone's Google Assistant, capable of hearing you even with blowing wind and loud music. It can do everything that Assistant on your phone is capable of, including opening apps, sending a text message, playing the news, and so on.
When you're not using Assistant, the JBL Link Drive doubles as a Bluetooth-to-AUX adapter, so anything playing on your phone is piped to your car's stereo. This might not be a big deal to anyone with a car that already supports Bluetooth audio playback, but my car lacks that ability.
I previously said that the JBL Link Drive works identically to the Anker Roav Bolt, and that includes the Bolt's disadvantages. Pairing to a different phone requires resetting the adapter, so the Link Drive isn't ideal for shared cars. Voice commands also don't always work when the phone's screen isn't on, which I assume is something related to Android Doze. For the record, I used the Link Drive mostly with a Galaxy S10e, but I experienced the same issues on the Roav Bolt with my OnePlus 6T and Google Pixel.
Should you buy it?
JBL Link Drive
5/10
No. The JBL Link Drive isn't necessarily a bad product, but there's no point in buying it when the Anker Roav Drive exists. The Roav Bolt takes up less physical space, includes an additional USB port, and is also $10 cheaper (as of the time of writing) with an identical software experience. It's rare that someone can definitively say there is no point in buying a certain product over a competitor, but the Link Drive doesn't seem to have a single advantage over the Roav Bolt.
If you're looking for a way to bring Assistant into your car, with a better microphone than you'll find on any phone, the JBL Link Drive and Anker Roav Bolt will do the job. But for now, you should just buy the Roav Bolt.
Buy it if...
- You want a more powerful Google Assistant in your car.
- You can find the JBL Link on sale.
Don't buy it if...
- The Anker Roav Bolt is available for less money.
Buy:
JBL


| Quantity | Description | Unit price | Total |
|---|---|---|---|
| 30 | Website DesignCreating a recognizable design solution based on the company's existing visual identity |
$40.00 | $1,200.00 |
| 80 | Website DevelopmentDeveloping a Content Management System-based Website |
$40.00 | $3,200.00 |
| 20 | Search Engines OptimizationOptimize the site for search engines (SEO) |
$40.00 | $800.00 |
| SUBTOTAL: | $5,200.00 | ||
| TAX 25%: | $1,300.00 | ||
GRAND TOTAL:$6,500.00 |