|
mbed TLS v2.16.11
|
Multi-precision integer library. More...
Go to the source code of this file.
Data Structures | |
| struct | mbedtls_mpi |
| MPI structure. More... | |
Macros | |
| #define | MBEDTLS_ERR_MPI_FILE_IO_ERROR -0x0002 |
| #define | MBEDTLS_ERR_MPI_BAD_INPUT_DATA -0x0004 |
| #define | MBEDTLS_ERR_MPI_INVALID_CHARACTER -0x0006 |
| #define | MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL -0x0008 |
| #define | MBEDTLS_ERR_MPI_NEGATIVE_VALUE -0x000A |
| #define | MBEDTLS_ERR_MPI_DIVISION_BY_ZERO -0x000C |
| #define | MBEDTLS_ERR_MPI_NOT_ACCEPTABLE -0x000E |
| #define | MBEDTLS_ERR_MPI_ALLOC_FAILED -0x0010 |
| #define | MBEDTLS_MPI_CHK(f) |
| #define | MBEDTLS_MPI_MAX_LIMBS 10000 |
| #define | MBEDTLS_MPI_WINDOW_SIZE 6 |
| #define | MBEDTLS_MPI_MAX_SIZE 1024 |
| #define | MBEDTLS_MPI_MAX_BITS ( 8 * MBEDTLS_MPI_MAX_SIZE ) |
| #define | MBEDTLS_MPI_MAX_BITS_SCALE100 ( 100 * MBEDTLS_MPI_MAX_BITS ) |
| #define | MBEDTLS_LN_2_DIV_LN_10_SCALE100 332 |
| #define | MBEDTLS_MPI_RW_BUFFER_SIZE ( ((MBEDTLS_MPI_MAX_BITS_SCALE100 + MBEDTLS_LN_2_DIV_LN_10_SCALE100 - 1) / MBEDTLS_LN_2_DIV_LN_10_SCALE100) + 10 + 6 ) |
| #define | MBEDTLS_HAVE_INT32 |
| #define | MBEDTLS_HAVE_UDBL |
| #define | MBEDTLS_DEPRECATED |
Typedefs | |
| typedef int32_t | mbedtls_mpi_sint |
| typedef uint32_t | mbedtls_mpi_uint |
| typedef uint64_t | mbedtls_t_udbl |
| typedef struct mbedtls_mpi | mbedtls_mpi |
| MPI structure. More... | |
Enumerations | |
| enum | mbedtls_mpi_gen_prime_flag_t { MBEDTLS_MPI_GEN_PRIME_FLAG_DH = 0x0001, MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR = 0x0002 } |
| Flags for mbedtls_mpi_gen_prime() More... | |
Functions | |
| void | mbedtls_mpi_init (mbedtls_mpi *X) |
| Initialize an MPI context. More... | |
| void | mbedtls_mpi_free (mbedtls_mpi *X) |
| This function frees the components of an MPI context. More... | |
| int | mbedtls_mpi_grow (mbedtls_mpi *X, size_t nblimbs) |
| Enlarge an MPI to the specified number of limbs. More... | |
| int | mbedtls_mpi_shrink (mbedtls_mpi *X, size_t nblimbs) |
| This function resizes an MPI downwards, keeping at least the specified number of limbs. More... | |
| int | mbedtls_mpi_copy (mbedtls_mpi *X, const mbedtls_mpi *Y) |
| Make a copy of an MPI. More... | |
| void | mbedtls_mpi_swap (mbedtls_mpi *X, mbedtls_mpi *Y) |
| Swap the contents of two MPIs. More... | |
| int | mbedtls_mpi_safe_cond_assign (mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned char assign) |
| Perform a safe conditional copy of MPI which doesn't reveal whether the condition was true or not. More... | |
| int | mbedtls_mpi_safe_cond_swap (mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign) |
| Perform a safe conditional swap which doesn't reveal whether the condition was true or not. More... | |
| int | mbedtls_mpi_lset (mbedtls_mpi *X, mbedtls_mpi_sint z) |
| Store integer value in MPI. More... | |
| int | mbedtls_mpi_get_bit (const mbedtls_mpi *X, size_t pos) |
| Get a specific bit from an MPI. More... | |
| int | mbedtls_mpi_set_bit (mbedtls_mpi *X, size_t pos, unsigned char val) |
| Modify a specific bit in an MPI. More... | |
| size_t | mbedtls_mpi_lsb (const mbedtls_mpi *X) |
Return the number of bits of value 0 before the least significant bit of value 1 . More... | |
| size_t | mbedtls_mpi_bitlen (const mbedtls_mpi *X) |
Return the number of bits up to and including the most significant bit of value 1 . More... | |
| size_t | mbedtls_mpi_size (const mbedtls_mpi *X) |
| Return the total size of an MPI value in bytes. More... | |
| int | mbedtls_mpi_read_string (mbedtls_mpi *X, int radix, const char *s) |
| Import an MPI from an ASCII string. More... | |
| int | mbedtls_mpi_write_string (const mbedtls_mpi *X, int radix, char *buf, size_t buflen, size_t *olen) |
| Export an MPI to an ASCII string. More... | |
| int | mbedtls_mpi_read_file (mbedtls_mpi *X, int radix, FILE *fin) |
| Read an MPI from a line in an opened file. More... | |
| int | mbedtls_mpi_write_file (const char *p, const mbedtls_mpi *X, int radix, FILE *fout) |
| Export an MPI into an opened file. More... | |
| int | mbedtls_mpi_read_binary (mbedtls_mpi *X, const unsigned char *buf, size_t buflen) |
| Import an MPI from unsigned big endian binary data. More... | |
| int | mbedtls_mpi_write_binary (const mbedtls_mpi *X, unsigned char *buf, size_t buflen) |
| Export an MPI into unsigned big endian binary data of fixed size. More... | |
| int | mbedtls_mpi_shift_l (mbedtls_mpi *X, size_t count) |
| Perform a left-shift on an MPI: X <<= count. More... | |
| int | mbedtls_mpi_shift_r (mbedtls_mpi *X, size_t count) |
| Perform a right-shift on an MPI: X >>= count. More... | |
| int | mbedtls_mpi_cmp_abs (const mbedtls_mpi *X, const mbedtls_mpi *Y) |
| Compare the absolute values of two MPIs. More... | |
| int | mbedtls_mpi_cmp_mpi (const mbedtls_mpi *X, const mbedtls_mpi *Y) |
| Compare two MPIs. More... | |
| int | mbedtls_mpi_lt_mpi_ct (const mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned *ret) |
| Check if an MPI is less than the other in constant time. More... | |
| int | mbedtls_mpi_cmp_int (const mbedtls_mpi *X, mbedtls_mpi_sint z) |
| Compare an MPI with an integer. More... | |
| int | mbedtls_mpi_add_abs (mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B) |
| Perform an unsigned addition of MPIs: X = |A| + |B|. More... | |
| int | mbedtls_mpi_sub_abs (mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B) |
| Perform an unsigned subtraction of MPIs: X = |A| - |B|. More... | |
| int | mbedtls_mpi_add_mpi (mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B) |
| Perform a signed addition of MPIs: X = A + B. More... | |
| int | mbedtls_mpi_sub_mpi (mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B) |
| Perform a signed subtraction of MPIs: X = A - B. More... | |
| int | mbedtls_mpi_add_int (mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b) |
| Perform a signed addition of an MPI and an integer: X = A + b. More... | |
| int | mbedtls_mpi_sub_int (mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b) |
| Perform a signed subtraction of an MPI and an integer: X = A - b. More... | |
| int | mbedtls_mpi_mul_mpi (mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B) |
| Perform a multiplication of two MPIs: X = A * B. More... | |
| int | mbedtls_mpi_mul_int (mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint b) |
| Perform a multiplication of an MPI with an unsigned integer: X = A * b. More... | |
| int | mbedtls_mpi_div_mpi (mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B) |
| Perform a division with remainder of two MPIs: A = Q * B + R. More... | |
| int | mbedtls_mpi_div_int (mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, mbedtls_mpi_sint b) |
| Perform a division with remainder of an MPI by an integer: A = Q * b + R. More... | |
| int | mbedtls_mpi_mod_mpi (mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B) |
| Perform a modular reduction. R = A mod B. More... | |
| int | mbedtls_mpi_mod_int (mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_sint b) |
| Perform a modular reduction with respect to an integer. r = A mod b. More... | |
| int | mbedtls_mpi_exp_mod (mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N, mbedtls_mpi *_RR) |
| Perform a sliding-window exponentiation: X = A^E mod N. More... | |
| int | mbedtls_mpi_fill_random (mbedtls_mpi *X, size_t size, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng) |
| Fill an MPI with a number of random bytes. More... | |
| int | mbedtls_mpi_gcd (mbedtls_mpi *G, const mbedtls_mpi *A, const mbedtls_mpi *B) |
| Compute the greatest common divisor: G = gcd(A, B) More... | |
| int | mbedtls_mpi_inv_mod (mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *N) |
| Compute the modular inverse: X = A^-1 mod N. More... | |
| MBEDTLS_DEPRECATED int | mbedtls_mpi_is_prime (const mbedtls_mpi *X, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng) |
| Perform a Miller-Rabin primality test with error probability of 2-80. More... | |
| int | mbedtls_mpi_is_prime_ext (const mbedtls_mpi *X, int rounds, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng) |
| Miller-Rabin primality test. More... | |
| int | mbedtls_mpi_gen_prime (mbedtls_mpi *X, size_t nbits, int flags, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng) |
| Generate a prime number. More... | |
| int | mbedtls_mpi_self_test (int verbose) |
| Checkup routine. More... | |
Multi-precision integer library.
Definition in file bignum.h.
| #define MBEDTLS_ERR_MPI_ALLOC_FAILED -0x0010 |
| #define MBEDTLS_ERR_MPI_BAD_INPUT_DATA -0x0004 |
| #define MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL -0x0008 |
| #define MBEDTLS_ERR_MPI_DIVISION_BY_ZERO -0x000C |
| #define MBEDTLS_ERR_MPI_FILE_IO_ERROR -0x0002 |
| #define MBEDTLS_ERR_MPI_INVALID_CHARACTER -0x0006 |
| #define MBEDTLS_ERR_MPI_NEGATIVE_VALUE -0x000A |
| #define MBEDTLS_ERR_MPI_NOT_ACCEPTABLE -0x000E |
| #define MBEDTLS_MPI_CHK | ( | f | ) |
| #define MBEDTLS_MPI_MAX_BITS ( 8 * MBEDTLS_MPI_MAX_SIZE ) |
| #define MBEDTLS_MPI_MAX_BITS_SCALE100 ( 100 * MBEDTLS_MPI_MAX_BITS ) |
| #define MBEDTLS_MPI_MAX_SIZE 1024 |
| #define MBEDTLS_MPI_RW_BUFFER_SIZE ( ((MBEDTLS_MPI_MAX_BITS_SCALE100 + MBEDTLS_LN_2_DIV_LN_10_SCALE100 - 1) / MBEDTLS_LN_2_DIV_LN_10_SCALE100) + 10 + 6 ) |
| typedef struct mbedtls_mpi mbedtls_mpi |
MPI structure.
| typedef int32_t mbedtls_mpi_sint |
| typedef uint32_t mbedtls_mpi_uint |
| typedef uint64_t mbedtls_t_udbl |
Flags for mbedtls_mpi_gen_prime()
Each of these flags is a constraint on the result X returned by mbedtls_mpi_gen_prime().
| Enumerator | |
|---|---|
| MBEDTLS_MPI_GEN_PRIME_FLAG_DH | (X-1)/2 is prime too |
| MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR | lower error rate from 2-80 to 2-128 |
| int mbedtls_mpi_add_abs | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | A, | ||
| const mbedtls_mpi * | B | ||
| ) |
Perform an unsigned addition of MPIs: X = |A| + |B|.
| X | The destination MPI. This must point to an initialized MPI. |
| A | The first summand. This must point to an initialized MPI. |
| B | The second summand. This must point to an initialized MPI. |
0
if successful. | int mbedtls_mpi_add_int | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | A, | ||
| mbedtls_mpi_sint | b | ||
| ) |
Perform a signed addition of an MPI and an integer: X = A + b.
| X | The destination MPI. This must point to an initialized MPI. |
| A | The first summand. This must point to an initialized MPI. |
| b | The second summand. |
0
if successful. | int mbedtls_mpi_add_mpi | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | A, | ||
| const mbedtls_mpi * | B | ||
| ) |
Perform a signed addition of MPIs: X = A + B.
| X | The destination MPI. This must point to an initialized MPI. |
| A | The first summand. This must point to an initialized MPI. |
| B | The second summand. This must point to an initialized MPI. |
0
if successful. | size_t mbedtls_mpi_bitlen | ( | const mbedtls_mpi * | X | ) |
Return the number of bits up to and including the most significant bit of value 1
.
1
.| X | The MPI to query. This must point to an initialized MPI. |
1
. | int mbedtls_mpi_cmp_abs | ( | const mbedtls_mpi * | X, |
| const mbedtls_mpi * | Y | ||
| ) |
Compare the absolute values of two MPIs.
| X | The left-hand MPI. This must point to an initialized MPI. |
| Y | The right-hand MPI. This must point to an initialized MPI. |
1
if |X|
is greater than |Y|
. -1
if |X|
is lesser than |Y|
. 0
if |X|
is equal to |Y|
. | int mbedtls_mpi_cmp_int | ( | const mbedtls_mpi * | X, |
| mbedtls_mpi_sint | z | ||
| ) |
Compare an MPI with an integer.
| X | The left-hand MPI. This must point to an initialized MPI. |
| z | The integer value to compare X to. |
1
if X
is greater than z
. -1
if X
is lesser than z
. 0
if X
is equal to z
. | int mbedtls_mpi_cmp_mpi | ( | const mbedtls_mpi * | X, |
| const mbedtls_mpi * | Y | ||
| ) |
Compare two MPIs.
| X | The left-hand MPI. This must point to an initialized MPI. |
| Y | The right-hand MPI. This must point to an initialized MPI. |
1
if X
is greater than Y
. -1
if X
is lesser than Y
. 0
if X
is equal to Y
. | int mbedtls_mpi_copy | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | Y | ||
| ) |
Make a copy of an MPI.
| X | The destination MPI. This must point to an initialized MPI. |
| Y | The source MPI. This must point to an initialized MPI. |
0
if successful. | int mbedtls_mpi_div_int | ( | mbedtls_mpi * | Q, |
| mbedtls_mpi * | R, | ||
| const mbedtls_mpi * | A, | ||
| mbedtls_mpi_sint | b | ||
| ) |
Perform a division with remainder of an MPI by an integer: A = Q * b + R.
| Q | The destination MPI for the quotient. This may be NULL if the value of the quotient is not needed. |
| R | The destination MPI for the remainder value. This may be NULL if the value of the remainder is not needed. |
| A | The dividend. This must point to an initialized MPi. |
| b | The divisor. |
0
if successful. b
equals zero. | int mbedtls_mpi_div_mpi | ( | mbedtls_mpi * | Q, |
| mbedtls_mpi * | R, | ||
| const mbedtls_mpi * | A, | ||
| const mbedtls_mpi * | B | ||
| ) |
Perform a division with remainder of two MPIs: A = Q * B + R.
| Q | The destination MPI for the quotient. This may be NULL if the value of the quotient is not needed. |
| R | The destination MPI for the remainder value. This may be NULL if the value of the remainder is not needed. |
| A | The dividend. This must point to an initialized MPi. |
| B | The divisor. This must point to an initialized MPI. |
0
if successful. B
equals zero. | int mbedtls_mpi_exp_mod | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | A, | ||
| const mbedtls_mpi * | E, | ||
| const mbedtls_mpi * | N, | ||
| mbedtls_mpi * | _RR | ||
| ) |
Perform a sliding-window exponentiation: X = A^E mod N.
| X | The destination MPI. This must point to an initialized MPI. |
| A | The base of the exponentiation. This must point to an initialized MPI. |
| E | The exponent MPI. This must point to an initialized MPI. |
| N | The base for the modular reduction. This must point to an initialized MPI. |
| _RR | A helper MPI depending solely on N which can be used to speed-up multiple modular exponentiations for the same value of N . This may be NULL . If it is not NULL , it must point to an initialized MPI. If it hasn't been used after the call to mbedtls_mpi_init(), this function will compute the helper value and store it in _RR for reuse on subsequent calls to this function. Otherwise, the function will assume that _RR holds the helper value set by a previous call to mbedtls_mpi_exp_mod(), and reuse it. |
0
if successful. N
is negative or even, or if E
is negative. | int mbedtls_mpi_fill_random | ( | mbedtls_mpi * | X, |
| size_t | size, | ||
| int(*)(void *, unsigned char *, size_t) | f_rng, | ||
| void * | p_rng | ||
| ) |
Fill an MPI with a number of random bytes.
| X | The destination MPI. This must point to an initialized MPI. |
| size | The number of random bytes to generate. |
| f_rng | The RNG function to use. This must not be NULL . |
| p_rng | The RNG parameter to be passed to f_rng . This may be NULL if f_rng doesn't need a context argument. |
0
if successful. | void mbedtls_mpi_free | ( | mbedtls_mpi * | X | ) |
This function frees the components of an MPI context.
| X | The MPI context to be cleared. This may be NULL , in which case this function is a no-op. If it is not NULL , it must point to an initialized MPI. |
| int mbedtls_mpi_gcd | ( | mbedtls_mpi * | G, |
| const mbedtls_mpi * | A, | ||
| const mbedtls_mpi * | B | ||
| ) |
Compute the greatest common divisor: G = gcd(A, B)
| G | The destination MPI. This must point to an initialized MPI. |
| A | The first operand. This must point to an initialized MPI. |
| B | The second operand. This must point to an initialized MPI. |
0
if successful. | int mbedtls_mpi_gen_prime | ( | mbedtls_mpi * | X, |
| size_t | nbits, | ||
| int | flags, | ||
| int(*)(void *, unsigned char *, size_t) | f_rng, | ||
| void * | p_rng | ||
| ) |
Generate a prime number.
| X | The destination MPI to store the generated prime in. This must point to an initialized MPi. |
| nbits | The required size of the destination MPI in bits. This must be between 3 and MBEDTLS_MPI_MAX_BITS. |
| flags | A mask of flags of type mbedtls_mpi_gen_prime_flag_t. |
| f_rng | The RNG function to use. This must not be NULL . |
| p_rng | The RNG parameter to be passed to f_rng . This may be NULL if f_rng doesn't use a context parameter. |
0
if successful, in which case X
holds a probably prime number. nbits
is not between 3
and MBEDTLS_MPI_MAX_BITS. | int mbedtls_mpi_get_bit | ( | const mbedtls_mpi * | X, |
| size_t | pos | ||
| ) |
Get a specific bit from an MPI.
| X | The MPI to query. This must be initialized. |
| pos | Zero-based index of the bit to query. |
0
or 1
on success, depending on whether bit pos
of X
is unset or set. | int mbedtls_mpi_grow | ( | mbedtls_mpi * | X, |
| size_t | nblimbs | ||
| ) |
Enlarge an MPI to the specified number of limbs.
| X | The MPI to grow. It must be initialized. |
| nblimbs | The target number of limbs. |
0
if successful. | void mbedtls_mpi_init | ( | mbedtls_mpi * | X | ) |
Initialize an MPI context.
This makes the MPI ready to be set or freed, but does not define a value for the MPI.
| X | The MPI context to initialize. This must not be NULL . |
| int mbedtls_mpi_inv_mod | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | A, | ||
| const mbedtls_mpi * | N | ||
| ) |
Compute the modular inverse: X = A^-1 mod N.
| X | The destination MPI. This must point to an initialized MPI. |
| A | The MPI to calculate the modular inverse of. This must point to an initialized MPI. |
| N | The base of the modular inversion. This must point to an initialized MPI. |
0
if successful. N
is less than or equal to one. has
no modular inverse with respect to N
. | MBEDTLS_DEPRECATED int mbedtls_mpi_is_prime | ( | const mbedtls_mpi * | X, |
| int(*)(void *, unsigned char *, size_t) | f_rng, | ||
| void * | p_rng | ||
| ) |
Perform a Miller-Rabin primality test with error probability of 2-80.
| X | The MPI to check for primality. This must point to an initialized MPI. |
| f_rng | The RNG function to use. This must not be NULL . |
| p_rng | The RNG parameter to be passed to f_rng . This may be NULL if f_rng doesn't use a context parameter. |
0
if successful, i.e. X
is probably prime. X
is not prime. | int mbedtls_mpi_is_prime_ext | ( | const mbedtls_mpi * | X, |
| int | rounds, | ||
| int(*)(void *, unsigned char *, size_t) | f_rng, | ||
| void * | p_rng | ||
| ) |
Miller-Rabin primality test.
X
is potentially generated by an adversary, for example when validating cryptographic parameters that you didn't generate yourself and that are supposed to be prime, then rounds
should be at least the half of the security strength of the cryptographic algorithm. On the other hand, if X
is chosen uniformly or non-adversially (as is the case when mbedtls_mpi_gen_prime calls this function), then rounds
can be much lower.| X | The MPI to check for primality. This must point to an initialized MPI. |
| rounds | The number of bases to perform the Miller-Rabin primality test for. The probability of returning 0 on a composite is at most 2-2*rounds . |
| f_rng | The RNG function to use. This must not be NULL . |
| p_rng | The RNG parameter to be passed to f_rng . This may be NULL if f_rng doesn't use a context parameter. |
0
if successful, i.e. X
is probably prime. X
is not prime. | size_t mbedtls_mpi_lsb | ( | const mbedtls_mpi * | X | ) |
Return the number of bits of value 0
before the least significant bit of value 1
.
1
.| X | The MPI to query. |
0
before the least significant bit of value 1
in X
. | int mbedtls_mpi_lset | ( | mbedtls_mpi * | X, |
| mbedtls_mpi_sint | z | ||
| ) |
Store integer value in MPI.
| X | The MPI to set. This must be initialized. |
| z | The value to use. |
0
if successful. | int mbedtls_mpi_lt_mpi_ct | ( | const mbedtls_mpi * | X, |
| const mbedtls_mpi * | Y, | ||
| unsigned * | ret | ||
| ) |
Check if an MPI is less than the other in constant time.
| X | The left-hand MPI. This must point to an initialized MPI with the same allocated length as Y. |
| Y | The right-hand MPI. This must point to an initialized MPI with the same allocated length as X. |
| ret | The result of the comparison: 1 if X is less than Y . 0 if X is greater than or equal to Y . |
| int mbedtls_mpi_mod_int | ( | mbedtls_mpi_uint * | r, |
| const mbedtls_mpi * | A, | ||
| mbedtls_mpi_sint | b | ||
| ) |
Perform a modular reduction with respect to an integer. r = A mod b.
| r | The address at which to store the residue. This must not be NULL . |
| A | The MPI to compute the residue of. This must point to an initialized MPi. |
| b | The integer base of the modular reduction. |
0
if successful. b
equals zero. b
is negative. | int mbedtls_mpi_mod_mpi | ( | mbedtls_mpi * | R, |
| const mbedtls_mpi * | A, | ||
| const mbedtls_mpi * | B | ||
| ) |
Perform a modular reduction. R = A mod B.
| R | The destination MPI for the residue value. This must point to an initialized MPI. |
| A | The MPI to compute the residue of. This must point to an initialized MPI. |
| B | The base of the modular reduction. This must point to an initialized MPI. |
0
if successful. B
equals zero. B
is negative. | int mbedtls_mpi_mul_int | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | A, | ||
| mbedtls_mpi_uint | b | ||
| ) |
Perform a multiplication of an MPI with an unsigned integer: X = A * b.
| X | The destination MPI. This must point to an initialized MPI. |
| A | The first factor. This must point to an initialized MPI. |
| b | The second factor. |
0
if successful. | int mbedtls_mpi_mul_mpi | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | A, | ||
| const mbedtls_mpi * | B | ||
| ) |
Perform a multiplication of two MPIs: X = A * B.
| X | The destination MPI. This must point to an initialized MPI. |
| A | The first factor. This must point to an initialized MPI. |
| B | The second factor. This must point to an initialized MPI. |
0
if successful. | int mbedtls_mpi_read_binary | ( | mbedtls_mpi * | X, |
| const unsigned char * | buf, | ||
| size_t | buflen | ||
| ) |
Import an MPI from unsigned big endian binary data.
| X | The destination MPI. This must point to an initialized MPI. |
| buf | The input buffer. This must be a readable buffer of length buflen Bytes. |
| buflen | The length of the input buffer p in Bytes. |
0
if successful. | int mbedtls_mpi_read_file | ( | mbedtls_mpi * | X, |
| int | radix, | ||
| FILE * | fin | ||
| ) |
Read an MPI from a line in an opened file.
| X | The destination MPI. This must point to an initialized MPI. |
| radix | The numeric base of the string representation used in the source line. |
| fin | The input file handle to use. This must not be NULL . |
The function returns 0
on an empty line.
Leading whitespaces are ignored, as is a '0x' prefix for radix 16
.
0
if successful. | int mbedtls_mpi_read_string | ( | mbedtls_mpi * | X, |
| int | radix, | ||
| const char * | s | ||
| ) |
Import an MPI from an ASCII string.
| X | The destination MPI. This must point to an initialized MPI. |
| radix | The numeric base of the input string. |
| s | Null-terminated string buffer. |
0
if successful. | int mbedtls_mpi_safe_cond_assign | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | Y, | ||
| unsigned char | assign | ||
| ) |
Perform a safe conditional copy of MPI which doesn't reveal whether the condition was true or not.
| X | The MPI to conditionally assign to. This must point to an initialized MPI. |
| Y | The MPI to be assigned from. This must point to an initialized MPI. |
| assign | The condition deciding whether to perform the assignment or not. Possible values:
|
if( assign ) mbedtls_mpi_copy( X, Y );
except that it avoids leaking any information about whether the assignment was done or not (the above code may leak information through branch prediction and/or memory access patterns analysis).0
if successful. | int mbedtls_mpi_safe_cond_swap | ( | mbedtls_mpi * | X, |
| mbedtls_mpi * | Y, | ||
| unsigned char | assign | ||
| ) |
Perform a safe conditional swap which doesn't reveal whether the condition was true or not.
| X | The first MPI. This must be initialized. |
| Y | The second MPI. This must be initialized. |
| assign | The condition deciding whether to perform the swap or not. Possible values:
|
0
if successful. | int mbedtls_mpi_self_test | ( | int | verbose | ) |
Checkup routine.
| int mbedtls_mpi_set_bit | ( | mbedtls_mpi * | X, |
| size_t | pos, | ||
| unsigned char | val | ||
| ) |
Modify a specific bit in an MPI.
1
in a not yet existing limb. It will not grow if the bit should be set to 0
.| X | The MPI to modify. This must be initialized. |
| pos | Zero-based index of the bit to modify. |
| val | The desired value of bit pos: 0 or 1 . |
0
if successful. | int mbedtls_mpi_shift_l | ( | mbedtls_mpi * | X, |
| size_t | count | ||
| ) |
Perform a left-shift on an MPI: X <<= count.
| X | The MPI to shift. This must point to an initialized MPI. |
| count | The number of bits to shift by. |
0
if successful. | int mbedtls_mpi_shift_r | ( | mbedtls_mpi * | X, |
| size_t | count | ||
| ) |
Perform a right-shift on an MPI: X >>= count.
| X | The MPI to shift. This must point to an initialized MPI. |
| count | The number of bits to shift by. |
0
if successful. | int mbedtls_mpi_shrink | ( | mbedtls_mpi * | X, |
| size_t | nblimbs | ||
| ) |
This function resizes an MPI downwards, keeping at least the specified number of limbs.
If X
is smaller than nblimbs
, it is resized up instead.
| X | The MPI to shrink. This must point to an initialized MPI. |
| nblimbs | The minimum number of limbs to keep. |
0
if successful. | size_t mbedtls_mpi_size | ( | const mbedtls_mpi * | X | ) |
Return the total size of an MPI value in bytes.
| X | The MPI to use. This must point to an initialized MPI. |
X
internally. This happens if and only if there are trailing bytes of value zero.X
. | int mbedtls_mpi_sub_abs | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | A, | ||
| const mbedtls_mpi * | B | ||
| ) |
Perform an unsigned subtraction of MPIs: X = |A| - |B|.
| X | The destination MPI. This must point to an initialized MPI. |
| A | The minuend. This must point to an initialized MPI. |
| B | The subtrahend. This must point to an initialized MPI. |
0
if successful. B
is greater than A
. | int mbedtls_mpi_sub_int | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | A, | ||
| mbedtls_mpi_sint | b | ||
| ) |
Perform a signed subtraction of an MPI and an integer: X = A - b.
| X | The destination MPI. This must point to an initialized MPI. |
| A | The minuend. This must point to an initialized MPI. |
| b | The subtrahend. |
0
if successful. | int mbedtls_mpi_sub_mpi | ( | mbedtls_mpi * | X, |
| const mbedtls_mpi * | A, | ||
| const mbedtls_mpi * | B | ||
| ) |
Perform a signed subtraction of MPIs: X = A - B.
| X | The destination MPI. This must point to an initialized MPI. |
| A | The minuend. This must point to an initialized MPI. |
| B | The subtrahend. This must point to an initialized MPI. |
0
if successful. | void mbedtls_mpi_swap | ( | mbedtls_mpi * | X, |
| mbedtls_mpi * | Y | ||
| ) |
Swap the contents of two MPIs.
| X | The first MPI. It must be initialized. |
| Y | The second MPI. It must be initialized. |
| int mbedtls_mpi_write_binary | ( | const mbedtls_mpi * | X, |
| unsigned char * | buf, | ||
| size_t | buflen | ||
| ) |
Export an MPI into unsigned big endian binary data of fixed size.
| X | The source MPI. This must point to an initialized MPI. |
| buf | The output buffer. This must be a writable buffer of length buflen Bytes. |
| buflen | The size of the output buffer buf in Bytes. |
0
if successful. buf
isn't large enough to hold the value of X
. | int mbedtls_mpi_write_file | ( | const char * | p, |
| const mbedtls_mpi * | X, | ||
| int | radix, | ||
| FILE * | fout | ||
| ) |
Export an MPI into an opened file.
| p | A string prefix to emit prior to the MPI data. For example, this might be a label, or "0x" when printing in base 16 . This may be NULL if no prefix is needed. |
| X | The source MPI. This must point to an initialized MPI. |
| radix | The numeric base to be used in the emitted string. |
| fout | The output file handle. This may be NULL , in which case the output is written to stdout . |
0
if successful. | int mbedtls_mpi_write_string | ( | const mbedtls_mpi * | X, |
| int | radix, | ||
| char * | buf, | ||
| size_t | buflen, | ||
| size_t * | olen | ||
| ) |
Export an MPI to an ASCII string.
| X | The source MPI. This must point to an initialized MPI. |
| radix | The numeric base of the output string. |
| buf | The buffer to write the string to. This must be writable buffer of length buflen Bytes. |
| buflen | The available size in Bytes of buf . |
| olen | The address at which to store the length of the string written, including the final NULL byte. This must not be NULL . |
buflen == 0
to obtain the minimum required buffer size in *olen
.0
if successful. buf
is too small to hold the value of X
in the desired base. In this case, *olen
is nonetheless updated to contain the size of buf
required for a successful call.


