In MySuiteA's view, a cryptographic algorithm consist of a set of functions that transforms operands between various forms such as plaintext message, ciphertext, digest, signature, predicate, and/or other form of information;
a cryptographic algorithm is associated with a set of properties that are intrinsic of the algorithm (e.g. key and key schedule size, output size, input length limit);
an algorithm may be based on another algorithm, a.k.a. an algorithm is parameterized by another (set of) algorithm(s) - for example, a digital signature may be instantiated with a hash function, an encryption algorithm may be instantiated with a blockcipher, etc.
Based on the above premise, the term algorithm construction refers to algorithms that needs to be instantiated with another (set of) algorithm(s) or other types of parameters; the term algorithm instance refers to algorithms which have all necessary parameterizations (if any) specified and can operate on operands in a definite way.
The term algorithm can refer to either algorithm construction or algorithm instance. The term algorithm family is banned from use in MySuiteA documentations as it is ambiguous.
MySuiteA implements a uniform interface for using and instantiating from cryptographic algorithms at compile, link, and run time.
At compile time, a function-like macro whose name consists of the name
of the algorithm prefixed with a single lower-case letter "c" is defined.
This macro takes a single argument q
, which
specifies the property associated with the algorithm to be queried, and
evaluates to the value of that property.
For other queries, this macro evaluates to 0.
At link time, a similar macro exists. In addition to the queries available in the compile time queries, the pointers to the set of functions constituting the algorithm may be queried. The prefix of this macro is "x" instead of "c".
At run time, a function with the exact behavior of the link time macro exists. A function is needed so as to enable run-time instantiation, as a function can be encapsulated in a pointer to the function. Such a function is colloquially called a "crypto object".
For the set of queries available (and their applicability to particular types of algorithm), see "mysuitea-common.h".
The "crypto object" function mentioned above takes a single argument. It has the prototype:
IntPtr (*iCryptoObj_t)(int q);
where IntPtr
is a signed integer type with same width as
a pointer type. By default this is defined to be the same as
intptr_t
, however on systems where object and function
pointer types have different representation, this may be changed to
something else by the user of the MySuiteA library.
A algorithm construction crypto object is represented as a function that takes a parameterization argument first, then the query. Such function has the prototype:
IntPtr (*tCryptoObj_t)(const CryptoParam_t *P, int q);
where CryptoParam_t
contains the following members:
iCryptoObj_t info;
This member is used when param
and aux
are
both NULL
, which indicates this parameter is an
algorithm instance.
tCryptoObj_t template;
This member is used if param
or aux
is
non-NULL
, which indicates this parameter is an
algorithm construction that takes further instantiation parameter(s).
The members info
and template
are aliased
together in a union
data structure.
const CryptoParam_t *param;
If used, this is passed as the first argument to template
.
This allows an algorithm construction to be recursively instantiated
by other algorithm constructions and instances.
IntPtr aux
If used, this is passed as the first argument to template
.
This member allow certain algorithm constructions to be instantiated with
miscellaneous objects and values and in ways not defined in MySuiteA.
This member is aliased to param
in a union
data structure, so that caller of template
doesn't have to
be aware of its argument semantics.
Both the parameter P
and the member param
may
point to both a single CryptoParam_t
object, or the initial
element of an array of which - in the case of an array, the algorithm
construction is said to be parameterized by multiple elements.
Previously (before v0.2) there was a PKParamsFunc
query for
obtaining instantiation parameters for use in PKC algorithms. The way
it's implemented caused inflexibility with re-combining PKC Algorithms
with other instantiation parameters.
The approach taken in v0.2 is to have a PKC_Algo_Inst_t
data structure, representing an PKC algorithm instance, defined as:
typedef struct { int secbits; tCryptoObj_t algo; CryptoParam_t *param; } PKC_Algo_Inst_t;
Initial set of instantiation parameters for the algorithms are declared
in the header files named ${algorithm-name}-paramset.h
, and
defined in the corresponding C source code file. Algorithm instances are
generally named as ${Algorithm-Name}_${Parameter}
To use an algorithm instance, after checking it provides the desired
security level, query algo
with param
as instantiation parameter, and obtain relevant algorithm
characteristics and interfaces.
Parallel and tree hashing had been an active area of research, with results such as KangarooTwelve and BLAKE3 turning up. These 2 algorithms are implemented in the Suite with a thin layer of hosted library support.
The model chosen for these multi-thread capable algorithms, is to implement them in such way that, they can take a parallel object to dispatch independent workloads to a crew of threads in a hosted environment; equally, in a freestanding environment, the thread crew can just be a stub that executes the workload subroutine within the control flow with no benefit of any concurrency.
The thread crew is provided as a pointer to a structure which contains
at least 2 interfaces - an enqueue
that dispatches the
workload, and a wait
that waits for all currently dispatched
workloads to complete. The thread crew instances shall have structures
that're layout-compatible with the TCrew_Abstract_t
data type, as defined here:
typedef void (*TCrew_Assignment_t)(void *ctx); typedef int (*TCrew_Dispatch_t)( void *crew, TCrew_Assignment_t func, void *ctx); typedef struct { TCrew_Dispatch_t enqueue; TCrew_Dispatch_t wait; } TCrew_Abstract_t;
MySuiteA strives to implement a uniform set of interface where there's a common API for each type of cryptographic algorithm. This interface is layered, where higher-level schemes may be instantiated from lower-level primitives. As explained in the note in "notes.md" dated [2021-09-03b], blockciphers, permutations, hash, and XOF functions never take parameters to instantiate from, and will always be algorithm instances.
MySuiteA is an octet-oriented implementation, and is written with the assumption that 1 byte is exactly 8 bits (1 octet). It also assumes that 16-bit, 32-bit, 64-bit exact-width integers are available.
In the following sub-sections, property queries available to a particular
type of cryptographic algorithm are listed in code shading
,
each followed by a description of its semantic. The following shorthands
are used in function prototype descriptions:
buf | void * |
|---|---|
dat | void const * |
rbuf |
void *restrict |
rdat |
void const *restrict |
_param_ |
const CryptoParam_t *P |
_tc_ |
TCrew_Abstract_t *restrict tc
|
A blockcipher is a fixed-width keyed permutation. MySuiteA currently only support a single block size of 128 bits. Use of 64-bit blocks have negative security implications; blockciphers with larger block sizes currently lack support from higher-level algorithm constructions and therefore have poorer interoperability and is of lesser use.
Note the phrase "blockcipher instance" is used to distinguish it from a blockcipher family, which may specify many variants of blockcipher instances.
blockBytes
keyBytes
keyschedBytes
EncFunc
void (*)(dat in, buf out, rdat w);
where
in
is the input plaintext block, out
is the output ciphertext block, and w
is the key schedule generated from the key. DecFunc
void (*)(dat in, buf out, rdat w);
where
in
is the input ciphertext block, out
is the output plaintext block, and w
is the key schedule generated from the key. KschdFunc
void (*)(rdat key, rbuf w);
where
key
is cipher key to use, w
is the buffer to hold the key schedule. [note:in-out-ptr-alias]
Note that neither in
nor out
has the
restrict
pointer qualifier. This is an intentional
design decision for allowing in-place cipher computation.
It is implemented as if the encryption and decryption functions first
copied input to output buffer before encryption/decryption.
blockBytes
PermuteFunc
void (*)(dat in, buf out);
where
in
is the input block, out
is the output block. See note tagged [note:in-out-ptr-alias] in the Blockcipher section.
outBytes
blockBytes
(hash-specific)keyBytes
(MAC-specific)contextBytes
InitFunc
(hash-specific)void (*)(rbuf x);
where
x
is the pointer
to the working context in memory.
KInitFunc
(MAC-specific)void *(*)(rbuf x, rdat k, size_t klen);
;
or if the construction is parameterized, the function of prototype
void *(*)(_param_, rbuf x, rdat k, size_t klen);
where
_param_
is the instantiation parameter, x
is the pointer,
to the working context in memory.
k
is MAC key to use, klen
is length of the key input. NULL
. Otherwise, everything succeeds, and
x
is returned.
UpdateFunc
void (*)(rbuf x, rdat data, size_t len);
where
x
is the pointer to the working context, data
the data to feed into the working context,len
the length of the data. FinalFunc
void (*)(rbuf x, rdat out, size_t t);
where
x
is the pointer to the working context, out
is the pointer to the memory location to which,
the hash digest will be written,
len
is the requested length of the digest.
[note:outlen]: It is a convention of MySuiteA that, if the requested length is greater than (or less than) the digest/tag length of the hash/MAC function, then the output will be zero-extended (or truncated).
Additionally, for parallel and tree hashing algorithms, there are:
Update4Func
TCrew_Abstract_t
to potentially
provide concurrent computation. It has the prototype
void (*)(rbuf x, rdat data, size_t len, _tc_);
where
x
is the pointer to the working context,data
the data to feed into the working context,len
the length of the data, andtc
the thread crew that will receive the dispatched workload.Final2Func
void (*)(rbuf x, _tc_);
where
x
is the pointer to the working context,tc
the thread crew that had been used with the working context.Read4Func
void (*)(rbuf x, rbuf data, size_t len, int flags);
where
x
is the pointer to the working context,data
is the pointer to the output buffer,len
is the length of digest data to retrieve,flags
specifies miscellaneous information.
Because newer parallel and tree hashing algorithms are commonly
XOFs, by default, this function behaves identically to XOF's
ReadFunc
when flags
is 0. There is the flag
HASHING_READ4_REWIND
that resets the reading offset
of the hashing context to the start, and it's currently the only flag
defined for Read4Func
.
outTruncBytes
blockBytes
(hash-specific)contextBytes
InitFunc
(hash-specific)void (*)(rbuf x);
where
x
is the pointer
to the working context in memory.
WriteFunc
void (*)(rbuf x, rdat data, size_t len);
where
x
is the pointer to the working context, data
the data to feed into the working context,len
the length of the data. XofFinalFunc
void (*)(rbuf x);
where
x
is the pointer to the working context, ReadFunc
void (*)(rbuf x, rbuf data, size_t len);
where
x
is the pointer to the working context, data
the buffer into which data will be read, len
the requested length of the data.
Because WriteFunc
and UpdateFunc
have
identical prototype, and that they serve very similar purpose,
these 2 symbolic constants are aliased together by having
identical numerical value.
Some algorithms (e.g. KMAC) can operate in both XOF and regular
fixed-length mode, and may support domain separation between different
usage. These algorithms usually support all three of
FinalFunc
,
XofFinalFunc
, and
ReadFunc
.
And, their FinalFunc
behave similar to
XofFinalFunc
and ReadFunc
called in
adjacent sequence.
keyBytes
contextBytes
ivBytes
KInitFunc
void *(*)(rbuf x, rdat k, size_t klen);
;
or if it's a parameterized algorithm construction,
the function of prototype
void *(*)(_param_, rbuf x, rdat k, size_t klen);
where
_param_
is the instantiation parameter, x
is the pointer
to the working context in memory,
k
is cipher key to use, klen
is length of the key input. NULL
. Otherwise, everything succeeds, and
x
is returned.
AEncFunc
void *(*)( rbuf x, size_t ivlen, dat iv, size_t alen, dat aad, size_t len, dat in, buf out, size_t tlen, buf T);where
x
is the cipher working context, ivlen
is the byte length of iv
, iv
points to the initialization vector, alen
is the byte length of aad
, aad
is the additional data to be authenticated but not encrypted,
len
is the byte length of plaintext and ciphertext,
in
, out
are plaintext input and ciphertext output respectively,
tlen
is the requested length of the tag,
T
is the buffer in which the tag will be stored.
out
will be returned.
Otherwise, if there's unsupported/invalid parameter(s) or
any other kind of error, NULL
will be returned.
ADecFunc
void *(*)( rbuf x, size_t ivlen, dat iv, size_t alen, dat aad, size_t len, dat in, buf out, size_t tlen, dat T);where
x
is the cipher working context, ivlen
is the byte length of iv
, iv
points to the initialization vector, alen
is the byte length of aad
, aad
is the additional non-encrypted data to be verified,
len
is the byte length of plaintext and ciphertext,
in
, out
are ciphertext input and plaintext output respectively,
tlen
is the length of the MAC tag to be compared,
which may be truncated or zero-extended
at the request of the invoker of the encryption function,
T
is the buffer that stores the MAC tag.
out
will be returned.
Otherwise, if there's decryption failure, unsupported/invalid
parameter(s) or any other kind of error, NULL
will be returned.
See notes tagged [note:in-out-ptr-alias] in the Blockcipher section and [note:outlen] in the Hash Function & Message Authentication Code section.
contextBytes
seedBytes
InstInitFunc
void *(*)(rbuf x, rdat seedstr, size_t len);
or
if the construction is parameterized, the function of prototype:
void *(*)(_param_, rbuf x, rdat seedstr, size_t len);
where
_param_
is the instantiation parameter, x
is the pointer to the working context, seedstr
is the pointer to the PRNG seed, len
is the length of the seed in bytes, NULL
. Otherwise, everything
succeeds, and x
is returned.
ReseedFunc
void (*)(rbuf x, rdat seedstr, size_t len);
where
x
is the pointer to the PRNG working context, seedstr
is the pointer to the reseeding material,
len
is the length of the reseeding material in bytes.
GenFunc
void (*)(rbuf x, rbuf out, size_t len);
where
x
is the pointer to the PRNG working context, seedstr
is the pointer to the memory location to store the random bytes,
len
is the length of the requested random bytes.
Due to functional similarity as well as them having
identical prototypes,
InstInitFunc
,
ReseedFunc
, and
GenFunc
are aliased to
KInitFunc
,
WriteFunc
, and
ReadFunc
respectively, by them having
identical corresponding numerical values.
The API for key-pair encoding and decoding is common to both PKE/KEM and signature schemes, therefore it's described here in the first place.
The encoder functions have the prototype:
IntPtr (*PKKeyEncoder_t)( rdat any, rbuf enc, size_t enclen, _param_);
where as the decoder functions have the prototype:
IntPtr (*PKKeyDecoder_t)( rbuf any, rdat enc, size_t enclen, _param_);
The any
parameter points to the working context of the
PKC algorithm, which may be the public-key or the private-key
working context depending on the usage. The enc
parameter
points to the buffer that holds the encoded key. The enclen
specifies the length of this buffer. The _param_
parameter
specifies the instantiation parameters used for the algorithm, which will
be taken into account when estimating the size of the working context.
These functions have 2 passes. In the 1st pass, these functions returns the estimated size of encoded key (encoder) or the working context (decoder). If some error occurs, then -1 is returned. The actual encoding/decoding is carried out in the 2nd pass. The return value in the 2nd pass is the same as that from the 1st pass.
Such setup is necessary, as some key formats (e.g. ASN.1 DER encoding of RSA private keys) have variable encoded lengths depending on the values of components of the key material, even when the parameters are otherwise constant.
In pass 1, the enc
and enclen
should be
specified as NULL
and 0 respectively for the encoder
(although enclen
is ignored for now, it may have other
reserved meaning in future versions of MySuiteA); for the decoder,
any
should be specified as NULL
.
In pass 2, all of any
, enc
,
enclen
, and _param_
should be specified with
valid values.
PKKengenFunc
PKPrivkeyEncoder
PKKeyEncoder_t
where any
is the private-key working context
PKPrivkeyDecoder
PKKeyDecoder_t
where any
is the private-key working context
PKPubkeyExporter
PKKeyEncoder_t
where any
is the private-key working context
PKPubkeyEncoder
PKKeyEncoder_t
where any
is the public-key working context
PKPubkeyDecoder
PKKeyDecoder_t
where any
is the public-key working context
The interface for encoding and decoding is the same for both KEM/PKE and digital signatures. They're associated with the PKC algorithm through the public/private function pair.
The encoder functions have the prototype:
void *(*PKCiphergramEncoder_t)( rbuf x, rbuf c, size_t *len);
The encoder function saves the ciphergram (ciphertext or signature)
into c
. It returns c
on success and
NULL
otherwise. If c
is NULL
then *len
is set to its length.
Such set up is necessary as some formats of some signatures (e.g. ECDSA when encoding (r,s) using ASN.1 DER encoding, or the Falcon PQC digital signature scheme) have lengths that're variable.
The decoder functions have the prototype:
void *(*PKCiphergramDecoder_t)( rbuf x, rdat c, size_t len);
The decoder function loads the ciphergram into the working context of
the PKC algorithm. It returns x
on success and
NULL
on failure.
PKEncFunc
(KEM-specific)PKDecFunc
(KEM-specific)PKSignFunc
(signature scheme -specific)PKVerifyFunc
(signature scheme -specific)PKCtEncoder
PKCiphergramEncoder_t
.
Ct
means cipher transcript.PKCtDecoder
PKCiphergramDecoder_t
.
Ct
means cipher transcript.isParamDetermByKey
If the value of this query is 1, then the values of the queries
bytesCtxPriv
and bytesCtxPub
can only
be used for private contexts for generating keys, as the parameters
and the size of the working contexts are variable depending on the
key to be loaded.
On the other hand, if the value of this query is 0, then
bytesCtxPriv
and bytesCtxPub
can be
used to set parameters for the working context, as they're not
determined by the key. See "mysuitea-common.h" for more.
bytesCtxPriv
bytesCtxPub
PKKeygenFunc
The key generation function of prototype:
IntPtr (*PKKeygenFunc_t)( rbuf x, _param_, GenFunc_t prng_gen, rbuf prng);
where:
x
points to the private-key working context,_param_
specifies the parameter
for generating the new key,prng_gen
is the PRNG
random bits generating function,prng
is the working context for the PRNG.This function generates a key-pair and save its internal representation in the working context, which can be retrieved using key encoder/exporter functions and loaded using decoder functions.
If x
is NULL
, then then function returns
the estimated space needed for allocating a working context based on
the given parameters; otherwise, x
is returned.
PKEncFunc
The KEM secret encapsulation function of prototype:
void *(*PKEncFunc_t)( rbuf x, rbuf ss, size_t *restrict sslen, GenFunc_t prng_gen, rbuf prng);
where:
x
points to the public-key working context,ss
points to the buffer that will
receives the shared secret,sslen
points to a variable of type
size_t
. If ss
is NULL
,
this variable will be set to the length of the shared secret.
If ss
is non-NULL
, the variable
indicates the size of the buffer pointed to by ss
,
in which case, at most *sslen
bytes will be written
to ss
, and if there's excess space than needed to
store the shared secret, the result will be right-padded with
nul bytes.
prng_gen
is the PRNG
random bits generating function,prng
is the working context for the PRNG.
This function generates a shared secret and a ciphertext based on
the public key loaded into the public-key working context.
The shared secret is stored into ss
while the ciphertext
is saved in a internal representation in the working context and
will be exported using a ciphergram encoding function.
PKDecFunc
The KEM secret decapsulation function of prototype:
void *(*PKDecFunc_t)( rbuf x, rbuf ss, size_t *restrict sslen);
where:
x
points to the private-key working context,ss
points to the buffer that will
receives the shared secret,sslen
points to a variable of type
size_t
. If ss
is NULL
,
this variable will be set to the length of the shared secret.
If ss
is non-NULL
, the variable
indicates the size of the buffer pointed to by ss
,
in which case, at most *sslen
bytes will be written
to ss
, and if there's excess space than needed to
store the shared secret, the result will be right-padded with
nul bytes.
This function decapsulates the shared secret from the ciphertext using the private key. The ciphertext and the private key are loaded into the private-key working context using the private key decoder function and the ciphertext decoder function. For some cryptosystems, the ciphertext may be of variable length (e.g. RSA PKE), as such, repeating the call returns the same information unless a different ciphertext is loaded using the ciphergram decoder function.
isParamDetermByKey
bytesCtxPriv
bytesCtxPub
PKKeygenFunc
Same as that for KEMs'.
PKSignFunc
The digital signature signing function of prototype:
void *(*PKSignFunc_t)( rbuf x, rdat msg, size_t msglen, GenFunc_t prng_gen, rbuf prng);
where:
x
points to the private-key working context,msg
is the buffer
holding the message to be signed,msglen
is the length of the message in bytes,prng_gen
is the PRNG
random bits generating function,prng
is the working context for the PRNG.
The function signs the message msg
and saves the
internal representation of the signature in x
to be
exported using the ciphergram encoding function. It returns
x
on success and NULL
on failure.
PKVerifyFunc
The digital signature signing function of prototype:
const void *(*PKVerifyFunc_t)( rbuf x, rdat msg, size_t msglen);
where:
x
points to the public-key working context,msg
is the buffer
holding the message to be verified,msglen
is the length of the message in bytes,
The function verifies the message msg
with the
public key and the signature loaded into the public-key working
context using the public-key and ciphergram decoder function.
It returns msg
if signature is valid, and
NULL
otherwise.
Context control functions are a class of catch-all functions that performs operations that're algorithm-specific. Generally, these operations involve additional parameters that can't be passed using other uniform APIs.
XctrlFunc
PubXctrlFunc
PrivXctrlFunc
The context control function of prototype:
void *(*XctrlFunc_t)( rbuf x, int cmd, const bufvec_t *restrict bufvec, int veclen, int flags);
where:
x
points to the
working context of the algorithm,cmd
specifies the sub-function to perform,bufvec
is the array of data buffer elements
passed to the sub-functionveclen
specifies the length of the array,flags
specifies additional information
for the sub-function, with 0 as a reserved default,
The query XctrlFunc
generally apply to symmetric-key
algorithms,
whereas PubXctrlFunc
and PrivXctrlFunc
apply to the public and private working contexts of the
asymmetric-key algorithm. And the type definition for
bufvec_t
is:
typedef struct { union { size_t len; IntPtr info; }; union { void const *dat; void *buf; }; } bufvec_t;