Welcome to the Digital Humanities
...now what in the heck are they and what do you have to do to succeed in this course
Basic Definitions
Problems of Terms: A Non-inclusive List
What DH is Not
A Few Examples
GIS & Mapping
Mapping Unrealities
Network Analysis
Some Ancient Applications
Text Analysis
Text Analysis
Diving Right into Data
You Enter a Dungeon...
From Math to Text
Between Logic and Language: Programming
Basic Data Concept: Plain Text
Basic Data Concept: Plain Text (HTML)
Basic Data Concept: Plain Text (CSV)
How I Got into DH
Eleusis, The Shrine of the Mysteries and a Mysterious Man
Networks in Stone
Networks of Commemoration
Those Who First Inspired Me
Jean Bauer
Shawn Graham
Miriam Posner
What You Will Learn to Do
1) Scrape Data from the Web
2) Clean and Transform Data En Masse
3) Visually Analyze Results
4) Research Digital Scholarship & Compose Your Analysis
5) Publish Your Work Openly
6) Most Critically: Think About Data Critically
Previous Student Work
Confederate Memorials
The Slave Ledgers
An Teanga Sean, The Celtic Languages


-
Vuln Hunt: Find the Security Vulnerability Challenge
blogs.microsoft.com
There’s a saying that many people have heard, “If it was snake, it would have bitten you.” More often than not, that’s the case with software ...
-
Microsoft on the Issues - News and perspectives on legal, public policy ...
blogs.microsoft.com
As part of our continuing commitment to transparency, we are publishing updated information Friday about the number of requests Microsoft has ...
-
Avoid Phone Scams | Cybercriminal Tech Support Scam | Security Threats
www.microsoft.com
Avoid phone scams including cybercriminal tech support scams that call your telephone and request personal information. Prevent these and other ...
-
Microsoft on Government Blog
www.microsoft.com
The Microsoft on Government blog features insights and views from subject matter experts and industry leaders on government technology topics. Find ...
-
How tech companies can engage with (billions of) users on human rights - ...
blogs.microsoft.com
How can technology companies engage with users—who number in the billions—on potential human rights challenges? The release of today’s working paper ...
-
Laying a sound foundation for cybersecurity
www.microsoft.com
Much cybersecurity news today focuses on the emergence of new and complex threats and the widespread damage they can inflict on our society. Yet ...
-
Security Trends in Cloud Computing Part 1: Financial Services
blogs.microsoft.com
In 2012, Microsoft Trustworthy Computing launched the Cloud Security Readiness Tool (CSRT) to help organizations understand their current IT ...
-
MMPC - Coordinated Malware Eradication
www.microsoft.com
The Coordinated Malware Eradication program aims to unite security organizations to disrupt the malware ecosystem.
-
Create stronger passwords and protect them
blogs.microsoft.com
All week we’ll be posting our best guidance on how to create, protect, and manage your passwords. Passwords are your first line of defense against ...
-
Now Available: Enhanced Mitigation Experience Toolkit (EMET) 5.0
blogs.microsoft.com
Today we are pleased to announce the general availability of our Enhanced Mitigation Experience Toolkit (EMET) 5.0. It has been almost five years ...
-
What to do if your antivirus subscription has expired
blogs.microsoft.com
Phil asks: I’m new to Windows 8.1. Now that my free security software has expired, how do I go about making Windows Defender my choice security ...
-
Microsoft Security :: Microsoft Active Protections Program (MAPP) ...
technet.microsoft.com
Find answers to frequently asked questions about the Microsoft Active Protections Program (MAPP). Read about the price of MAPP and the availability ...
-
Managing visual risk using enterprise risk visualization
www.microsoft.com
In today's society our expectation is that data is readily available and easily accessible on ubiquitous devices to fulfill our needs. Back in ...
-
Cybercrime, Data Protection, and Multi-Factor Authentication (MFA)
blogs.microsoft.com
Most people are familiar with the concept of an arms race. In the world of cybersecurity, this phrase is also in use. A cybersecurity “arms race” ...
-
What will cybersecurity look like in 2025?, Part 3: How Microsoft is ...
blogs.microsoft.com
Today’s post concludes our three-part series on Cyberspace 2025: Today’s Decisions, Tomorrow’s Terrain which presented three views of the world and ...
-
Keeping Oracle Java updated continues to be high security ROI
blogs.microsoft.com
New data from the recently-published Security Intelligence Report volume 16 (SIRv16) suggests that keeping Java up-to-date with security updates is ...
-
The mix of poverty and piracy that turned Romania into Europe's software ...
www.zdnet.com
Nearly two-thirds of Romania's computers run at least one piece of illegal software – a sign of a technological heritage that means it now has the ...
-
Leveraging technology as a force multiplier for security
www.microsoft.com
In Microsoft’s large and growing retail footprint, there will inevitably be losses, theft and the need for investigative services. Beyond this retail ...
-
New Guidance for Securing Public Key Infrastructure
blogs.microsoft.com
Public Key Infrastructure (PKI) is used as a building block to provide key security controls, such as data protection and authentication for ...
-
Microsoft Malware Protection Center - Help
www.microsoft.com
Help for virus and malware infections and problems with your antimalware and antivirus security software.
-
Major Rights Management Update to Office and Azure
blogs.microsoft.com
For many of the CISOs I talk to regularly, data leakage prevention continues to be a topic of high interest. Whether using either a cloud service or ...
-
Microsoft's Free Security Tools – Summary
blogs.microsoft.com
In July, we kicked off a blog series focused on "Microsoft's Free Security Tools." The series highlights free security tools that Microsoft provides ...
-
Security Newsletter Registration | News Events Guides Forums
technet.microsoft.com
Register and view the Microsoft Security Newsletter for security tips, resources and best practices, community, product lifecycles, bulletins and ...
-
5 passwords you should never use
blogs.microsoft.com
This is part three of three posts on stronger passwords. Part 1: Create stronger passwords and protect them Part 2: Do you know your kids’ passwords? ...
-
Measure Twice, Cut Once, With RMA Methodology
blogs.microsoft.com
I’ve been beating our drum for a while now about the inevitability of failure in cloud-based systems. Simply put, the complexities and ...
-
Computer IT Security Support & Troubleshooting – TechNet Security
technet.microsoft.com
TechNet Security’s support page puts a number of resources in your hands, including a community of experts, to help identify & troubleshoot security ...
-
Download at your own risk: Bitcoin miners bundled with game repacks - ...
blogs.technet.com
The Microsoft Malware Protection Center Blog provides information on viruses, worms and other malware and spyware and explains how Microsoft ...


resource opendir ( string $path [, resource $context ] )
Opens up a directory handle to be used in subsequent closedir(), readdir(), and rewinddir() calls.
Returns a directory handle resource on success, or FALSE on failure. If path is not a valid directory or the directory can not be opened due to permission restrictions or filesystem errors, opendir() returns FALSE and generates a PHP error of level E_WARNING. You can suppress the error output of opendir() by prepending '@' to the front of the function name.


Lumeer can help you in situations where
How many hours do you spend weekly dealing with some data records, putting information in the right fields or cells, copying and moving values, creating reports? Don't you feel like this is the same task all again and again? We noticed recurring patterns when working with business data or records even accros various industry fields. We believe we can make your job much easier and save you precious time that you can possibly spend with your family.
Lumeer is like a friend who can help you with your tasks so your kids can enjoy you more.
We simply allow you to input your data in the form you want to see them, make sure we understand their meaning, allow you to specify your own processes that need to be followed, and in the end we offer you wide variety of views of the same data. These views can be directly used to input your data and serve as reports as well.
Want to know more? Hit and subscribe below!
We can put you in our priority list of Early Access users and inform you about our progress in releasing Lumeer to public. Just leave us your email below. Many thanks!


The specificity measure (SPM) ranges from 0 to 1 and can be calculated for each condition/tissue. The value indicates how large the contribution is from one condition/tissue to the entire expression profile 0 being no contribution and 1 being the only condition/tissue expressed. In CoNekT the SPM for each condition/tissue was calculated and only the highest one was stored. In combination with an arbitrary threshold SPM can be used to find codition/tissue specific genes. SPM has been used in TiSGeD PubMed