This is the Graph visualizer for the
Tournament Allocation Problem. Nodes represent players while edges are the conflicts between them. A conflict is any kind of
undesired interaction in a tournament structure. For this specific instance, conflicts are matches between the same pair of players in the first round (+5), second round (+2), third round (+1), quarter and semi final rounds (+0.5)
and players from the same country (+5). Node size is proportional to weighted degree, edges to their weights.
This webpage was built with
Gephi,
SigmaJS and
a little help from Oxford.
If you wish to know more about the mathematics and theoretical aspects behind, refer to the thesis available on
gitHub.
MIT License
Copyright (c) 2018 Gabriele Dragotto


Here we see the dynamic duo of Cooper (The bigger one) and Ash (The one flopped on his side) longingly sitting near the screen door.
Shortly after this photo was taken a neighbors cat walked along the side of the house and across the door. Immediatley causing a flight response for these two. Causing what we call a "burnout" where their fur covered paws cannot recieve traction on the hardwood floor causing the sound of repeated nail scratching as they attempt to flee.
Other things that TERRIFY them


Welcome to Vishal's Webpage
What you'll find here
Here are some of my interests:
- Listening to music
- Playing Video games
- Playing Cricket
- Watching Movies
- Watching Reviews of latest gadets available on the market
My Favourite Quotes
"No one can make you feel inferior without your consent"-Roosevelt
"if you can dream it you can do it"-Walt Disney
"The Problem is not problem;The problem is your atitude about the problem"-Captain Jack Sparrow