Chapter 6 From data visualization to statistical modelling
Patterns in the data provide clues about relationship or covariation.Now that we know how to visualize the various relationships, we can proceed to learn more about how to formally test the relationship.
Statistical models are tools for extracting patterns out of data.
Statistics represent a common method of presenting information helping us to understand what the data are telling us.
Descriptive (or summary) statistics summarise the raw data and allow data users to interpret a dataset more easily.Descriptive statistics can describe the shape, centre and spread of a dataset.
Inferential statistics are used to infer conclusions about a population from a sample of that population. It includes estimation (An estimate is a value that is inferred for a population based on data collected from a sample of units from that population), and hypothesis testing.
6.1 Two continuous variables
6.1.1 Simple linear regression
The techique we used here is called Simple linear regression, where there is one dependent variable (continuous) and one independent variable (continuous). When there are more than one independent variable (continuous), you need to look for something called Multiple linear regression.
head(faithful)
## eruptions waiting
## 1 3.600 79
## 2 1.800 54
## 3 3.333 74
## 4 2.283 62
## 5 4.533 85
## 6 2.883 55
ggplot(faithful)+
geom_point(aes(eruptions, waiting))
6.1.2 correlation vs. linear regression
Correlation and linear regression each explore the relationship between two quantitative variables. (Salvatore S. Mangiafico)
Correlation determines if one variable varies systematically as another variable changes. It does not specify that one variable is the dependent variable and the other is the independent variable. Often, it is useful to look at which variables are correlated to others in a data set, and it is especially useful to see which variables correlate to a particular variable of interest.
In contrast, linear regression specifies one variable as the independent variable and another as the dependent variable. The resultant model relates the variables with a linear relationship.
The tests associated with linear regression are parametric and assume normality, homoscedasticity, and independence of residuals, as well as a linear relationship between the two variables.
6.1.3 Correlation matrix
pairs(data=faithful,
~ eruptions + waiting)
pairs(data=iris,
~ Sepal.Length + Sepal.Width + Petal.Length +Petal.Width)
corr.test(faithful,
use = "pairwise",
method = "pearson",
adjust = "none")
## Call:corr.test(x = faithful, use = "pairwise", method = "pearson",
## adjust = "none")
## Correlation matrix
## eruptions waiting
## eruptions 1.0 0.9
## waiting 0.9 1.0
## Sample Size
## [1] 272
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## eruptions waiting
## eruptions 0 0
## waiting 0 0
##
## To see confidence intervals of the correlations, print with the short=FALSE option
6.1.4 Pearson, Spearman, and Kendall regression
# library(PerformanceAnalytics)
chart.Correlation(faithful,
method="pearson",
histogram=TRUE,
pch=16)
chart.Correlation(faithful,
method="kendall",
histogram=TRUE,
pch=16)
chart.Correlation(faithful,
method="spearman",
histogram=TRUE,
pch=16)
## Warning in cor.test.default(as.numeric(x), as.numeric(y), method = method):
## Cannot compute exact p-value with ties
<IP_ADDRESS> Effect size
The statistics r, rho, and tau are used as effect sizes for Pearson, Spearman, and Kendall regression, respectively. These statistics vary from –1 to 1, with 0 indicating no correlation, 1 indicating a perfect positive correlation, and –1 indicating a perfect negative correlation. Like other effect size statistics, these statistics are not affected by sample size.
Interpretation of effect sizes necessarily varies by discipline and the expectations of the experiment. They should not be considered universal. An interpretation of r is given by Cohen (1988). It is probably reasonable to use similar interpretations for rho and tau.
small: 0.10 – < 0.30
medium: 0.30 – < 0.50
large: ≥ 0.50
<IP_ADDRESS> Pearson correlation
The test used for Pearson correlation is a parametric analysis that requires that the relationship between the variables is linear, and that the data be bivariate normal. Variables should be interval/ratio. The test is sensitive to outliers.
The correlation coefficient, r, can range from +1 to –1, with +1 being a perfect positive correlation and –1 being a perfect negative correlation. An r of 0 represents no correlation whatsoever. The hypothesis test determines if the r value is significantly different from 0.
cor.test( ~ eruptions + waiting,
data=faithful,
method = "pearson")
##
## Pearson's product-moment correlation
##
## data: eruptions and waiting
## t = 34.089, df = 270, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.8756964 0.9210652
## sample estimates:
## cor
## 0.9008112
# the results report the p-value for the hypothesis test as well as the r value, written as cor, 0.849.
<IP_ADDRESS> Kendall correlation
Kendall correlation is considered a nonparametric analysis. - It is a rank-based test that does not require assumptions about the distribution of the data.
- Variables can be interval/ratio or ordinal.
The correlation coefficient from the test is tau, which can range from +1 to –1, with +1 being a perfect positive correlation and –1 being a perfect negative correlation. A tau of 0 represents no correlation whatsoever. The hypothesis test determines if the tau value is significantly different from 0.
As a technical note, the cor.test function in R calculates tau-b, which handles ties in ranks well.
The test is relatively robust to outliers in the data. The test is sometimes cited for being reliable when there are small number of samples or when there are many ties in ranks.
cor.test( ~ eruptions + waiting,
data=faithful,
method = "kendall")
##
## Kendall's rank correlation tau
##
## data: eruptions and waiting
## z = 13.902, p-value < 2.2e-16
## alternative hypothesis: true tau is not equal to 0
## sample estimates:
## tau
## 0.5747674
<IP_ADDRESS> Spearman correlation
Spearman correlation is considered a nonparametric analysis.
- It is a rank-based test that does not require assumptions about the distribution of the data.
- Variables can be interval/ratio or ordinal.
The correlation coefficient from the test, rho, can range from +1 to –1, with +1 being a perfect positive correlation and –1 being a perfect negative correlation. A rho of 0 represents no correlation whatsoever. The hypothesis test determines if the rho value is significantly different from 0.
Spearman correlation is probably most often used with ordinal data. It tests for a monotonic relationship between the variables. It is relatively robust to outliers in the data.
cor.test( ~ eruptions + waiting,
data=faithful,
method = "spearman")
## Warning in cor.test.default(x = c(3.6, 1.8, 3.333, 2.283, 4.533, 2.883, :
## Cannot compute exact p-value with ties
##
## Spearman's rank correlation rho
##
## data: eruptions and waiting
## S = 744660, p-value < 2.2e-16
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
## rho
## 0.7779721
6.1.5 Linear regression
Linear regression is a very common approach to model the relationship between two interval/ratio variables. The outcome of linear regression includes estimating the intercept and the slope of the linear model.
Multiple, nominal, and ordinal independent variables
If there are multiple independent variables of interval/ratio type in the model, then linear regression expands to multiple regression.
If the independent variable were of nominal type, then the linear regression would become a one-way analysis of variance.
Handling independent variables of ordinal type can be complicated. Often they are treated as either nominal type or interval/ratio type, although there are drawbacks to each approach.
Assumptions
Linear regression assumes - a linear relationship between the two variables, - normality of the residuals, - independence of the residuals, - homoscedasticity of residuals.
Linear regression can be performed with the lm function, which was the same function we used for analysis of variance.
model = lm(eruptions ~ waiting,
data = faithful)
summary(model)
##
## Call:
## lm(formula = eruptions ~ waiting, data = faithful)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.29917 -0.37689 0.03508 0.34909 1.19329
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.874016 0.160143 -11.70 <2e-16 ***
## waiting 0.075628 0.002219 34.09 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4965 on 270 degrees of freedom
## Multiple R-squared: 0.8115, Adjusted R-squared: 0.8108
## F-statistic: 1162 on 1 and 270 DF, p-value: < 2.2e-16
The summary function for lm model objects includes estimates for model parameters (intercept and slope), as well as an r-squared value for the model and p-value for the model.
- How to read the model?
The model produces a coefficient for the intercept (-1.87) and a coefficient for the slope (0.07);
Each coefficient comes with three other numbers: its standard error, a t-value, and a p-value. The p-value tells us whether the coefficient is significantly different from zero.
If the coefficient for a predictor is zero, there is no relation at all between the predictor and the dependent variable, in which case it is worthless as a predictor. In order to ascertain whether a coefficient is significantly different from zero, and hence potentially useful, a two-tailed t-test is carried out, using the t-value and the associated degrees of freedom.
The t-value itself is the value of the coefficient divided by its standard error. This standard error is a measure of how sure we are about the estimate of the coefficient. The smaller the standard error, the smaller the confidence interval around the estimate, the less likely it is that zero will be included in the acceptance region, and hence the smaller the probability that it might just as well be zero.
The residual standard error is a measure of how unsuccessful the model is; it gauges the variability in the dependent variable that we can’t handle through the predictor variables. The better a model is, the smaller its residual standard error will be.
The multiple R-squared equals 0.8115. This R-squared is the squared correlation coefficient, r2, which quantifies, on a scale from 0 to 1, the proportion of the variance that the model explains.
plot(eruptions ~ waiting,
data=faithful,
pch=16,
xlab = "waiting",
ylab = "eruptions")
abline(model,
col = "blue",
lwd = 2)
x = residuals(model)
#library(rcompanion)
plotNormalHistogram(x)
6.2 Categorical(independent) with continuous(dependent)
6.2.1 T-tests
T-tests are commonly used to compare the means of two samples or between one sample and a fixed value. In other words, the independent variable should be categorical and have two levels.
<IP_ADDRESS> Requirements:
Observations between groups are independent.That is, not paired or repeated measures data
Data for each population are normally distributed.Moderate skewness is permissible if the data distribution is unimodal without outliers.
# distribution
plot(density(df$chinese))
qqnorm(df$chinese)
# formal tests
# null hypothesis: the distribution is normal
shapiro.test(df$chinese)
##
## Shapiro-Wilk normality test
##
## data: df$chinese
## W = 0.98571, p-value = 0.3566
ks.test(df$chinese, "pnorm", mean(df$chinese), sd(df$chinese))
##
## One-sample Kolmogorov-Smirnov test
##
## data: df$chinese
## D = 0.059435, p-value = 0.8717
## alternative hypothesis: two-sided
- For Student’s t-test, the two samples need to have the same variance. However, Welch’s t-test, which is used by default in R, does not assume equal variances.
#independent sample t-test---compare means
class1 = df[df$class == 1, ]$chinese
class2 = df[df$class == 2, ]$chinese
var.test(class1,class2)#compare variance
##
## F test to compare two variances
##
## data: class1 and class2
## F = 1.6497, num df = 24, denom df = 24, p-value = 0.2273
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.7269864 3.7437034
## sample estimates:
## ratio of variances
## 1.649734
<IP_ADDRESS> One-sample t-test
#one sample t-test: one group and a fixed value
t.test(df$chinese, mu = 78)
##
## One Sample t-test
##
## data: df$chinese
## t = 4.7923, df = 99, p-value = 5.804e-06
## alternative hypothesis: true mean is not equal to 78
## 95 percent confidence interval:
## 79.18028 80.84827
## sample estimates:
## mean of x
## 80.01428
t.test(df$chinese, mu = 78, alternative = "greater")
##
## One Sample t-test
##
## data: df$chinese
## t = 4.7923, df = 99, p-value = 2.902e-06
## alternative hypothesis: true mean is greater than 78
## 95 percent confidence interval:
## 79.31639 Inf
## sample estimates:
## mean of x
## 80.01428
t.test(df$chinese, mu = 78, alternative = "less")
##
## One Sample t-test
##
## data: df$chinese
## t = 4.7923, df = 99, p-value = 1
## alternative hypothesis: true mean is less than 78
## 95 percent confidence interval:
## -Inf 80.71216
## sample estimates:
## mean of x
## 80.01428
wilcox.test(df$chinese, mu = 78)# skewed distributions
##
## Wilcoxon signed rank test with continuity correction
##
## data: df$chinese
## V = 3771, p-value = 1.849e-05
## alternative hypothesis: true location is not equal to 78
<IP_ADDRESS> Independent sample t-test
t.test(class1,class2)
##
## Welch Two Sample t-test
##
## data: class1 and class2
## t = -0.63224, df = 45.278, p-value = 0.5304
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -3.196186 1.668777
## sample estimates:
## mean of x mean of y
## 79.47697 80.24067
<IP_ADDRESS> Paired sample t-test
t.test(df$chinese, df$math, paired = T)
##
## Paired t-test
##
## data: df$chinese and df$math
## t = 40.353, df = 99, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 19.61140 21.63976
## sample estimates:
## mean of the differences
## 20.62558
<IP_ADDRESS> wilcox.test
wilcox.test(class1,class2)#not normally distributed
##
## Wilcoxon rank sum test
##
## data: class1 and class2
## W = 297, p-value = 0.773
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(df$chinese, df$math, paired = T)
##
## Wilcoxon signed rank test with continuity correction
##
## data: df$chinese and df$math
## V = 5050, p-value < 2.2e-16
## alternative hypothesis: true location shift is not equal to 0
6.2.2 ANOVA
When the independent variable has more than two levels, we need to use ANOVA.
We can use avo function in R or build a linear model.
dif_class = aov (chinese ~ class, data = df)
summary(dif_class)
## Df Sum Sq Mean Sq F value Pr(>F)
## class 3 34.5 11.51 0.644 0.588
## Residuals 96 1714.4 17.86
How to report: There is a significant difference among different classes in terms of their Chinese scores, F (3, 96) = 0.87, p = .46.
After we run the model, it is very likely that we need to conduct pairwised comparison. However, we cannot simple use multiple t-tests but we need to correct the alpha value.
There are different ways to do the correction:
- Bonferroni correction: a/n
- Tukey’s Honestly Significant difference: assuming the means for each level of the factor should be based on equal numbers of observation.
#how is the difference like?
TukeyHSD(dif_class)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = chinese ~ class, data = df)
##
## $class
## diff lwr upr p adj
## 2-1 0.76370420 -2.361498 3.888907 0.9191350
## 3-1 -0.01161454 -3.136817 3.113588 0.9999997
## 4-1 1.39714388 -1.728058 4.522346 0.6478474
## 3-2 -0.77531874 -3.900521 2.349884 0.9157821
## 4-2 0.63343968 -2.491763 3.758642 0.9516030
## 4-3 1.40875842 -1.716444 4.533961 0.6417724
# diff= the difference in the means
# lwr = the lower end points of the confidence interval
# p adj = adjusted p value
plot(TukeyHSD(dif_class))
In the general linear model approach, residuals are normally distributed;groups should have the same variance, or homoscedasticity.
Observations among groups are independent.
The null hypothesis of the independence assumption is to be rejected if the p-value of the following Chi-squared test statistics is less than a given significance level α.
Here is an example: In the dataset survey, the Smoke column records the students smoking habit, while the Exer column records their exercise level. The allowed values in Smoke are “Heavy”, “Regul” (regularly), “Occas” (occasionally) and “Never”. As for Exer, they are “Freq” (frequently), “Some” and “None”.
tbl = table(survey$Smoke, survey$Exer)
chisq.test(tbl)
## Warning in chisq.test(tbl): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: tbl
## X-squared = 5.4885, df = 6, p-value = 0.4828
As the p-value 0.4828 is greater than the .05 significance level, we do not reject the null hypothesis that the smoking habit is independent of the exercise level of the students.


2019 - ongoing * Open Source project * AR.js Studio I am leading the development and design of the first Web AR Authoring Platform in Open Source. It's an easy-to-use platform to build and host live Web AR apps, without need of coding knowledge. Designed for teachers, students, artists and users who want to start with Augmented Reality for free, with no programming knowledge. It uses AR.js as AR core for tracking and rendering. Built with HTML + CSS + Vanilla Javascript for frontend/backend sides. As of June 2020, AR.js Studio is available in Beta version.
Learn more:
AR.js Studio, project repository, work in progress
2019 - 2020 * Open Source project * AR.js 3 Development of the first, Open Source, Web AR library for Image Target tracking (NFT). It is now possible, on the Web, to recognize every picture and track them, using the Augmented Reality and to show content.
I contributed on the jsartoolkit5 project, for the NFT (Image Tracking) feature. Later, I brought this technology on AR.js, in order to use it also with framework like A-Frame, to built Web AR experience with Image Tracking using only HTML language.
Some references:
AR.js version 3 with Image Tracking
Blog post on A-Frame official Blog
Introducing AR.js 3, blog article
2019 * Open Source project * GeoAR.js Development of the first, Open Source, Web AR library based on Geolocation (location based AR). The project, formerly known as GeoAR.js, has been merged on AR.js from AR.js v2.0.0. Learn more:
2017 - ongoing * Open Source project * AR.js Maintaining of AR.js project, a Javascript library for Augmented Reality on the Web. On my Medium page there are insights and tutorials to get start with it. Learn more:2018 - ongoing * Writing of technical articles about Augmented Reality, Agile in Web Development and Accessibility. Learn more:


open source projects and counting.
Python. Go. Ruby. And many others.
We began at the grassroots level in open source communities. We’re firm believers in developing, sharing, and collaborating with other like-minded doers and enthusiasts.


|
Serial Wombat Arduino Library
|
A class representing a Serial Wombat PWM output. More...
#include <SerialWombatPWM.h>
Public Member Functions | |
| SerialWombatPWM (SerialWombat &serialWombat) | |
| Constructor for SerialWombatPWM class. More... | |
| void | begin (uint8_t pin) |
| Initialize a pin that has been declared as PWM. Starts with 0 duty cycle. More... | |
| void | begin (uint8_t pin, uint16_t dutyCycle) |
| Initialize a pin that has been declared as PWM. More... | |
| void | begin (uint8_t pin, uint16_t dutyCycle, bool invert) |
| Initialize a pin that has been declared as PWM. More... | |
| void | writeDutyCycle (uint16_t dutyCycle) |
| Set PWM duty cycle. More... | |
| void | setFrequency_SW4AB (Wombat4A_B_PWMFrequencyValues_t frequency) |
| Set PWM Frequency (Adjusts all PWM outputs' frequency on a SerialWombat) More... | |
| void | setFrequency_SW18AB_Hz (uint16_t frequency_Hz) |
| void | setPeriod_SW18AB_uS (uint16_t period_uS) |
| ~SerialWombatPWM () | |
A class representing a Serial Wombat PWM output.
An instance of this class should be declared for each pin to be used as a Serial Wombat PWM.
PWMs are initialized to a frequency of 31250 Hz at startup. This frequency can be changed using the setFrequency_SW4AB method. All PWM outputs use the same clock divider, so a change in frequency to one PWM output will affect other outputs.
PWM inputs are either 8 or 10 bit resolution, depending on frequency selection. The duty cycle parameter of methods that set duty cycle take a 16 bit value ranging from 0 to 65535 as an input regardless of resolution, with 0 being always low, and 65535 being always high.
| SerialWombatPWM::SerialWombatPWM | ( | SerialWombat & | serialWombat | ) |
Constructor for SerialWombatPWM class.
| serialWombat | SerialWombat on which the PWM will run |
| SerialWombatPWM::~SerialWombatPWM | ( | ) |
| void SerialWombatPWM::begin | ( | uint8_t | pin | ) |
Initialize a pin that has been declared as PWM. Starts with 0 duty cycle.
| pin | The pin to become a PWM. Valid values for SW4A: 0-3 SW4B: 1-3 |
| void SerialWombatPWM::begin | ( | uint8_t | pin, |
| uint16_t | dutyCycle | ||
| ) |
Initialize a pin that has been declared as PWM.
| pin | The pin to become a PWM. Valid values for SW4A: 0-3 SW4B: 1-3 |
| dutyCycle | A value from 0 to 65535 representing duty cycle |
| void SerialWombatPWM::begin | ( | uint8_t | pin, |
| uint16_t | dutyCycle, | ||
| bool | invert | ||
| ) |
Initialize a pin that has been declared as PWM.
| pin | The pin to become a PWM. Valid values for SW4A: 0-3 SW4B: 1-3 |
| dutyCycle | A value from 0 to 65535 representing duty cycle |
| invert | if true, internally adjust duty cycle to 65535-duty cycle |
| void SerialWombatPWM::setFrequency_SW18AB_Hz | ( | uint16_t | frequency_Hz | ) |
| void SerialWombatPWM::setFrequency_SW4AB | ( | Wombat4A_B_PWMFrequencyValues_t | frequency | ) |
Set PWM Frequency (Adjusts all PWM outputs' frequency on a SerialWombat)
| frequency | A value of the Wombat4A_B_PWMFrequencyValues_t enumeration |
This function changes the Serial Wombat 4A and 4B PWM output frequncy by adjusting the clock divisor for the PWM generation hardware. By default the value is 31250Hz. Changing the frequency may reduce PWM resolution from 10 bits to 8 bits for some frequencies. However, the input value for duty cycle for methods of this class continue to be 0 to 65535 and are scaled accordingly.
| void SerialWombatPWM::setPeriod_SW18AB_uS | ( | uint16_t | period_uS | ) |
| void SerialWombatPWM::writeDutyCycle | ( | uint16_t | dutyCycle | ) |
Set PWM duty cycle.
| dutyCycle | A value from 0 to 65535 representing duty cycle |


Youtube as background on the fly!
BackTube is capable to set element's background to video with no hassle. Just load the script and instantiate then you're done.
Set Video to backgroundAPI
element
HTML element to set video background with given videoId.
YouTube iframe will be appended to the specified element.
// shows background video to #video element
var element = document.getElementById('video');
new BackTube(element, 'some_video_id');
videoId
Video id is the value of `v` key in any YouTube video URL. ie) https://www.youtube.com/watch?v=EKyirtVHsK0
// shows background video to #video element
new BackTube(document.querySelector('#vid'), 'some_video_id');


Click Me!
This is example for COLLAPSE
One
This is one
Two
This is two
Three
This is three
Previous
Next


---
layout: post
title: no title
date: '2015-06-10T15:02:04-04:00'
tags:
- agile
- heather fleming
- webinar
- video
- atlassian
tumblr_url: http://tech.gilt.com/post/121206863644/the-video-from-the-recent-atlassian-webinar
---
The video from the recent Atlassian webinar featuring Senior Director, Heather Fleming is now available!
Want more on how Agile can be a competitive advantage for your company? Check out the latest HBR report!


My name is Nicolò Carpignoli, I'm a WebXR developer from Italy. I'm working for Chia lab, a design and software company based in Bologna. You can find more about me on Github at nicolocarpignoli, On twitter at nicolocarp, On medium at nicolcarpignoli. I'm here to make easier for you to start with Augmented Reality on the Web. From now on we will refer to it as 'WebAR'.
Let's start from definitions. What is AR? AR for me is a new communication medium. It's new for the market, not for the tech. It makes you see content over the reality. This can make you learn in different ways, see things differently, you can feel more engaged with the content itself, because it's situated in your environment. You can feel it closer to you and more real. Situated content can be also more accessible (for example, Augmented sign language books).
Some examples of AR use cases can be: "I’d like to see how this new furniture fits on my room, the colors, the size, etc... before buying it." "I’d like to learn biology, or anatomy: this 3D model I see, in real sizes, over my textbooks, is really helping me to understand sizes, to see every side of it, every detail, etc… and I can interact with it, it’s so cool and helpful!" "I want to explore my city, walking in the historic center and see new places I do not know. To see anchors on my phone camera, where places really are, with some indications and distance, is helping me to find them." "I’m abroad and I have text in front of me in a language I do not know, I don’t have time to type it all on a translator: I will use this AR app that translates that to me in real time. Also, it’s chinese and I’m italian, how do I even type it?"
AR comes in different types: markerless, image tracking, location based, marker based. We will see each of them later, in detail, talking about technologies.
Why are we talking about AR on the Web? Because now it's possible to use AR on every user's phone, and it makes sense, because this way, we can make AR content and apps collaborative, and build them easily. For example, to have a mobile apps instead of a web app, it would mean: For developers, to have High costs of development, build and release; To have a Macbook for iOS, developer licenses for both Android/iOS; To release a new app at every bugfix or feature.; For users, it means: To find an app on the stores; To install an app (storage issues); To keep it updated; To remember to delete it. So the AR future, in my opinion, relies on the Web.
Today we're going to talk about several, free and open source WebAR technologies. AR.js, WebXR Device API, jsartoolkit, model viewer and jeelizAR. Let's start from the first of them.
AR.js is written in Javascript and it features Marker Based, Image Tracking and Location Based AR. It's cross browser, working on almost every android and iphones of last 5-6 years. Marker Based means that when we scan a marker, so a simple image sorrounded by a black border, we can show content on top of it. Content will disappear if the camera lost the marker. Instead Image Tracking uses the same 'marker' behaviour but in this case we can use real pictures and not simple barcodes or qrcodes like images. So we can augmented drawing, pictures, art, and make them live, for example starting from a movie poster and animate it with a 2D video overlayed on it. Content can be 3D models, videos, images, even audio. It uses aframe, a framework based on HTML and Javascript, that makes easy to create content on the Web for AR and VR - VR stands for Virtual Reality. Instead, location based AR uses real-world coordinates to place AR content in context. Users can move freely (outdoors for better precision) and content associated with their location will be scaled and placed accordingly (e.g: content will render bigger / smaller based on distance to the user). It can be used to: Show Augmented Reality informations of places walking on a park, a street, etc., For Cities and museum tours, restaurant guides, treasure hunts, biology or history learning games or place virtual art on any real world location, to create GPS based games (Pokèmon GO-like).
You can even create markers inside QRCodes with custom qr code creators, in order to make the user, with a single scan, to reach your website thanks to the qrcode and to see AR content with the marker within it. AR.js is cross browser and features three important AR types, but still requires programming knowledge to be used, to create web ar with it and deploy it live on a website.
AR.js Studio instead is an authoring platform to create Web AR Experiences. It uses AR.js under the hood, but it's designed to develop AR without coding knowledge. You just choose your experience type, marker or location based, define anchors (for example places of interest if location based) and load your content, like 3D models, images or videos. You can then choose to publish it live on a website and it will output you a public URL, or you can download the zip archive and play with it. AR.js Studio is still not ready, me and all the AR.js organization are working to release a first demo in June/July 2020.
Now we're going to talk about WebXR Device API. The future of Augmented Reality is the Immersive Web Community Group and the WebXR Device API This new API is aiming to be a standard for both Web AR and Web VR technologies on browsers. Currently it works on latest Chrome and Firefox versions, with ARCore compatible devices. No rumors about Safari/iOS support. We’re still from have it cross-browser, but it’s time to give it a look. It features Markerless AR, hit-testing and soon DOM Overlay. With Markerless AR we mean to see 3D models around you without needing a marker or an image as anchor.
jsartoolkit is a Javascript port for the Web of ARToolkit, the first of all OSS project of WebAR around. jsartoolkit it's the base of AR.js, for example, and of more projects. It features the same AR types of AR.js but lacks of aframe support and location based. But it gives you a better control on detection and tracking API. It's suggested if you want to control tracking/detection better than with AR.js and you know JS/ComputerVision programming.
Instead, WebARStudio it's the authoring platform for jsartoolkit. It's different from the previously showed AR.js Studio. In this case, we have a more complex interface, but it makes it possible to create 3D complex scene. So you can do more, talking about 3D stuff and then publish them as WebAR. But again, it's a bit more complicated. It depends on your needs and your 3D design knowledge.
Now it's time to talk about Model Viewer. Model Viewer means WebXR (when supported) + Quick Look (on Apple) + Scene Viewer (on Android) + fallback experience. It Features: markerless AR, place/scale objects, take pictures of the scene. This is practically a layer on top of Google's and Apple's markerless solution for WebAr, although their solution is not a real WebAR, because it opens a file with a native mobile view. Anyway, it can still be thought of 'web' based, as files are served through the web. This is the solution used by Google on Google Search, introduced in recent times: try to search for an animal on Google, on the results you will find the possibility to see it on your room. That's Model Viewer. Unfortunately it's not very cross browser and it's limited, because it's not possible to modify the scene when the camera starts the AR scene. But it's possible to modify the web page that triggers it. Code to use this solution is very simple, although you will need 3D models with GLTF and USDZ formats (latest for Apple devices).
Last but not least, jeelizAR and JeelizFaceFilter. They are based Machine Learning and are featuring Markerless AR and Face Filters. These are two solutions based on neural networks. You have to use pre-trained neural networks or train one on your own. Then, when you have a neural network in order to recognize a specific kind of objects (like a cup, a table, etc.) you can use JeelizAR to track it real-time. It's very fast, faster than Tensorflow.js, authors said. It comes also with face-tracking and face-detection and this specific library is called JeelizFaceFilter. It's a great library and the only face filter AR around on the web for free. But it requires programming knowledge and also a bit of Machine Learning basics to use it.
I hope you enjoyed. These were the most used Web AR technologies on Open Source as of mid 2020. We have seen pros and cons, features and support on devices for each of them. Some of them can be used without programming knowledge, other requires a bit of Javascript and Web programming basics. You can learn more following me on Twitter at nicolocarp, on Medium at nicolcarpignoli or on these references:
Write me an email at nicolocarpignoli dot gmail dot com for collaborations, questions or just a chat! Bye!


Satyarth Vaidya
BELIEVE ME I AM HUMAN.
BELIEVE ME I AM HUMAN.
Collaborated with team members to draft a new Schema for the Database via ER Diagram(s) with additional attributes focused towards machine performance tracking. Migrated data from Firebase to a MySQL based database with an additional S3 bucket to store the image data captured during a machine cycle. Built the webserver API using NodeJS and tweaked the existing Android code to incorporate the new API and database respectively. Designed and hosted an analytics dashboard on S3 bucket, built using FusionChartsJs to monitor the machine status, faults and predict irregularities.
Text segmentation based on semantic word embeddings: Obtained the data by means of web scraping various popular news websites. Implemented a script which maps a sentence to a predefined category. Used K-Means clustering to identify all the unique categories which could be extracted. Identify categories in an unlabeled dataset via topic modeling techniques. Verified results by word embedding methods like word2vec and doc2vec for context extraction. Opinion Mining: Classified an unlabeled dataset of question pair to determine their intent. Created NLP models and supervised learning to map a question pair to a particular category. Improved accuracy using K-fold training and measured the performance on test dataset via precision and recall.
Applied Regression models on various crude types and its properties for maximization of a specific set of output properties. Analyzed input parameters of over 350 different crude types and predicted the concentrations and quality of the products of fractional distillation via the help of a software called Spiral-Assay. Created interactive visualization dashboards using Tableau, Spotfire in order to make data driven decisions. The results are being deployed to measure the efficiency of the machinery and to modify the input mixture of crudes as per requirement at the Jamnagar facility of Reliance Industries.
The research work got accepted as an extended abstract in the Workshop on Neural Generation and Translation at ACL 2020. Demonstrated a bias to generate specific topic words for models in the Plug and Play Language Model framework such as GPT-2. Proposed with the necessary results, 3 methods namely Weighted Log Likelihood, KL Divergence Loss and Adaptive Word Elimination to increase the generation of the less frequent words.
Comparative Study of Computational Intelligent Algorithms: Created a hierarchy of algorithms based on their source of inspiration. Differentiated algorithms based on attributes such as fitness function and characteristics. Crop Recommendation Expert System: Extracted selective topographical features such as soil type, soil pH from satellite images. Used Plate Tectonics Based optimization algorithm for training a ML model. Created a database of crop properties for all the districts in Rajasthan. Based on the field and environmental conditions, it recommends top crops for best yield.
GPA: 3.3
GPA: 8.8
Apart from being a web developer, I enjoy most of my time being outdoors. In the winter, I am an avid skier and novice ice climber. During the warmer months here in Colorado, I enjoy mountain biking, free climbing, and kayaking.
When forced indoors, I follow a number of sci-fi and fantasy genre movies and television shows, I am an aspiring chef, and I spend a large amount of my free time exploring the latest technology advancements in the front-end web development world.


|
|
|
Access password required |
|
|
|
|
|
|
|
You have not entered an access password, and you cannot subscribe to this list without assigning one.  You should choose a short word or phrase preferably containing a mixture of numbers and letters. Do not choose passwords that would be easy to guess, like your phone number, spouse's name and so on. |
|
|
|
|
|
Click here to return to the subscription login screen. |


--- layout: example categories: example/v1.0.0 version: v1.0.0 title: Fit map to markers description: Automatically fit your data on your map with fitBounds with Mapbox.js, our open source JavaScript library. tags: - markers ---


Did you mean "wheels"?

A list of things that are better than wheels
Flat things
Paper
Feet


To get the pathing and array of points,
the P5 function known as textToPoints() is used which simplifies
the pathing of the array of the points for the texts.
A class has then been created for the agents to contain their random starting positions, velocity, target,
render functions, etc. The important function for this however is the behaviour function which determines
how the agents finds their places and how they would react once the user hovers their cursor on them.
This is done by using the flocking or steering algorithm. There are two sub-functions called into the behaviour
function which both takes in on what is called a “desired velocity”. The position of the agents is then calculated
between the distance of their current location and their placements. Depending on the sub-functions, this would
result in the agents going to their place or running away from them. Where the desired velocity takes place is
when the agents are in a certain distance of their pathing, the calculation for the desired velocity will then
slightly update agents’ speed and maximum force on return.
In terms of audio, two P5 functions that is specific for sound manipulation has been used. The first function is
called P5.FFT (Fast Fourier Transform) which was used to render the spectrum and the waveform graphs while the second
function is called P5.Aplitude which was used to animate the agents to go with the beat. P5.Aplitude allows the developer
to fetch the level/volume of the audio which then can be used. For instance, when the audio hits a peak
(i.e. a spike through the level/volume), it will then increase the size of the agents.
Finally in terms of user interaction, as explained earlier, the user is able to interact with the agents by hovering their
cursor over them. Basic colour lerping has also been implemented within the x-axis of the canvas. A number of GUIs has been
developed to allow the user to customise the spectrum graph, the waveform graph, the dimensions of the agents and toggling
whether to display the track information on the bottom right to display or not. These are created by using P5.GUI as well
as setting up multiple global variables which are linked between the components and the GUI itself.
/**
* ------------- SHOW FUNCTION: -------------
*/
show() {
let rms = analyser.getLevel(); // rms = Root Mean Square amplitude
let fromColour = color(255, 0, 0);
let toColour = color(0, 0, 255);
let lerpMap = map(mouseX, 0, width, 0, 1.0);
let activateLerp = lerpColor(fromColour, toColour, lerpMap);
strokeWeight(strokeThickness);
fill(activateLerp);
if (isPlaying === true) {
rectMode(CENTER);
strokeWeight(strokeThickness / 5);
stroke(0);
rect(this.pos.x, this.pos.y, agentSize + rms * amplitudeLevel, agentSize + rms * amplitudeLevel); // Connecting agentSize and the rms by the amplitude level will allow the agents to "dance" to the beat of the track.
} else {
stroke(255);
rect(this.pos.x, this.pos.y, agentSize, agentSize);
}
}
/**
* ------------- BEHAVIOUR FUNCTION: -------------
*/
behaviours() {
// Agents finding and "flocking" their places:
let arrive = this.arriveAtPlace(this.target);
arrive.mult(1); // Weight of agents flocking
this.applyForce(arrive);
// Agents "flying away" from their places:
let mouseInteraction = createVector(mouseX, mouseY);
let fly = this.flyAway(mouseInteraction);
fly.mult(10); // Weight of agents flying away
this.applyForce(fly);
}
/**
* ------------- APPLY FORCE FUNCTION: -------------
* Sub-function of "Behaviour"
*/
applyForce(f) {
this.acc.add(f);
}
/**
* ------------- ARRIVE AT PLACE FUNCTION: -------------
* Sub-function of "Behaviour"
*/
arriveAtPlace(targ) {
let wantedVel = p5.Vector.sub(targ, this.pos);
let dist = wantedVel.mag();
let speed = this.maxSpeed;
if (dist < 100) {
speed = map(dist, 0, 100, 0, this.maxSpeed);
}
wantedVel.setMag(speed);
let flock = p5.Vector.sub(wantedVel, this.vel);
flock.limit(this.maxForce);
return flock;
}
/**
* ------------- FLY AWAY FUNCTION: -------------
* Sub-function of "Behaviour"
*/
flyAway(targ) {
let wantedVel = p5.Vector.sub(targ, this.pos);
let dist = wantedVel.mag();
if (dist < 50) {
wantedVel.setMag(this.maxSpeed);
wantedVel.mult(-1);
let flock = p5.Vector.sub(wantedVel, this.vel);
flock.limit(this.maxForce);
return flock;
} else {
return createVector(0, 0);
}
}
}