Pep Guardiola rubbishes media reports suggesting he will dump Man City this season
- Pep Guardiola is not planning to walk out of his deal with Manchester City
- The Spaniard has a deal with the Citizens until the summer of 2021
- Guardiola won back to back Premier League titles for City but looks like he will concede the title to Liverpool at the end of this season
Manchester City boss pep Guardiola has rubbished media reports linking him away from the Etihad Stadium at the end of this season.
The Spanish born tactician has a deal with the current Premier League champions until the summer of 2021 having joined them in 2016.
Guardiola's men are currently struggling to catch up with table toppers Liverpool on the log as they are eight points shy of the Reds after 12 matches.
PAY ATTENTION: Install Pitch Football App for FREE to get the latest football News & Scores
They welcome in-form Chelsea to the Etihad Stadium in late EPL kick off this evening and the former Barcelona boss will hope his side can bounce back to winning ways after the match.
Super Eagles star beats Chelsea's N'Golo Kante to another EPL landmark
City were hammered 3-1 by the Merseyside outfit before FIFA international break - a result that prompted the rumour of him leaving when the season is over.
However, the Bayern Munich boss, was quoted by SunSport while addressing the media ahead of his side's game this weekend saying: “If the people ask ‘do I want to stay?’
"I want to stay, I don’t have any reasons to move from here. “I am incredibly satisfied working with this club, with these players.
“And if the people think I am going to resign or be sacked for these results and the fact we are nine points behind Liverpool then people don’t know me.
“If the club wants me next season, I want to be here — 100 percent. “I want to live in this city because I know lovely people here and I want to work and live with them.”
Out of favour Super Eagles striker set to join Turkish champions in January on 1 condition
When he was asked about Manchester City's position on the table, Guardiola seems undisturbed by their current stance, saying the challenge is good for his team.
Guardiola added: “I like this challenge, I love to be in this position. “If I don’t win I’m in trouble, I know that. But I’m incredibly happy to work in this city and for this club.
“And I want to help this club to get better. “I still enjoy working with these players a lot and I would like to stay longer. If the club wants, I will stay.
“Why should people think I’m not happy here? Because we lost at Anfield or I’ve lost three games this season?
“That’s an odd reason to say I’m not happy or satisfied to be here. The real situation is 198 points in two seasons, that is exceptional.
READ ALSO: NAIJ.com upgrades to Legit.ng
Frank Lampard wants Nigerian star back at Chelsea from loan in the January window
“The moment I will leave is when I feel my team don’t follow me or play in the way we played at Anfield.
“At that moment I’d say, ‘Wow, I miss my team’ and then I would call my boss and say, ‘Guys, maybe you have to sit and think about it’.
“But I don’t have that feeling. Maybe if you speak to the players they would say completely the opposite but I don’t have that feeling. “If it’s not enough, next season will be better.”
Legit.ng earlier reported that Jose Mourinho has moved to the second position behind Manchester City boss Pep Guardiola on the list of top 10 highest paid managers in the world.
The former Chelsea and Manchester United gaffer was named Tottenham manager this week after the club sacked Mauricio Pochettino who was in charge for five years.
Former Nigeria captain wants to become Lampard's assistant at Chelsea
Before he got the job at Tottenham, Jose Mourinho was without a club for almost a year after being sacked at Manchester United in December 2018.
Abu Azeez: Meet the only Nigerian rated among top 50 beach soccer players worldwide | Legit TV


| Interface | Description |
|---|---|
| IAnimation |
Animated effect.
|
| IContext |
High-level container of state.
|
| IContextFactory<C extends IContext> |
Factory for
IContext objects. |
| IContextListener |
Event listener for
IContext . |
| IContextManager |
Manages the active
IContext and context lifetimes. |
| IDestructible |
Object which can destroy (dispose, close) itself.
|
| IEnvironment |
Wrapper object that contains global engine state.
|
| IEventListener |
General-purpose no-arg event listener.
|
| IInterpolator |
Remaps floating point values between
0.0) and 1.0 (both inclusive). |
| IModule |
Sub-module of the engine.
|
| INotifier |
Shows notifications to the player.
|
| INovel |
Top-level class for controlling the game.
|
| IPrefsChangeListener |
Event listener for
IPreferenceStore . |
| IResourceCache |
Cached resources.
|
| IResourceResolver |
Finds the accompanying resource for a file path.
|
| ISkipState |
Skip, pause, auto read state.
|
| IStreamingMedia |
Shared interface for streaming media (audio, video).
|
| ISystemEnv |
Exposes properties of the system environment we're running in.
|
| ISystemModule |
Interface for interacting with hardware and external applications.
|
| IUpdateable |
Interface for objects that require a periodic tick function.
|
| Class | Description |
|---|---|
| ContextListener |
Empty implementation of
IContextListener . |
| DistortGrid |
Represents a two-dimensional
(width, height) grid of X/Y offsets. |
| Duration |
An amount of time.
|
| Interpolators |
Defines various implementations of
IInterpolator . |
| NovelPrefs |
Defines global settings.
|
| ResourceId |
Unique identifier for a resolved resource (canonical path + type).
|
| ResourceLoadInfo |
Contains information about a callsite of a resource load operation.
|
| Enum | Description |
|---|---|
| BlendMode |
The blend mode determines how new pixels are combined with existing pixels during rendering.
|
| Direction |
General-purpose relative direction.
|
| MediaType |
Resource type.
|
| SkipMode |
Used when skipping.
|
| VerticalAlign |
Relative y-axis alignment.
|
| Exception | Description |
|---|---|
| InitException |
Represents a fatal error during startup or initialisation.
|


Home
Home
Belmond Resort Gallery
Here is a pictoral overview of Belmond Resort
1.Our beaches
2. Bedrooms
3. Hotel


{% extends "source/base.html" %}
{% block slides %}
{% include "source/title.html" %}
{% include "source/why_write.html" %}
{% include "source/collaborations.html" %}
{% include "source/authorship.html" %}
{% include "source/journals.html" %}
{% include "source/tools.html" %}
{% include "source/paper_structure.html" %}
{% include "source/writing_tips.html" %}
{% include "source/plagiarism.html" %}
{% include "source/open_science.html" %}
{% endblock %}