Preparation time
overnight
Cooking time
over 2 hours
Serves
Serves 8-10
Low and slow cooking is the secret to tender American-style barbecue. The sauce is optional.
Equipment and preparation: These instructions are for a gas-powered barbecue, but a barbecue with a lid can be used if the coals are very low.
For the pork, in a small bowl, mix the salt and sugar until combined. One to three days before you plan to grill, generously sprinkle the salt-sugar rub over the entire pork shoulder, covering every surface. You may not need the full quantity of rub. (A good rule of thumb is two teaspoons per pound of meat.)
If you’re lucky enough to have a shoulder with skin on it, score the skin in a crosshatch pattern, leaving an inch or so between the lines. Try to work some of the rub into the scorings. Refrigerate the pork shoulder uncovered. Bring to room temperature before you put it on the grill.
Soak the wood chips in water for about 30 minutes; set aside.
Prepare a gas-powered barbecue for smoking. On a section of the grill that won’t receive direct heat, place a disposable pan or tray beneath the cooking grate and directly on the bottom bars or lava rocks (whichever your grill has). Fill the pan about halfway with water; this will catch drippings and keep the inside of the grill moist.
Set the cooking grate back on the grill. Adjust the burners so the temperature in the grill is somewhere between 95C/200F and 150C/300F. Keep the burners under the drip pan off, and those not under it on.
Drain the wood chips and place them in a smoker box. If you don’t have a smoker box, you can make one by piercing holes all over a shallow and narrow foil-covered aluminium pan.
A few minutes before putting the meat on the grill, set the smoker box directly over the heat source. (Smoke works best early in the cooking process.)
 Cover the grill and roast the pork shoulder for 4 to 6 hours. The time it takes will vary depending on your piece of meat, the grill, and the cooking temperature. Lower temperature is better but takes much longer to cook. Whichever temperature you choose, check occasionally to make sure it does not exceed 150C/300F or fall below 95C/200F. When the temperature of the interior of the meat is 90C/195F, it should be done.
Don’t be alarmed if the temperature of the pork shoulder rises quickly and then stays at 150°F for a long time (sometimes for several hours). This is called the “stall.” Be patient and wait for it to reach 90C/195F. Check to see if the meat feels relaxed to the touch or if you can pull it apart with a fork. If it resists, give it another 30 minutes. The meat should by now be a deep brown color.
If the outside of the shoulder doesn’t have some dark, crispy areas (i.e., bark or, if you started with skin, crackling), crank up the temperature to 260C/500F for a few minutes. (Keep a close eye on it so it doesn’t burn.) Remove the meat from the grill and let it rest for at least 20 to 30 minutes.
For the vinegar-BBQ sauce, combine the vinegar, water, sugar, salt, hot pepper flakes, and black pepper in a medium-size bowl and stir until the sugar and salt have dissolved; set aside.
Either pull the pork shoulder apart with a fork or roughly chop with a cleaver, incorporating crispy bits of crackling (if you have it) or bark. Mix in a generous splash of the vinegar BBQ sauce; adjust the seasoning, making sure there’s enough acid (vinegar) and salt. Put the remainder of the sauce in a pitcher on the table. Serve with soft rolls. Coleslaw and beans and rice make good accompaniments.


vals.push(3);
{statement}
pest is a general purpose parser written in Rust with a focus on accessibility, correctness, and performance. It uses parsing expression grammars (or PEG) as input, which are similar in spirit to regular expressions, but which offer the enhanced expressivity needed to parse complex languages.
Grammar-generated parsers are both easier to use and maintain than their hand-written counterparts.
Grammars offer better correctness guarantees, and issues can be solved declaratively in the grammar itself. Rust's memory safety further limits the amount of damage bugs can do.
High-level static analysis and careful low-level implementation build a solid foundation on which serious performance tuning is possible.
The following is an example of a grammar for a list of alpha-numeric identifiers where the first identifier does not start with a digit:
alpha = { 'a'..'z' | 'A'..'Z' }
digit = { '0'..'9' }
ident = { (alpha | digit)+ }
ident_list = _{ !digit ~ ident ~ (" " ~ ident)+ }
// ^
// ident_list rule is silent (produces no tokens or error reports)
Grammars are saved in separate .pest
files which are
never mixed with procedural code. This results in an always up-to-date
formalization of a language that is easy to read and maintain.
Based on the grammar definition, the parser also includes automatic
error reporting. For the example above, the input "123"
will result in:
thread 'main' panicked at ' --> 1:1
|
1 | 123
| ^---
|
= unexpected digit', src/main.rs:12
while "ab *"
will result in:
thread 'main' panicked at ' --> 1:1
|
1 | ab *
| ^---
|
= expected ident', src/main.rs:12


The Chrome browser extension is available in a separate repository, not the shared codebase used for the verifier, sentinel, client, and documentation server.
For a line-by-line explanation of how this extension works, please read the release notes to version 1 of the extension.
Until the alias mechanism of NTTP-1 is implemented, we recommend using a separate account for purposes such as this.
When you install the extension, a Nyzo icon will appear in the top toolbar of Chrome. When you click on the extension for the first time, a button will be displayed requesting configuration.
The options page requires a private key and a base tip. The private key is stored in local, unencrypted storage. Use an expendable, low-value account for this.
When you have entered valid values, the field backgrounds change from red to green. The values are stored automatically as you enter them.

When you click on a tip button, the popup will indicate that the tip is being sent. This should show only briefly.
A confirmation lets you know that the tip was received, forwarded to the cycle, and scheduled for inclusion in the blockchain. If there are any errors or warnings, they are displayed here.
If you ever want to change your private key or base tip amount, right-click on the extension icon and select "Options."
When the extension is loaded, it looks for elements with the CSS class nyzo-tip-button. The extension retrieves the data-client-url, data-receiver-id, and data-tag attributes from the elements it finds.
The data-client-url attribute lets the extension know where the tip transaction should be sent. This attribute is required.
The data-receiver-id attribute designates the receiver of the tip transactions. This attribute is required.
The data-tag attribute is included in the sender data field of transactions, and it allows the operator of the site to track the source of tip transactions. The tag may be up to 7 characters, and it may include ASCII letters, numbers, and the underscore. Disallowed characters are filtered, and excess characters are truncated. This attribute is optional.
The nyzo-extension-not-installed CSS class is removed from all nyzo-tip-button elements, and the nyzo-extension-installed CSS class is added.
The page has no responsibility to respond to these CSS class changes or even to display the element at all. The following button displays different images depending on whether the extension is installed. CSS can be used to automatically change the appearance of elements, and the class list of the element can be examined in JavaScript (<element>.classList.contains('nyzo-extension-installed')) to provide different behavior.
When the button above is tapped, this paragraph will display whether the extension is installed. Similar logic could be used to send users without the extension to an install page.


Google Meet Grid View - Arcola Energy fork
Speak to the IT team for more information about this extension
Donate to the School the original author works for


Buy price
Buy Price
Difference in %
Sell price
Difference in %
Buy price
Difference in %
Sell price
Buy price
Difference in %
Sell price
Difference in %
Buy price
Difference in % 5
Sell price
Sell price
Sell price
Difference in %
Buy price
Difference in %
Sell price
Difference in %
Buy price
Sell price
Difference in %
Buy price
Difference in %
Sell price
Difference in %
Buy price
Percentage
Price in FIAT
Percentage
Use minus
for decrees
Price difference
Price + percentage
Difference in %
Purchasing price
Selling price
Price difference
Difference in %
Sell quantity
Income


|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use Services | |
|---|---|
| compbio.data.msa | Web Service interfaces for JAva Bioinformatics Analysis Web Services. |
| compbio.data.msa.jaxws | |
| compbio.stat.collector | |
| compbio.stat.servlet | |
| compbio.stat.servlet.util | |
| compbio.ws.client | A command line client and web services testing client for JAva Bioinformatics Analysis Web Services. |
| compbio.ws.server |
| Uses of Services in compbio.data.msa |
|---|
| Methods in compbio.data.msa that return types with arguments of type Services | |
|---|---|
Set<Services> |
Category.getServices()
|
Set<Services> |
RegistryWS.getSupportedServices()
List of services that are functioning on the server. |
| Methods in compbio.data.msa with parameters of type Services | |
|---|---|
int |
RegistryWS.getLastTested(Services service)
Number of seconds since the last test. |
Date |
RegistryWS.getLastTestedOn(Services service)
The date and time the service has been verified to work last time |
String |
RegistryWS.getServiceDescription(Services service)
Gives the description of the service. |
boolean |
RegistryWS.isOperating(Services service)
Check whether a particular web service is working on this server |
String |
RegistryWS.testService(Services service)
Test a particular service |
| Uses of Services in compbio.data.msa.jaxws |
|---|
| Methods in compbio.data.msa.jaxws that return Services | |
|---|---|
Services |
TestService.getArg0()
|
Services |
IsOperating.getArg0()
|
Services |
GetServiceDescription.getArg0()
|
Services |
GetLastTestedOn.getArg0()
|
Services |
GetLastTested.getArg0()
|
| Methods in compbio.data.msa.jaxws that return types with arguments of type Services | |
|---|---|
Set<Services> |
GetSupportedServicesResponse.getReturn()
|
| Methods in compbio.data.msa.jaxws with parameters of type Services | |
|---|---|
void |
TestService.setArg0(Services arg0)
|
void |
IsOperating.setArg0(Services arg0)
|
void |
GetServiceDescription.setArg0(Services arg0)
|
void |
GetLastTestedOn.setArg0(Services arg0)
|
void |
GetLastTested.setArg0(Services arg0)
|
| Method parameters in compbio.data.msa.jaxws with type arguments of type Services | |
|---|---|
void |
GetSupportedServicesResponse.setReturn(Set<Services> _return)
|
| Uses of Services in compbio.stat.collector |
|---|
| Methods in compbio.stat.collector that return Services | |
|---|---|
Services |
JobStat.getWebService()
|
| Methods in compbio.stat.collector with parameters of type Services | |
|---|---|
StatProcessor |
StatProcessor.getSingleWSStat(Services webService)
|
List<JobStat> |
StatDB.readData(Timestamp from,
Timestamp to,
Services wservice,
Boolean clusterOnly)
|
| Uses of Services in compbio.stat.servlet |
|---|
| Methods in compbio.stat.servlet that return Services | |
|---|---|
Services |
ServiceTestResult.getService()
|
| Constructors in compbio.stat.servlet with parameters of type Services | |
|---|---|
ServiceTestResult(Services service)
|
| Uses of Services in compbio.stat.servlet.util |
|---|
| Methods in compbio.stat.servlet.util that return types with arguments of type Services | |
|---|---|
Map<Services,StatProcessor> |
StatCollection.getAllStat()
|
Map<Services,StatProcessor> |
StatCollection.getClusterStat()
|
Map<Services,StatProcessor> |
StatCollection.getLocalStat()
|
| Method parameters in compbio.stat.servlet.util with type arguments of type Services | |
|---|---|
static Totals |
Totals.sumStats(Map<Services,StatProcessor> stat)
|
| Uses of Services in compbio.ws.client |
|---|
| Methods in compbio.ws.client that return Services | |
|---|---|
static Services |
Services.getService(String servName)
|
static Services |
ServicesUtil.getServiceByJobDirectory(File jobdir)
|
static Services |
ServicesUtil.getServiceByRunner(Class<? extends Executable> class1)
|
static Services |
Services.valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Services[] |
Services.values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods in compbio.ws.client that return types with arguments of type Services | |
|---|---|
static Set<Services> |
Jws2Client.getServices(String hostname)
|
| Methods in compbio.ws.client with parameters of type Services | |
|---|---|
boolean |
WSTester.checkService(Services service)
Test JABA web service |
static JABAService |
Jws2Client.connect(String host,
Services service)
Connects to a web service by the host and the service name web service type |
static Class<? extends Executable<?>> |
ServicesUtil.getServiceImpl(Services service)
|
static void |
Jws2Client.testService(String hostname,
Services service,
PrintWriter writer)
Asks registry to test the service on the host hostname |
| Method parameters in compbio.ws.client with type arguments of type Services | |
|---|---|
static String |
Services.toString(Set<Services> services)
|
| Uses of Services in compbio.ws.server |
|---|
| Methods in compbio.ws.server that return types with arguments of type Services | |
|---|---|
Set<Services> |
RegistryWS.getSupportedServices()
|
| Methods in compbio.ws.server with parameters of type Services | |
|---|---|
int |
RegistryWS.getLastTested(Services service)
|
Date |
RegistryWS.getLastTestedOn(Services service)
Can potentially return null if the service has not been tested yet. |
String |
RegistryWS.getServiceDescription(Services service)
|
static _WSLogger |
_WSLogger.getStatLogger(Services service,
WebServiceContext wsContext)
Deprecated. |
boolean |
RegistryWS.isOperating(Services service)
|
String |
RegistryWS.testService(Services service)
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |


Connected
reconnect
Logging (l)
Motor Power (m)
AI Tracking (a)
Main Battery Voltage:
Phone Battery Percentage:
Other commands: Save image (s), Zero motor position (z)
Control
Tracks
Track Generator
Sessions