I used JavaScript for the first time this week (woo!). This post will be about JavaScript, the programming language, and how it differs in syntax and useability from a few other languages.
I first learned how to program in high school. The year was 2007 and the language was Visual Basic. To me, it was a simple, easy to use, easy to learn language. In college I learned C, along with the basics of computer organization and machine languages. When I began Dev Bootcamp, I learned Ruby. Ruby blew my mind (if you'll pardon the cliché). So intuitive, so simple, so powerful - Ruby was a joy to use. It was at this point in my education that I was introduced to JavaScript. I expected that it would be just as strange and wonderful as Ruby, and boy was I wrong! JavaScript shares many syntactical similarities with Ruby, but it doesn't behave like I now expect a programming language to behave.
One of the first things I found myself struggling with in JavaScript was array comparison. A simple [1,2,3] == [1,2,3]
evaluates to false. Comparison in JavaScript, come to find, is really quite messy. There's even extra comparator operators (=== and !==). The solution to array comparison is to write your own comparison function. I took this one from the internet and modified it for my own purposes.
Important to note - in Ruby, <<
works to append elements to an array. In JavaScript, you must use the push()
method.
In Ruby, a function is declared like so:
{% highlight ruby %} def HelloWorld() puts "Hello, World!" end HelloWorld() # <-- "Hello, World!" {% endhighlight %}In JavaScript, it's a bit weirder.
Javascript has three ways of defining functions: declaration, expression, and construction. It actually has more than three, but these are the most commonly used.
Uses the 'function' keyword, can be called from anywhere in the code (even above the declaration), DO NOT put into any loops or conditionals. Function declarations are intended to be separate from the logical flow of the program at runtime. Function declarations do not need a semicolon, but using one is harmless.
{% highlight js %} // Function Declaration Example // function helloWorld() { console.log("Hello, World!"); } helloWorld() // <-- "Hello, World!" var storage = helloWorld(); console.log(storage) // <-- "Hello, World!" {% endhighlight %}Creates a 'nameless' function, evaluated at runtime, end with a semicolon like all other expressions.
{% highlight js %} // Function Expression Example // var some_variable = function() { console.log("Pass me to variables, I don't have a name on my own."); }; some_variable() // <-- "Pass me to variables, I don't have a name on my own." {% endhighlight %}This one gave me the most trouble this week. It's a function declaration that uses the 'this' method to list properties, and is called with the 'new' keyword. Using functions in this way allows for multiple instances of the same function, much like Ruby class objects.
{% highlight js %} // Function Constructor Example // function messageTranslator() { this.message = "Hello, Sweetie."; }; var read_this = new messageTranslator() console.log(read_this.message); // <-- "Hello, Sweetie." {% endhighlight %}The difference between function declarations and function constructors is minimal. I'm by no means an experienced JavaSript programmer, but I have a feeling that the subtle difference in useage lead to significant design differences. Either that, or a function constructor IS a function declaration, just with extra useage. I will update once I learn more. Check out Eloquent JavaScript, by Marijn Haverbeke for more information.


WORK
CONTACT
RESUME
Hi! I am Sajal
A product designer, currently designing solution for growth
@ Postman.com
An enterpreneur, helping artists and interior designers to build beautiful spaces
@ TheExpressionists
A curious individual with a penchant for photography and travelling. Check out my experiences here
@pixilated_stories
MY WORK
PROJECT SHOWCASE


{% extends 'base.html' %} {% block content %}
{{ ship.name }} ({{ ship.model }})
{{ ship.description }}
Oops! I couldn't find any spaceships in the system


workbox-strategies. StrategyHandler
A class created every time a Strategy instance instance calls
handle() or
handleAll() that wraps all fetch and
cache actions around plugin callbacks and keeps track of when the strategy
is "done" (i.e. all added event.waitUntil()
promises have resolved).
Constructor
StrategyHandler
new StrategyHandler(strategy, options)
Creates a new instance associated with the passed strategy and event that's handling the request.
The constructor also initializes the state that will be passed to each of the plugins handling this request.
Parameter |
|||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
strategy |
|||||||||||
|
options |
Object Values in
|
Properties
event
ExtendableEvent
The event associated with this request.
params
(any type or undefined)
A param
value (if passed to the strategy's
handle()
or handleAll()
method).
Note: the param
param will be present if the strategy was invoked
from a workbox Route
object and the
match callback returned
a truthy value (it will be that value).
request
Request
The request the strategy is performing (passed to the strategy's
handle()
or handleAll()
method).
url
(URL or undefined)
A URL
instance of request.url
(if passed to the strategy's
handle()
or handleAll()
method).
Note: the url
param will be present if the strategy was invoked
from a workbox Route
object.
Methods
cacheMatch
cacheMatch(key) returns Promise containing (Response or undefined)
Matches a request from the cache (and invokes any applicable plugin
callback methods) using the cacheName
, matchOptions
, and plugins
defined on the strategy object.
The following plugin lifecycle methods are invoked when using this method:
- cacheKeyWillByUsed()
- cachedResponseWillByUsed()
Parameter |
|
|---|---|
|
key |
(Request or string) The Request or URL to use as the cache key. |
- Returns
-
Promise containing (Response or undefined)
A matching response, if found.
cachePut
cachePut(key, response)
Puts a request/response pair in the cache (and invokes any applicable
plugin callback methods) using the cacheName
and plugins
defined on
the strategy object.
The following plugin lifecycle methods are invoked when using this method:
- cacheKeyWillByUsed()
- cacheWillUpdate()
- cacheDidUpdate()
Parameter |
|
|---|---|
|
key |
(Request or string) The request or URL to use as the cache key. |
|
response |
Promise containing void The response to cache. |
destroy
destroy()
Stops running the strategy and immediately resolves any pending
waitUntil()
promises.
doneWaiting
doneWaiting()
Returns a promise that resolves once all promises passed to
waitUntil()
have settled.
Note: any work done after doneWaiting()
settles should be manually
passed to an event's waitUntil()
method (not this handler's
waitUntil()
method), otherwise the service worker thread my be killed
prior to your work completing.
fetch
fetch(input) returns Promise containing Response
Fetches a given request (and invokes any applicable plugin callback
methods) using the fetchOptions
and plugins
defined on the strategy
object.
The following plugin lifecycle methods are invoked when using this method:
requestWillFetch()
fetchDidSucceed()
fetchDidFail()
Parameter |
|
|---|---|
|
input |
(Request or string) The URL or request to fetch. |
- Returns
-
Promise containing Response
fetchAndCachePut
fetchAndCachePut(input) returns Promise containing Response
Calls this.fetch()
and (in the background) runs this.cachePut()
on
the response generated by this.fetch()
.
The call to this.cachePut()
automatically invokes this.waitUntil()
,
so you do not have to manually call waitUntil()
on the event.
Parameter |
|
|---|---|
|
input |
(Request or string) The request or URL to fetch and cache. |
- Returns
-
Promise containing Response
getCacheKey
getCacheKey(request, mode) returns Promise containing Request
Checks the list of plugins for the cacheKeyWillBeUsed
callback, and
executes any of those callbacks found in sequence. The final Request
object returned by the last plugin is treated as the cache key for cache
reads and/or writes. If no cacheKeyWillBeUsed
plugin callbacks have
been registered, the passed request is returned unmodified
Parameter |
|
|---|---|
|
request |
Request |
|
mode |
string |
- Returns
-
Promise containing Request
hasCallback
hasCallback(name) returns boolean
Returns true if the strategy has at least one plugin with the given callback.
Parameter |
|
|---|---|
|
name |
string The name of the callback to check for. |
- Returns
-
boolean
iterateCallbacks
iterateCallbacks(name) returns Array of function()
Accepts a callback and returns an iterable of matching plugin callbacks, where each callback is wrapped with the current handler state (i.e. when you call each callback, whatever object parameter you pass it will be merged with the plugin's current state).
Parameter |
|
|---|---|
|
name |
string The name fo the callback to run |
- Returns
-
Array of function()
runCallbacks
runCallbacks(name, param)
Runs all plugin callbacks matching the given name, in order, passing the given param object (merged ith the current plugin state) as the only argument.
Note: since this method runs all plugins, it's not suitable for cases
where the return value of a callback needs to be applied prior to calling
the next callback. See
iterateCallbacks()
below for how to handle that case.
Parameter |
|
|---|---|
|
name |
string The name of the callback to run within each plugin. |
|
param |
Object The object to pass as the first (and only) param when executing each callback. This object will be merged with the current plugin state prior to callback execution. |
waitUntil
waitUntil(promise)
Adds a promise to the
extend lifetime promises
of the event event associated with the request being handled (usually a
FetchEvent
).
Note: you can await
doneWaiting()
to know when all added promises have settled.
Parameter |
|
|---|---|
|
promise |
Promise A promise to add to the extend lifetime promises of the event that triggered the request. |


{% for item in site.data.featured %}
{% endfor %}
{% include events.html title='Events' items=site.data.events %}
{% assign sortedAnnouncements = site.announcements | reverse %}
{% include home-card.html title='Announcements' items=sortedAnnouncements limit=3 %}
{% include home-card.html title='News' items=site.posts limit=3 %}


This is a simple implementation of a machine learning algorithm that tries to classify handwritten integers. The underlying model uses a convolutional neural network from Keras. Try using your mouse to write an integer between 0 to 9 and see if the model can accurately guess what you have written!


|
Amazing Mazes | ||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--MazeCanvas
MAZE CANVAS ******** draws the maze using double buffer
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
| Field Summary | |
(package private) static int |
BORDER
|
(package private) java.awt.Graphics |
buffer
|
(package private) java.awt.Image |
bufferImage
|
private int |
cellSize
|
private int |
cols
|
private int |
height
|
private int |
hOffset
|
(package private) static int |
MAX_CELL_SIZE
|
(package private) MazeGen |
mg
|
private int |
mzHeight
|
private int |
mzWidth
|
private int |
nwPathOffset
|
private int |
pathSize
|
private int |
rows
|
private int |
sePathOffset
|
private int |
width
|
private int |
wOffset
|
| Fields inherited from class java.awt.Canvas |
base,
graphicsConfig,
nameCounter,
serialVersionUID |
| Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
assert,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
changeSupport,
componentListener,
componentListenerK,
componentOrientation,
componentSerializedDataVersion,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
name,
nameExplicitlySet,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
serialVersionUID,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
| Constructor Summary | |
(package private) |
MazeCanvas(int mcw,
int mch)
|
| Method Summary | |
(package private) void |
drawGen(int x,
int y,
int direction,
Maze mz)
|
(package private) void |
drawGrid(Maze mz)
|
private void |
drawInit(Maze mz)
|
(package private) void |
drawMaze(Maze mz)
|
(package private) void |
drawPath(boolean showBack,
Maze mz)
|
(package private) void |
drawSolve(int x,
int y,
int direction,
java.awt.Color c,
Maze mz)
|
(package private) void |
drawStartEnd(java.awt.Point startPt,
java.awt.Point endPt)
|
void |
paint(java.awt.Graphics g)
|
void |
update(java.awt.Graphics g)
|
| Methods inherited from class java.awt.Canvas |
|
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
dispatchEventImpl,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
eventEnabled,
firePropertyChange,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getIntrinsicCursor,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getPreferredSize,
getSize,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
getWidth,
getWindowForObject,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
initIDs,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
lightweightPrint,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
minimumSize,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
paramString,
postEvent,
preferredSize,
prepareImage,
prepareImage,
print,
printAll,
processComponentEvent,
processEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
readObject,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
validate,
writeObject |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
| Field Detail |
static final int BORDER
static final int MAX_CELL_SIZE
private int width
private int height
private int mzWidth
private int mzHeight
private int cellSize
private int wOffset
private int hOffset
private int rows
private int cols
private int pathSize
private int nwPathOffset
private int sePathOffset
java.awt.Image bufferImage
java.awt.Graphics buffer
MazeGen mg
| Constructor Detail |
MazeCanvas(int mcw, int mch)
| Method Detail |
private void drawInit(Maze mz)
void drawMaze(Maze mz)
void drawGrid(Maze mz)
void drawGen(int x, int y, int direction, Maze mz)
void drawStartEnd(java.awt.Point startPt, java.awt.Point endPt)
void drawPath(boolean showBack, Maze mz)
void drawSolve(int x, int y, int direction, java.awt.Color c, Maze mz)
public void paint(java.awt.Graphics g)
public void update(java.awt.Graphics g)
|
Author: Andrew Bridges Copyright © 2001 |
||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


ev3devices
– EV3 Motors and Sensors¶
LEGO® MINDSTORMS® EV3 motors and sensors.
Motors¶
-
class
Motor
(port, direction=Direction.CLOCKWISE, gears=None)¶ LEGO® MINDSTORMS® EV3 Medium or Large Motor.
Element 99455/6148292 or 95658/6148278, contained in:
- 31313: LEGO® MINDSTORMS® EV3 (2013)
- 45544: LEGO® MINDSTORMS® Education EV3 Core Set (2013)
- 45503 or 45502: Separate part (2013)
Parameters: - port (Port) – Port to which the motor is connected.
- direction (Direction) – Positive speed direction (Default: Direction.CLOCKWISE).
- gears (list) –
List of gears linked to the motor (Default:
None
).For example:
[12, 36]
represents a gear train with a 12-tooth and a 36-tooth gear. See ratio for illustrated examples.Use a list of lists for multiple gear trains, such as
[[12, 36], [20, 16, 40]]
.When you specify a gear train, all motor commands and settings are automatically adjusted to account for the resulting gear ratio. The motor direction remains unchanged, no matter how many gears you choose.
For example, with
gears=[12, 36]
, the gear ratio is 3, which means that the output is mechanically slowed down by a factor of 3. To compensate, the motor will automatically turn 3 times as fast and 3 times as far when you give a motor command. So when you chooserun_angle(200, 90)
, your mechanism output simply turns at 200 deg/s for 90 degrees.The same holds for the documentation below: When it states “motor angle” or “motor speed”, you can read this as “mechanism output angle” and “mechanism output speed”, and so on, as the gear ratio is automatically accounted for.
The
gears
setting is only available for motors with rotation sensors.
Example:
# Initialize a motor (by default this means clockwise, without any gears). example_motor = Motor(Port.A) # Initialize a motor where positive speed values should go counterclockwise right_motor = Motor(Port.B, Direction.COUNTERCLOCKWISE) # Initialize a motor with a gear train robot_arm = Motor(Port.C, Direction.CLOCKWISE, [12, 36])
Methods for motors without rotation sensors
-
dc
(duty)¶ Set the duty cycle of the motor.
Parameters: duty (percentage: %) – The duty cycle (-100.0 to 100). Example:
# Set the motor duty cycle to 75%. example_motor.duty(75)
Methods for motors with rotation sensors
-
angle
()¶ Get the rotation angle of the motor.
Returns: Motor angle. Return type: angle: deg
-
reset_angle
(angle)¶ Reset the accumulated rotation angle of the motor.
Parameters: angle (angle: deg) – Value to which the angle should be reset.
-
speed
()¶ Get the speed (angular velocity) of the motor.
Returns: Motor speed. Return type: rotational speed: deg/s
-
stop
(stop_type=Stop.COAST)¶ Stop the motor.
Parameters: stop_type (Stop) – Whether to coast, brake, or hold (Default: Stop.COAST
).
-
run
(speed)¶ Keep the motor running at a constant speed (angular velocity).
The motor will accelerate towards the requested speed and the duty cycle is automatically adjusted to keep the speed constant, even under some load. This continues in the background until you give the motor a new command or the program stops.
Parameters: speed (rotational speed: deg/s) – Speed of the motor.
-
run_time
(speed, time, stop_type=Stop.COAST, wait=True)¶ Run the motor at a constant speed (angular velocity) for a given amount of time.
The motor will accelerate towards the requested speed and the duty cycle is automatically adjusted to keep the speed constant, even under some load. It begins to decelerate just in time to reach standstill after the specified duration.
Parameters: - speed (rotational speed: deg/s) – Speed of the motor.
- time (time: ms) – Duration of the maneuver.
- stop_type (Stop) – Whether to coast, brake, or hold after coming to a standstill (Default:
Stop.COAST
). - wait (bool) – Wait for the maneuver to complete before continuing with the rest of the program (Default:
True
). This means that your program waits for the specifiedtime
.
-
run_angle
(speed, rotation_angle, stop_type=Stop.COAST, wait=True)¶ Run the motor at a constant speed (angular velocity) by a given angle.
The motor will accelerate towards the requested speed and the duty cycle is automatically adjusted to keep the speed constant, even under some load. It begins to decelerate just in time so that it comes to a standstill after traversing the given angle.
Parameters: - speed (rotational speed: deg/s) – Speed of the motor.
- rotation_angle (angle: deg) – Angle by which the motor should rotate.
- stop_type (Stop) – Whether to coast, brake, or hold after coming to a standstill (Default:
Stop.COAST
). - wait (bool) – Wait for the maneuver to complete before continuing with the rest of the program (Default:
True
). This means that your program waits until the motor has traveled precisely the requested angle.
-
run_target
(speed, target_angle, stop_type=Stop.COAST, wait=True)¶ Run the motor at a constant speed (angular velocity) towards a given target angle.
The motor will accelerate towards the requested speed and the duty cycle is automatically adjusted to keep the speed constant, even under some load. It begins to decelerate just in time so that it comes to a standstill at the given target angle.
The direction of rotation is automatically selected based on the target angle.
Parameters: - speed (rotational speed: deg/s) – Absolute speed of the motor. The direction will be automatically selected based on the target angle: it makes no difference if you specify a positive or negative speed.
- target_angle (angle: deg) – Target angle that the motor should rotate to, regardless of its current angle.
- stop_type (Stop) – Whether to coast, brake, or hold after coming to a standstill (Default:
Stop.COAST
). - wait (bool) – Wait for the maneuver to complete before continuing with the rest of the program (Default:
True
). This means that your program waits until the motor has reached the target angle.
Advanced methods for motors with rotation sensors
-
track_target
(target_angle)¶ Track a target angle that varies in time.
This function is quite similar to
run_target()
, but speed and acceleration settings are ignored: it will move to the target angle as fast as possible. Instead, you adjust speed and acceleration by choosing how fast or slow you vary thetarget_angle
.This method is useful in fast loops where the motor target changes continuously.
Parameters: target_angle (angle: deg) – Target angle that the motor should rotate to. Example:
# Initialize motor and timer from math import sin motor = Motor(Port.A) watch = StopWatch() amplitude = 90 # In a fast loop, compute a reference angle # and make the motor track it. while True: # Get the time in seconds seconds = watch.time()/1000 # Compute a reference angle. This produces # a sine wave that makes the motor move # smoothly between -90 and +90 degrees. angle_now = sin(seconds)*amplitude # Make the motor track the given angle motor.track_target(angle_now)
-
stalled
()¶ Check whether the motor is currently stalled.
A motor is stalled when it cannot move even with the maximum torque. For example, when something is blocking the motor or your mechanism simply cannot turn any further.
Specifically, the motor is stalled when the duty cycle computed by the PID controllers has reached the maximum (so
duty
=duty_limit
) and still the motor cannot reach a minimal speed (sospeed
<stall_speed
) for a period of at leaststall_time
.You can change the
duty_limit
,stall_speed
, andstall_time
settings usingset_dc_settings()
andset_pid_settings()
in order to change the sensitivity to being stalled.Returns: True
if the motor is stalled,False
if it is not.Return type: bool
-
run_until_stalled
(speed, stop_type=Stop.COAST, duty_limit=default)¶ Run the motor at a constant speed (angular velocity) until it stalls. The motor is considered stalled when it cannot move even with the maximum torque. See
stalled()
for a more precise definition.The
duty_limit
argument lets you temporarily limit the motor torque during this maneuver. This is useful to avoid applying the full motor torque to a geared or lever mechanism.Parameters: - speed (rotational speed: deg/s) – Speed of the motor.
- stop_type (Stop) – Whether to coast, brake, or hold after coming to a standstill (Default:
Stop.COAST
). - duty_limit (percentage: %) – Relative torque limit. This limit works just like
set_dc_settings()
, but in this case the limit is temporary: it returns to its previous value after completing this command.
-
set_dc_settings
(duty_limit, duty_offset)¶ Configure the settings to adjust the behavior of the
dc()
command. This also affects all of therun
commands, which use thedc()
method in the background.Parameters: - duty_limit (percentage: %) – Relative torque limit during subsequent motor commands. This sets the maximum duty cycle that is applied during any subsequent motor command. This reduces the maximum torque output to a percentage of the absolute maximum stall torque. This is useful to avoid applying the full motor torque to a geared or lever mechanism, or to prevent your LEGO® train from unintentionally going at full speed. (Default: 100).
- duty_offset (percentage: %) – Minimum duty cycle given when you use
dc()
. This adds a small feed forward torque so that your motor will move even for very low duty cycle values, which can be useful when you create your own feedback controllers (Default: 0).
-
set_run_settings
(max_speed, acceleration)¶ Configure the maximum speed and acceleration/deceleration of the motor for all run commands.
This applies to the
run
,run_time
,run_angle
,run_target
, orrun_until_stalled
commands you give the motor. See also the default parameters for each motor.Parameters: - max_speed (rotational speed: deg/s) – Maximum speed of the motor during a motor command.
- acceleration (rotational acceleration: deg/s/s) – Acceleration towards the target speed and deceleration towards standstill. This should be a positive value. The motor will automatically change the sign to decelerate as needed.
Example:
# Set the maximum speed to 200 deg/s and acceleration to 400 deg/s/s. example_motor.set_run_settings(200, 400) # Make the motor run for 5 seconds. Even though the speed argument is 300 # deg/s in this example, the motor will move at only 200 deg/s because of # the settings above. example_motor.run_time(300, 5000)
-
set_pid_settings
(kp, ki, kd, tight_loop_limit, angle_tolerance, speed_tolerance, stall_speed, stall_time)¶ Configure the settings of the position and speed controllers. See also pid and the default parameters for each motor.
Parameters: - kp (int) – Proportional position (and integral speed) control constant.
- ki (int) – Integral position control constant.
- kd (int) – Derivative position (and proportional speed) control constant.
- tight_loop_limit (time: ms) – If you execute any of the
run
commands within this interval after starting the previous command, the controllers assume that you want to control the speed directly. This means that it will ignore the acceleration setting and immediately begin tracking the speed you give in therun
command. This is useful in a fast loop, where you usually want the motors to respond quickly rather than accelerate smoothly, for example with a line-following robot. - angle_tolerance (angle: deg) – Allowed deviation from the target angle before motion is considered complete.
- speed_tolerance (rotational speed: deg/s) – Allowed deviation from zero speed before motion is considered complete.
- stall_speed (rotational speed: deg/s) – See
stalled()
. - stall_time (time: ms) – See
stalled()
.
Sensors¶
Touch Sensor¶
-
class
TouchSensor
(port)¶ LEGO® MINDSTORMS® EV3 Touch Sensor.
Element 95648/6138404, contained in:
- 31313: LEGO® MINDSTORMS® EV3 (2013)
- 45544: LEGO® MINDSTORMS® Education EV3 Core Set (2013)
- 45507: Separate part (2013)
Parameters: port (Port) – Port to which the sensor is connected. -
pressed
()¶ Check if the sensor is pressed.
Returns: True
if the sensor is pressed,False
if it is not pressed.Return type: bool
Color Sensor¶
-
class
ColorSensor
(port)¶ LEGO® MINDSTORMS® EV3 Color Sensor.
Element 95650/6128869, contained in:
- 31313: LEGO® MINDSTORMS® EV3 (2013)
- 45544: LEGO® MINDSTORMS® Education EV3 Core Set (2013)
- 45506: Separate part (2013)
Parameters: port (Port) – Port to which the sensor is connected. -
color
()¶ Measure the color of a surface.
Returns: Color.BLACK
,Color.BLUE
,Color.GREEN
,Color.YELLOW
,Color.RED
,Color.WHITE
,Color.BROWN
orNone
.Return type: Color
, orNone
if no color is detected.
-
ambient
()¶ Measure the ambient light intensity.
Returns: Ambient light intensity, ranging from 0 (dark) to 100 (bright). Return type: percentage: %
-
reflection
()¶ Measure the reflection of a surface using a red light.
Returns: Reflection, ranging from 0 (no reflection) to 100 (high reflection). Return type: percentage: %
-
rgb
()¶ Measure the reflection of a surface using a red, green, and then a blue light.
Returns: Reflection for red, green, and blue light, each ranging from 0.0 (no reflection) to 100.0 (high reflection). Return type: tuple of three percentages
Infrared Sensor and Beacon¶
-
class
InfraredSensor
(port)¶ LEGO® MINDSTORMS® EV3 Infrared Sensor and Beacon.
Element 95654/6132629 and 72156/6127283, contained in:
- 31313: LEGO® MINDSTORMS® EV3 (2013)
- 45509 and 45508: Separate parts (2013)
Parameters: port (Port) – Port to which the sensor is connected. -
distance
()¶ Measure the relative distance between the sensor and an object using infrared light.
Returns: Relative distance ranging from 0 (closest) to 100 (farthest). Return type: relative distance: %
-
beacon
(channel)¶ Measure the relative distance and angle between the remote and the infrared sensor.
Parameters: channel (int) – Channel number of the remote. Returns: Tuple of relative distance (0 to 100) and approximate angle (-75 to 75 degrees) between remote and infrared sensor. Return type: (relative distance: %, angle: deg) or ( None
,None
) if no remote is detected.
Check which buttons on the infrared remote are pressed.
Parameters: channel (int) – Channel number of the remote. Returns: List of pressed buttons on the remote on the specified channel. Return type: List of Button
Ultrasonic Sensor¶
-
class
UltrasonicSensor
(port)¶ LEGO® MINDSTORMS® EV3 Ultrasonic Sensor.
Element 95652/6138403, contained in:
- 45544: LEGO® MINDSTORMS® Education EV3 Core Set (2013)
- 45504: Separate part (2013)
Parameters: port (Port) – Port to which the sensor is connected. -
distance
(silent=False)¶ Measure the distance between the sensor and an object using ultrasonic sound waves.
Parameters: silent (bool) – Choose
True
to turn the sensor off after measuring the distance.Choose
False
to leave the sensor on (Default).When you choose
silent=True
, the sensor does not emit sounds waves except when taking the measurement. This reduces interference with other ultrasonic sensors, but turning the sensor off takes approximately 300 ms each time.Returns: Distance (millimeters). Return type: distance: mm
-
presence
()¶ Check for the presence of other ultrasonic sensors by detecting ultrasonic sounds.
If the other ultrasonic sensor is operating in silent mode, you can only detect the presence of that sensor while it is taking a measurement.
Returns: True
if ultrasonic sounds are detected,False
if not.Return type: bool
Gyroscopic Sensor¶
-
class
GyroSensor
(port, direction=Direction.CLOCKWISE)¶ LEGO® MINDSTORMS® EV3 Gyro Sensor.
Element 99380/6138411, contained in:
- 45544: LEGO® MINDSTORMS® Education EV3 Core Set (2013)
- 45505: Separate part (2013)
Parameters: -
speed
()¶ Get the speed (angular velocity) of the sensor.
Returns: Sensor angular velocity. Return type: rotational speed: deg/s
-
angle
()¶ Get the accumulated angle of the sensor.
Returns: Rotation angle. Return type: angle: deg
-
reset_angle
(angle)¶ Set the rotation angle of the sensor to a desired value.
Parameters: angle (angle: deg) – Value to which the angle should be reset.


fingers |
int
|
<optional>
|
1
|
The number of fingers to detect in a swipe. Any swipes that do not meet this
requirement will NOT trigger swipe handlers.
|
threshold |
int
|
<optional>
|
75
|
The number of pixels that the user must move their finger by before it is
considered a swipe.
|
cancelThreshold |
int
|
<optional>
|
null
|
The number of pixels that the user must move their finger back from the
original swipe direction to cancel the gesture.
|
pinchThreshold |
int
|
<optional>
|
20
|
The number of pixels that the user must pinch their finger by before it is
considered a pinch.
|
maxTimeThreshold |
int
|
<optional>
|
null
|
Time, in milliseconds, between touchStart and touchEnd must NOT exceed in order
to be considered a swipe.
|
fingerReleaseThreshold |
int
|
<optional>
|
250
|
Time in milliseconds between releasing multiple fingers. If 2 fingers are down,
and are released one after the other, if they are within this threshold, it counts as a simultaneous
release.
|
longTapThreshold |
int
|
<optional>
|
500
|
Time in milliseconds between tap and release for a long tap |
doubleTapThreshold |
int
|
<optional>
|
200
|
Time in milliseconds between 2 taps to count as a double tap |
swipe |
function
|
<optional>
|
null
|
A handler to catch all swipes. See event:swipe
|
swipeLeft |
function
|
<optional>
|
null
|
A handler that is triggered for "left" swipes. See event:swipeLeft |
swipeRight |
function
|
<optional>
|
null
|
A handler that is triggered for "right" swipes. See event:swipeRight |
swipeUp |
function
|
<optional>
|
null
|
A handler that is triggered for "up" swipes. See event:swipeUp |
swipeDown |
function
|
<optional>
|
null
|
A handler that is triggered for "down" swipes. See event:swipeDown |
swipeStatus |
function
|
<optional>
|
null
|
A handler triggered for every phase of the swipe. See event:swipeStatus |
pinchIn |
function
|
<optional>
|
null
|
A handler triggered for pinch in events. See event:pinchIn |
pinchOut |
function
|
<optional>
|
null
|
A handler triggered for pinch out events. See event:pinchOut |
pinchStatus |
function
|
<optional>
|
null
|
A handler triggered for every phase of a pinch. See event:pinchStatus |
tap |
function
|
<optional>
|
null
|
A handler triggered when a user just taps on the item, rather than swipes it.
If they do not move, tap is triggered, if they do move, it is not.
|
doubleTap |
function
|
<optional>
|
null
|
A handler triggered when a user double taps on the item. The delay between taps
can be set with the doubleTapThreshold property.
|
longTap |
function
|
<optional>
|
null
|
A handler triggered when a user long taps on the item. The delay between start
and end can be set with the longTapThreshold property.
|
(function) |
|
|
|
[hold=null] A handler triggered when a user reaches longTapThreshold on the
item.
|
triggerOnTouchEnd |
boolean
|
<optional>
|
true
|
If true, the swipe events are triggered when the touch end event is received
(user releases finger). If false, it will be triggered on reaching the threshold, and then cancel the
touch event automatically.
|
triggerOnTouchLeave |
boolean
|
<optional>
|
false
|
If true, then when the user leaves the swipe object, the swipe will end and
trigger appropriate handlers.
|
allowPageScroll |
string
|
undefined
|
<optional>
|
'auto'
|
How the browser handles page scrolls when the user is swiping on a touchSwipe
object.
"auto" : all undefined swipes will cause the page to scroll in that direction.
"none" : the page will not scroll when user swipes.
"horizontal" : will force page to scroll on horizontal swipes.
"vertical" : will force page to scroll on vertical swipes.
|
fallbackToMouseEvents |
boolean
|
<optional>
|
true
|
If true mouse events are used when run on a non touch device, false will stop
swipes being triggered by mouse events on non tocuh devices.
|
excludedElements |
string
|
<optional>
|
"button, input, select, textarea, a, .noSwipe"
|
A jquery selector that specifies child elements that do NOT trigger swipes. By
default this excludes all form, input, select, button, anchor and .noSwipe elements.
|
preventDefaultEvents |
boolean
|
<optional>
|
true
|
by default default events are cancelled, so the page doesn't move. You can
dissable this so both native events fire as well as your handlers.
|


The neural-activity-visualizer Javascript app, enables web-browser
visualisation of electrophysiology datafiles in any format supported by the Neo library. It makes use of
the Neo Viewer
REST API.
The visualizer-view component requires the source (url of file) attribute. There are also
optional height (height of visualization panel), downsamplefactor (factor by which data
should be downsampled to improve loading time with default value 1 for no downsampling)),
iotype (manually specify the file type) attributes.


I am a second-year PhD student advised by Aleksander Mądry. I am interested in the science of deep learning and deep learning for science. I also like thinking about adversarial robustness and privacy.
I obtained a joint degree in Math and Computer Science from MIT. During that time, I was fortunate to be advised by Asuman Özdağlar as a SuperUROP scholar. Previously, I was at QuantCo and Apple.
I grew up in Bulgaria. In my free time, I enjoy playing soccer and chess. At MIT, I have led the AI@MIT club.
This website was last updated on .
* denotes equal contribution; authors are ordered alphabetically unless they're not
In this work we analyze the behaviour of the last iterate of the Extragradient (EG) and Proximal Point (PP) algorithms on smooth variationally coherent problems1 . In particular, we examine a relaxation of the conditions in Golowich et al. (2020), who show a rate of \(\mathcal{O}\left( 1 / \sqrt{T} \right)\) for both algorithms when the problem is convex- concave. We show that best iterate convergence at a rate of \(\mathcal{O}\left( 1 / \sqrt{T} \right)\) naturally carries over to to variationally coherent problems but key monotonicity properties are lost.
Golowich, N., Pattathil, S., Daskalakis, C., and Özdağlar, A. Last iterate is slower than averaged iterate in smooth convex-concave saddle point problems, 2020.
Zhou, Z., Mertikopoulos, P., Bambos, N., Boyd, S., and Glynn, P. W. Stochastic mirror descent in variationally coherent optimization problems, NeurIPS 2017.
Gradient based meta-learning has established itself as a promising research direction for prob- lems in few-shot learning: data-constrained training on an ensemble of tasks with quick adapta- tion on a task, unseen during training. Until recently, little has been known about the success of model-agnostic meta-learners (MAMLs), which are particularly useful to few shot learning. We shed light on the phenomenon of feature reuse in MAMLs through empirical visualizations of the loss landscapes of a variety of tasks. We develop meta-visualization: an efficient framework for visualization of any gradient based meta learning algorithm that can be used to generate hypotheses and guide model designs. The contributions of our work vary from augmenting research in the field of meta learning to explaining the success of the method through geometrical lens.
We explore the hypothesis that robust training helps to disentangle representations by looking at the behavior of individual units of a robustly trained neural network through network dissection. We observe that to a large extent, robust models explain each high-level concept with fewer units than the equivalent non-robust models.
The minimum \(k\)-cut problem is a natural generalization of the famous minimum cut problem, where we seek a cut that partitions a graph \(G(V,E)\) into \(k\) components. Karger et al. (1996) develop a randomized algorithm and provide an analysis which shows their algorithm provides a solution with high probability in \(\tilde{\mathcal{O}}\left( |V|^{2(k-1)} \right)\) time. A reduction to the maximum-weight clique problem gives a lower bound of \(\mathcal{\Omega}\left( |V|^{(1-o(1))k} \right)\). Until recently, the gap in the exponent was not explained. Confirming previous experimental results, Anuram Gupta et al. (2020) provide a refined analysis of the Karger-Stein algorithm that shows it is tight up to lower order terms. We survey the techniques employed in their analysis, together with other recent analyses of algorithms of similar flavour; this includes ideas from extremal set theory and stochastic processes.
Anupam Gupta et al. “Optimal Bounds for the k-cut Problem”. In: arXiv preprint arXiv:2005.08301 (2020).
David R. Karger and Clifford Stein. “A New Approach to the Minimum Cut Problem”. In: J. ACM 43.4 (July 1996), pp. 601–640.
Wikipedia, Karger's Algorithm https://en.wikipedia.org/wiki/Karger%27s_algorithm
Continuous time Markov processes are heavily used to approximate solutions to parabolic and elliptic partial differential equations. In this paper, we examine the role of the Feynman-Kac formula in the aforementioned approximation. We present the classical results for linear parabolic equations. Then we generalize the method for stochastic processes with discrete jump discontinuities. Via Fokker-Planck's equation we show that this class of SDEs is the codomain of a more general class of partial integro-differential equations under Feynman-Kac's transformation. We utilize a jump-adapted Euler-Maruyama scheme to approximate the evolution of jump-diffusions. Finally, we analyze the weak and strong convergence properties of the implemented methods.
The project belongs to the field of topology. More specifically, the identification (gluing) of the edges of \(2n\)-gons is analyzed. We prove that the resulting manifold is a topological surface. A classification of compact surfaces is presented. A conjecture regarding the number of ways to obtain an arbitrary manifold from \(2n\)-gon is constructed. The author’s contributions consist of constructing a conjecture regarding the number of ways to obtain an arbitrary manifold from \(2n\)-gon, as well as computing the number of configurations of the edges of a \(2n\)-gon forming a sphere, a torus, a \(\mathbb{R}P^2\) and a Klein bottle, thus proving the conjecture true for the mentioned manifolds.
I started developing this project in the summer of 2014 at HSSIMI - a summer research school held at Blagoevgrad, Bulgaria. I worked under the guidance of Katerina Velcheva from Stanford. Afterwards, I continued working on the topic under the guidance of Prof. Kopanov from Plovdiv University. The project was presented at the 27th edition of EUCYS, the largest science fair for high school students in Europe.
In college, I played lots of foosball. And so did a lot of my friends. Being a competitive bunch, we created FoosRank - a ranking system for foosball games. The algorithm is a slight modification of the ELO system, used in, e.g., chess. FoosRank also keeps the score during the game and shows each user their game history and ranking over time.


Berliner Weisse
- 1 pound 5357 White Wheat Malt
- 1 pound 1866 Red Pilsner Malt
- 1 pound 1850 Pilsner Malt
- 3 pounds CBW Briess Bavarian Wheat Dried Malt Extract (DME)
- 3 pounds CBW Briess Golden Light DME
- Wyeast 3944 Belgian Wit
- 1 Hallertau package of Hop pellets-2.5%A
Steps and Observations
3/7/17 Used a grian bag and mashed for 45 minutes. Put in one DME bag in early before the sparge. After sparge threw in the other. Put hops in for 15 minutes. Only boiled for 15 minutes. Cooled and added the yeast. OG reads 1.060 but that was measured from the bottom of the brew, sediment likely tainted reading 3/12/17-Added the Wyeast 3944, Lactobacillus First 3 days of fermentation were very active, settled after that.


Shanghai is one of the four direct-administered municipalities of the People's Republic of China.
Yes No


|
42h
v0.1
Simplified shell
|
#include <criterion/criterion.h>
#include "lexer/lexer.h"
#include "utils/string_utils.h"
#include "../garbage_collector/garbage_collector.h"
#include "../storage/program_data_storage.h"
#include "../storage/var_storage.h"
Functions | |
| Test (lexer, basic_tokens) | |
| Test (lexer, basic_word_tokens) | |
| Test (lexer, newline) | |
| Test (lexer, eof) | |
| Test (lexer, backslash) | |
| Test (lexer, io_number) | |
| Test (lexer, spaced_redirections) | |
| Test (lexer, no_spaced_redirections) | |
| Test (lexer, semicolon) | |
| Test (lexer, not) | |
| Test (lexer, curly_braces) | |
| Test (lexer, assignment_word) | |
| Test (lexer, variables) | |
| Test (lexer, parenthesis) | |
| Test (lexer, parenthesis2) | |
| Test (lexer, comments) | |
| Test (lexer, if_test) | |
| Test (lexer, if_test2) | |
| Test (lexer, dollar) | |
| Test (lexer, hard_stuck) | |
| Test (lexer, cmd_substitution) | |
| Test (lexer, hard_cmd_substitution) | |
Variables | |
| struct var_storage * | alias_storage |
| struct var_storage * | var_storage |
| struct file_manager * | file_manager |
| Test | ( | lexer | , |
| assignment_word | |||
| ) |
| Test | ( | lexer | , |
| backslash | |||
| ) |
| Test | ( | lexer | , |
| basic_tokens | |||
| ) |
| Test | ( | lexer | , |
| basic_word_tokens | |||
| ) |
| Test | ( | lexer | , |
| cmd_substitution | |||
| ) |
| Test | ( | lexer | , |
| comments | |||
| ) |
| Test | ( | lexer | , |
| curly_braces | |||
| ) |
| Test | ( | lexer | , |
| dollar | |||
| ) |
| Test | ( | lexer | , |
| eof | |||
| ) |
| Test | ( | lexer | , |
| hard_cmd_substitution | |||
| ) |
| Test | ( | lexer | , |
| hard_stuck | |||
| ) |
| Test | ( | lexer | , |
| if_test | |||
| ) |
| Test | ( | lexer | , |
| if_test2 | |||
| ) |
| Test | ( | lexer | , |
| io_number | |||
| ) |
| Test | ( | lexer | , |
| newline | |||
| ) |
| Test | ( | lexer | , |
| no_spaced_redirections | |||
| ) |
| Test | ( | lexer | , |
| not | |||
| ) |
| Test | ( | lexer | , |
| parenthesis | |||
| ) |
| Test | ( | lexer | , |
| parenthesis2 | |||
| ) |
| Test | ( | lexer | , |
| semicolon | |||
| ) |
| Test | ( | lexer | , |
| spaced_redirections | |||
| ) |
| Test | ( | lexer | , |
| variables | |||
| ) |
| struct var_storage* alias_storage |
| struct file_manager* file_manager |
| struct var_storage* var_storage |


Ole Gunnar Solskjaer slams Manchester United stars, questions their desire after Sheffield United draw
by HarigovindWhile speaking after their disappointing 3-3 draw in the Premier League against Sheffield United on Sunday, Manchester United manager Ole Gunnar Solskjaer slammed his players and questioned their desire to win matches.
“I was angry, disappointed, you had to wake them up,” the Norwegian said, before adding:
“You had to do something about it. I could have changed every player at half-time, apart from the keeper.”
“It wasn’t about tactics. It was about the desire first half, getting first to the ball, tackling, winning challenges. Sometimes tactics go out of the window.”
“You have to earn the right to win a game and we didn’t have any right to win the game after 70 minutes. We were nowhere near a Manchester United team.”
And upon asked how worried he was about a perceived lack of hunger among the various Manchester United stars, Solskjaer replied: “It’s not about a lack of desire (per se)… maybe it is that confidence in themselves.”
“I don’t doubt them wanting to win but sometimes young players don’t know how to win challenges like this. We’ve learned a lot today – I’m sure they have. Release the fear, play with belief and confidence,” he concluded.
Quotes via Daily Mail.


Want to know my techinal skills and the projects I done so far? If yes the go through this page
Character Recognition
This was my first project which I done on my own in Python.It might not sounds good but this itself took weeks to complete.
I used Two main Frameworks for this Project
1)Numpy
2)OpenCv
thus Numpy is used for Matrix Computations for applying Machine Learning alogorithms
and Opencv is used for Image processing.So,this project is completely used to recognize characters(Alphabets & Numbers from 0-9).
I learned python and those two frameworks on my own and implemented this project successfully using Notepad++ IDE. To see the dataset I used to train this project
Click here.
To see the execution of my project
Click here.
My Personal Website
Basically I was to planning to put all my skills and projects which I done on my Linkedin profile.Then I got an idea of designing my personal website.
This is how I designed the website. For this I learned HTML, CSS and Javascript. I used two framework here.
1)Jquery(JS)
2)Bootstrap(CSS)
I hope this website gives you the proper description about my technical skills.Thus this site was HAND CODED BY ME.
Farming Using AI
Not Done!!
To develop robots and implement basic farming strategies using artificial intelligence thereby helping farmers to reduce their workload.Basically I'm fond of farming.From my childhood and still I am waiting for the day where I do agriculture.
Nowadays I'm looking that Farmers are not actually getting paid for their work.So I initiated my goal project as Machine for agriculture.
I could start this project only if I'm specialized in AI.
Chatbot For Students
The workshop and event "IBM Build Your Bot" conducted by Shaastra2k18(IIT Madras's National level Technical symposium).
A very basic chatbot was built to assist students for solving their doubts about symposium.
Got a basic knowledge about Chatbot.


The goal of this application is to present a chat history export from
Slack in a human readable format. To get started, follow these instructions:
-
Download your Slack team's history. This can be done by navigating to
https://$YOUR_TEAM_NAME.slack.com/services/export. The
export will come in the form of a zip file containing many directories
(channels) and json files broken into dates.
-
Select your zip using the "Choose File" button in the form below.
This will trigger the browser to load your zip file. The file does not
get uploaded anywhere, all processing is done client side.
-
The app will process your zip and once it is complete these
instructions will be replaced by a list of your channels that you can
click on and view the chat history that was contained in the zip.


EFQRCode is a lightweight, pure-Swift library for generating pretty QRCode image with input watermark or icon and recognizing QRCode from image, it is based on CoreGraphics
, CoreImage
and ImageIO
. EFQRCode provides you a better way to operate QRCode in your app, it works on iOS
, macOS
, watchOS
and tvOS
, and it is available through CocoaPods
, Carthage
and Swift Package Manager
. This project is inspired by qrcode.
Overview
Demo
App Store
You can click the App Store
button below to download demo, support iOS and tvOS:
You can also click the Mac App Store
button below to download demo for macOS:
Manual
To run the example project manually, clone the repo, demos are in the ‘Examples’ folder, remember run command git submodule update --init --recursive
in terminal to get all submodules
first, then open EFQRCode.xcworkspace
with Xcode and select the target you want, run.
Or you can run the following command in terminal:
git clone git@github.com:EFPrefix/EFQRCode.git; cd EFQRCode; git submodule update --init --recursive; open 'EFQRCode.xcworkspace'
Requirements
| Version | Needs |
|---|---|
| 1.x | Xcode 8.0+ Swift 3.0+ iOS 8.0+ / macOS 10.11+ / tvOS 9.0+ |
| 4.x | Xcode 9.0+ Swift 4.0+ iOS 8.0+ / macOS 10.11+ / tvOS 9.0+ |
| 5.x | Xcode 10.2+ Swift 5.0+ iOS 8.0+ / macOS 10.11+ / tvOS 9.0+ |
Installation
CocoaPods
EFQRCode is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'EFQRCode', '~> 5.0.0'
Then, run the following command:
$ pod install
Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate EFQRCode into your Xcode project using Carthage, specify it in your Cartfile
:
github "EFPrefix/EFQRCode" ~> 5.0.0
Run carthage update
to build the framework and drag the built EFQRCode.framework
into your Xcode project.
Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler.
Once you have your Swift package set up, adding EFQRCode as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.Package(url: "https://github.com/EFPrefix/EFQRCode.git", Version(5, 0, 0))
]
Quick Start
1. Import EFQRCode
Import EFQRCode module where you want to use it:
import EFQRCode
2. Recognition
Get QR Codes from CGImage, maybe there are several codes in a image, so it will return an array:
if let testImage = UIImage(named: "test.png")?.toCGImage() {
if let tryCodes = EFQRCode.recognize(image: testImage) {
if tryCodes.count > 0 {
print("There are \(tryCodes.count) codes in testImage.")
for (index, code) in tryCodes.enumerated() {
print("The content of \(index) QR Code is: \(code).")
}
} else {
print("There is no QR Codes in testImage.")
}
} else {
print("Recognize failed, check your input image!")
}
}
3. Generation
Create QR Code image, quick usage:
// content: Content of QR Code
// size (Optional): Width and height of image
// backgroundColor (Optional): Background color of QRCode
// foregroundColor (Optional): Foreground color of QRCode
// watermark (Optional): Background image of QRCode
if let tryImage = EFQRCode.generate(
content: "https://github.com/EFPrefix/EFQRCode",
watermark: UIImage(named: "WWF")?.toCGImage()
) {
print("Create QRCode image success: \(tryImage)")
} else {
print("Create QRCode image failed!")
}
Result:
4. Generation from GIF
You can create GIF QRCode with function generateWithGIF
of class EFQRCode
, for example:
// data: Data of input GIF
// generator: An object of EFQRCodeGenerator, use for setting
// pathToSave (Optional): Path to save the output GIF, default is temp path
// delay (Optional): Output QRCode GIF delay, default is same as input GIF
// loopCount (Optional): Output QRCode GIF loopCount, default is same as input GIF
if let qrcodeData = EFQRCode.generateWithGIF(data: data, generator: generator) {
print("Create QRCode image success.")
} else {
print("Create QRCode image failed!")
}
You can get more information from the demo, result will like this:
5. Next
Learn more from User Guide.
Todo
- [x] Support GIF
- [ ] Support more styles
PS
- Please select a high contrast foreground and background color combinations;
- You should use
magnification
instead ofsize
if you want to improve the definition of QRCode image, you can also increase the value of them; - Magnification too high／Size too long／Content too much may cause failure;
- It is recommended to test the QRCode image before put it into use;
- You can contact me if there is any problem, both
Issue
andPull request
are welcome.
PS of PS: I wish you can click the Star
button if this tool is useful for you, thanks, QAQ…
Other Platforms/Languages
| Platforms/Languages | Link |
|---|---|
| Objective-C | https://github.com/z624821876/YSQRCode |
| Java | https://github.com/SumiMakito/AwesomeQRCode |
| JavaScript | https://github.com/SumiMakito/Awesome-qr.js |
| Kotlin | https://github.com/SumiMakito/AwesomeQRCode-Kotlin |
| Python | https://github.com/sylnsfar/qrcode |
Contributors
This project exists thanks to all the people who contribute. [Contribute]
PS: The original generation code of QRCode in watchOS
is based on swift_qrcodejs, thanks for ApolloZhu‘s work.
Donations
If you think this project has brought you help, you can buy me a cup of coffee. If you like this project and are willing to provide further support for it’s development, you can choose to become Backer
or Sponsor
in Open Collective.
Backers
Thank you to all our backers! 🙏 [Become a backer]
Sponsors
Support this project by becoming a sponsor.  [Become a sponsor]
Thanks for your support, 🙏
Apps using EFQRCode
Contact
Email<EMAIL_ADDRESS>License
EFQRCode is available under the MIT license. See the LICENSE file for more info.


Name is Required
Quote is Required
Author's name is required
Poster's name is required
Date is Required


1. Instinct orientation held on 2 Nov,2017
2. Activity on Elocution for confidence building held on 15th Nov,2017
3. Session on Self Discovery and Introspectionheld on 20th Nov,2017
Time:1-2pm Venue:Room no.321, IT Block
4. Session with Yash Bhardwaj as a Guest speaker on 23rd Nov,2017
Time:12am to 2pm Venue:Seminar hall,Examination hall
fb:Instinct-Peer Educator's Society
Contact:0000011111
1. Weekend Workshop held on 4th Nov to 5th Nov,2017
2. ACM Open Source session on Linux and Git/GitHub held on 8th Nov,2017
3. A bootcamp session on MongoDB held on 14th Nov,2017
fb:ACM Student Chapter
Contact:0110011111
1. Technoliterati orientation held on 1st Nov,2017
2. Brings BACHPAN REWIND. Last day to send your entry is 30th Nov,2017
3. Conference on Intra Colligate Model United Nations (MUN'17)going to held on 23rd Nov,2017
Time:10 am to 5 pm Venue:AUD
4. Session-1 on PreInterview on 27th Nov
Time:1-2pm Venue:ECE block,1st floor
fb:Technoliterati
Contact:0110011100


|
NATS C Client with JetStream and Streaming support
3.1.1
The nats.io C Client, Supported by Synadia Communications Inc.
|
Go to the source code of this file.
| enum natsConnStatus |
| enum natsStatus |
| Enumerator | |
|---|---|
| NATS_OK | Success. |
| NATS_ERR | Generic error. |
| NATS_PROTOCOL_ERROR | Error when parsing a protocol message, or not getting the expected message. |
| NATS_IO_ERROR | IO Error (network communication). |
| NATS_LINE_TOO_LONG | The protocol message read from the socket does not fit in the read buffer. |
| NATS_CONNECTION_CLOSED | Operation on this connection failed because the connection is closed. |
| NATS_NO_SERVER | Unable to connect, the server could not be reached or is not running. |
| NATS_STALE_CONNECTION | The server closed our connection because it did not receive PINGs at the expected interval. |
| NATS_SECURE_CONNECTION_WANTED | The client is configured to use TLS, but the server is not. |
| NATS_SECURE_CONNECTION_REQUIRED | The server expects a TLS connection. |
| NATS_CONNECTION_DISCONNECTED | The connection was disconnected. Depending on the configuration, the connection may reconnect. |
| NATS_CONNECTION_AUTH_FAILED | The connection failed due to authentication error. |
| NATS_NOT_PERMITTED | The action is not permitted. |
| NATS_NOT_FOUND | An action could not complete because something was not found. So far, this is an internal error. |
| NATS_ADDRESS_MISSING | Incorrect URL. For instance no host specified in the URL. |
| NATS_INVALID_SUBJECT | Invalid subject, for instance NULL or empty string. |
| NATS_INVALID_ARG | An invalid argument is passed to a function. For instance passing NULL to an API that does not accept this value. |
| NATS_INVALID_SUBSCRIPTION | The call to a subscription function fails because the subscription has previously been closed. |
| NATS_INVALID_TIMEOUT | Timeout must be positive numbers. |
| NATS_ILLEGAL_STATE | An unexpected state, for instance calling natsSubscription_NextMsg() on an asynchronous subscriber. |
| NATS_SLOW_CONSUMER | The maximum number of messages waiting to be delivered has been reached. Messages are dropped. |
| NATS_MAX_PAYLOAD | Attempt to send a payload larger than the maximum allowed by the NATS Server. |
| NATS_MAX_DELIVERED_MSGS | Attempt to receive more messages than allowed, for instance because of natsSubscription_AutoUnsubscribe(). |
| NATS_INSUFFICIENT_BUFFER | A buffer is not large enough to accommodate the data. |
| NATS_NO_MEMORY | An operation could not complete because of insufficient memory. |
| NATS_SYS_ERROR | Some system function returned an error. |
| NATS_TIMEOUT | An operation timed-out. For instance natsSubscription_NextMsg(). |
| NATS_FAILED_TO_INITIALIZE | The library failed to initialize. |
| NATS_NOT_INITIALIZED | The library is not yet initialized. |
| NATS_SSL_ERROR | An SSL error occurred when trying to establish a connection. |
| NATS_NO_SERVER_SUPPORT | The server does not support this action. |
| NATS_NOT_YET_CONNECTED | A connection could not be immediately established and natsOptions_SetRetryOnFailedConnect() specified a connected callback. The connect is retried asynchronously. |
| NATS_DRAINING | A connection and/or subscription entered the draining mode. Some operations will fail when in that mode. |
| NATS_INVALID_QUEUE_NAME | An invalid queue name was passed when creating a queue subscription. |
| NATS_NO_RESPONDERS | No responders were running when the server received the request. |
| NATS_MISMATCH | For JetStream subscriptions, it means that a consumer sequence mismatch was discovered. |
| NATS_MISSED_HEARTBEAT | For JetStream subscriptions, it means that the library detected that server heartbeats have been missed. |
| enum jsErrCode |