text
stringlengths 1
22.8M
|
|---|
```ruby
require_relative '../../spec_helper'
platform_is_not :windows do
require_relative 'shared/log'
require 'syslog'
describe "Syslog.notice" do
it_behaves_like :syslog_log, :notice
end
end
```
|
```forth
*> \brief \b ZPFTRF
*
* =========== DOCUMENTATION ===========
*
* Online html documentation available at
* path_to_url
*
*> \htmlonly
*> Download ZPFTRF + dependencies
*> <a href="path_to_url">
*> [TGZ]</a>
*> <a href="path_to_url">
*> [ZIP]</a>
*> <a href="path_to_url">
*> [TXT]</a>
*> \endhtmlonly
*
* Definition:
* ===========
*
* SUBROUTINE ZPFTRF( TRANSR, UPLO, N, A, INFO )
*
* .. Scalar Arguments ..
* CHARACTER TRANSR, UPLO
* INTEGER N, INFO
* ..
* .. Array Arguments ..
* COMPLEX*16 A( 0: * )
*
*
*> \par Purpose:
* =============
*>
*> \verbatim
*>
*> ZPFTRF computes the Cholesky factorization of a complex Hermitian
*> positive definite matrix A.
*>
*> The factorization has the form
*> A = U**H * U, if UPLO = 'U', or
*> A = L * L**H, if UPLO = 'L',
*> where U is an upper triangular matrix and L is lower triangular.
*>
*> This is the block version of the algorithm, calling Level 3 BLAS.
*> \endverbatim
*
* Arguments:
* ==========
*
*> \param[in] TRANSR
*> \verbatim
*> TRANSR is CHARACTER*1
*> = 'N': The Normal TRANSR of RFP A is stored;
*> = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
*> \endverbatim
*>
*> \param[in] UPLO
*> \verbatim
*> UPLO is CHARACTER*1
*> = 'U': Upper triangle of RFP A is stored;
*> = 'L': Lower triangle of RFP A is stored.
*> \endverbatim
*>
*> \param[in] N
*> \verbatim
*> N is INTEGER
*> The order of the matrix A. N >= 0.
*> \endverbatim
*>
*> \param[in,out] A
*> \verbatim
*> A is COMPLEX*16 array, dimension ( N*(N+1)/2 );
*> On entry, the Hermitian matrix A in RFP format. RFP format is
*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
*> the Conjugate-transpose of RFP A as defined when
*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
*> follows: If UPLO = 'U' the RFP A contains the nt elements of
*> upper packed A. If UPLO = 'L' the RFP A contains the elements
*> of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
*> 'C'. When TRANSR is 'N' the LDA is N+1 when N is even and N
*> is odd. See the Note below for more details.
*>
*> On exit, if INFO = 0, the factor U or L from the Cholesky
*> factorization RFP A = U**H*U or RFP A = L*L**H.
*> \endverbatim
*>
*> \param[out] INFO
*> \verbatim
*> INFO is INTEGER
*> = 0: successful exit
*> < 0: if INFO = -i, the i-th argument had an illegal value
*> > 0: if INFO = i, the leading principal minor of order i
*> is not positive, and the factorization could not be
*> completed.
*>
*> Further Notes on RFP Format:
*> ============================
*>
*> We first consider Standard Packed Format when N is even.
*> We give an example where N = 6.
*>
*> AP is Upper AP is Lower
*>
*> 00 01 02 03 04 05 00
*> 11 12 13 14 15 10 11
*> 22 23 24 25 20 21 22
*> 33 34 35 30 31 32 33
*> 44 45 40 41 42 43 44
*> 55 50 51 52 53 54 55
*>
*> Let TRANSR = 'N'. RFP holds AP as follows:
*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
*> conjugate-transpose of the first three columns of AP upper.
*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
*> conjugate-transpose of the last three columns of AP lower.
*> To denote conjugate we place -- above the element. This covers the
*> case N even and TRANSR = 'N'.
*>
*> RFP A RFP A
*>
*> -- -- --
*> 03 04 05 33 43 53
*> -- --
*> 13 14 15 00 44 54
*> --
*> 23 24 25 10 11 55
*>
*> 33 34 35 20 21 22
*> --
*> 00 44 45 30 31 32
*> -- --
*> 01 11 55 40 41 42
*> -- -- --
*> 02 12 22 50 51 52
*>
*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
*> transpose of RFP A above. One therefore gets:
*>
*> RFP A RFP A
*>
*> -- -- -- -- -- -- -- -- -- --
*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
*> -- -- -- -- -- -- -- -- -- --
*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
*> -- -- -- -- -- -- -- -- -- --
*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
*>
*> We next consider Standard Packed Format when N is odd.
*> We give an example where N = 5.
*>
*> AP is Upper AP is Lower
*>
*> 00 01 02 03 04 00
*> 11 12 13 14 10 11
*> 22 23 24 20 21 22
*> 33 34 30 31 32 33
*> 44 40 41 42 43 44
*>
*> Let TRANSR = 'N'. RFP holds AP as follows:
*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
*> conjugate-transpose of the first two columns of AP upper.
*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
*> conjugate-transpose of the last two columns of AP lower.
*> To denote conjugate we place -- above the element. This covers the
*> case N odd and TRANSR = 'N'.
*>
*> RFP A RFP A
*>
*> -- --
*> 02 03 04 00 33 43
*> --
*> 12 13 14 10 11 44
*>
*> 22 23 24 20 21 22
*> --
*> 00 33 34 30 31 32
*> -- --
*> 01 11 44 40 41 42
*>
*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
*> transpose of RFP A above. One therefore gets:
*>
*> RFP A RFP A
*>
*> -- -- -- -- -- -- -- -- --
*> 02 12 22 00 01 00 10 20 30 40 50
*> -- -- -- -- -- -- -- -- --
*> 03 13 23 33 11 33 11 21 31 41 51
*> -- -- -- -- -- -- -- -- --
*> 04 14 24 34 44 43 44 22 32 42 52
*> \endverbatim
*
* Authors:
* ========
*
*> \author Univ. of Tennessee
*> \author Univ. of California Berkeley
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup pftrf
*
* =====================================================================
SUBROUTINE ZPFTRF( TRANSR, UPLO, N, A, INFO )
*
* -- LAPACK computational routine --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
*
* .. Scalar Arguments ..
CHARACTER TRANSR, UPLO
INTEGER N, INFO
* ..
* .. Array Arguments ..
COMPLEX*16 A( 0: * )
*
* =====================================================================
*
* .. Parameters ..
DOUBLE PRECISION ONE
COMPLEX*16 CONE
PARAMETER ( ONE = 1.0D+0, CONE = ( 1.0D+0, 0.0D+0 ) )
* ..
* .. Local Scalars ..
LOGICAL LOWER, NISODD, NORMALTRANSR
INTEGER N1, N2, K
* ..
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* ..
* .. External Subroutines ..
EXTERNAL XERBLA, ZHERK, ZPOTRF, ZTRSM
* ..
* .. Intrinsic Functions ..
INTRINSIC MOD
* ..
* .. Executable Statements ..
*
* Test the input parameters.
*
INFO = 0
NORMALTRANSR = LSAME( TRANSR, 'N' )
LOWER = LSAME( UPLO, 'L' )
IF( .NOT.NORMALTRANSR .AND. .NOT.LSAME( TRANSR, 'C' ) ) THEN
INFO = -1
ELSE IF( .NOT.LOWER .AND. .NOT.LSAME( UPLO, 'U' ) ) THEN
INFO = -2
ELSE IF( N.LT.0 ) THEN
INFO = -3
END IF
IF( INFO.NE.0 ) THEN
CALL XERBLA( 'ZPFTRF', -INFO )
RETURN
END IF
*
* Quick return if possible
*
IF( N.EQ.0 )
$ RETURN
*
* If N is odd, set NISODD = .TRUE.
* If N is even, set K = N/2 and NISODD = .FALSE.
*
IF( MOD( N, 2 ).EQ.0 ) THEN
K = N / 2
NISODD = .FALSE.
ELSE
NISODD = .TRUE.
END IF
*
* Set N1 and N2 depending on LOWER
*
IF( LOWER ) THEN
N2 = N / 2
N1 = N - N2
ELSE
N1 = N / 2
N2 = N - N1
END IF
*
* start execution: there are eight cases
*
IF( NISODD ) THEN
*
* N is odd
*
IF( NORMALTRANSR ) THEN
*
* N is odd and TRANSR = 'N'
*
IF( LOWER ) THEN
*
* SRPA for LOWER, NORMAL and N is odd ( a(0:n-1,0:n1-1) )
* T1 -> a(0,0), T2 -> a(0,1), S -> a(n1,0)
* T1 -> a(0), T2 -> a(n), S -> a(n1)
*
CALL ZPOTRF( 'L', N1, A( 0 ), N, INFO )
IF( INFO.GT.0 )
$ RETURN
CALL ZTRSM( 'R', 'L', 'C', 'N', N2, N1, CONE, A( 0 ),
$ N,
$ A( N1 ), N )
CALL ZHERK( 'U', 'N', N2, N1, -ONE, A( N1 ), N, ONE,
$ A( N ), N )
CALL ZPOTRF( 'U', N2, A( N ), N, INFO )
IF( INFO.GT.0 )
$ INFO = INFO + N1
*
ELSE
*
* SRPA for UPPER, NORMAL and N is odd ( a(0:n-1,0:n2-1)
* T1 -> a(n1+1,0), T2 -> a(n1,0), S -> a(0,0)
* T1 -> a(n2), T2 -> a(n1), S -> a(0)
*
CALL ZPOTRF( 'L', N1, A( N2 ), N, INFO )
IF( INFO.GT.0 )
$ RETURN
CALL ZTRSM( 'L', 'L', 'N', 'N', N1, N2, CONE, A( N2 ),
$ N,
$ A( 0 ), N )
CALL ZHERK( 'U', 'C', N2, N1, -ONE, A( 0 ), N, ONE,
$ A( N1 ), N )
CALL ZPOTRF( 'U', N2, A( N1 ), N, INFO )
IF( INFO.GT.0 )
$ INFO = INFO + N1
*
END IF
*
ELSE
*
* N is odd and TRANSR = 'C'
*
IF( LOWER ) THEN
*
* SRPA for LOWER, TRANSPOSE and N is odd
* T1 -> A(0,0) , T2 -> A(1,0) , S -> A(0,n1)
* T1 -> a(0+0) , T2 -> a(1+0) , S -> a(0+n1*n1); lda=n1
*
CALL ZPOTRF( 'U', N1, A( 0 ), N1, INFO )
IF( INFO.GT.0 )
$ RETURN
CALL ZTRSM( 'L', 'U', 'C', 'N', N1, N2, CONE, A( 0 ),
$ N1,
$ A( N1*N1 ), N1 )
CALL ZHERK( 'L', 'C', N2, N1, -ONE, A( N1*N1 ), N1,
$ ONE,
$ A( 1 ), N1 )
CALL ZPOTRF( 'L', N2, A( 1 ), N1, INFO )
IF( INFO.GT.0 )
$ INFO = INFO + N1
*
ELSE
*
* SRPA for UPPER, TRANSPOSE and N is odd
* T1 -> A(0,n1+1), T2 -> A(0,n1), S -> A(0,0)
* T1 -> a(n2*n2), T2 -> a(n1*n2), S -> a(0); lda = n2
*
CALL ZPOTRF( 'U', N1, A( N2*N2 ), N2, INFO )
IF( INFO.GT.0 )
$ RETURN
CALL ZTRSM( 'R', 'U', 'N', 'N', N2, N1, CONE,
$ A( N2*N2 ),
$ N2, A( 0 ), N2 )
CALL ZHERK( 'L', 'N', N2, N1, -ONE, A( 0 ), N2, ONE,
$ A( N1*N2 ), N2 )
CALL ZPOTRF( 'L', N2, A( N1*N2 ), N2, INFO )
IF( INFO.GT.0 )
$ INFO = INFO + N1
*
END IF
*
END IF
*
ELSE
*
* N is even
*
IF( NORMALTRANSR ) THEN
*
* N is even and TRANSR = 'N'
*
IF( LOWER ) THEN
*
* SRPA for LOWER, NORMAL, and N is even ( a(0:n,0:k-1) )
* T1 -> a(1,0), T2 -> a(0,0), S -> a(k+1,0)
* T1 -> a(1), T2 -> a(0), S -> a(k+1)
*
CALL ZPOTRF( 'L', K, A( 1 ), N+1, INFO )
IF( INFO.GT.0 )
$ RETURN
CALL ZTRSM( 'R', 'L', 'C', 'N', K, K, CONE, A( 1 ),
$ N+1,
$ A( K+1 ), N+1 )
CALL ZHERK( 'U', 'N', K, K, -ONE, A( K+1 ), N+1, ONE,
$ A( 0 ), N+1 )
CALL ZPOTRF( 'U', K, A( 0 ), N+1, INFO )
IF( INFO.GT.0 )
$ INFO = INFO + K
*
ELSE
*
* SRPA for UPPER, NORMAL, and N is even ( a(0:n,0:k-1) )
* T1 -> a(k+1,0) , T2 -> a(k,0), S -> a(0,0)
* T1 -> a(k+1), T2 -> a(k), S -> a(0)
*
CALL ZPOTRF( 'L', K, A( K+1 ), N+1, INFO )
IF( INFO.GT.0 )
$ RETURN
CALL ZTRSM( 'L', 'L', 'N', 'N', K, K, CONE, A( K+1 ),
$ N+1, A( 0 ), N+1 )
CALL ZHERK( 'U', 'C', K, K, -ONE, A( 0 ), N+1, ONE,
$ A( K ), N+1 )
CALL ZPOTRF( 'U', K, A( K ), N+1, INFO )
IF( INFO.GT.0 )
$ INFO = INFO + K
*
END IF
*
ELSE
*
* N is even and TRANSR = 'C'
*
IF( LOWER ) THEN
*
* SRPA for LOWER, TRANSPOSE and N is even (see paper)
* T1 -> B(0,1), T2 -> B(0,0), S -> B(0,k+1)
* T1 -> a(0+k), T2 -> a(0+0), S -> a(0+k*(k+1)); lda=k
*
CALL ZPOTRF( 'U', K, A( 0+K ), K, INFO )
IF( INFO.GT.0 )
$ RETURN
CALL ZTRSM( 'L', 'U', 'C', 'N', K, K, CONE, A( K ),
$ N1,
$ A( K*( K+1 ) ), K )
CALL ZHERK( 'L', 'C', K, K, -ONE, A( K*( K+1 ) ), K,
$ ONE,
$ A( 0 ), K )
CALL ZPOTRF( 'L', K, A( 0 ), K, INFO )
IF( INFO.GT.0 )
$ INFO = INFO + K
*
ELSE
*
* SRPA for UPPER, TRANSPOSE and N is even (see paper)
* T1 -> B(0,k+1), T2 -> B(0,k), S -> B(0,0)
* T1 -> a(0+k*(k+1)), T2 -> a(0+k*k), S -> a(0+0)); lda=k
*
CALL ZPOTRF( 'U', K, A( K*( K+1 ) ), K, INFO )
IF( INFO.GT.0 )
$ RETURN
CALL ZTRSM( 'R', 'U', 'N', 'N', K, K, CONE,
$ A( K*( K+1 ) ), K, A( 0 ), K )
CALL ZHERK( 'L', 'N', K, K, -ONE, A( 0 ), K, ONE,
$ A( K*K ), K )
CALL ZPOTRF( 'L', K, A( K*K ), K, INFO )
IF( INFO.GT.0 )
$ INFO = INFO + K
*
END IF
*
END IF
*
END IF
*
RETURN
*
* End of ZPFTRF
*
END
```
|
```c++
/**
* KFR (path_to_url
* See LICENSE.txt for details
*/
#include <kfr/simd/vec.hpp>
#include <kfr/io/tostring.hpp>
namespace kfr
{
static_assert(std::is_same_v<i32x4, std::common_type_t<i32x4, i32x4>>);
static_assert(std::is_same_v<i32x4, std::common_type_t<i32x4>>);
static_assert(std::is_same_v<u32x4, std::common_type_t<i32x4, u32x4>>);
static_assert(std::is_same_v<f64x4, std::common_type_t<i32x4, u32x4, f64x4>>);
inline namespace CMT_ARCH_NAME
{
TEST(mask_op)
{
mask<float, 4> m = make_mask<float>(true, false, true, false);
CHECK(m == make_mask<float>(true, false, true, false));
m ^= vec<float, 4>(1, 2, 3, 4) < 3;
CHECK(m == make_mask<float>(false, true, true, false));
m |= vec<float, 4>(1, 2, 3, 4) < 3;
CHECK(m == make_mask<float>(true, true, true, false));
m &= vec<float, 4>(1, 2, 3, 4) < 3;
CHECK(m == make_mask<float>(true, true, false, false));
m = ~m;
CHECK(m == make_mask<float>(false, false, true, true));
}
TEST(cones)
{
CHECK(vec<int, 2>(cones) == vec<int, 2>(-1, -1));
CHECK(vec<float, 2>(cones) == vec<f32, 2>(bitcast<f32>(-1), bitcast<f32>(-1)));
}
TEST(vec_broadcast)
{
CHECK(static_cast<f32x4>(4.f) == f32x4{ 4.f, 4.f, 4.f, 4.f });
CHECK(static_cast<f64x8>(4.f) == f64x8{ 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0 });
CHECK(static_cast<u8x3>(4.f) == u8x3{ 4, 4, 4 });
}
template <typename Tout, typename Tin>
bool is_in_range_of(Tin x)
{
return (is_f_class<Tin> && is_f_class<Tout>) || static_cast<Tin>(static_cast<Tout>(x)) == x;
}
TEST(cast)
{
CHECK(static_cast<i32x4>(u16x4{ 1, 2, 3, 4 }) == i32x4{ 1, 2, 3, 4 });
CHECK(static_cast<vec<vec<double, 4>, 2>>(vec<vec<float, 4>, 2>{
vec<float, 4>{ 1.f, 2.f, 3.f, 4.f }, vec<float, 4>{ 11.f, 22.f, 33.f, 44.f } }) ==
vec<vec<double, 4>, 2>{ vec<double, 4>{ 1., 2., 3., 4. }, vec<double, 4>{ 11., 22., 33., 44. } });
static_assert(std::is_convertible_v<float, f32x4>, "");
static_assert(std::is_convertible_v<float, f64x8>, "");
static_assert(std::is_convertible_v<float, u8x3>, "");
static_assert(std::is_convertible_v<u16x4, i32x4>, "");
static_assert(!std::is_convertible_v<u16x4, i32x3>, "");
static_assert(!std::is_convertible_v<u16x1, u16x16>, "");
static_assert(std::is_convertible_v<float, vecx<float, 2>>, "");
static_assert(std::is_convertible_v<float, vecx<float, 2, 2>>, "");
static_assert(std::is_same_v<decltype(broadcastto<f64>(f32x4x4(1))), f64x4x4>, "");
static_assert(std::is_same_v<decltype(broadcastto<f64>(f32x4(1))), f64x4>, "");
static_assert(std::is_same_v<decltype(broadcastto<f64>(f32(1))), f64>, "");
// N/A static_assert(std::is_same_v<decltype(broadcastto<f64x4>(f32x4x4(1))), f64x4x4>, "");
static_assert(std::is_same_v<decltype(broadcastto<f64x4>(f32x4(1))), f64x4x4>, "");
static_assert(std::is_same_v<decltype(broadcastto<f64x4>(f32(1))), f64x4>, "");
// N/A static_assert(std::is_same_v<decltype(promoteto<f64>(f32x4x4(1))), f64x4>, "");
static_assert(std::is_same_v<decltype(promoteto<f64>(f32x4(1))), f64x4>, "");
static_assert(std::is_same_v<decltype(promoteto<f64x4>(f32x4x4(1))), f64x4x4>, "");
static_assert(std::is_same_v<decltype(promoteto<f64x4>(f32x4(1))), f64x4x4>, "");
CHECK(cast<vecx<float, 2, 2>>(123.f) == vec{ vec{ 123.f, 123.f }, vec{ 123.f, 123.f } });
CHECK(promoteto<vecx<float, 2>>(vecx<float, 4>{ 1.f, 2.f, 3.f, 4.f }) ==
vec{ vec{ 1.f, 1.f }, vec{ 2.f, 2.f }, vec{ 3.f, 3.f }, vec{ 4.f, 4.f } });
testo::scope s("");
s.text = ("target_type = u8");
test_function1(
test_catogories::all, [](auto x) { return kfr::broadcastto<u8>(x); },
[](auto x) -> u8 { return static_cast<u8>(x); },
[](auto t, special_value x)
{ return is_in_range_of<u8>(x.get<subtype<typename decltype(t)::type>>()); });
s.text = ("target_type = i8");
test_function1(
test_catogories::all, [](auto x) { return kfr::broadcastto<i8>(x); },
[](auto x) -> i8 { return static_cast<i8>(x); },
[](auto t, special_value x)
{ return is_in_range_of<i8>(x.get<subtype<typename decltype(t)::type>>()); });
s.text = ("target_type = u16");
test_function1(
test_catogories::all, [](auto x) { return kfr::broadcastto<u16>(x); },
[](auto x) -> u16 { return static_cast<u16>(x); },
[](auto t, special_value x)
{ return is_in_range_of<u16>(x.get<subtype<typename decltype(t)::type>>()); });
s.text = ("target_type = i16");
test_function1(
test_catogories::all, [](auto x) { return kfr::broadcastto<i16>(x); },
[](auto x) -> i16 { return static_cast<i16>(x); },
[](auto t, special_value x)
{ return is_in_range_of<i16>(x.get<subtype<typename decltype(t)::type>>()); });
s.text = ("target_type = u32");
test_function1(
test_catogories::all, [](auto x) { return kfr::broadcastto<u32>(x); },
[](auto x) -> u32 { return static_cast<u32>(x); },
[](auto t, special_value x)
{ return is_in_range_of<u32>(x.get<subtype<typename decltype(t)::type>>()); });
s.text = ("target_type = i32");
test_function1(
test_catogories::all, [](auto x) { return kfr::broadcastto<i32>(x); },
[](auto x) -> i32 { return static_cast<i32>(x); },
[](auto t, special_value x)
{ return is_in_range_of<i32>(x.get<subtype<typename decltype(t)::type>>()); });
s.text = ("target_type = u64");
test_function1(
test_catogories::all, [](auto x) { return kfr::broadcastto<u64>(x); },
[](auto x) -> u64 { return static_cast<u64>(x); },
[](auto t, special_value x)
{ return is_in_range_of<u64>(x.get<subtype<typename decltype(t)::type>>()); });
s.text = ("target_type = i64");
test_function1(
test_catogories::all, [](auto x) { return kfr::broadcastto<i64>(x); },
[](auto x) -> i64 { return static_cast<i64>(x); },
[](auto t, special_value x)
{ return is_in_range_of<i64>(x.get<subtype<typename decltype(t)::type>>()); });
s.text = ("target_type = f32");
test_function1(
test_catogories::all, [](auto x) { return kfr::broadcastto<f32>(x); },
[](auto x) -> f32 { return static_cast<f32>(x); },
[](auto t, special_value x)
{ return is_in_range_of<f32>(x.get<subtype<typename decltype(t)::type>>()); });
s.text = ("target_type = f64");
test_function1(
test_catogories::all, [](auto x) { return kfr::broadcastto<f64>(x); },
[](auto x) -> f64 { return static_cast<f64>(x); },
[](auto t, special_value x)
{ return is_in_range_of<f64>(x.get<subtype<typename decltype(t)::type>>()); });
}
TEST(unaligned_read)
{
testo::matrix(named("type") = numeric_vector_types<vec>,
[](auto type)
{
using T = typename decltype(type)::type;
#if defined(_MSC_VER) && !defined(__clang__)
// workaround for MSVC
using Tsub = typename T::value_type;
#else
using Tsub = subtype<T>;
#endif
constexpr static size_t N = T::size();
Tsub data[N * 2];
for (size_t i = 0; i < arraysize(data); i++)
{
data[i] = static_cast<Tsub>(i);
}
for (size_t i = 0; i < N; i++)
{
testo::scope sc(as_string("i = ", i));
CHECK(read<N, false>(data + i) == (enumerate<Tsub, N>() + static_cast<Tsub>(i)));
}
});
}
TEST(mask_broadcast)
{
CHECK(mask<i32, 4>(mask<f32, 4>(true, false, true, false)).asvec() == vec<i32, 4>(-1, 0, -1, 0));
CHECK(mask<i32, 4>(mask<f32, 4>(true)).asvec() == vec<i32, 4>(-1, -1, -1, -1));
CHECK(mask<i32, 4>(mask<i32, 4>(true)).asvec() == vec<i32, 4>(-1, -1, -1, -1));
CHECK(mask<i32, 4>(mask<u32, 4>(true)).asvec() == vec<i32, 4>(-1, -1, -1, -1));
}
TEST(masks)
{
mask<float, 4> m = make_mask<float>(false, true, false, true);
vec<float, 4> v = m.asvec();
CHECK(bit<float>(m[0]) == false);
CHECK(bit<float>(m[1]) == true);
CHECK(bit<float>(m[2]) == false);
CHECK(bit<float>(m[3]) == true);
CHECK(float(v[0]) == maskbits<float>(false));
CHECK(float(v[1]) == maskbits<float>(true));
CHECK(float(v[2]) == maskbits<float>(false));
CHECK(float(v[3]) == maskbits<float>(true));
CHECK(bitcast_anything<std::array<int32_t, 1>>(mask<i32, 1>{ true }) == std::array<int32_t, 1>{ -1 });
CHECK(bitcast_anything<std::array<int32_t, 2>>(mask<i32, 2>{ true, true }) ==
std::array<int32_t, 2>{ -1, -1 });
CHECK(bitcast_anything<std::array<int32_t, 4>>(mask<i32, 4>{ true, true, true, true }) ==
std::array<int32_t, 4>{ -1, -1, -1, -1 });
CHECK(bitcast_anything<u8x16>(mask<f32, 4>{ true, true, true, true }) ==
u8x16{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 });
CHECK(bitcast_anything<u8x16>(bitcast<bit<u8>>(mask<i32, 4>{ true, true, true, true })) ==
u8x16{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 });
CHECK(bitcast_anything<u8x16>(bitcast<bit<u8>>(mask<f32, 4>{ true, true, true, true })) ==
u8x16{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 });
}
TEST(vec_deduction)
{
vec v{ 1, 2, 3 };
static_assert(std::is_same_v<decltype(v), vec<int, 3>>);
}
TEST(vec2d_element)
{
auto v = vec{ vec{ 1, 2 }, vec{ 3, 4 } };
CHECK(v[0][0] == 1);
CHECK(v[0][1] == 2);
CHECK(v[1][0] == 3);
CHECK(v[1][1] == 4);
}
} // namespace CMT_ARCH_NAME
} // namespace kfr
```
|
```shell
#!/bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# file, You can obtain one at path_to_url
FAIL=0
export VSOMEIP_CONFIGURATION=debounce_frequency_test_client.json
../../examples/routingmanagerd/routingmanagerd &
PID_VSOMEIPD=$!
sleep 1
./debounce_frequency_test_client &
PID_MASTER=$!
sleep 1
if [ ! -z "$USE_LXC_TEST" ]; then
echo "starting debounce test on slave LXC debounce_frequency_test_slave_starter.sh"
ssh -tt -i $SANDBOX_ROOT_DIR/commonapi_main/lxc-config/.ssh/mgc_lxc/rsa_key_file.pub -o StrictHostKeyChecking=no root@$LXC_TEST_SLAVE_IP "bash -ci \"set -m; cd \\\$SANDBOX_TARGET_DIR/vsomeip_lib/test/network_tests; ./debounce_frequency_test_slave_starter.sh\"" &
elif [ ! -z "$USE_DOCKER" ]; then
docker exec $DOCKER_IMAGE sh -c "cd $DOCKER_TESTS; sleep 10; ./debounce_frequency_test_slave_starter.sh" &
else
cat <<End-of-message
*******************************************************************************
*******************************************************************************
** Please now run:
** debounce_frequency_test_slave_starter.sh
** from an external host to successfully complete this test.
**
** You probably will need to adapt the 'unicast' settings in
** debounce_frequency_test_slave.json to your personal setup.
*******************************************************************************
*******************************************************************************
End-of-message
fi
# Wait until all slaves are finished
for job in $PID_MASTER
do
# Fail gets incremented if a client exits with a non-zero exit code
echo "waiting for $job"
wait $job || FAIL=$(($FAIL+1))
done
kill $PID_VSOMEIPD
sleep 3
# Check if everything went well
exit $FAIL
```
|
```objective-c
// <iterator> -*- C++ -*-
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// invalidate any other reasons why the executable file might be covered by
/*
*
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file iterator
* This is a Standard C++ Library header. You should @c #include this header
* in your programs, rather than any of the "st[dl]_*.h" implementation files.
*/
#ifndef _CPP_ITERATOR
#define _CPP_ITERATOR 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <cstddef>
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_iterator_base_funcs.h>
#include <bits/stl_iterator.h>
#include <ostream>
#include <istream>
#include <bits/stream_iterator.h>
#include <bits/streambuf_iterator.h>
#endif /* _CPP_ITERATOR */
// Local Variables:
// mode:C++
// End:
```
|
```objective-c
// 2016 and later: Unicode, Inc. and others.
/* your_sha256_hash-- */
/* Decimal Context module header */
/* your_sha256_hash-- */
/* */
/* This software is made available under the terms of the */
/* */
/* The description and User's Guide ("The decNumber C Library") for */
/* this software is called decNumber.pdf. This document is */
/* available, together with arithmetic and format specifications, */
/* testcases, and Web links, on the General Decimal Arithmetic page. */
/* */
/* Please send comments, suggestions, and corrections to the author: */
/* mfc@uk.ibm.com */
/* Mike Cowlishaw, IBM Fellow */
/* IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK */
/* your_sha256_hash-- */
/* Modified version, for use from within ICU.
* Renamed public functions, to avoid an unwanted export of the
* standard names from the ICU library.
*
* Use ICU's uprv_malloc() and uprv_free()
*
* Revert comment syntax to plain C
*
* Remove a few compiler warnings.
*/
#include "unicode/utypes.h"
#include "putilimp.h"
/* */
/* Context variables must always have valid values: */
/* */
/* status -- [any bits may be cleared, but not set, by user] */
/* round -- must be one of the enumerated rounding modes */
/* */
/* The following variables are implied for fixed size formats (i.e., */
/* they are ignored) but should still be set correctly in case used */
/* with decNumber functions: */
/* */
/* clamp -- must be either 0 or 1 */
/* digits -- must be in the range 1 through 999999999 */
/* emax -- must be in the range 0 through 999999999 */
/* emin -- must be in the range 0 through -999999999 */
/* extended -- must be either 0 or 1 [present only if DECSUBSET] */
/* traps -- only defined bits may be set */
/* */
/* your_sha256_hash-- */
#if !defined(DECCONTEXT)
#define DECCONTEXT
#define DECCNAME "decContext" /* Short name */
#define DECCFULLNAME "Decimal Context Descriptor" /* Verbose name */
#define DECCAUTHOR "Mike Cowlishaw" /* Who to blame */
#if !defined(int32_t)
/* #include <stdint.h> */ /* C99 standard integers */
#endif
#include <stdio.h> /* for printf, etc. */
#include <signal.h> /* for traps */
/* Extended flags setting -- set this to 0 to use only IEEE flags */
#if !defined(DECEXTFLAG)
#define DECEXTFLAG 1 /* 1=enable extended flags */
#endif
/* Conditional code flag -- set this to 0 for best performance */
#if !defined(DECSUBSET)
#define DECSUBSET 0 /* 1=enable subset arithmetic */
#endif
/* Context for operations, with associated constants */
enum rounding {
DEC_ROUND_CEILING, /* round towards +infinity */
DEC_ROUND_UP, /* round away from 0 */
DEC_ROUND_HALF_UP, /* 0.5 rounds up */
DEC_ROUND_HALF_EVEN, /* 0.5 rounds to nearest even */
DEC_ROUND_HALF_DOWN, /* 0.5 rounds down */
DEC_ROUND_DOWN, /* round towards 0 (truncate) */
DEC_ROUND_FLOOR, /* round towards -infinity */
DEC_ROUND_05UP, /* round for reround */
DEC_ROUND_MAX /* enum must be less than this */
};
#define DEC_ROUND_DEFAULT DEC_ROUND_HALF_EVEN;
typedef struct {
int32_t digits; /* working precision */
int32_t emax; /* maximum positive exponent */
int32_t emin; /* minimum negative exponent */
enum rounding round; /* rounding mode */
uint32_t traps; /* trap-enabler flags */
uint32_t status; /* status flags */
uint8_t clamp; /* flag: apply IEEE exponent clamp */
#if DECSUBSET
uint8_t extended; /* flag: special-values allowed */
#endif
} decContext;
/* Maxima and Minima for context settings */
#define DEC_MAX_DIGITS 999999999
#define DEC_MIN_DIGITS 1
#define DEC_MAX_EMAX 999999999
#define DEC_MIN_EMAX 0
#define DEC_MAX_EMIN 0
#define DEC_MIN_EMIN -999999999
#define DEC_MAX_MATH 999999 /* max emax, etc., for math funcs. */
/* Classifications for decimal numbers, aligned with 754 (note that */
/* 'normal' and 'subnormal' are meaningful only with a decContext */
/* or a fixed size format). */
enum decClass {
DEC_CLASS_SNAN,
DEC_CLASS_QNAN,
DEC_CLASS_NEG_INF,
DEC_CLASS_NEG_NORMAL,
DEC_CLASS_NEG_SUBNORMAL,
DEC_CLASS_NEG_ZERO,
DEC_CLASS_POS_ZERO,
DEC_CLASS_POS_SUBNORMAL,
DEC_CLASS_POS_NORMAL,
DEC_CLASS_POS_INF
};
/* Strings for the decClasses */
#define DEC_ClassString_SN "sNaN"
#define DEC_ClassString_QN "NaN"
#define DEC_ClassString_NI "-Infinity"
#define DEC_ClassString_NN "-Normal"
#define DEC_ClassString_NS "-Subnormal"
#define DEC_ClassString_NZ "-Zero"
#define DEC_ClassString_PZ "+Zero"
#define DEC_ClassString_PS "+Subnormal"
#define DEC_ClassString_PN "+Normal"
#define DEC_ClassString_PI "+Infinity"
#define DEC_ClassString_UN "Invalid"
/* Trap-enabler and Status flags (exceptional conditions), and */
/* their names. The top byte is reserved for internal use */
#if DECEXTFLAG
/* Extended flags */
#define DEC_Conversion_syntax 0x00000001
#define DEC_Division_by_zero 0x00000002
#define DEC_Division_impossible 0x00000004
#define DEC_Division_undefined 0x00000008
#define DEC_Insufficient_storage 0x00000010 /* [when malloc fails] */
#define DEC_Inexact 0x00000020
#define DEC_Invalid_context 0x00000040
#define DEC_Invalid_operation 0x00000080
#if DECSUBSET
#define DEC_Lost_digits 0x00000100
#endif
#define DEC_Overflow 0x00000200
#define DEC_Clamped 0x00000400
#define DEC_Rounded 0x00000800
#define DEC_Subnormal 0x00001000
#define DEC_Underflow 0x00002000
#else
/* IEEE flags only */
#define DEC_Conversion_syntax 0x00000010
#define DEC_Division_by_zero 0x00000002
#define DEC_Division_impossible 0x00000010
#define DEC_Division_undefined 0x00000010
#define DEC_Insufficient_storage 0x00000010 /* [when malloc fails] */
#define DEC_Inexact 0x00000001
#define DEC_Invalid_context 0x00000010
#define DEC_Invalid_operation 0x00000010
#if DECSUBSET
#define DEC_Lost_digits 0x00000000
#endif
#define DEC_Overflow 0x00000008
#define DEC_Clamped 0x00000000
#define DEC_Rounded 0x00000000
#define DEC_Subnormal 0x00000000
#define DEC_Underflow 0x00000004
#endif
/* IEEE 754 groupings for the flags */
/* [DEC_Clamped, DEC_Lost_digits, DEC_Rounded, and DEC_Subnormal */
/* are not in IEEE 754] */
#define DEC_IEEE_754_Division_by_zero (DEC_Division_by_zero)
#if DECSUBSET
#define DEC_IEEE_754_Inexact (DEC_Inexact | DEC_Lost_digits)
#else
#define DEC_IEEE_754_Inexact (DEC_Inexact)
#endif
#define DEC_IEEE_754_Invalid_operation (DEC_Conversion_syntax | \
DEC_Division_impossible | \
DEC_Division_undefined | \
DEC_Insufficient_storage | \
DEC_Invalid_context | \
DEC_Invalid_operation)
#define DEC_IEEE_754_Overflow (DEC_Overflow)
#define DEC_IEEE_754_Underflow (DEC_Underflow)
/* flags which are normally errors (result is qNaN, infinite, or 0) */
#define DEC_Errors (DEC_IEEE_754_Division_by_zero | \
DEC_IEEE_754_Invalid_operation | \
DEC_IEEE_754_Overflow | DEC_IEEE_754_Underflow)
/* flags which cause a result to become qNaN */
#define DEC_NaNs DEC_IEEE_754_Invalid_operation
/* flags which are normally for information only (finite results) */
#if DECSUBSET
#define DEC_Information (DEC_Clamped | DEC_Rounded | DEC_Inexact \
| DEC_Lost_digits)
#else
#define DEC_Information (DEC_Clamped | DEC_Rounded | DEC_Inexact)
#endif
/* IEEE 854 names (for compatibility with older decNumber versions) */
#define DEC_IEEE_854_Division_by_zero DEC_IEEE_754_Division_by_zero
#define DEC_IEEE_854_Inexact DEC_IEEE_754_Inexact
#define DEC_IEEE_854_Invalid_operation DEC_IEEE_754_Invalid_operation
#define DEC_IEEE_854_Overflow DEC_IEEE_754_Overflow
#define DEC_IEEE_854_Underflow DEC_IEEE_754_Underflow
/* Name strings for the exceptional conditions */
#define DEC_Condition_CS "Conversion syntax"
#define DEC_Condition_DZ "Division by zero"
#define DEC_Condition_DI "Division impossible"
#define DEC_Condition_DU "Division undefined"
#define DEC_Condition_IE "Inexact"
#define DEC_Condition_IS "Insufficient storage"
#define DEC_Condition_IC "Invalid context"
#define DEC_Condition_IO "Invalid operation"
#if DECSUBSET
#define DEC_Condition_LD "Lost digits"
#endif
#define DEC_Condition_OV "Overflow"
#define DEC_Condition_PA "Clamped"
#define DEC_Condition_RO "Rounded"
#define DEC_Condition_SU "Subnormal"
#define DEC_Condition_UN "Underflow"
#define DEC_Condition_ZE "No status"
#define DEC_Condition_MU "Multiple status"
#define DEC_Condition_Length 21 /* length of the longest string, */
/* including terminator */
/* Initialization descriptors, used by decContextDefault */
#define DEC_INIT_BASE 0
#define DEC_INIT_DECIMAL32 32
#define DEC_INIT_DECIMAL64 64
#define DEC_INIT_DECIMAL128 128
/* Synonyms */
#define DEC_INIT_DECSINGLE DEC_INIT_DECIMAL32
#define DEC_INIT_DECDOUBLE DEC_INIT_DECIMAL64
#define DEC_INIT_DECQUAD DEC_INIT_DECIMAL128
/* decContext routines */
U_CAPI decContext * U_EXPORT2 uprv_decContextClearStatus(decContext *, uint32_t);
U_CAPI decContext * U_EXPORT2 uprv_decContextDefault(decContext *, int32_t);
U_CAPI enum rounding U_EXPORT2 uprv_decContextGetRounding(decContext *);
U_CAPI uint32_t U_EXPORT2 uprv_decContextGetStatus(decContext *);
U_CAPI decContext * U_EXPORT2 uprv_decContextRestoreStatus(decContext *, uint32_t, uint32_t);
U_CAPI uint32_t U_EXPORT2 uprv_decContextSaveStatus(decContext *, uint32_t);
U_CAPI decContext * U_EXPORT2 uprv_decContextSetRounding(decContext *, enum rounding);
U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatus(decContext *, uint32_t);
U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusFromString(decContext *, const char *);
U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusFromStringQuiet(decContext *, const char *);
U_CAPI decContext * U_EXPORT2 uprv_decContextSetStatusQuiet(decContext *, uint32_t);
U_CAPI const char * U_EXPORT2 uprv_decContextStatusToString(const decContext *);
U_CAPI uint32_t U_EXPORT2 uprv_decContextTestSavedStatus(uint32_t, uint32_t);
U_CAPI uint32_t U_EXPORT2 uprv_decContextTestStatus(decContext *, uint32_t);
U_CAPI decContext * U_EXPORT2 uprv_decContextZeroStatus(decContext *);
#endif
```
|
Odaipatty is a village located near Oddanchatram in Dindigul district, State of Tamil Nadu, India. The major job of this village is cultivation/farming; mostly vegetables which are Tomato, Drumstick, Brinjal, Ladies finger, Red Chilly and Green Chilly. Vegetables will be sold to the Oddanchatram Vegetable market which is famous in Tamil Nadu and major exporter of vegetables to the State of Kerala.
Villages in Dindigul district
|
Therriault is a surname. Notable people with the surname include:
Daniel Therriault (born 1953), American playwright, screenwriter and actor
Devin Therriault (born 1988/89), American musician
Gene Therriault (born 1960), American politician
Michael Therriault, Canadian actor
|
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OpenTK" Version="3.1.0" NoWarn="NU1701" />
<PackageReference Include="OpenTK.GLControl" Version="3.1.0" NoWarn="NU1701" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\binding\SkiaSharp\SkiaSharp.csproj" />
<ProjectReference Include="..\..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.Desktop.Common\SkiaSharp.Views.Desktop.Common.csproj" />
<ProjectReference Include="..\..\..\..\source\SkiaSharp.Views\SkiaSharp.Views.WindowsForms\SkiaSharp.Views.WindowsForms.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="$(ApplicationIcon)" />
</ItemGroup>
<Import Project="..\..\..\..\binding\IncludeNativeAssets.SkiaSharp.targets" />
</Project>
```
|
The Party is the second studio album by Italian singer Alexia released in 1998. The album saw Alexia begin to branch away from the eurodance sound of Fan Club towards Europop, causing disappointment amongst some of Alexia's fans. The album contained the Almighty Edit of "Uh La La La" as a bonus track for territories which had seen the release of Fan Club, and the lead track for the UK and Australia where the song had been released in its remixed version.
"The Party" refers to the album's opening track "Keep On Movin'" in which Alexia is credited for hosting a good party. The album sold 500,000 copies worldwide.
Release
The album was released on CD through Sony Dancepool, firstly in Italy then throughout Europe (Sony Code 491339). The German edition featured the original version of "Uh La La La" as the lead track rather than containing the remixed version. An alternate European release (Sony Code 491542) saw "Dame Amor" (the Spanish version of "Gimme Love") replaced in favour of the Club Short Edit of "Gimme Love". The UK release followed in June 1998 featuring slightly different artwork followed in July by the Australian release.
In 1999, the Japanese version was released on the Sony Epic label with both "The Party" and "Uh La La La" on the cover. The artwork is nearly identical to the American single release of "Uh La La La".
The majority of the tracks were written by Alexia and Robyx, though four of the tracks were written by others such as Andrea Fascetti ("If You Say Goodbye"), Fascetti and Federico Zanetti ("Feelings"), Alexia, Andrea de Antoni and Francesco Alberti ("Everything") and Alexia, de Antoni, Alberti and Sandra Chambers ("Bad Boy").
Track listing
"Keep On Movin'" - 3:38
"Gimme Love" - 2:55
"Bad Boy" - 3:28
"The Music I Like" - 3:23
"Crazy For You" - 3:57
"Claro de luna" - 3:55
"Everything" - 3:34
"Feelings" - 4:25
"Everyday" - 3:46
"I Love My Boy" - 3:15
"Don't Love Me Baby" - 2:45
"If You Say Goodbye" - 3:34
"Dame amor" - 2:55
"Uh La La La" (Almighty Edit) - 3:40
The UK release substituted the original versions of "Gimme Love" and "The Music I Like" for their UK counterpart remixes by Pump Friction Vs. Precious Paul ("Gimme Love") and Metro ("The Music I Like") with them leading the album after the Almighty Edit of "Uh La La La". The Pump Friction Vs. Precious Paul Edit of "Gimme Love" was a minute longer than the Edit used for UK radio. The Australian release followed the same track listing with the Club Mix of "Number One" being added as a bonus track.
The Japanese version followed the same track listing as the UK version (though the Pump Friction Vs. Precious Paul Edit was just labelled as "Gimme Love") with five additional alternate versions in the following order;
"The Music I Like" (Radio Edit) - 3:24
"The Music I Like" (Radiopm Project In Ibiza) - 4:04
"Uh La La La" (U.S. Radio Edit) - 3:44
"Uh La La La" (Fargetta's Mix) - 5:25
"Uh La La La" (Almighty's Mighty Mix) - 6:25
Chart performance
Certifications
References
External links
1998 albums
Alexia (Italian singer) albums
|
```xml
/**
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import type {FieldConfig} from './types';
export const OSSCommitMessageFieldSchema: Array<FieldConfig> = [
{key: 'Title', type: 'title', icon: 'milestone'},
{key: 'Description', type: 'textarea', icon: 'note'},
];
```
|
Souvenirs d’égotisme (French for Memoirs of an Egotist) is an autobiographical work by Stendhal. It was written in 13 days in June and July 1832 while the author was staying in Civitavecchia. Stendhal recounts his life in Paris and London from 1821 to 1830. It includes candid and spirited descriptions of contemporaries such as Lafayette, Madame Pasta, Destutt de Tracy, Mérimée, and Charles de Rémusat. The story remained unfinished and was not published until 1892 by Casimir Stryienski.
Composition and background
Stendhal began to write Memoirs of an Egotist on June 20, 1832, approximately one year after having taken a post as French Consul in Civitavecchia. He was forty-nine and undertook to describe his years in Paris between 1821 and 1830, but sometimes misremembered the dates of events and included incidents that happened earlier. In Paris, Stendhal was active in the literary world and wrote for London periodicals, which paid well. When his literary prospects dried up in 1826 and again in 1828, Stendhal began to look for a government post. His friends managed to secure for him a position first in Trieste and then, following a confrontation with Austrian police, in Civitavecchia. Stendhal put aside the manuscript for Memoirs of an Egotist for good on July 4, 1832. The approximately 40,000 words of Memoirs of an Egotist were therefore written in 13 days.
Summary
Memoirs of an Egotist describes Stendhal's life in Paris and London from 1821 to 1830, after having spent 1814 to 1821 in Italy. The nine-and-a-half years that Stendhal spent in Paris were the longest he had spent anywhere except for his time in Grenoble as a child. Stendhal left Italy in 1821 for a number of reasons, including distrust from both liberals (who thought he was a spy for the police) and the police (who thought he was a dangerous liberal). Métilde Dembowski, for whom Stendhal conceived a great passion while in Milan, either did not reciprocate his love or was unwilling to consummate it. In Memoirs of an Egotist Stendhal portrays the situation as one of perfectly requited love that is somehow kept from fruition; the critic Michael Wood puts it, "She loved him but wouldn't sleep with him. He left."
Stendhal lists his bad characteristics next to his admirable ones, and does not shrink from describing moments of humiliation or silliness, including an account of a visit to a brothel that occasioned a short-lived reputation for impotence among his friends. Memoirs of an Egotist describes likewise many missed opportunities for friendship or advantageous networking. Upon his arrival in Paris, he developed a friendship with a Baron de Lussinge, who was as frugal as Stendhal. But de Lussigne became rich and miserly, and patronised Stendhal's poverty. Stendhal changed his café so as not to have to see his former friend. During this time in Paris, Stendhal was becoming known as a writer of works on music and art, but he received savage reviews, which he cushioned by musing that "one or other of us must be wrong". He was known as a liberal and "as part of Napoleon's Court". When offered by the Chief of Police in 1814 the post of food controller of Paris, he refused. The man who accepted became rich in four or five years, Stendhal says, "without stealing".
Stendhal describes a handful of love affairs he declined even when the memory of his Métilde had become "a tender, profoundly sad ghost, who, by her apparitions, inclined me powerfully to ideas of tenderness, kindness, justice and indulgence." Michael Wood interprets the narrative as an account of Stendhal's recovery from his infatuation with Métilde. Stendhal says, "It was only by chance, and in 1824, three years later, that I had a mistress. Only then was the memory of Métilde less rending..."
He also describes a trip to England, with which he hoped to combat his low spirits, and to see the plays of Shakespeare. Elsewhere in Memoirs of an Egotist Stendhal asserts that the only loves in his life have been Cimarosa, Mozart, and Shakespeare. He saw Edmund Kean in Othello, and records his astonishment that in France and in England they used different gestures to express the same emotions; he also was impressed that Kean delivered his lines as if thinking of them for the first time.
References
Books published posthumously
Unfinished books
Literary autobiographies
Stendhal
|
```c++
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing,
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// specific language governing permissions and limitations
#include <gtest/gtest.h>
#include "arrow/array.h"
#include "arrow/array/builder_decimal.h"
#include "arrow/datum.h"
#include "arrow/record_batch.h"
#include "arrow/tensor.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/type.h"
#include "arrow/type_traits.h"
#include "arrow/util/checked_cast.h"
namespace arrow {
// Test basic cases for contains NaN.
class TestAssertContainsNaN : public ::testing::Test {};
TEST_F(TestAssertContainsNaN, BatchesEqual) {
auto schema = ::arrow::schema({
{field("a", float32())},
{field("b", float64())},
});
auto expected = RecordBatchFromJSON(schema,
R"([{"a": 3, "b": 5},
{"a": 1, "b": 3},
{"a": 3, "b": 4},
{"a": NaN, "b": 6},
{"a": 2, "b": 5},
{"a": 1, "b": NaN},
{"a": 1, "b": 3}
])");
auto actual = RecordBatchFromJSON(schema,
R"([{"a": 3, "b": 5},
{"a": 1, "b": 3},
{"a": 3, "b": 4},
{"a": NaN, "b": 6},
{"a": 2, "b": 5},
{"a": 1, "b": NaN},
{"a": 1, "b": 3}
])");
ASSERT_BATCHES_EQUAL(*expected, *actual);
AssertBatchesApproxEqual(*expected, *actual);
}
TEST_F(TestAssertContainsNaN, TableEqual) {
auto schema = ::arrow::schema({
{field("a", float32())},
{field("b", float64())},
});
auto expected = TableFromJSON(schema, {R"([{"a": null, "b": 5},
{"a": NaN, "b": 3},
{"a": 3, "b": null}
])",
R"([{"a": null, "b": null},
{"a": 2, "b": NaN},
{"a": 1, "b": 5},
{"a": 3, "b": 5}
])"});
auto actual = TableFromJSON(schema, {R"([{"a": null, "b": 5},
{"a": NaN, "b": 3},
{"a": 3, "b": null}
])",
R"([{"a": null, "b": null},
{"a": 2, "b": NaN},
{"a": 1, "b": 5},
{"a": 3, "b": 5}
])"});
ASSERT_TABLES_EQUAL(*expected, *actual);
}
TEST_F(TestAssertContainsNaN, ArrayEqual) {
auto expected = ArrayFromJSON(float64(), "[0, 1, 2, NaN]");
auto actual = ArrayFromJSON(float64(), "[0, 1, 2, NaN]");
AssertArraysEqual(*expected, *actual);
}
TEST_F(TestAssertContainsNaN, ChunkedEqual) {
auto expected = ChunkedArrayFromJSON(float64(), {
"[null, 1]",
"[3, NaN, 2]",
"[NaN]",
});
auto actual = ChunkedArrayFromJSON(float64(), {
"[null, 1]",
"[3, NaN, 2]",
"[NaN]",
});
AssertChunkedEqual(*expected, *actual);
}
TEST_F(TestAssertContainsNaN, DatumEqual) {
// scalar
auto expected_scalar = ScalarFromJSON(float64(), "NaN");
auto actual_scalar = ScalarFromJSON(float64(), "NaN");
AssertDatumsEqual(expected_scalar, actual_scalar);
// array
auto expected_array = ArrayFromJSON(float64(), "[3, NaN, 2, 1, 5]");
auto actual_array = ArrayFromJSON(float64(), "[3, NaN, 2, 1, 5]");
AssertDatumsEqual(expected_array, actual_array);
// chunked array
auto expected_chunked = ChunkedArrayFromJSON(float64(), {
"[null, 1]",
"[3, NaN, 2]",
"[NaN]",
});
auto actual_chunked = ChunkedArrayFromJSON(float64(), {
"[null, 1]",
"[3, NaN, 2]",
"[NaN]",
});
AssertDatumsEqual(expected_chunked, actual_chunked);
}
class TestTensorFromJSON : public ::testing::Test {};
TEST_F(TestTensorFromJSON, FromJSONAndArray) {
std::vector<int64_t> shape = {9, 2};
const int64_t i64_size = sizeof(int64_t);
std::vector<int64_t> f_strides = {i64_size, i64_size * shape[0]};
std::vector<int64_t> f_values = {1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 20, 30, 40, 50, 60, 70, 80, 90};
auto data = Buffer::Wrap(f_values);
std::shared_ptr<Tensor> tensor_expected;
ASSERT_OK_AND_ASSIGN(tensor_expected, Tensor::Make(int64(), data, shape, f_strides));
std::shared_ptr<Tensor> result = TensorFromJSON(
int64(), "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90]",
shape, f_strides);
EXPECT_TRUE(tensor_expected->Equals(*result));
}
TEST_F(TestTensorFromJSON, FromJSON) {
std::vector<int64_t> shape = {9, 2};
std::vector<int64_t> values = {1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 20, 30, 40, 50, 60, 70, 80, 90};
auto data = Buffer::Wrap(values);
std::shared_ptr<Tensor> tensor_expected;
ASSERT_OK_AND_ASSIGN(tensor_expected, Tensor::Make(int64(), data, shape));
std::shared_ptr<Tensor> result = TensorFromJSON(
int64(), "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90]",
"[9, 2]");
EXPECT_TRUE(tensor_expected->Equals(*result));
}
} // namespace arrow
```
|
Guranabad-e Qazzaq (, also Romanized as Gūrānābād-e Qazzāq) is a village in Solduz Rural District, in the Central District of Naqadeh County, West Azerbaijan Province, Iran. At the 2006 census, its population was 127, in 26 families.
References
Populated places in Naqadeh County
|
The University of Florida College of Health and Human Performance is an academic college of the University of Florida. The College of Health and Human Performance was founded in 1946 and is located on the university's Gainesville, Florida campus. The college has four departments and four research centers. The college is unique in that the majors that are offered are inter-disciplinary in nature. As of 2021, there were more than 2,900 undergraduate and graduate students enrolled in the college. In 2022 the College of Health and Human Performance generated $10 million in research expenditures.
Departments
Applied Physiology and Kinesiology
Health Education and Behavior
Sport Management
Tourism, Hospitality and Event Management
Deans of the College of Health and Human Performance
References
External links
Official website
Facts about the College
College overview
Breakdown of the Departments
Capital Campaign info for the College
Health and Human Performance
Universities and colleges established in 1946
1946 establishments in Florida
|
Hospital Nacional Psiquiátrico is a psychiatric hospital in San José, Costa Rica.
References
Hospitals in San José, Costa Rica
Psychiatric hospitals in Costa Rica
|
```smalltalk
using System.Collections.Generic;
using ClosedXML.Excel;
using ClosedXML.Extensions;
using ClosedXML.Parser;
using NUnit.Framework;
using static ClosedXML.Parser.ReferenceAxisType;
using static ClosedXML.Parser.ReferenceStyle;
namespace ClosedXML.Tests.Extensions
{
[TestFixture]
internal class ReferenceAreaExtensionsTests
{
[Test]
[TestCaseSource(nameof(A1TestCases))]
public void ToSheetPoint_converts_a1_reference_to_sheet_range(ReferenceArea tokenArea, XLSheetRange expectedRange)
{
Assert.AreEqual(expectedRange, tokenArea.ToSheetRange(default));
}
[Test]
[TestCaseSource(nameof(R1C1TestCases))]
public void ToSheetPoint_converts_r1c1_reference_to_sheet_range(XLSheetPoint anchor, ReferenceArea tokenArea, XLSheetRange expectedRange)
{
Assert.AreEqual(expectedRange, tokenArea.ToSheetRange(anchor));
}
public static IEnumerable<object[]> A1TestCases()
{
// C5
yield return new object[]
{
new ReferenceArea(Relative, 5, Relative, 3, A1),
new XLSheetRange(5, 3, 5, 3)
};
// C5:E14
yield return new object[]
{
new ReferenceArea(new RowCol(Relative, 5, Relative, 3, A1), new RowCol(Relative, 14, Relative, 5, A1)),
new XLSheetRange(5, 3, 14, 5)
};
// $B3:E$10
yield return new object[]
{
new ReferenceArea(new RowCol(Relative, 3, Absolute, 2, A1), new RowCol(Absolute, 10, Relative, 5, A1)),
new XLSheetRange(3, 2, 10, 5)
};
// $B$3:$E$10
yield return new object[]
{
new ReferenceArea(new RowCol(Absolute, 3, Absolute, 2, A1), new RowCol(Absolute, 10, Absolute, 5, A1)),
new XLSheetRange(3, 2, 10, 5)
};
// B10:E3 points are not in left top corner and bottom right corner
yield return new object[]
{
new ReferenceArea(new RowCol(Relative, 10, Relative, 2, A1), new RowCol(Absolute, 3, Absolute, 5, A1)),
new XLSheetRange(3, 2, 10, 5)
};
// C:E
yield return new object[]
{
new ReferenceArea(new RowCol(None, 0, Relative, 3, A1), new RowCol(None, 0, Relative, 5, A1)),
new XLSheetRange(XLHelper.MinRowNumber, 3, XLHelper.MaxRowNumber, 5)
};
// E:C
yield return new object[]
{
new ReferenceArea(new RowCol(None, 0, Relative, 5, A1), new RowCol(None, 0, Relative, 3, A1)),
new XLSheetRange(XLHelper.MinRowNumber, 3, XLHelper.MaxRowNumber, 5)
};
// 14:30
yield return new object[]
{
new ReferenceArea(new RowCol(Relative, 14, None, 0, A1), new RowCol(Relative, 30, None, 0, A1)),
new XLSheetRange(14, XLHelper.MinColumnNumber, 30, XLHelper.MaxColumnNumber)
};
// 30:14
yield return new object[]
{
new ReferenceArea(new RowCol(Relative, 30, None, 0, A1), new RowCol(Relative, 14, None, 0, A1)),
new XLSheetRange(14, XLHelper.MinColumnNumber, 30, XLHelper.MaxColumnNumber)
};
}
public static IEnumerable<object[]> R1C1TestCases()
{
// R2C4
yield return new object[]
{
new XLSheetPoint(1, 1),
new ReferenceArea(Absolute, 2, Absolute, 4, R1C1),
new XLSheetRange(2, 4, 2, 4)
};
// R[2]C[4]
yield return new object[]
{
new XLSheetPoint(3, 2), // R3C2
new ReferenceArea(Relative, 2, Relative, 4, R1C1), // R[2]C[4]
new XLSheetRange(5, 6, 5, 6)
};
// R[0]C[0] is the identical address
yield return new object[]
{
new XLSheetPoint(3, 2), // R3C2
new ReferenceArea(Relative, 0, Relative, 0, R1C1), // R[0]C[0]
new XLSheetRange(3, 2, 3, 2)
};
// No looping: Maximum allowed value for relative column is `XLHelper.MaxColumnNumber-1`.
yield return new object[]
{
new XLSheetPoint(1, 1), // R1C1
new ReferenceArea(Relative, 0, Relative, 16383, R1C1), // R[0]C[16383]
new XLSheetRange(1, XLHelper.MaxColumnNumber, 1, XLHelper.MaxColumnNumber)
};
// No looping: Minimum allowed value for relative column is `-XLHelper.MaxColumnNumber+1`.
yield return new object[]
{
new XLSheetPoint(1, XLHelper.MaxColumnNumber), // R1C16384
new ReferenceArea(Relative, 0, Relative, -16383, R1C1), // R[0]C[-16383]
new XLSheetRange(1, 1, 1, 1) // R1C1
};
// Looping: when relative column adjusted to anchor is above the max column, it loops back
yield return new object[]
{
new XLSheetPoint(1, 16380), // R1C16380
new ReferenceArea(Relative, 0, Relative, 16380, R1C1), // R[0]C[16380]
new XLSheetRange(1, 16376, 1, 16376) // RC16376
};
// Looping: when relative column adjusted to anchor is below the column 1, it loops back
yield return new object[]
{
new XLSheetPoint(1, 10), // R1C10
new ReferenceArea(Relative, 0, Relative, -16370, R1C1), // R[0]C[16370]
new XLSheetRange(1, 24, 1, 24) // R1C24
};
// Looping: when relative row adjusted to anchor is above the max row, it loops back
yield return new object[]
{
new XLSheetPoint(15, 1), // R15C1
new ReferenceArea(Relative, 1048570, Relative, 0, R1C1), // R[1048570]C[0]
new XLSheetRange(9, 1, 9, 1) // R9C1
};
// Looping: when relative row adjusted to anchor is below the row 1, it loops back
yield return new object[]
{
new XLSheetPoint(1048570, 1), // R1048570C1
new ReferenceArea(Relative, -1048573, Relative, 0, R1C1), // R[-1048573]C[0]
new XLSheetRange(1048573, 1, 1048573, 1) // R1048573C1
};
// Area absolute
yield return new object[]
{
new XLSheetPoint(754, 5742),
new ReferenceArea(new RowCol(Absolute, 3, Absolute, 2, R1C1), new RowCol(Absolute, 7, Absolute, 4, R1C1)),
XLSheetRange.Parse("B3:D7")
};
// Area relative
yield return new object[]
{
new XLSheetPoint(3, 6),
new ReferenceArea(new RowCol(Relative, 4, Relative, -1, R1C1), new RowCol(Relative, 6, Relative, 3, R1C1)), // R[4]C[-1]:R[6]C[3]
new XLSheetRange(7, 5, 9, 9)
};
// Are with corners not in top left and right bottom
yield return new object[]
{
new XLSheetPoint(3, 6),
new ReferenceArea(new RowCol(Relative, 6, Relative, -1, R1C1), new RowCol(Relative, 4, Relative, 3, R1C1)), // R[6]C[-1]:R[4]C[3]
new XLSheetRange(7, 5, 9, 9)
};
}
}
}
```
|
```smalltalk
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Security.Cryptography;
using System.IO;
using System.Text;
namespace QFramework
{
[Serializable]
public class MD5Manager : ISingleton
{
public static MD5Manager Instance => SingletonProperty<MD5Manager>.Instance;
private MD5Manager() {}
//Md5filePathmd5SavePathmd5
public void SaveMd5(string filePath, string md5SavePath)
{
string md5 = BuildFileMd5(filePath);
string name = filePath + "_md5.dat";
if (File.Exists(name))
{
File.Delete(name);
}
StreamWriter sw = new StreamWriter(name, false, Encoding.UTF8);
if (sw != null)
{
sw.Write(md5);
sw.Flush();
sw.Close();
}
}
//Md5filePath
public void SaveMd5(string filePath)
{
string md5 = BuildFileMd5(filePath);
string name = filePath + "_md5.dat";
if (File.Exists(name))
{
File.Delete(name);
}
StreamWriter sw = new StreamWriter(name, false, Encoding.UTF8);
if (sw != null)
{
sw.Write(md5);
sw.Flush();
sw.Close();
}
}
//Md5
public string GetMd5(string path)
{
string name = path + "_md5.dat";
try
{
StreamReader sr = new StreamReader(name, Encoding.UTF8);
string content = sr.ReadToEnd();
sr.Close();
return content;
}
catch
{
return "";
}
}
public string BuildFileMd5(string fliePath)
{
string filemd5 = null;
try
{
using (var fileStream = File.OpenRead(fliePath))
{
var md5 = MD5.Create();
var fileMD5Bytes = md5.ComputeHash(fileStream);//Stream
filemd5 = FormatMD5(fileMD5Bytes);
}
}
catch (System.Exception ex)
{
Debug.LogError(ex);
}
return filemd5;
}
public string FormatMD5(Byte[] data)
{
return System.BitConverter.ToString(data).Replace("-", "").ToLower();//byte[]
}
public void OnSingletonInit()
{
}
}
}
```
|
Listronotus humilis is a species of underwater weevil in the beetle family Curculionidae. It is found in North America.
References
Further reading
Cyclominae
Articles created by Qbugbot
Beetles described in 1834
|
```c
/*
*
*/
#include <zephyr/ztest.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <tracing_buffer.h>
#include <tracing_core.h>
#include <zephyr/tracing/tracing_format.h>
#if defined(CONFIG_TRACING_BACKEND_UART)
#include "../../../../subsys/tracing/include/tracing_backend.h"
#endif
/**
* @brief Tests for tracing
* @defgroup tracing_api_tests Tracing
* @ingroup all_tests
* @{
* @}
*/
/* Check flags */
static bool data_format_found;
static bool raw_data_format_found;
static bool sync_string_format_found;
#ifdef CONFIG_TRACING_ASYNC
static bool async_tracing_api;
static bool tracing_api_found;
static bool tracing_api_not_found;
static uint8_t *string_tracked[] = {
"sys_trace_k_thread_switched_out", "sys_trace_k_thread_switched_in",
"sys_trace_k_thread_priority_set", "sys_trace_k_thread_sched_set_priority",
"sys_trace_k_thread_create", "sys_trace_k_thread_start",
"sys_trace_k_thread_abort", "sys_trace_k_thread_suspend",
"sys_trace_k_thread_resume", "sys_trace_k_thread_ready",
"sys_trace_k_thread_sched_ready", "sys_trace_k_thread_sched_abort",
"sys_trace_k_thread_sched_resume", "sys_trace_k_thread_sched_suspend",
"sys_trace_k_thread_sleep_enter", "sys_trace_k_thread_sleep_exit",
"sys_trace_k_thread_abort_enter", "sys_trace_k_thread_abort_exit",
"sys_trace_k_thread_yield", "sys_trace_k_thread_wakeup",
"sys_trace_k_thread_pend", "sys_trace_k_thread_info",
"sys_trace_k_thread_name_set", "sys_trace_k_thread_sched_lock",
"sys_trace_k_timer_init", "sys_trace_k_thread_join_blocking",
"sys_trace_k_thread_join_exit", "sys_trace_isr_enter",
"sys_trace_isr_exit", "sys_trace_idle",
"sys_trace_k_condvar_broadcast_enter", "sys_trace_k_condvar_broadcast_exit",
"sys_trace_k_condvar_init", "sys_trace_k_condvar_signal_enter",
"sys_trace_k_condvar_signal_blocking", "sys_trace_k_condvar_signal_exit",
"sys_trace_k_condvar_wait_enter", "sys_trace_k_condvar_wait_exit",
"sys_trace_k_sem_init", "sys_trace_k_sem_give_enter",
"sys_trace_k_sem_take_enter", "sys_trace_k_sem_take_exit",
"sys_trace_k_sem_take_blocking", "sys_trace_k_mutex_init",
"sys_trace_k_mutex_lock_enter", "sys_trace_k_mutex_lock_exit",
"sys_trace_k_mutex_lock_blocking", "sys_trace_k_mutex_unlock_enter",
"sys_trace_k_mutex_unlock_exit", "sys_trace_k_timer_start", NULL
};
#endif
#if defined(CONFIG_TRACING_BACKEND_UART)
static void tracing_backends_output(
const struct tracing_backend *backend,
uint8_t *data, uint32_t length)
{
/* Check the output data. */
#ifdef CONFIG_TRACING_ASYNC
if (async_tracing_api) {
/* Define static 'i' is for guaranteeing all strings of 0 ~ end
* of the array string_tracked are tested.
*/
static int i;
while (string_tracked[i] != NULL) {
if (strstr(data, string_tracked[i]) != NULL) {
tracing_api_found = true;
} else {
tracing_api_not_found = true;
}
i++;
}
}
#endif
if (strstr(data, "tracing_format_data_testing") != NULL) {
data_format_found = true;
}
if (strstr(data, "tracing_format_raw_data_testing") != NULL) {
raw_data_format_found = true;
}
if (strstr(data, "tracing_format_string_testing") != NULL) {
sync_string_format_found = true;
}
}
const struct tracing_backend_api tracing_uart_backend_api = {
.init = NULL,
.output = tracing_backends_output
};
TRACING_BACKEND_DEFINE(tracing_backend_uart, tracing_uart_backend_api);
#endif
#ifdef CONFIG_TRACING_ASYNC
/**
* @brief Test tracing APIS
*
* @details For asynchronous mode, self-designed tracing uart backend
* firstly, and called tracing APIs one by one directly, check if the
* output from the backend is equal to the input.
*
* @ingroup tracing_api_tests
*/
ZTEST(tracing_api, test_tracing_sys_api)
{
int ret = 0, prio = 0;
size_t stack = 0;
struct k_mutex mutex;
struct k_thread thread;
struct k_condvar condvar;
struct k_sem sem, sem2;
struct k_timer timer;
k_timeout_t timeout = K_MSEC(1);
tracing_buffer_init();
async_tracing_api = true;
/* thread api */
sys_trace_k_thread_switched_out();
sys_trace_k_thread_switched_in();
sys_trace_k_thread_priority_set(&thread);
sys_trace_k_thread_sched_set_priority(&thread, prio);
sys_trace_k_thread_create(&thread, stack, prio);
sys_trace_k_thread_start(&thread);
sys_trace_k_thread_abort(&thread);
sys_trace_k_thread_suspend(&thread);
sys_trace_k_thread_resume(&thread);
sys_trace_k_thread_ready(&thread);
sys_trace_k_thread_sched_ready(&thread);
sys_trace_k_thread_sched_abort(&thread);
sys_trace_k_thread_sched_resume(&thread);
sys_trace_k_thread_sched_suspend(&thread);
sys_trace_k_thread_sleep_enter(timeout);
sys_trace_k_thread_sleep_exit(timeout, ret);
sys_trace_k_thread_abort_enter(&thread);
sys_trace_k_thread_abort_exit(&thread);
sys_trace_k_thread_yield();
sys_trace_k_thread_wakeup(&thread);
sys_trace_k_thread_pend(&thread);
sys_trace_k_thread_info(&thread);
sys_trace_k_thread_name_set(&thread, ret);
sys_trace_k_thread_sched_lock();
sys_port_trace_k_thread_sched_unlock();
sys_trace_k_thread_join_blocking(&thread, timeout);
sys_trace_k_thread_join_exit(&thread, timeout, ret);
/* ISR api */
sys_trace_isr_enter();
sys_trace_isr_exit();
sys_trace_idle();
/* condvar api */
sys_trace_k_condvar_broadcast_enter(&condvar);
sys_trace_k_condvar_broadcast_exit(&condvar, ret);
sys_trace_k_condvar_init(&condvar, ret);
sys_trace_k_condvar_signal_enter(&condvar);
sys_trace_k_condvar_signal_blocking(&condvar);
sys_trace_k_condvar_signal_exit(&condvar, ret);
sys_trace_k_condvar_wait_enter(&condvar, &mutex, timeout);
sys_trace_k_condvar_wait_exit(&condvar, &mutex, timeout, ret);
/* sem api */
sys_trace_k_sem_init(&sem, ret);
sys_trace_k_sem_give_enter(&sem);
sys_trace_k_sem_take_enter(&sem2, timeout);
sys_trace_k_sem_take_exit(&sem, timeout, ret);
sys_trace_k_sem_take_blocking(&sem, timeout);
/* mutex api */
sys_trace_k_mutex_init(&mutex, ret);
sys_trace_k_mutex_lock_enter(&mutex, timeout);
sys_trace_k_mutex_lock_exit(&mutex, timeout, ret);
sys_trace_k_mutex_lock_blocking(&mutex, timeout);
sys_trace_k_mutex_unlock_enter(&mutex);
sys_trace_k_mutex_unlock_exit(&mutex, ret);
/* timer api */
sys_trace_k_timer_start(&timer, timeout, timeout);
sys_trace_k_timer_init(&timer, NULL, NULL);
/* wait for some actions finished */
k_sleep(K_MSEC(100));
zassert_true(tracing_api_found, "Failded to check output from backend");
zassert_true(tracing_api_not_found == false, "Failded to check output from backend");
async_tracing_api = false;
}
#else
/**
* @brief Test tracing APIS
*
* @details For synchronize mode, self-designed tracing uart backend
* firstly, called API tracing_format_string to put a string, meanwhile,
* check the output for the backend.
*
* @ingroup tracing_api_tests
*/
ZTEST(tracing_api, test_tracing_sys_api)
{
tracing_buffer_init();
tracing_format_string("tracing_format_string_testing");
k_sleep(K_MSEC(100));
zassert_true(sync_string_format_found == true, "Failed to check output from backend");
}
#endif /* CONFIG_TRACING_ASYNC */
/**
* @brief Test tracing APIS
*
* @details Packaged the data by different format as the tracing input,
* check the output for the self-designed uart backend.
*
* @ingroup tracing_api_tests
*/
ZTEST(tracing_api, test_tracing_data_format)
{
tracing_data_t tracing_data, tracing_raw_data;
uint8_t data[] = "tracing_format_data_testing";
uint8_t raw_data[] = "tracing_format_raw_data_testing";
tracing_buffer_init();
tracing_data.data = data;
tracing_data.length = sizeof(data);
tracing_raw_data.data = raw_data;
tracing_raw_data.length = sizeof(raw_data);
tracing_format_data(&tracing_data, 1);
k_sleep(K_MSEC(100));
zassert_true(data_format_found == true, "Failed to check output from backend");
tracing_format_raw_data(tracing_raw_data.data, tracing_raw_data.length);
k_sleep(K_MSEC(100));
zassert_true(raw_data_format_found == true, "Failed to check output from backend");
}
/**
* @brief Test tracing APIS
*
* @details Simulate the host computer command to pass to the function
* tracing_cmd_handle to detect the tracing behavior.
*
* @ingroup tracing_api_tests
*/
ZTEST(tracing_api, test_tracing_cmd_manual)
{
uint32_t length = 0;
uint8_t *cmd = NULL;
uint8_t cmd0[] = " ";
uint8_t cmd1[] = "disable";
uint8_t cmd2[] = "enable";
length = tracing_cmd_buffer_alloc(&cmd);
cmd = cmd0;
zassert_true(sizeof(cmd0) < length, "cmd0 is too long");
tracing_cmd_handle(cmd, sizeof(cmd0));
zassert_true(is_tracing_enabled(),
"Failed to check default status of tracing");
length = tracing_cmd_buffer_alloc(&cmd);
cmd = cmd1;
zassert_true(sizeof(cmd1) < length, "cmd1 is too long");
tracing_cmd_handle(cmd, sizeof(cmd1));
zassert_false(is_tracing_enabled(), "Failed to disable tracing");
length = tracing_cmd_buffer_alloc(&cmd);
cmd = cmd2;
zassert_true(sizeof(cmd2) < length, "cmd2 is too long");
tracing_cmd_handle(cmd, sizeof(cmd2));
zassert_true(is_tracing_enabled(), "Failed to enable tracing");
}
ZTEST_SUITE(tracing_api, NULL, NULL, NULL, NULL, NULL);
```
|
Chinese Tajiks (), also known as Mountain Tajiks, are ethnic Pamiris who live in the Pamir Mountains of Tashkurgan Tajik Autonomous County, in Xinjiang, China. They are one of the 56 ethnic groups officially recognized by the Chinese government. Most Chinese Tajiks speak an Eastern Iranian language; the vast majority speak Sarikoli while a minority speak Wakhi.
Name
Despite their name, Chinese Tajiks are not ethnic Tajiks but ethnic Pamiris, a different Iranian ethnic group who speak the Eastern Iranian Pamiri languages.
Early 20th-century travelers to the region referred to the Chinese Tajiks as "Mountain Tajiks", or by the Turkic exonym "Ghalcha". Sarikoli- and Wakhi-speaking Chinese Tajiks were also referred to as "Sarikolis" and "Wakhis", respectively.
History
Early history
The Pamiri peoples are believed to be the descendants of the Saka-Scythians who inhabited modern-day Xinjiang. The Pamiri languages are descended from various Scythian languages.
The town of Tashkurgan was the capital of the Sarikol Kingdom () in the Pamir Mountains.
Xinjiang and its eastern Iranian-speaking peoples underwent gradual Turkification following the region's conquests and settlements by Turkic peoples such as the Uyghurs and Qarakhanids. By the Mongol period, most of these eastern Iranian peoples had assimilated into the Turkic community. The Chinese Tajiks claim to be descended from the remaining eastern Iranians who still resided in the Pamir Mountains of Xinjiang. This claim is supported by medieval Chinese literature, documents and modern archaeological evidence.
Conversion to Nizari Ismailism
According to oral tradition, Nasir Khusraw led a mission to the region with four of his disciples: Sayyid Hassan Zarrabi, Sayyid Surab Wali, Sayyid Jalal Bukhari, and Jahan Malikshah. Khusraw purportedly told some of his disciples to settle down in the area to continue to aid and preach to the local converts about Ismailism. Many contemporary pirs (holy men) claim descent from these early disciples.
Qing dynasty
The Chinese Tajiks were administered by the Qing under a system of Begs (chiefs) like the rest of Xinjiang. The Qing claimed suzerainty over the Taghdumbash Pamir in the southwest of Xinjiang, but permitted the Mir of Hunza to administer the region in return for their tributes. The Hunzas were tributaries and allies to Qing China, acknowledging China as suzerain from 1761 onward.
The Chinese Tajiks practiced slavery, selling some of their own as a punishment. Submissive slaves were given wives and settled with the Tajiks. They were considered property and could be sold anytime. Their slaves came from numerous sources; for example, Sunni captives such as the Kyrgyz were enslaved in retaliation for Kyrgyz slave raids against the Chinese Tajiks. Sunni slaves were also brought from Hunza (also known as Khujund), Gilgit, and Chitral. Slaves from Chitral and Hunza passed through the Pamir Mountains on their way to Bukhara, present-day Uzbekistan. The Chinese Tajiks were labelled "Rafidites" by the Sunnis, who did not consider them Muslims as enslaving fellow Muslims is contrary to Sharia law.
There were hundreds of slaves sold by Chinese Tajiks. Most foreign slaves in Xinjiang were Chinese Tajiks; they were referred to by Sunni Turkic Muslims as "Ghalcha". Chinese Tajiks made up the majority of slave trafficked and sold in Xinjiang to the Sunni Muslim Turkic inhabitants and they were seen as foreigners and strangers. Serfs were treated in a "wretched" manner.
An anti-Russian uproar broke out when Russian customs officialsthree Cossacks and a Russian courierinvited local Uyghur prostitutes to a party in January 1902 in Kashgar. This caused a massive brawl between several Russians and local Uyghurs, the latter acting on the pretense of protecting Muslim women. Qing officials quickly dispersed the crowd and sought to end tensions immediately to prevent the Russians from building up a pretext to invade Xinjiang.
After the riot, the Russians sent troops to Tashkurghan and demanded that local postal services be placed under Russian supervision. The Russians attempted to negotiate with the Begs of Tashkurgan, but the Begs feared that the Russians would not stop at their demands of the postal services and would aim to seize the entire area from the Qing. Tashkurgan officials even went as far as to petition the Amban of Yarkand to evacuate the local population to Yarkand so they could avoid being harassed by the Russians.
Republic of China
In the mid-1940s around 9,000 Chinese Tajiks lived in Xinjiang, while others moved to other Central Asian countries and provinces of China. During the Ili Rebellion from 1944 to 1949, Uyghur forces butchered the livestock of the Chinese Tajiks as they advanced south. Uyghur rebels who were backed by the Soviets destroyed Chinese Tajik crops and acted violently against Chinese Tajiks and Kyrgyz.
Distribution
The population of Chinese Tajiks in Xinjiang numbered 41,028 in 2000 and 50,265 in 2015. Sixty percent of the Chinese Tajik population reside in Tashkurgan Tajik Autonomous County. As of 2016, more than 4,000 Chinese Tajiks lived in nearby Poskam County (Zepu). Some Chinese Tajiks live in Kokyar (Kekeya) and Kargilik County (Yecheng). Tar Township in Akto County, Kizilsu Kyrgyz Autonomous Prefecture, is a Chinese Tajik township.
Language
The languages of the Chinese Tajiks have no official written form. The vast majority speak the Sarikoli language, which has been heavily influenced by Chinese, Uyghur, and Wakhi. A minority speak the Wakhi language. Sarikoli and Wakhi are Iranian languages, commonly classified in the Pamir or Eastern Iranian areal groups.
Religion
The Chinese Tajiks are adherents of Nizari Ismaili sect of Shia Islam and are still a little isolated from the rest of the worldwide Ismaili community, though their communication with other Pamiri (Ismaili) peoples has never stopped. The Chinese authorities allow a few Ismaili religious buildings to function in Tashkurgan, the clerics of whom are appointed by the secular Chinese authorities. Restrictions by the Chinese government bar foreign Ismaili preachers from openly working among the Chinese Tajiks. The religious leader of the Nizari Ismaili sect, the Aga Khan, was once barred from conducting business with Ismailis in China.
From 2 to 4 April 2012, Aga Khan IV paid an official visit to Ürümqi, the capital of Xinjiang, at the invitation of the then governor of Xinjiang, Nur Bekri. Delegations of the Aga Khan Development Network (AKDN) and the Xinjiang government met to discuss future cooperation. Bekri agreed to collaborate in several thematic areas of mutual interest, including poverty alleviation, education, investment in tourism, and financial services. The Aga Khan IV had last visited China in 1981.
Chinese Tajiks have been caught up in the China's crackdown on Muslims that has taken place since 2017, despite the fact that they have tended to be not politically active. Only a single mosque is allowed to operate in Tashkurgan Tajik Autonomous County, and children under 18 are not permitted to attend it.
Culture
Family life
At least three generations of relatives live under the same household in a traditional Chinese Tajik family. Each family has a familial hierarchy determined by a family member's age and sex, with the senior male acting as the head of the family. The responsibilities of the men tend to be providing for the family and looking after the children and elderly. The women's responsibilities are to raise the children, attend to household duties, and care for the elderly. The senior male is in charge of managing the entire household and the family's wealth through consulting with the rest of the men in the house. The young men are discouraged from seeking an independent life outside the household unless they receive collective consent from the family. Failure to do so can forfeit them from inheritance.
Rites of passage and life cycles
Marriages are usually arranged by the parents of the prospective groom and bride from the asking of the daughter's hand up to the wedding. The families of the couple also decide on the dowry amount, plan the engagements and wedding dates, and choose who can attend. About three days before the wedding, the families come together and initiate a feast for the people in the area who have lost relatives in the last year or so. These people then approve of the celebration by tapping on a hand drum. Funerals are conducted by first doing the Islamic rites of cleansing the body and praying for the deceased. This is followed by the family who burn incense and close any room or ceiling windows as this is believed to purify the path for the deceased. Every family member is expected to attend the funeral or make up for it with a visit to the family. For forty days after the burial, the closest relatives of the deceased will begin to abstain from personal comforts like by keeping their hair unkempt or uncut. On the last day, friends and family come together to bathe and clean the mourners and to convince them to return to their daily lives.
Festivals and rituals
The two main celebrations of the Chinese Tajiks are Nowruz (the Persian New Year; ched chader in Sarikoli, meaning "cleaning the house") and the Pilik festival. Right before Nowruz begins, families rigorously clean their homes and sprinkle the inner walls with putuk (wheat flour) to wish for a successful year. Each household bakes a cake for the occasion to share with guests. The guests are welcomed on the doorstep by dusting some putuk on their right shoulder. Meanwhile, Pilik is dedicated to commemorating the dead. Families light candles and pray for the souls of the dead while circling the light and pulling the flame towards their face. This ritual lasts two days. On the first day, families light candles inside the house. On the second day, they visit the local cemetery and light a candle for each deceased relative and place it on their graves.
Seasonal rituals such as Zuwur zoht (irrigation) and Teghm zuwost (seed sowing) used to be commonplace but presently a pir (a local religious master) or khalifa (a religious functionary who is trained under a pir) blesses the agricultural implements in the fields by reciting verses from the Quran.
Livelihood
Because of the harsh and scarce environment in which the locals live in, Chinese Tajiks mostly rely on cultivating whatever arable land is available and engage in small-scale animal husbandry. Other types of subsistence also include selling traditional embroidery, clothes, hats, and other arts and crafts. However, this is only a seasonal operation. There are also a few governmental wages available but salaried jobs are few and the demand is very high.
Notable people
(1935–1973), poet
Wu Tianyi (born 1937), medical scientist, member of the Chinese Academy of Engineering
(born 1941), poet and writer
(born 1964), politician, member of the 12th National People's Congress
(born 1977), politician
(1979–2021), soldier and politician, member of the 13th National People's Congress
References
External links
The Tajik ethnic minority (China) (PRC government website, in English)
Ethnic groups in Xinjiang
Xinjiang
Muslim communities of China
Ethnic groups officially recognized by China
|
The 1989–90 Scottish League Cup was the forty-fourth season of Scotland's second football knockout competition. The competition was won by Aberdeen, who defeated Rangers in the Final.
First round
Second round
Third round
Quarter-finals
Semi-finals
Final
References
General
Specific
League Cup
Scottish League Cup seasons
|
A list of political parties, organizations, and movements adhering to various forms of fascist ideology, part of the list of fascist movements by country.
List of movements, sorted by country
Overview A-F G-M N-T U-Z
Overview A-F G-M N-T U-Z
References
A-F
|
```javascript
import winston from 'winston';
import url from 'url';
import { MongoClient } from 'mongodb';
import settings from './settings';
const mongodbConnection = settings.mongodbServerUrl;
const mongoPathName = url.parse(mongodbConnection).pathname;
const dbName = mongoPathName.substring(mongoPathName.lastIndexOf('/') + 1);
const RECONNECT_INTERVAL = 1000;
const CONNECT_OPTIONS = {
reconnectTries: 3600,
reconnectInterval: RECONNECT_INTERVAL,
useNewUrlParser: true
};
const onClose = () => {
winston.info('MongoDB connection was closed');
};
const onReconnect = () => {
winston.info('MongoDB reconnected');
};
export let db = null;
const connectWithRetry = () => {
MongoClient.connect(
mongodbConnection,
CONNECT_OPTIONS,
(err, client) => {
if (err) {
winston.error(
`MongoDB connection was failed: ${err.message}`,
err.message
);
setTimeout(connectWithRetry, RECONNECT_INTERVAL);
} else {
db = client.db(dbName);
db.on('close', onClose);
db.on('reconnect', onReconnect);
winston.info('MongoDB connected successfully');
}
}
);
};
connectWithRetry();
```
|
```go
package federations
/*
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing,
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* specific language governing permissions and limitations
*/
import (
"encoding/json"
"fmt"
"net/http"
"github.com/apache/trafficcontrol/v8/lib/go-tc"
"github.com/apache/trafficcontrol/v8/traffic_ops/traffic_ops_golang/api"
"github.com/apache/trafficcontrol/v8/traffic_ops/traffic_ops_golang/dbhelpers"
)
const deleteFederationFederationResolversQuery = `
DELETE FROM federation_federation_resolver ffr
WHERE ffr.federation = $1
`
// GetFederationFederationResolversHandler returns a subset of federation_resolvers belonging to the federation ID supplied.
func GetFederationFederationResolversHandler(w http.ResponseWriter, r *http.Request) {
inf, userErr, sysErr, errCode := api.NewInfo(r, []string{"id"}, []string{"id"})
if userErr != nil || sysErr != nil {
api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
return
}
defer inf.Close()
fedID := inf.IntParams["id"]
frs, err := dbhelpers.GetFederationResolversByFederationID(inf.Tx.Tx, fedID)
if err != nil {
api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, nil, fmt.Errorf("database exception: %v", err))
return
}
api.WriteResp(w, r, frs)
return
}
// AssignFederationResolversToFederationHandler associates one or more federation_resolver to the federation ID supplied.
func AssignFederationResolversToFederationHandler(w http.ResponseWriter, r *http.Request) {
inf, userErr, sysErr, errCode := api.NewInfo(r, []string{"id"}, []string{"id"})
if userErr != nil || sysErr != nil {
api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
return
}
defer inf.Close()
var reqObj tc.AssignFederationResolversRequest
if err := json.NewDecoder(r.Body).Decode(&reqObj); err != nil {
api.HandleErr(w, r, inf.Tx.Tx, http.StatusBadRequest, fmt.Errorf("malformed JSON: %v", err), nil)
return
}
fedID := inf.IntParams["id"]
name, ok, err := dbhelpers.GetFederationNameFromID(fedID, inf.Tx.Tx)
if err != nil {
api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, nil, fmt.Errorf("database exception: %v", err))
return
}
if !ok {
api.HandleErr(w, r, inf.Tx.Tx, http.StatusNotFound, fmt.Errorf("'%d': no such Federation", fedID), nil)
return
}
cdnID, ok, err := dbhelpers.GetCDNIDFromFedID(fedID, inf.Tx.Tx)
if err != nil {
api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, nil, fmt.Errorf("database exception: %v", err))
return
}
if ok {
userErr, sysErr, errCode = dbhelpers.CheckIfCurrentUserCanModifyCDNWithID(inf.Tx.Tx, int64(cdnID), inf.User.UserName)
if userErr != nil || sysErr != nil {
api.HandleErr(w, r, inf.Tx.Tx, errCode, userErr, sysErr)
return
}
}
if reqObj.Replace {
if _, err := inf.Tx.Tx.Exec(deleteFederationFederationResolversQuery, fedID); err != nil {
api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, nil, fmt.Errorf("database exception: %v", err))
return
}
}
for _, id := range reqObj.FedResolverIDs {
if _, err := inf.Tx.Tx.Exec(associateFederationWithResolverQuery, fedID, id); err != nil {
api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, nil, fmt.Errorf("database exception: %v", err))
return
}
}
api.CreateChangeLogRawTx(
api.ApiChange,
fmt.Sprintf("FEDERATION: %s, ID: %d, ACTION: Assign Federation Resolvers %v to Federation", name, fedID, reqObj.FedResolverIDs),
inf.User,
inf.Tx.Tx,
)
api.WriteRespAlertObj(
w, r, tc.SuccessLevel,
fmt.Sprintf("%d resolver(s) were assigned to the %s federation", len(reqObj.FedResolverIDs), name),
reqObj,
)
}
```
|
```c++
CDataConnection dc;
dc.Open(szInit);
SourceFunc(dc);
```
|
Kravits, Kravitz, Kravit are Yiddish-language occupational surnames derived from the Ukrainian word кравець (see Kravets), "tailor". The surname may refer to:
Amy Kravitz, American film director
Andy Kravitz, American drummer
Asher Kravitz (born 1969), Israeli humorist, physicist and mathematician
Danny Kravitz (1930–2013), American baseball player
Dick Kravitz (born 1941), American politician
Edward Kravitz (born 1932), American neuroscientist
Jason Kravits (born 1967), American actor
Jean-Jacques Kravetz (born 1947), French keyboardist, saxophonist, and composer
Lee Kravitz, American journalist
Lenny Kravitz (born 1964), American musician
Leonard M. Kravitz, American soldier
Lou Kravitz, American labor racketeer
Mark R. Kravitz (1950–2012), American judge
Nina Kraviz (Nina Kravits), Russian DJ
Peter Kravitz, Scottish author and critic
Pinky Kravitz (1927–2015), American journalist
Ted Kravitz (born 1974), British presenter and reporter
Zoë Kravitz (born 1988), American singer and actress
Fictional characters
Duddy Kravitz, fictional character from the novel The Apprenticeship of Duddy Kravitz, by Mordecai Richler
Gladys Kravitz, fictional character from the TV series Bewitched
See also
Surnames of Jewish origin
Occupational surnames
Surnames of Ukrainian origin
Yiddish-language surnames
|
Hesperocimex coloradensis, the Colorado bed bug, is a species of bed bug in the family Cimicidae. It is found in Central America and North America.
References
Further reading
Cimicidae
Articles created by Qbugbot
Insects described in 1925
Hemiptera of North America
Hemiptera of Central America
|
Mystic Warriors-based hardware is an arcade system board used by Konami on several of its action games and fighting games in the early 1990s. Since Konami did not use the word system on most of its arcade hardware, its arcade games are usually classified by the type of video and sound chips used. In this case, the hardware is named after Konami's ninja-themed action game, Mystic Warriors, which debuted the system in 1992.
Specifications of the hardware
Main CPU: Motorola 68000 @ 16 MHz.
Sound CPU: Zilog Z80 @ 8 MHz
Sound Chip: 2xK054539 @ 18.432 MHz
Games based on the hardware
Mystic Warriors (1992)
Gaiapolis (1993)
Martial Champion (1993)
Metamorphic Force (1993)
Monster Maulers (1993)
Violent Storm (1993)
Video and sound chips
Note: The chips are followed by their corresponding game(s) in parentheses.
K053246 (all listed games)
K053252 (Gaiapolis, Martial Champion and Mystic Warriors)
K053936 (Gaiapolis)
K053990 (Martial Champion)
K054000 (Gaiapolis)
K054156 (all listed games)
K054157 (all listed games)
K054338 (Martial Champion, Mystic Warriors and Violent Storm)
K054539 (Martial Champion, Mystic Warriors and Violent Storm)
K054573 (Martial Champion)
K054986 (Martial Champion)
K055550 (Violent Storm)
K055555 (all listed games)
K055673 (all listed games)
See also
Konami GX
Konami GX400
External links
Mystic Warriors Based Hardware and Game Information
Konami arcade system boards
68k-based arcade system boards
|
The (; 'Rhine Tower') is a concrete telecommunications tower in Düsseldorf, capital of the federal state (Bundesland) of North Rhine-Westphalia, Germany. Construction commenced in 1979 and finished in 1981. The carries aerials for directional radio, FM and TV transmitters. It stands 172.5 metres high and houses a revolving restaurant and an observation deck at a height of 168 metres. It is the tallest building in Düsseldorf.
The was inaugurated on 1 December 1981. It contains 7,500 cubic metres of concrete and weighs 22,500 tons. Before October 15, 2004, when an aerial antenna for DVB-T was mounted, it was 234.2 metres high. The observation deck is open to public daily from 10:00 to 23:30.
As a special attraction, a light sculpture on its shaft works as a clock. This sculpture was designed by Horst H. Baumann and is called (light time level). The light sculpture on the is the largest digital clock in the world. The clock is a 24-hour clock with six sets of lights, two each for the Hour (00 to 24), Minutes (00 to 60), and Seconds (00 to 60), to be read from top to bottom.
Gallery
See also
List of tallest structures in Germany
List of tallest structures in Europe
List of tallest towers in the world
References
External links
360° interactive panorama
Rheinturm Restaurants QOMO and M 168 , Centro Hotels Group
time lapse of tower and clock at new years fire work
Literature
Klaus Müller, Hermann Wegener, Heinz-Gerd Wöstemeyer: Rheinturm Düsseldorf: Daten und Fakten Triltsch Verlag, Düsseldorf 1990, .
Roland Kanz: Architekturführer Düsseldorf. Dietrich Riemer Verlag, Berlin 2001, , S. 81.
Klaus Englert: … in die Jahre gekommen. Der Rheinturm in Düsseldorf. In db Deutsche Bauzeitung 141, 2007, Nr.6, S. 85–88, ISSN 0721-1902.
Erwin Heinle, Fritz Leonhardt: Türme aller Zeiten, aller Kulturen. Deutsche Verlags-Anstalt, Stuttgart 1997, , S. 235.
Towers completed in 1981
Buildings and structures in Düsseldorf
Towers with revolving restaurants
Tourist attractions in Düsseldorf
Communication towers in Germany
Observation towers
1981 establishments in West Germany
|
```php
<?php
declare(strict_types=1);
namespace PhpOffice\PhpSpreadsheetTests\Cell;
use PhpOffice\PhpSpreadsheet\Cell\CellAddress;
use PhpOffice\PhpSpreadsheet\Exception;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PHPUnit\Framework\TestCase;
class CellAddressTest extends TestCase
{
/**
* @dataProvider providerCreateFromCellAddress
*/
public function testCreateFromCellAddress(
string $cellAddress,
string $expectedColumnName,
int $expectedColumnId,
int $expectedRowId
): void {
$cellAddressObject = CellAddress::fromCellAddress($cellAddress);
self::assertSame($cellAddress, (string) $cellAddressObject);
self::assertSame($cellAddress, $cellAddressObject->cellAddress());
self::assertSame($expectedRowId, $cellAddressObject->rowId());
self::assertSame($expectedColumnId, $cellAddressObject->columnId());
self::assertSame($expectedColumnName, $cellAddressObject->columnName());
}
public static function providerCreateFromCellAddress(): array
{
return [
['A1', 'A', 1, 1],
['C5', 'C', 3, 5],
['IV256', 'IV', 256, 256],
];
}
/**
* @dataProvider providerCreateFromCellAddressException
*/
public function testCreateFromCellAddressException(string $cellAddress): void
{
$this->expectException(Exception::class);
$this->expectExceptionMessage(
$cellAddress === ''
? 'Cell coordinate can not be zero-length string'
: "Invalid cell coordinate {$cellAddress}"
);
CellAddress::fromCellAddress($cellAddress);
}
public static function providerCreateFromCellAddressException(): array
{
return [
['INVALID'],
[''],
['IV'],
['12'],
];
}
/**
* @dataProvider providerCreateFromColumnAndRow
*/
public function testCreateFromColumnAndRow(
int $columnId,
int $rowId,
string $expectedCellAddress,
string $expectedColumnName
): void {
$cellAddressObject = CellAddress::fromColumnAndRow($columnId, $rowId);
self::assertSame($expectedCellAddress, (string) $cellAddressObject);
self::assertSame($expectedCellAddress, $cellAddressObject->cellAddress());
self::assertSame($rowId, $cellAddressObject->rowId());
self::assertSame($columnId, $cellAddressObject->columnId());
self::assertSame($expectedColumnName, $cellAddressObject->columnName());
}
/**
* @dataProvider providerCreateFromColumnRowException
*/
public function testCreateFromColumnRowException(int|string $columnId, int|string $rowId): void
{
$this->expectException(Exception::class);
$this->expectExceptionMessage('Row and Column Ids must be positive integer values');
CellAddress::fromColumnAndRow($columnId, $rowId);
}
public static function providerCreateFromColumnAndRow(): array
{
return [
[1, 1, 'A1', 'A'],
[3, 5, 'C5', 'C'],
[256, 256, 'IV256', 'IV'],
];
}
/**
* @dataProvider providerCreateFromColumnRowArray
*/
public function testCreateFromColumnRowArray(
int $columnId,
int $rowId,
string $expectedCellAddress,
string $expectedColumnName
): void {
$columnRowArray = [$columnId, $rowId];
$cellAddressObject = CellAddress::fromColumnRowArray($columnRowArray);
self::assertSame($expectedCellAddress, (string) $cellAddressObject);
self::assertSame($expectedCellAddress, $cellAddressObject->cellAddress());
self::assertSame($rowId, $cellAddressObject->rowId());
self::assertSame($columnId, $cellAddressObject->columnId());
self::assertSame($expectedColumnName, $cellAddressObject->columnName());
}
public static function providerCreateFromColumnRowArray(): array
{
return [
[1, 1, 'A1', 'A'],
[3, 5, 'C5', 'C'],
[256, 256, 'IV256', 'IV'],
];
}
/**
* @dataProvider providerCreateFromColumnRowException
*/
public function testCreateFromColumnRowArrayException(mixed $columnId, mixed $rowId): void
{
$this->expectException(Exception::class);
$this->expectExceptionMessage('Row and Column Ids must be positive integer values');
$columnRowArray = [$columnId, $rowId];
CellAddress::fromColumnRowArray($columnRowArray);
}
public static function providerCreateFromColumnRowException(): array
{
return [
[-1, 1],
[3, 'A'],
];
}
/**
* @dataProvider providerCreateFromCellAddressWithWorksheet
*/
public function testCreateFromCellAddressWithWorksheet(
string $cellAddress,
string $expectedCellAddress,
string $expectedColumnName,
int $expectedColumnId,
int $expectedRowId
): void {
$spreadsheet = new Spreadsheet();
$worksheet = $spreadsheet->getActiveSheet();
$worksheet->setTitle("Mark's Worksheet");
$cellAddressObject = CellAddress::fromCellAddress($cellAddress, $worksheet);
self::assertSame($expectedCellAddress, (string) $cellAddressObject);
self::assertSame($cellAddress, $cellAddressObject->cellAddress());
self::assertSame($expectedRowId, $cellAddressObject->rowId());
self::assertSame($expectedColumnId, $cellAddressObject->columnId());
self::assertSame($expectedColumnName, $cellAddressObject->columnName());
}
public static function providerCreateFromCellAddressWithWorksheet(): array
{
return [
['A1', "'Mark''s Worksheet'!A1", 'A', 1, 1],
['C5', "'Mark''s Worksheet'!C5", 'C', 3, 5],
['IV256', "'Mark''s Worksheet'!IV256", 'IV', 256, 256],
];
}
public function testNextRow(): void
{
$cellAddress = CellAddress::fromCellAddress('C5');
// default single row
$cellAddressC6 = $cellAddress->nextRow();
self::assertSame('C6', (string) $cellAddressC6);
// multiple rows
$cellAddressC9 = $cellAddress->nextRow(4);
self::assertSame('C9', (string) $cellAddressC9);
// negative rows
$cellAddressC3 = $cellAddress->nextRow(-2);
self::assertSame('C3', (string) $cellAddressC3);
// negative beyond the minimum
$cellAddressC1 = $cellAddress->nextRow(-10);
self::assertSame('C1', (string) $cellAddressC1);
// Check that the original object is still unchanged
self::assertSame('C5', (string) $cellAddress);
}
public function testPreviousRow(): void
{
$cellAddress = CellAddress::fromCellAddress('C5');
// default single row
$cellAddressC4 = $cellAddress->previousRow();
self::assertSame('C4', (string) $cellAddressC4);
}
public function testNextColumn(): void
{
$cellAddress = CellAddress::fromCellAddress('C5');
// default single row
$cellAddressD5 = $cellAddress->nextColumn();
self::assertSame('D5', (string) $cellAddressD5);
// multiple rows
$cellAddressG5 = $cellAddress->nextColumn(4);
self::assertSame('G5', (string) $cellAddressG5);
// negative rows
$cellAddressB5 = $cellAddress->nextColumn(-1);
self::assertSame('B5', (string) $cellAddressB5);
// negative beyond the minimum
$cellAddressA5 = $cellAddress->nextColumn(-10);
self::assertSame('A5', (string) $cellAddressA5);
// Check that the original object is still unchanged
self::assertSame('C5', (string) $cellAddress);
}
public function testPreviousColumn(): void
{
$cellAddress = CellAddress::fromCellAddress('C5');
// default single row
$cellAddressC4 = $cellAddress->previousColumn();
self::assertSame('B5', (string) $cellAddressC4);
}
}
```
|
```xml
<mxfile host="app.diagrams.net" modified="2023-09-05T06:51:58.972Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" etag="WIiEteUfwi_wqgJBZc2M" version="21.7.2" type="device">
<diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">
<mxGraphModel dx="2656" dy="2002" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" background="none" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="1350" value="Mammal" style="ellipse;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=20;fontColor=#FFFFFF;align=center;strokeWidth=3;fillColor=#1699D3;strokeColor=none;" parent="1" vertex="1">
<mxGeometry x="523.5" y="271.5" width="120" height="120" as="geometry" />
</mxCell>
<mxCell id="1351" value="Insect" style="ellipse;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=20;fontColor=#FFFFFF;align=center;strokeWidth=3;fillColor=#F08705;strokeColor=none;gradientColor=none;" parent="1" vertex="1">
<mxGeometry x="1103.5" y="241.5" width="120" height="120" as="geometry" />
</mxCell>
<mxCell id="1352" value="Bird" style="ellipse;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=20;fontColor=#FFFFFF;align=center;strokeWidth=3;fillColor=#E85642;strokeColor=none;" parent="1" vertex="1">
<mxGeometry x="1701" y="356.5" width="120" height="120" as="geometry" />
</mxCell>
<mxCell id="1353" value="Fish" style="ellipse;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=20;fontColor=#FFFFFF;align=center;strokeWidth=3;fillColor=#1699D3;strokeColor=none;" parent="1" vertex="1">
<mxGeometry x="1936" y="806.5" width="120" height="120" as="geometry" />
</mxCell>
<mxCell id="1354" value="Bacteria" style="ellipse;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=20;fontColor=#FFFFFF;align=center;strokeWidth=3;fillColor=#736ca8;strokeColor=none;" parent="1" vertex="1">
<mxGeometry x="1711" y="1171.5" width="120" height="120" as="geometry" />
</mxCell>
<mxCell id="1355" value="Fungi" style="ellipse;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=20;fontColor=#FFFFFF;align=center;strokeWidth=3;fillColor=#F08705;strokeColor=none;" parent="1" vertex="1">
<mxGeometry x="1163.5" y="1309" width="120" height="120" as="geometry" />
</mxCell>
<mxCell id="1356" value="Flower" style="ellipse;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=20;fontColor=#FFFFFF;align=center;strokeWidth=3;fillColor=#E85642;strokeColor=none;" parent="1" vertex="1">
<mxGeometry x="558.5" y="1171.5" width="120" height="120" as="geometry" />
</mxCell>
<mxCell id="1357" value="Ant" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="973.5" y="411.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1358" value="Dolphin" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="429.5" y="441.5" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1359" style="endArrow=none;strokeWidth=6;strokeColor=#1699D3;html=1;" parent="1" source="1515" target="1350" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1360" style="endArrow=none;strokeWidth=6;strokeColor=#f08705;html=1;" parent="1" source="1515" target="1351" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1361" style="endArrow=none;strokeWidth=6;strokeColor=#E85642;html=1;" parent="1" source="1515" target="1352" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1362" style="endArrow=none;strokeWidth=6;strokeColor=#1699D3;html=1;" parent="1" source="1515" target="1353" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1363" style="endArrow=none;strokeWidth=6;strokeColor=#736CA8;html=1;" parent="1" source="1515" target="1516" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1364" style="endArrow=none;strokeWidth=6;strokeColor=#736ca8;html=1;" parent="1" source="1515" target="1354" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1365" value="" style="edgeStyle=none;endArrow=none;strokeWidth=6;strokeColor=#F08705;html=1;" parent="1" source="1515" target="1355" edge="1">
<mxGeometry x="181" y="226.5" width="100" height="100" as="geometry">
<mxPoint x="181" y="326.5" as="sourcePoint" />
<mxPoint x="281" y="226.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1366" value="" style="edgeStyle=none;endArrow=none;strokeWidth=6;strokeColor=#E85642;html=1;" parent="1" source="1515" target="1356" edge="1">
<mxGeometry x="181" y="226.5" width="100" height="100" as="geometry">
<mxPoint x="181" y="326.5" as="sourcePoint" />
<mxPoint x="281" y="226.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1367" value="Lion" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="730" y="321.5" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1368" value="Elephant" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="368.5" y="391.5" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1369" value="Cat" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="330" y="311.5" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1370" value="Giraffe" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="348.5" y="246.5" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1371" value="Dog" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="380" y="186.5" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1372" value="Donkey" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="455" y="140" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1373" value="Leopard" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="600" y="140" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1374" value="Horse" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="678.5" y="201.5" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1375" value="Zebra" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="730" y="261.5" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1376" value="Gazelle" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="710" y="391.5" width="130" height="40" as="geometry" />
</mxCell>
<mxCell id="1377" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1376" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1378" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1367" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1379" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1358" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1380" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1368" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1381" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1369" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1382" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1370" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1383" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1371" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1384" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1372" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1385" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1373" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1386" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1374" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1387" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1350" target="1375" edge="1">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="-221.5" y="156.5" as="sourcePoint" />
<mxPoint x="-121.5" y="56.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1388" value="Bee" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="913.5" y="341.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1389" value="Hornet" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="903.5" y="271.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1390" value="Fly" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="923.5" y="201.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1391" value="Termite" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="963.5" y="141.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1392" value="Mantis" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1033.5" y="81.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1393" value="Ladybug" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1163.5" y="81.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1394" value="Butterfly" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1233.5" y="141.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1395" value="Flea" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1283.5" y="201.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1396" value="Mosquito" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1298.5" y="271.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1397" value="Spider" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1293.5" y="331.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1398" value="Bumblebee" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1238.5" y="401.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1399" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1357" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1400" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1388" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1401" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1389" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1402" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1390" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1403" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1391" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1404" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1392" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1405" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1393" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1406" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1394" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1407" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1395" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1408" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1396" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1409" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1397" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1410" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1351" target="1398" edge="1">
<mxGeometry x="3.5" y="21.5" width="100" height="100" as="geometry">
<mxPoint x="3.5" y="121.5" as="sourcePoint" />
<mxPoint x="103.5" y="21.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1411" value="Eagle" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1611" y="516.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1412" value="Pigeon" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1946" y="401.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1413" value="Hawk" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1491" y="436.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1414" value="Falcon" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1521" y="371.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1415" value="Sparrow" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1541" y="291.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1416" value="Stork" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1631" y="221.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1417" value="Flamingo" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1766" y="166.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1418" value="Penguin" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1861" y="251.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1419" value="Owl" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1916" y="321.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1420" value="Albatross" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1691" y="576.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1421" value="Pelican" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1781" y="506.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1422" value="Swallow" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1876" y="461.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1423" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1411" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1424" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1413" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1425" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1414" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1426" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1415" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1427" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1416" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1428" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1417" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1429" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1418" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1430" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1419" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1431" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1412" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1432" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1422" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1433" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1421" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1434" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1352" target="1420" edge="1">
<mxGeometry x="31" y="106.5" width="100" height="100" as="geometry">
<mxPoint x="31" y="206.5" as="sourcePoint" />
<mxPoint x="131" y="106.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1435" value="Perch" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1781" y="766.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1436" value="Mackerel" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1811" y="696.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1437" value="Tuna" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1936" y="666.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1438" value="Shark" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="2066" y="721.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1439" value="Whale" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="578.5" y="466.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1440" value="Bass" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="2130" y="791.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1441" value="Eel" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="2130" y="896.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1443" value="Ray" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="2030" y="990" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1444" value="Trout" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1880" y="990" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1445" value="Catfish" style="rounded=1;fillColor=#64BBE2;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1756" y="891.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1446" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1353" target="1435" edge="1">
<mxGeometry x="-24" y="196.5" width="100" height="100" as="geometry">
<mxPoint x="-24" y="296.5" as="sourcePoint" />
<mxPoint x="76" y="196.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1447" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1353" target="1436" edge="1">
<mxGeometry x="-24" y="196.5" width="100" height="100" as="geometry">
<mxPoint x="-24" y="296.5" as="sourcePoint" />
<mxPoint x="76" y="196.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1448" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1353" target="1437" edge="1">
<mxGeometry x="-24" y="196.5" width="100" height="100" as="geometry">
<mxPoint x="-24" y="296.5" as="sourcePoint" />
<mxPoint x="76" y="196.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1449" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1353" target="1438" edge="1">
<mxGeometry x="-24" y="196.5" width="100" height="100" as="geometry">
<mxPoint x="-24" y="296.5" as="sourcePoint" />
<mxPoint x="76" y="196.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1451" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1353" target="1440" edge="1">
<mxGeometry x="-24" y="196.5" width="100" height="100" as="geometry">
<mxPoint x="-24" y="296.5" as="sourcePoint" />
<mxPoint x="76" y="196.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1453" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1353" target="1441" edge="1">
<mxGeometry x="-24" y="196.5" width="100" height="100" as="geometry">
<mxPoint x="-24" y="296.5" as="sourcePoint" />
<mxPoint x="76" y="196.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1454" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1353" target="1443" edge="1">
<mxGeometry x="-24" y="196.5" width="100" height="100" as="geometry">
<mxPoint x="-24" y="296.5" as="sourcePoint" />
<mxPoint x="76" y="196.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1455" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1353" target="1444" edge="1">
<mxGeometry x="-24" y="196.5" width="100" height="100" as="geometry">
<mxPoint x="-24" y="296.5" as="sourcePoint" />
<mxPoint x="76" y="196.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1456" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" parent="1" source="1353" target="1445" edge="1">
<mxGeometry x="-24" y="196.5" width="100" height="100" as="geometry">
<mxPoint x="-24" y="296.5" as="sourcePoint" />
<mxPoint x="76" y="196.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1457" value="Streptococcus" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1646" y="1087" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1458" value="Echericia Colli" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1631" y="1301.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1459" value="Lactobacyllus" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1801" y="1114" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1460" value="Helicobacter" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1901" y="1194" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1461" value="Bifidobacterium" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1821" y="1331.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1462" value="Staphyllococcus" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1551" y="1211.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1463" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1354" target="1460" edge="1">
<mxGeometry x="251" y="-103.5" width="100" height="100" as="geometry">
<mxPoint x="251" y="-3.5" as="sourcePoint" />
<mxPoint x="351" y="-103.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1464" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1354" target="1461" edge="1">
<mxGeometry x="251" y="-103.5" width="100" height="100" as="geometry">
<mxPoint x="251" y="-3.5" as="sourcePoint" />
<mxPoint x="351" y="-103.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1465" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1354" target="1458" edge="1">
<mxGeometry x="251" y="-103.5" width="100" height="100" as="geometry">
<mxPoint x="251" y="-3.5" as="sourcePoint" />
<mxPoint x="351" y="-103.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1466" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1354" target="1462" edge="1">
<mxGeometry x="251" y="-103.5" width="100" height="100" as="geometry">
<mxPoint x="251" y="-3.5" as="sourcePoint" />
<mxPoint x="351" y="-103.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1467" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1354" target="1457" edge="1">
<mxGeometry x="251" y="-103.5" width="100" height="100" as="geometry">
<mxPoint x="251" y="-3.5" as="sourcePoint" />
<mxPoint x="351" y="-103.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1468" value="Zygomycota" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1358.5" y="1274" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1469" value="Script Writing" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1373.5" y="1346.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1470" value="Ascomycota" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1348.5" y="1411.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1471" value="Basidiomycota" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1283.5" y="1471.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1472" value="Mushroom" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1183.5" y="1529" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1473" value="Lichen" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1083.5" y="1471.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1474" value="Bread Mold" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1003.5" y="1411.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1475" value="Yeast" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="963.5" y="1339" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1476" value="Zygospore" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="968.5" y="1274" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1477" value="Truffle" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1028.5" y="1209" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1478" value="Chytrid" style="rounded=1;fillColor=#f5af58;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="1298.5" y="1194" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1479" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1478" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1480" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1468" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1481" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1469" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1482" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1470" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1483" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1471" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1484" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1472" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1485" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1473" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1486" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1474" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1487" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1475" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1488" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1476" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1489" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F5AF58;html=1;" parent="1" source="1355" target="1477" edge="1">
<mxGeometry x="243.5" y="39" width="100" height="100" as="geometry">
<mxPoint x="243.5" y="139" as="sourcePoint" />
<mxPoint x="343.5" y="39" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1490" value="Philadendron" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="623.5" y="1006.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1491" value="Dahlia" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="488.5" y="1011.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1492" value="Petunia" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="423.5" y="1066.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1493" value="Cactus" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="368.5" y="1126.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1494" value="Tulip" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="348.5" y="1181.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1495" value="Lilac" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="363.5" y="1246.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1496" value="Dandelion" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="398.5" y="1309" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1497" value="Poppy" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="468.5" y="1359" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1498" value="Gerbera" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="578.5" y="1414" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1499" value="Orchid" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="703.5" y="1349" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1500" value="Gladiola" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="763.5" y="1281.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1501" value="Rose" style="rounded=1;fillColor=#f08e81;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="783.5" y="1186" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1502" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1501" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1503" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1490" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1504" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1491" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1505" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1492" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1506" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1493" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1507" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1494" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1508" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1495" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1509" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1496" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1510" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1497" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1511" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1498" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1512" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1499" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1513" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#F08E81;html=1;" parent="1" source="1356" target="1500" edge="1">
<mxGeometry x="188.5" y="51.5" width="100" height="100" as="geometry">
<mxPoint x="188.5" y="151.5" as="sourcePoint" />
<mxPoint x="288.5" y="51.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1514" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.75;exitY=0;entryX=0.75;entryY=0;startArrow=none;startFill=0;endArrow=block;endFill=1;jettySize=auto;orthogonalLoop=1;strokeColor=#12aab5;strokeWidth=6;fontSize=20;fontColor=#2F5B7C;" parent="1" source="1414" target="1414" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1515" value="<font style="font-size: 30px;">LIVING<br>BEINGS</font><br>" style="ellipse;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=30;fontColor=#2F5B7C;align=center;strokeColor=#2F5B7C;strokeWidth=6;fillColor=#FFFFFF;fontStyle=1;gradientColor=none;" parent="1" vertex="1">
<mxGeometry x="961" y="676.5" width="270" height="270" as="geometry" />
</mxCell>
<mxCell id="1516" value="Tree" style="ellipse;whiteSpace=wrap;html=1;shadow=0;fontFamily=Helvetica;fontSize=20;fontColor=#FFFFFF;align=center;strokeWidth=3;fillColor=#736ca8;strokeColor=none;" parent="1" vertex="1">
<mxGeometry x="312" y="721.5" width="120" height="120" as="geometry" />
</mxCell>
<mxCell id="1517" value="Organisation" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="202" y="621.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1518" value="Oak" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="309.5" y="561.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1519" value="Birch" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="449.5" y="571.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1520" value="Silverfern" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="514.5" y="641.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1521" value="Personal 
Development" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="539.5" y="721.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1522" value="Pine" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="67" y="641.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1523" value="Lime" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="472" y="831.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1524" value="Chestnut" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="422" y="891.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1525" value="Beech" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="282" y="891.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1526" value="Poplar" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="142" y="856.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1527" value="Willow" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="37" y="801.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1528" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1517" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1529" value="Acacia" style="rounded=1;fillColor=#a29dc5;strokeColor=none;strokeWidth=3;shadow=0;html=1;fontColor=#FFFFFF;" parent="1" vertex="1">
<mxGeometry x="77" y="731.5" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="1530" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1518" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1531" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1519" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1532" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1520" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1533" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1521" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1534" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1522" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1535" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1523" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1536" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1524" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1537" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1525" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1538" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1526" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1539" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1527" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1540" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1516" target="1529" edge="1">
<mxGeometry x="-1498" y="-303.5" width="100" height="100" as="geometry">
<mxPoint x="-1498" y="-203.5" as="sourcePoint" />
<mxPoint x="-1398" y="-303.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1541" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#A29DC5;html=1;" parent="1" source="1354" target="1459" edge="1">
<mxGeometry x="-1174" y="-408.5" width="100" height="100" as="geometry">
<mxPoint x="-1174" y="-308.5" as="sourcePoint" />
<mxPoint x="-1074" y="-408.5" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="1542" style="edgeStyle=none;rounded=0;html=1;exitX=0.5;exitY=1;endArrow=none;endFill=0;jettySize=auto;orthogonalLoop=1;strokeColor=#736CA8;strokeWidth=2;fillColor=#64bbe2;fontSize=20;fontColor=#23445D;" parent="1" source="1529" target="1529" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="104TM-tIM6dC0J846HSY-1542" value="" style="edgeStyle=none;endArrow=none;strokeWidth=3;strokeColor=#64BBE2;html=1;" edge="1" parent="1" source="1350" target="1439">
<mxGeometry x="-221.5" y="56.5" width="100" height="100" as="geometry">
<mxPoint x="561" y="392" as="sourcePoint" />
<mxPoint x="506" y="477" as="targetPoint" />
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
```
|
Dr. was a Japanese-American poet, physician and photographer.
Photography
Koike arrived in Seattle in 1916 at the age of 38, and established a medical clinic in the downtown area near Main Street and 5th Avenue.
Although he was a respected professional surgeon, his first love was photography. He was a participant in the first Frederick & Nelson art salon, noted for his pictorialist style, and innovative combination of an Eastern and Western aesthetic.
He was a member of the Royal Photographic Society of Great Britain, and was designated a Fellow in 1928. He was also Director of the Associated Camera Clubs of America.
His solo exhibitions included the Kodak Park Camera Club, Rochester, NY, 1926, the Portage Camera Club, Akron, Ohio, 1927, the Brooklyn Institute of Arts & Sciences in 1928, and The Art Institute of Seattle in 1929.
Koike was the originator of the Seattle Camera Club. Given his thriving practice in the Japanese community in Seattle, his professional income allowed him not only to concentrate on his photography but to underwrite many of the expenses of forming the club. He was the editor of the club's newsletter Notan. He left all of his photographs and extensive records of the Seattle Camera Club to fellow club member Iwao Matsushita upon his death.
Poetry
Koike was also a noted poet, under the pen name . He was a member of the Rainier Ginsha, a Seattle Haiku poetry society formed in 1934 by poet Kyōu Kawajiri.
Internment during World War II
During Internment of Japanese Americans in World War II all of his photographic equipment was confiscated by the U.S. government, and he was taken to the Minidoka War Relocation Center in Idaho. While being detained he formed a new poetry society called Minidoka Ginsha. By 1945, the group consisted of over 158 poets. Koike became ill in the camps and died in 1947, shortly after his release.
References
Pictorialists
American artists of Japanese descent
American poets
American poets of Asian descent
American writers of Japanese descent
People from Shimane Prefecture
Japanese emigrants to the United States
American physicians of Japanese descent
Japanese-American internees
1878 births
1947 deaths
Japanese portrait photographers
|
```go
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package marketplacemetering
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
const opBatchMeterUsage = "BatchMeterUsage"
// BatchMeterUsageRequest generates a "aws/request.Request" representing the
// client's request for the BatchMeterUsage operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See BatchMeterUsage for more information on using the BatchMeterUsage
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the BatchMeterUsageRequest method.
// req, resp := client.BatchMeterUsageRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see path_to_url
func (c *MarketplaceMetering) BatchMeterUsageRequest(input *BatchMeterUsageInput) (req *request.Request, output *BatchMeterUsageOutput) {
op := &request.Operation{
Name: opBatchMeterUsage,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &BatchMeterUsageInput{}
}
output = &BatchMeterUsageOutput{}
req = c.newRequest(op, input, output)
return
}
// BatchMeterUsage API operation for AWSMarketplace Metering.
//
// BatchMeterUsage is called from a SaaS application listed on the AWS Marketplace
// to post metering records for a set of customers.
//
// For identical requests, the API is idempotent; requests can be retried with
// the same records or a subset of the input records.
//
// Every request to BatchMeterUsage is for one product. If you need to meter
// usage for multiple products, you must make multiple calls to BatchMeterUsage.
//
// BatchMeterUsage can process up to 25 UsageRecords at a time.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWSMarketplace Metering's
// API operation BatchMeterUsage for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
// An internal error has occurred. Retry your request. If the problem persists,
// post a message with details on the AWS forums.
//
// * ErrCodeInvalidProductCodeException "InvalidProductCodeException"
// The product code passed does not match the product code used for publishing
// the product.
//
// * ErrCodeInvalidUsageDimensionException "InvalidUsageDimensionException"
// The usage dimension does not match one of the UsageDimensions associated
// with products.
//
// * ErrCodeInvalidCustomerIdentifierException "InvalidCustomerIdentifierException"
// You have metered usage for a CustomerIdentifier that does not exist.
//
// * ErrCodeTimestampOutOfBoundsException "TimestampOutOfBoundsException"
// The timestamp value passed in the meterUsage() is out of allowed range.
//
// * ErrCodeThrottlingException "ThrottlingException"
// The calls to the MeterUsage API are throttled.
//
// Please also see path_to_url
func (c *MarketplaceMetering) BatchMeterUsage(input *BatchMeterUsageInput) (*BatchMeterUsageOutput, error) {
req, out := c.BatchMeterUsageRequest(input)
return out, req.Send()
}
// BatchMeterUsageWithContext is the same as BatchMeterUsage with the addition of
// the ability to pass a context and additional request options.
//
// See BatchMeterUsage for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See path_to_url
// for more information on using Contexts.
func (c *MarketplaceMetering) BatchMeterUsageWithContext(ctx aws.Context, input *BatchMeterUsageInput, opts ...request.Option) (*BatchMeterUsageOutput, error) {
req, out := c.BatchMeterUsageRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opMeterUsage = "MeterUsage"
// MeterUsageRequest generates a "aws/request.Request" representing the
// client's request for the MeterUsage operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See MeterUsage for more information on using the MeterUsage
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the MeterUsageRequest method.
// req, resp := client.MeterUsageRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see path_to_url
func (c *MarketplaceMetering) MeterUsageRequest(input *MeterUsageInput) (req *request.Request, output *MeterUsageOutput) {
op := &request.Operation{
Name: opMeterUsage,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &MeterUsageInput{}
}
output = &MeterUsageOutput{}
req = c.newRequest(op, input, output)
return
}
// MeterUsage API operation for AWSMarketplace Metering.
//
// API to emit metering records. For identical requests, the API is idempotent.
// It simply returns the metering record ID.
//
// MeterUsage is authenticated on the buyer's AWS account, generally when running
// from an EC2 instance on the AWS Marketplace.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWSMarketplace Metering's
// API operation MeterUsage for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
// An internal error has occurred. Retry your request. If the problem persists,
// post a message with details on the AWS forums.
//
// * ErrCodeInvalidProductCodeException "InvalidProductCodeException"
// The product code passed does not match the product code used for publishing
// the product.
//
// * ErrCodeInvalidUsageDimensionException "InvalidUsageDimensionException"
// The usage dimension does not match one of the UsageDimensions associated
// with products.
//
// * ErrCodeInvalidEndpointRegionException "InvalidEndpointRegionException"
// The endpoint being called is in a region different from your EC2 instance.
// The region of the Metering service endpoint and the region of the EC2 instance
// must match.
//
// * ErrCodeTimestampOutOfBoundsException "TimestampOutOfBoundsException"
// The timestamp value passed in the meterUsage() is out of allowed range.
//
// * ErrCodeDuplicateRequestException "DuplicateRequestException"
// A metering record has already been emitted by the same EC2 instance for the
// given {usageDimension, timestamp} with a different usageQuantity.
//
// * ErrCodeThrottlingException "ThrottlingException"
// The calls to the MeterUsage API are throttled.
//
// Please also see path_to_url
func (c *MarketplaceMetering) MeterUsage(input *MeterUsageInput) (*MeterUsageOutput, error) {
req, out := c.MeterUsageRequest(input)
return out, req.Send()
}
// MeterUsageWithContext is the same as MeterUsage with the addition of
// the ability to pass a context and additional request options.
//
// See MeterUsage for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See path_to_url
// for more information on using Contexts.
func (c *MarketplaceMetering) MeterUsageWithContext(ctx aws.Context, input *MeterUsageInput, opts ...request.Option) (*MeterUsageOutput, error) {
req, out := c.MeterUsageRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opResolveCustomer = "ResolveCustomer"
// ResolveCustomerRequest generates a "aws/request.Request" representing the
// client's request for the ResolveCustomer operation. The "output" return
// value will be populated with the request's response once the request complets
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ResolveCustomer for more information on using the ResolveCustomer
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ResolveCustomerRequest method.
// req, resp := client.ResolveCustomerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// Please also see path_to_url
func (c *MarketplaceMetering) ResolveCustomerRequest(input *ResolveCustomerInput) (req *request.Request, output *ResolveCustomerOutput) {
op := &request.Operation{
Name: opResolveCustomer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ResolveCustomerInput{}
}
output = &ResolveCustomerOutput{}
req = c.newRequest(op, input, output)
return
}
// ResolveCustomer API operation for AWSMarketplace Metering.
//
// ResolveCustomer is called by a SaaS application during the registration process.
// When a buyer visits your website during the registration process, the buyer
// submits a registration token through their browser. The registration token
// is resolved through this API to obtain a CustomerIdentifier and product code.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWSMarketplace Metering's
// API operation ResolveCustomer for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidTokenException "InvalidTokenException"
//
// * ErrCodeExpiredTokenException "ExpiredTokenException"
// The submitted registration token has expired. This can happen if the buyer's
// browser takes too long to redirect to your page, the buyer has resubmitted
// the registration token, or your application has held on to the registration
// token for too long. Your SaaS registration website should redeem this token
// as soon as it is submitted by the buyer's browser.
//
// * ErrCodeThrottlingException "ThrottlingException"
// The calls to the MeterUsage API are throttled.
//
// * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
// An internal error has occurred. Retry your request. If the problem persists,
// post a message with details on the AWS forums.
//
// Please also see path_to_url
func (c *MarketplaceMetering) ResolveCustomer(input *ResolveCustomerInput) (*ResolveCustomerOutput, error) {
req, out := c.ResolveCustomerRequest(input)
return out, req.Send()
}
// ResolveCustomerWithContext is the same as ResolveCustomer with the addition of
// the ability to pass a context and additional request options.
//
// See ResolveCustomer for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See path_to_url
// for more information on using Contexts.
func (c *MarketplaceMetering) ResolveCustomerWithContext(ctx aws.Context, input *ResolveCustomerInput, opts ...request.Option) (*ResolveCustomerOutput, error) {
req, out := c.ResolveCustomerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// A BatchMeterUsageRequest contains UsageRecords, which indicate quantities
// of usage within your application.
// Please also see path_to_url
type BatchMeterUsageInput struct {
_ struct{} `type:"structure"`
// Product code is used to uniquely identify a product in AWS Marketplace. The
// product code should be the same as the one used during the publishing of
// a new product.
//
// ProductCode is a required field
ProductCode *string `min:"1" type:"string" required:"true"`
// The set of UsageRecords to submit. BatchMeterUsage accepts up to 25 UsageRecords
// at a time.
//
// UsageRecords is a required field
UsageRecords []*UsageRecord `type:"list" required:"true"`
}
// String returns the string representation
func (s BatchMeterUsageInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchMeterUsageInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchMeterUsageInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "BatchMeterUsageInput"}
if s.ProductCode == nil {
invalidParams.Add(request.NewErrParamRequired("ProductCode"))
}
if s.ProductCode != nil && len(*s.ProductCode) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ProductCode", 1))
}
if s.UsageRecords == nil {
invalidParams.Add(request.NewErrParamRequired("UsageRecords"))
}
if s.UsageRecords != nil {
for i, v := range s.UsageRecords {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UsageRecords", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetProductCode sets the ProductCode field's value.
func (s *BatchMeterUsageInput) SetProductCode(v string) *BatchMeterUsageInput {
s.ProductCode = &v
return s
}
// SetUsageRecords sets the UsageRecords field's value.
func (s *BatchMeterUsageInput) SetUsageRecords(v []*UsageRecord) *BatchMeterUsageInput {
s.UsageRecords = v
return s
}
// Contains the UsageRecords processed by BatchMeterUsage and any records that
// have failed due to transient error.
// Please also see path_to_url
type BatchMeterUsageOutput struct {
_ struct{} `type:"structure"`
// Contains all UsageRecords processed by BatchMeterUsage. These records were
// either honored by AWS Marketplace Metering Service or were invalid.
Results []*UsageRecordResult `type:"list"`
// Contains all UsageRecords that were not processed by BatchMeterUsage. This
// is a list of UsageRecords. You can retry the failed request by making another
// BatchMeterUsage call with this list as input in the BatchMeterUsageRequest.
UnprocessedRecords []*UsageRecord `type:"list"`
}
// String returns the string representation
func (s BatchMeterUsageOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchMeterUsageOutput) GoString() string {
return s.String()
}
// SetResults sets the Results field's value.
func (s *BatchMeterUsageOutput) SetResults(v []*UsageRecordResult) *BatchMeterUsageOutput {
s.Results = v
return s
}
// SetUnprocessedRecords sets the UnprocessedRecords field's value.
func (s *BatchMeterUsageOutput) SetUnprocessedRecords(v []*UsageRecord) *BatchMeterUsageOutput {
s.UnprocessedRecords = v
return s
}
// Please also see path_to_url
type MeterUsageInput struct {
_ struct{} `type:"structure"`
// Checks whether you have the permissions required for the action, but does
// not make the request. If you have the permissions, the request returns DryRunOperation;
// otherwise, it returns UnauthorizedException.
//
// DryRun is a required field
DryRun *bool `type:"boolean" required:"true"`
// Product code is used to uniquely identify a product in AWS Marketplace. The
// product code should be the same as the one used during the publishing of
// a new product.
//
// ProductCode is a required field
ProductCode *string `min:"1" type:"string" required:"true"`
// Timestamp of the hour, recorded in UTC. The seconds and milliseconds portions
// of the timestamp will be ignored.
//
// Timestamp is a required field
Timestamp *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
// It will be one of the fcp dimension name provided during the publishing of
// the product.
//
// UsageDimension is a required field
UsageDimension *string `min:"1" type:"string" required:"true"`
// Consumption value for the hour.
//
// UsageQuantity is a required field
UsageQuantity *int64 `type:"integer" required:"true"`
}
// String returns the string representation
func (s MeterUsageInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s MeterUsageInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *MeterUsageInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "MeterUsageInput"}
if s.DryRun == nil {
invalidParams.Add(request.NewErrParamRequired("DryRun"))
}
if s.ProductCode == nil {
invalidParams.Add(request.NewErrParamRequired("ProductCode"))
}
if s.ProductCode != nil && len(*s.ProductCode) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ProductCode", 1))
}
if s.Timestamp == nil {
invalidParams.Add(request.NewErrParamRequired("Timestamp"))
}
if s.UsageDimension == nil {
invalidParams.Add(request.NewErrParamRequired("UsageDimension"))
}
if s.UsageDimension != nil && len(*s.UsageDimension) < 1 {
invalidParams.Add(request.NewErrParamMinLen("UsageDimension", 1))
}
if s.UsageQuantity == nil {
invalidParams.Add(request.NewErrParamRequired("UsageQuantity"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDryRun sets the DryRun field's value.
func (s *MeterUsageInput) SetDryRun(v bool) *MeterUsageInput {
s.DryRun = &v
return s
}
// SetProductCode sets the ProductCode field's value.
func (s *MeterUsageInput) SetProductCode(v string) *MeterUsageInput {
s.ProductCode = &v
return s
}
// SetTimestamp sets the Timestamp field's value.
func (s *MeterUsageInput) SetTimestamp(v time.Time) *MeterUsageInput {
s.Timestamp = &v
return s
}
// SetUsageDimension sets the UsageDimension field's value.
func (s *MeterUsageInput) SetUsageDimension(v string) *MeterUsageInput {
s.UsageDimension = &v
return s
}
// SetUsageQuantity sets the UsageQuantity field's value.
func (s *MeterUsageInput) SetUsageQuantity(v int64) *MeterUsageInput {
s.UsageQuantity = &v
return s
}
// Please also see path_to_url
type MeterUsageOutput struct {
_ struct{} `type:"structure"`
MeteringRecordId *string `type:"string"`
}
// String returns the string representation
func (s MeterUsageOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s MeterUsageOutput) GoString() string {
return s.String()
}
// SetMeteringRecordId sets the MeteringRecordId field's value.
func (s *MeterUsageOutput) SetMeteringRecordId(v string) *MeterUsageOutput {
s.MeteringRecordId = &v
return s
}
// Contains input to the ResolveCustomer operation.
// Please also see path_to_url
type ResolveCustomerInput struct {
_ struct{} `type:"structure"`
// When a buyer visits your website during the registration process, the buyer
// submits a registration token through the browser. The registration token
// is resolved to obtain a CustomerIdentifier and product code.
//
// RegistrationToken is a required field
RegistrationToken *string `type:"string" required:"true"`
}
// String returns the string representation
func (s ResolveCustomerInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ResolveCustomerInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ResolveCustomerInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ResolveCustomerInput"}
if s.RegistrationToken == nil {
invalidParams.Add(request.NewErrParamRequired("RegistrationToken"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetRegistrationToken sets the RegistrationToken field's value.
func (s *ResolveCustomerInput) SetRegistrationToken(v string) *ResolveCustomerInput {
s.RegistrationToken = &v
return s
}
// The result of the ResolveCustomer operation. Contains the CustomerIdentifier
// and product code.
// Please also see path_to_url
type ResolveCustomerOutput struct {
_ struct{} `type:"structure"`
// The CustomerIdentifier is used to identify an individual customer in your
// application. Calls to BatchMeterUsage require CustomerIdentifiers for each
// UsageRecord.
CustomerIdentifier *string `min:"1" type:"string"`
// The product code is returned to confirm that the buyer is registering for
// your product. Subsequent BatchMeterUsage calls should be made using this
// product code.
ProductCode *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ResolveCustomerOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ResolveCustomerOutput) GoString() string {
return s.String()
}
// SetCustomerIdentifier sets the CustomerIdentifier field's value.
func (s *ResolveCustomerOutput) SetCustomerIdentifier(v string) *ResolveCustomerOutput {
s.CustomerIdentifier = &v
return s
}
// SetProductCode sets the ProductCode field's value.
func (s *ResolveCustomerOutput) SetProductCode(v string) *ResolveCustomerOutput {
s.ProductCode = &v
return s
}
// A UsageRecord indicates a quantity of usage for a given product, customer,
// dimension and time.
//
// Multiple requests with the same UsageRecords as input will be deduplicated
// to prevent double charges.
// Please also see path_to_url
type UsageRecord struct {
_ struct{} `type:"structure"`
// The CustomerIdentifier is obtained through the ResolveCustomer operation
// and represents an individual buyer in your application.
//
// CustomerIdentifier is a required field
CustomerIdentifier *string `min:"1" type:"string" required:"true"`
// During the process of registering a product on AWS Marketplace, up to eight
// dimensions are specified. These represent different units of value in your
// application.
//
// Dimension is a required field
Dimension *string `min:"1" type:"string" required:"true"`
// The quantity of usage consumed by the customer for the given dimension and
// time.
//
// Quantity is a required field
Quantity *int64 `type:"integer" required:"true"`
// Timestamp of the hour, recorded in UTC. The seconds and milliseconds portions
// of the timestamp will be ignored.
//
// Your application can meter usage for up to one hour in the past.
//
// Timestamp is a required field
Timestamp *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
}
// String returns the string representation
func (s UsageRecord) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UsageRecord) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UsageRecord) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UsageRecord"}
if s.CustomerIdentifier == nil {
invalidParams.Add(request.NewErrParamRequired("CustomerIdentifier"))
}
if s.CustomerIdentifier != nil && len(*s.CustomerIdentifier) < 1 {
invalidParams.Add(request.NewErrParamMinLen("CustomerIdentifier", 1))
}
if s.Dimension == nil {
invalidParams.Add(request.NewErrParamRequired("Dimension"))
}
if s.Dimension != nil && len(*s.Dimension) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Dimension", 1))
}
if s.Quantity == nil {
invalidParams.Add(request.NewErrParamRequired("Quantity"))
}
if s.Timestamp == nil {
invalidParams.Add(request.NewErrParamRequired("Timestamp"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCustomerIdentifier sets the CustomerIdentifier field's value.
func (s *UsageRecord) SetCustomerIdentifier(v string) *UsageRecord {
s.CustomerIdentifier = &v
return s
}
// SetDimension sets the Dimension field's value.
func (s *UsageRecord) SetDimension(v string) *UsageRecord {
s.Dimension = &v
return s
}
// SetQuantity sets the Quantity field's value.
func (s *UsageRecord) SetQuantity(v int64) *UsageRecord {
s.Quantity = &v
return s
}
// SetTimestamp sets the Timestamp field's value.
func (s *UsageRecord) SetTimestamp(v time.Time) *UsageRecord {
s.Timestamp = &v
return s
}
// A UsageRecordResult indicates the status of a given UsageRecord processed
// by BatchMeterUsage.
// Please also see path_to_url
type UsageRecordResult struct {
_ struct{} `type:"structure"`
// The MeteringRecordId is a unique identifier for this metering event.
MeteringRecordId *string `type:"string"`
// The UsageRecordResult Status indicates the status of an individual UsageRecord
// processed by BatchMeterUsage.
//
// * Success- The UsageRecord was accepted and honored by BatchMeterUsage.
//
// * CustomerNotSubscribed- The CustomerIdentifier specified is not subscribed
// to your product. The UsageRecord was not honored. Future UsageRecords
// for this customer will fail until the customer subscribes to your product.
//
// * DuplicateRecord- Indicates that the UsageRecord was invalid and not
// honored. A previously metered UsageRecord had the same customer, dimension,
// and time, but a different quantity.
Status *string `type:"string" enum:"UsageRecordResultStatus"`
// The UsageRecord that was part of the BatchMeterUsage request.
UsageRecord *UsageRecord `type:"structure"`
}
// String returns the string representation
func (s UsageRecordResult) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UsageRecordResult) GoString() string {
return s.String()
}
// SetMeteringRecordId sets the MeteringRecordId field's value.
func (s *UsageRecordResult) SetMeteringRecordId(v string) *UsageRecordResult {
s.MeteringRecordId = &v
return s
}
// SetStatus sets the Status field's value.
func (s *UsageRecordResult) SetStatus(v string) *UsageRecordResult {
s.Status = &v
return s
}
// SetUsageRecord sets the UsageRecord field's value.
func (s *UsageRecordResult) SetUsageRecord(v *UsageRecord) *UsageRecordResult {
s.UsageRecord = v
return s
}
const (
// UsageRecordResultStatusSuccess is a UsageRecordResultStatus enum value
UsageRecordResultStatusSuccess = "Success"
// UsageRecordResultStatusCustomerNotSubscribed is a UsageRecordResultStatus enum value
UsageRecordResultStatusCustomerNotSubscribed = "CustomerNotSubscribed"
// UsageRecordResultStatusDuplicateRecord is a UsageRecordResultStatus enum value
UsageRecordResultStatusDuplicateRecord = "DuplicateRecord"
)
```
|
"So High" is a hit song by British recording singer Jay Sean. The song serves as the second single from his fourth studio album, Neon. It was produced by Afrojack, who also features in the song but is uncredited.
Background
In July 2012, during an interview with MTV, Jay Sean revealed about the collaboration with Afrojack. He said "Afrojack was working in the same studio that I was in when I was recording the album, and I happened to bump into him. We recognized each other, so we checked out. He played me a couple of his songs; I played him a couple of my songs. We were like, 'Yo, let's do something together.'"
He added that "The song 'So High' is just ridiculous. Afrojack is such an amazing producer." He also commented on Afrojack, saying that "Again, he lives in the clubs. He knows what works. So when it comes to actually producing, he knows what's gonna have an impact in the club."
Sean further added "So, the production on this is just incredible," "It sounds insane 'cause, again, the songwriting here was the same team who were behind 'Down,' 'Do You Remember' — myself and Jared Cotter. When we write songs, it just works. So that plus Afrojack's unbelievable production skills ... it sounds phenomenal."
Promotion
On 8 October 2012, Jay tweeted via his Official Twitter account "Yo peeps! I'll be premiering my brand new single, "So High" on XFactor in Australia on 16 October!!! @Thexfactor_au #xfactorau #YMCMB".
Release
The song was first released via iTunes in Australian, New Zealand & Japan Market on 17 October 2012 as an EP. The EP included 4 tracks plus 1 unreleased bonus track.
Music video
The video for the song first premiered on the Jay Sean's Vevo account on 5 October 2012. The video's length is 3 minutes 58 seconds.
Synopsis
The video opens with Jay escaping from a rope that ties him to a chair. The scenes then show what happens to him earlier and who ties him up. Clad in a black suit, Jay is mesmerized by a sexy lady (played by Arielle Reitsma) he meets at a party. After they get together, they make out on a chair afloat a pool, before the blonde beauty ties him up to the chair and leaves him alone.
Track listing
Australia, New Zealand & Japan iTunes EP Digital download
"So High" – 3:40
"Sex 101" (feat. Tyga) - 3:58
"Patience" - 3:43
"I'm All Yours" (feat. Pitbull) - 3:38
"I'm All Yours" (feat. Pitbull) [R3hab Full Vocal Remix] - 4:35
USA Promo CD
"So High" (Ralphi Rosario Vocal) - 6:53
"So High" (Ralphi Rosario Dub) - 6:53
"So High" (Ralphi Rosario Radio) - 3:41
"So High" (Papercha$er Vocal) - 5:39
"So High" (Papercha$er Dub) - 6:08
"So High" (Papercha$er Radio) - 4:05
Charts
Charts
References
2012 singles
Jay Sean songs
Songs written by Jay Sean
Cash Money Records singles
Song recordings produced by Orange Factory Music
2012 songs
|
```c
/*====================================================================*
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials
- provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*====================================================================*/
/*
* rotatetest1.c
*
* rotatetest1 filein angle(in degrees) fileout
*/
#include "allheaders.h"
#define NTIMES 180
#define NITERS 3
int main(int argc,
char **argv)
{
l_int32 i, w, h, d, rotflag;
PIX *pixs, *pixt, *pixd;
l_float32 angle, deg2rad, ang;
char *filein, *fileout;
if (argc != 4)
return ERROR_INT(" Syntax: rotatetest1 filein angle fileout",
__func__, 1);
filein = argv[1];
angle = atof(argv[2]);
fileout = argv[3];
setLeptDebugOK(1);
lept_mkdir("lept/rotate");
deg2rad = 3.1415926535 / 180.;
if ((pixs = pixRead(filein)) == NULL)
return ERROR_INT("pix not made", __func__, 1);
if (pixGetDepth(pixs) == 1) {
pixt = pixScaleToGray3(pixs);
pixDestroy(&pixs);
pixs = pixAddBorderGeneral(pixt, 1, 0, 1, 0, 255);
pixDestroy(&pixt);
}
pixGetDimensions(pixs, &w, &h, &d);
lept_stderr("w = %d, h = %d\n", w, h);
#if 0
/* repertory of rotation operations to choose from */
pixd = pixRotateAM(pixs, deg2rad * angle, L_BRING_IN_WHITE);
pixd = pixRotateAMColor(pixs, deg2rad * angle, 0xffffff00);
pixd = pixRotateAMColorFast(pixs, deg2rad * angle, 255);
pixd = pixRotateAMCorner(pixs, deg2rad * angle, L_BRING_IN_WHITE);
pixd = pixRotateShear(pixs, w /2, h / 2, deg2rad * angle,
L_BRING_IN_WHITE);
pixd = pixRotate3Shear(pixs, w /2, h / 2, deg2rad * angle,
L_BRING_IN_WHITE);
pixRotateShearIP(pixs, w / 2, h / 2, deg2rad * angle); pixd = pixs;
#endif
#if 0
/* timing of shear rotation */
for (i = 0; i < NITERS; i++) {
pixd = pixRotateShear(pixs, (i * w) / NITERS,
(i * h) / NITERS, deg2rad * angle,
L_BRING_IN_WHITE);
pixDisplay(pixd, 100 + 20 * i, 100 + 20 * i);
pixDestroy(&pixd);
}
#endif
#if 0
/* timing of in-place shear rotation */
for (i = 0; i < NITERS; i++) {
pixRotateShearIP(pixs, w/2, h/2, deg2rad * angle, L_BRING_IN_WHITE);
/* pixRotateShearCenterIP(pixs, deg2rad * angle, L_BRING_IN_WHITE); */
pixDisplay(pixs, 100 + 20 * i, 100 + 20 * i);
}
pixd = pixs;
if (pixGetDepth(pixd) == 1)
pixWrite(fileout, pixd, IFF_PNG);
else
pixWrite(fileout, pixd, IFF_JFIF_JPEG);
pixDestroy(&pixs);
#endif
#if 0
{
l_float32 pops;
/* timing of various rotation operations (choose) */
startTimer();
w = pixGetWidth(pixs);
h = pixGetHeight(pixs);
for (i = 0; i < NTIMES; i++) {
pixd = pixRotateShearCenter(pixs, deg2rad * angle, L_BRING_IN_WHITE);
pixDestroy(&pixd);
}
pops = (l_float32)(w * h * NTIMES / 1000000.) / stopTimer();
lept_stderr("vers. 1, mpops: %f\n", pops);
startTimer();
w = pixGetWidth(pixs);
h = pixGetHeight(pixs);
for (i = 0; i < NTIMES; i++) {
pixRotateShearIP(pixs, w/2, h/2, deg2rad * angle, L_BRING_IN_WHITE);
}
pops = (l_float32)(w * h * NTIMES / 1000000.) / stopTimer();
lept_stderr("shear, mpops: %f\n", pops);
pixWrite(fileout, pixs, IFF_PNG);
for (i = 0; i < NTIMES; i++) {
pixRotateShearIP(pixs, w/2, h/2, -deg2rad * angle, L_BRING_IN_WHITE);
}
pixWrite("/usr/tmp/junkout", pixs, IFF_PNG);
}
#endif
#if 0
/* area-mapping rotation operations */
pixd = pixRotateAM(pixs, deg2rad * angle, L_BRING_IN_WHITE);
/* pixd = pixRotateAMColorFast(pixs, deg2rad * angle, 255); */
if (pixGetDepth(pixd) == 1)
pixWrite(fileout, pixd, IFF_PNG);
else
pixWrite(fileout, pixd, IFF_JFIF_JPEG);
#endif
#if 0
/* compare the standard area-map color rotation with
* the fast area-map color rotation, on a pixel basis */
{
PIX *pix1, *pix2;
NUMA *nar, *nag, *nab, *naseq;
GPLOT *gplot;
startTimer();
pix1 = pixRotateAMColor(pixs, 0.12, 0xffffff00);
lept_stderr(" standard color rotate: %7.2f sec\n", stopTimer());
pixWrite("/tmp/lept/rotate/color1.jpg", pix1, IFF_JFIF_JPEG);
startTimer();
pix2 = pixRotateAMColorFast(pixs, 0.12, 0xffffff00);
lept_stderr(" fast color rotate: %7.2f sec\n", stopTimer());
pixWrite("/tmp/lept/rotate/color2.jpg", pix2, IFF_JFIF_JPEG);
pixd = pixAbsDifference(pix1, pix2);
pixGetColorHistogram(pixd, 1, &nar, &nag, &nab);
naseq = numaMakeSequence(0., 1., 256);
gplot = gplotCreate("/tmp/lept/rotate/absdiff", GPLOT_PNG,
"Number vs diff", "diff", "number");
gplotAddPlot(gplot, naseq, nar, GPLOT_POINTS, "red");
gplotAddPlot(gplot, naseq, nag, GPLOT_POINTS, "green");
gplotAddPlot(gplot, naseq, nab, GPLOT_POINTS, "blue");
gplotMakeOutput(gplot);
l_fileDisplay("/tmp/lept/rotate/absdiff.png", 100, 100, 1.0);
pixDestroy(&pix1);
pixDestroy(&pix2);
pixDestroy(&pixd);
numaDestroy(&nar);
numaDestroy(&nag);
numaDestroy(&nab);
numaDestroy(&naseq);
gplotDestroy(&gplot);
}
#endif
/* Do a succession of 180 7-degree rotations in a cw
* direction, and unwind the result with another set in
* a ccw direction. Although there is a considerable amount
* of distortion after successive rotations, after all
* 360 rotations, the resulting image is restored to
* its original pristine condition! */
#if 1
rotflag = L_ROTATE_AREA_MAP;
/* rotflag = L_ROTATE_SHEAR; */
/* rotflag = L_ROTATE_SAMPLING; */
ang = 7.0 * deg2rad;
pixGetDimensions(pixs, &w, &h, NULL);
pixd = pixRotate(pixs, ang, rotflag, L_BRING_IN_WHITE, w, h);
pixWrite("/tmp/lept/rotate/rot7.png", pixd, IFF_PNG);
for (i = 1; i < 180; i++) {
pixs = pixd;
pixd = pixRotate(pixs, ang, rotflag, L_BRING_IN_WHITE, w, h);
if ((i % 30) == 0) pixDisplay(pixd, 600, 0);
pixDestroy(&pixs);
}
pixWrite("/tmp/lept/rotate/spin.png", pixd, IFF_PNG);
pixDisplay(pixd, 0, 0);
for (i = 0; i < 180; i++) {
pixs = pixd;
pixd = pixRotate(pixs, -ang, rotflag, L_BRING_IN_WHITE, w, h);
if (i && (i % 30) == 0) pixDisplay(pixd, 600, 500);
pixDestroy(&pixs);
}
pixWrite("/tmp/lept/rotate/unspin.png", pixd, IFF_PNG);
pixDisplay(pixd, 0, 500);
pixDestroy(&pixd);
#endif
return 0;
}
```
|
Events in the year 2020 in Paraguay.
Incumbents
President: Mario Abdo Benítez
Vice President: Hugo Velázquez Moreno
Events
11 September – Former vice-president Óscar Denis is kidnapped by rebels.
18 September – Authorities fear for the health of Denis, 74, after the indigenous man who was captured with him but then released tests positive for COVID-19.
Deaths
January 6 – Zacarías Ortiz Rolón, Roman Catholic bishop (b. 1934).
January 7 – Ana Lucrecia Taglioretti, violinist (b. 1995).
January 31 – César Zabala, 58, footballer (Cerro Porteño, Talleres, national team), bladder cancer.
References
2020s in Paraguay
Years of the 21st century in Paraguay
Paraguay
Paraguay
|
```javascript
import { useMDXComponents } from "@mdx-js/react";
import PropTypes from "prop-types";
import React from "react";
import { Text } from "@chakra-ui/react";
import { useApiDocContext } from "./Context";
export function SourceLink({ canonicalReference }) {
const MDX = useMDXComponents();
const getItem = useApiDocContext();
const item = getItem(canonicalReference);
return item.file ?
<Text fontWeight="normal" size="sm">
<MDX.PrimaryLink
href={`path_to_url{item.file}`}
isExternal
>
({item.file})
</MDX.PrimaryLink>
</Text>
: null;
}
SourceLink.propTypes = {
canonicalReference: PropTypes.string.isRequired,
};
```
|
Frank Robert Cook (March 25, 1924 – August 13, 1982) was a Norwegian jazz musician and band leader.
Cook was born in Oslo, the son of Axel Brynjulf Christensen Cook (1886–1927) and Ingeborg Alma Cook (née Isaksen, 1888–1982). He was known for his performances in the 1950s with Nora Brockstedt, Per Asplin, Lillian Harriet, and Frank Ottersen, in Rowland Greenberg's quintets and the Carsten Klouman Trio, as well as in his own ensemble, Frank Cook's Orkester, where he played bass together with vocalists such as Anders Saus and Per Müller.
Cook made recordings with Sverre Cornelius Lund and Arnstein Johansen in the 1960s, and he appeared on NRK with Kjell Halvorsen (piano) and Bjørn Krokfoss (drums) from 1967 onward. He wrote the film score for Gylne ungdom (1956) and contributed to the volume Toner fra tigerstaden: musikk, mennesker og miljø fra Oslos revyliv 1905–78 (Tones from Tiger Town: Music, People, and the Ambiance of Oslo's Cabaret Life, 1905–78; Fabritius, 1979). His band participated in recordings with artists such as Britt Langlie, Wenche Myhre, and Jan Høiland, and it was a fixture in the early episodes of Roald Øyen's television program Bit for bit, bilde for bilde.
Frank Cook is buried at Vestre Gravlund in Oslo. Frank was the brother of the singer and actress Ingeborg Cook.
References
1924 births
1982 deaths
Norwegian jazz bass guitarists
Burials at Vestre gravlund
Musicians from Oslo
|
```objective-c
/*
* Version macros.
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* You should have received a copy of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef POSTPROC_VERSION_H
#define POSTPROC_VERSION_H
/**
* @file
* Libpostproc version macros
*/
#include "libavutil/avutil.h"
#define LIBPOSTPROC_VERSION_MAJOR 54
#define LIBPOSTPROC_VERSION_MINOR 1
#define LIBPOSTPROC_VERSION_MICRO 100
#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
LIBPOSTPROC_VERSION_MINOR, \
LIBPOSTPROC_VERSION_MICRO)
#define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \
LIBPOSTPROC_VERSION_MINOR, \
LIBPOSTPROC_VERSION_MICRO)
#define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT
#define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION)
#ifndef FF_API_QP_TYPE
#define FF_API_QP_TYPE (LIBPOSTPROC_VERSION_MAJOR < 55)
#endif
#endif /* POSTPROC_VERSION_H */
```
|
King Micheon of Goguryeo (died 331, r. 300–331) was the 15th ruler of Goguryeo, the northernmost of the Three Kingdoms of Korea.
Family
Father: Prince Dolgo (돌고, 咄固)
Grandfather: King Seocheon (서천왕, 西川王)
Grandmother: Queen, of the U clan (왕후 우씨, 王后 于氏)
Wife: Queen, of the Ju clan (왕후 주씨, 王后 周氏); taken as a hostage alongside the king's corpse in 342 when Mo Yong-hwang (모용황) invaded Goguryeo until able to return in 355.
Son: Prince Sayu (사유, 斯由; d. 371)
Son: Prince Mu (무, 武)
Background and Rise to the throne
He was the grandson of the 13th king Seocheon, and the son of the gochuga Go Dol-go, who was killed by his brother, the 14th king Bongsang.
Korean historical records say that Micheon fled and hid as a servant in a miserable life, doing menial tasks such as throwing stones into a pond throughout the night to keep his master from being awakened. It is said a year later he left that house to become salt peddler but failed to gain huge asset. Meanwhile, King Bongsang became increasingly unpopular, and court officials, led by Prime Minister Chang Jo-Ri, carried out a coup that overthrew King Bongsang, and placed King Micheon on the throne.
Reign
Micheon continuously developed the Goguryeo army into a very powerful force. During the disintegration of China's Jin Dynasty, he expanded Goguryeo's borders into the Liaodong Peninsula and the other Chinese commanderies. Since the commanderies were nuisances to be eliminated for Goguryeo’s stability, the first military campaign in 302 headed against the Xuantu Commandery, with conquering Daedong River basins of current Pyeongyang. Consolidating cut-off between commanderies and Chinese mainland, Goguryeo also annexed the Lelang commandery in 313 and Daifang commandery in 314 after attacked Seoanpyeong (西安平; near modern Dandong) in Liaodong. The series of subjugation around northern Korean peninsula and Manchuria held its significance given that 400-year presence of Chinese forces was completely cleared out of Korean peninsula.
In his reign, Goguryeo was faced with growing Xianbei influence in the west, particularly Murong Bu (慕容部) incursions into Liaodong. Micheon allied with other Xianbei tribes against the Murong Bu, but their attack was unsuccessful. In 319, the Goguryeo general Yeo Noja (여노자, 如奴子) was taken captive by the Murong Bu. Throughout this period, Goguryeo and the Murongbu attacked each other's positions in Liaodong, but neither was able to secure regional hegemony.
Since both sides were at stake, Micheon sent its ambassador to Zhou posterior in 330 with a view to making a diversion against Murong Bu from east side.
Death and aftermath
Micheon died and was buried in 331 at Micheon-won, literally the "garden with beautiful stream". Twelve years later, in the reign of King Gogugwon, his remains were dug up by the Former Yan invaders, and held for ransom.
See also
History of Korea
Three Kingdoms of Korea
List of Korean monarchs
References
Goguryeo monarchs
331 deaths
4th-century monarchs in Asia
Year of birth unknown
4th-century Korean people
|
Eretria is an ancient city in Greece.
Eretria may also refer to:
Eretria (moth), a genus of moth
Eretria (Shannara), a character in the Shannara series of fantasy novels
Eretria (Thessaly), a town of ancient Thessaly, Greece
|
```c++
//your_sha256_hash---------------------------------------
//your_sha256_hash---------------------------------------
#include "RuntimeLibraryPch.h"
namespace Js
{
JavascriptPromise::JavascriptPromise(DynamicType * type)
: DynamicObject(type),
isHandled(false),
status(PromiseStatus::PromiseStatusCode_Undefined),
result(nullptr),
reactions(nullptr)
{
Assert(type->GetTypeId() == TypeIds_Promise);
}
// Promise() as defined by ES 2016 Sections 25.4.3.1
Var JavascriptPromise::NewInstance(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
AssertMsg(args.Info.Count > 0, "Should always have implicit 'this'");
ScriptContext* scriptContext = function->GetScriptContext();
JavascriptLibrary* library = scriptContext->GetLibrary();
CHAKRATEL_LANGSTATS_INC_LANGFEATURECOUNT(ES6, Promise, scriptContext);
// SkipDefaultNewObject function flag should have prevented the default object from
// being created, except when call true a host dispatch
Var newTarget = args.GetNewTarget();
bool isCtorSuperCall = JavascriptOperators::GetAndAssertIsConstructorSuperCall(args);
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Promise"));
// 1. If NewTarget is undefined, throw a TypeError exception.
if ((callInfo.Flags & CallFlags_New) != CallFlags_New || (newTarget != nullptr && JavascriptOperators::IsUndefined(newTarget)))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_ClassConstructorCannotBeCalledWithoutNew, _u("Promise"));
}
// 2. If IsCallable(executor) is false, throw a TypeError exception.
if (args.Info.Count < 2 || !JavascriptConversion::IsCallable(args[1]))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_FunctionArgument_NeedFunction, _u("Promise"));
}
RecyclableObject* executor = VarTo<RecyclableObject>(args[1]);
// 3. Let promise be ? OrdinaryCreateFromConstructor(NewTarget, "%PromisePrototype%", <<[[PromiseState]], [[PromiseResult]], [[PromiseFulfillReactions]], [[PromiseRejectReactions]], [[PromiseIsHandled]] >>).
JavascriptPromise* promise = library->CreatePromise();
if (isCtorSuperCall)
{
JavascriptOperators::OrdinaryCreateFromConstructor(VarTo<RecyclableObject>(newTarget), promise, library->GetPromisePrototype(), scriptContext);
}
JavascriptPromiseResolveOrRejectFunction* resolve;
JavascriptPromiseResolveOrRejectFunction* reject;
// 4. Set promise's [[PromiseState]] internal slot to "pending".
// 5. Set promise's [[PromiseFulfillReactions]] internal slot to a new empty List.
// 6. Set promise's [[PromiseRejectReactions]] internal slot to a new empty List.
// 7. Set promise's [[PromiseIsHandled]] internal slot to false.
// 8. Let resolvingFunctions be CreateResolvingFunctions(promise).
InitializePromise(promise, &resolve, &reject, scriptContext);
JavascriptExceptionObject* exception = nullptr;
// 9. Let completion be Call(executor, undefined, << resolvingFunctions.[[Resolve]], resolvingFunctions.[[Reject]] >>).
try
{
BEGIN_SAFE_REENTRANT_CALL(scriptContext->GetThreadContext())
{
CALL_FUNCTION(scriptContext->GetThreadContext(),
executor, CallInfo(CallFlags_Value, 3),
library->GetUndefined(),
resolve,
reject);
}
END_SAFE_REENTRANT_CALL
}
catch (const JavascriptException& err)
{
exception = err.GetAndClear();
}
if (exception != nullptr)
{
// 10. If completion is an abrupt completion, then
// a. Perform ? Call(resolvingFunctions.[[Reject]], undefined, << completion.[[Value]] >>).
TryRejectWithExceptionObject(exception, reject, scriptContext);
}
// 11. Return promise.
return promise;
}
void JavascriptPromise::InitializePromise(JavascriptPromise* promise, JavascriptPromiseResolveOrRejectFunction** resolve, JavascriptPromiseResolveOrRejectFunction** reject, ScriptContext* scriptContext)
{
Assert(promise->GetStatus() == PromiseStatusCode_Undefined);
Assert(resolve);
Assert(reject);
Recycler* recycler = scriptContext->GetRecycler();
JavascriptLibrary* library = scriptContext->GetLibrary();
promise->SetStatus(PromiseStatusCode_Unresolved);
promise->reactions = RecyclerNew(recycler, JavascriptPromiseReactionList, recycler);
JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper* alreadyResolvedRecord = RecyclerNewStructZ(scriptContext->GetRecycler(), JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper);
alreadyResolvedRecord->alreadyResolved = false;
*resolve = library->CreatePromiseResolveOrRejectFunction(EntryResolveOrRejectFunction, promise, false, alreadyResolvedRecord);
*reject = library->CreatePromiseResolveOrRejectFunction(EntryResolveOrRejectFunction, promise, true, alreadyResolvedRecord);
}
BOOL JavascriptPromise::GetDiagValueString(StringBuilder<ArenaAllocator>* stringBuilder, ScriptContext* requestContext)
{
stringBuilder->AppendCppLiteral(_u("[...]"));
return TRUE;
}
BOOL JavascriptPromise::GetDiagTypeString(StringBuilder<ArenaAllocator>* stringBuilder, ScriptContext* requestContext)
{
stringBuilder->AppendCppLiteral(_u("Promise"));
return TRUE;
}
JavascriptPromiseReactionList* JavascriptPromise::GetReactions()
{
return this->reactions;
}
// Promise.all as described in ES 2015 Section 25.4.4.1
Var JavascriptPromise::EntryAll(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Promise.all"));
// 1. Let C be the this value.
Var constructor = args[0];
// 2. If Type(C) is not Object, throw a TypeError exception.
if (!JavascriptOperators::IsObject(constructor))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedObject, _u("Promise.all"));
}
JavascriptLibrary* library = scriptContext->GetLibrary();
Var iterable;
if (args.Info.Count > 1)
{
iterable = args[1];
}
else
{
iterable = library->GetUndefined();
}
// 3. Let promiseCapability be NewPromiseCapability(C).
JavascriptPromiseCapability* promiseCapability = NewPromiseCapability(constructor, scriptContext);
// We know that constructor is an object at this point - further, we even know that it is a constructor - because NewPromiseCapability
// would throw otherwise. That means we can safely cast constructor into a RecyclableObject* now and avoid having to perform ToObject
// as part of the Invoke operation performed inside the loop below.
RecyclableObject* constructorObject = VarTo<RecyclableObject>(constructor);
uint32 index = 0;
JavascriptArray* values = nullptr;
// We can't use a simple counter for the remaining element count since each Promise.all Resolve Element Function needs to know how many
// elements are remaining when it runs and needs to update that counter for all other functions created by this call to Promise.all.
// We can't just use a static variable, either, since this element count is only used for the Promise.all Resolve Element Functions created
// by this call to Promise.all.
your_sha256_hasher* remainingElementsWrapper = RecyclerNewStructZ(scriptContext->GetRecycler(), your_sha256_hasher);
remainingElementsWrapper->remainingElements = 1;
JavascriptExceptionObject* exception = nullptr;
try
{
// 4. Let iterator be GetIterator(iterable).
RecyclableObject* iterator = JavascriptOperators::GetIterator(iterable, scriptContext);
Var resolveVar = JavascriptOperators::GetProperty(constructorObject, Js::PropertyIds::resolve, scriptContext);
if (!JavascriptConversion::IsCallable(resolveVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
RecyclableObject* resolveFunc = VarTo<RecyclableObject>(resolveVar);
values = library->CreateArray(0);
JavascriptOperators::DoIteratorStepAndValue(iterator, scriptContext, [&](Var next)
{
ThreadContext * threadContext = scriptContext->GetThreadContext();
Var nextPromise = nullptr;
BEGIN_SAFE_REENTRANT_CALL(threadContext)
{
nextPromise = CALL_FUNCTION(threadContext,
resolveFunc, Js::CallInfo(CallFlags_Value, 2),
constructorObject,
next);
}
END_SAFE_REENTRANT_CALL
JavascriptPromiseAllResolveElementFunction* resolveElement = library->CreatePromiseAllResolveElementFunction(EntryAllResolveElementFunction, index, values, promiseCapability, remainingElementsWrapper);
remainingElementsWrapper->remainingElements++;
RecyclableObject* nextPromiseObject;
if (!JavascriptConversion::ToObject(nextPromise, scriptContext, &nextPromiseObject))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedObject);
}
Var thenVar = JavascriptOperators::GetProperty(nextPromiseObject, Js::PropertyIds::then, scriptContext);
if (!JavascriptConversion::IsCallable(thenVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
RecyclableObject* thenFunc = VarTo<RecyclableObject>(thenVar);
BEGIN_SAFE_REENTRANT_CALL(threadContext)
{
CALL_FUNCTION(scriptContext->GetThreadContext(),
thenFunc, Js::CallInfo(CallFlags_Value, 3),
nextPromiseObject,
resolveElement,
promiseCapability->GetReject());
}
END_SAFE_REENTRANT_CALL
index++;
});
remainingElementsWrapper->remainingElements--;
if (remainingElementsWrapper->remainingElements == 0)
{
Assert(values != nullptr);
TryCallResolveOrRejectHandler(promiseCapability->GetResolve(), values, scriptContext);
}
}
catch (const JavascriptException& err)
{
exception = err.GetAndClear();
}
if (exception != nullptr)
{
TryRejectWithExceptionObject(exception, promiseCapability->GetReject(), scriptContext);
}
return promiseCapability->GetPromise();
}
Var JavascriptPromise::EntryAny(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Promise.any"));
// 1. Let C be the this value.
Var C = args[0];
// 2. Let promiseCapability be ? NewPromiseCapability(C).
JavascriptPromiseCapability* promiseCapability = NewPromiseCapability(C, scriptContext);
RecyclableObject* constructor = UnsafeVarTo<RecyclableObject>(C);
JavascriptLibrary* library = scriptContext->GetLibrary();
RecyclableObject* promiseResolve = nullptr;
RecyclableObject* iteratorRecord = nullptr;
try {
// 3. Let promiseResolve be GetPromiseResolve(C).
// 4. IfAbruptRejectPromise(promiseResolve, promiseCapability).
Var resolveVar = JavascriptOperators::GetProperty(constructor, Js::PropertyIds::resolve, scriptContext);
if (!JavascriptConversion::IsCallable(resolveVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
promiseResolve = UnsafeVarTo<RecyclableObject>(resolveVar);
// 5. Let iteratorRecord be GetIterator(iterable).
// 6. IfAbruptRejectPromise(iteratorRecord, promiseCapability).
Var iterable = args.Info.Count > 1 ? args[1] : library->GetUndefined();
iteratorRecord = JavascriptOperators::GetIterator(iterable, scriptContext);
}
catch (const JavascriptException& err)
{
JavascriptExceptionObject* exception = err.GetAndClear();
return JavascriptPromise::CreateRejectedPromise(exception->GetThrownObject(scriptContext), scriptContext);
}
// Abstract operation PerformPromiseAny
// 7. Let result be PerformPromiseAny(iteratorRecord, C, promiseCapability, promiseResolve).
try {
// 1. Assert: ! IsConstructor(constructor) is true.
// 2. Assert: resultCapability is a PromiseCapability Record.
// 3. Assert: ! IsCallable(promiseResolve) is true.
// 4. Let errors be a new empty List.
JavascriptArray* errors = library->CreateArray();
// 5. Let remainingElementsCount be a new Record { [[Value]]: 1 }.
your_sha256_hasher* remainingElementsWrapper = RecyclerNewStructZ(scriptContext->GetRecycler(), your_sha256_hasher);
remainingElementsWrapper->remainingElements = 1;
// 6. Let index be 0.
uint32 index = 0;
// 7. Repeat,
JavascriptOperators::DoIteratorStepAndValue(iteratorRecord, scriptContext, [&](Var nextValue) {
// a. Let next be IteratorStep(iteratorRecord).
// e. Let nextValue be IteratorValue(next).
// h. Append undefined to errors.
errors->DirectAppendItem(library->GetUndefined());
// i. Let nextPromise be ? Call(promiseResolve, constructor, << nextValue >> ).
ThreadContext* threadContext = scriptContext->GetThreadContext();
Var nextPromise = nullptr;
BEGIN_SAFE_REENTRANT_CALL(threadContext);
{
nextPromise = CALL_FUNCTION(threadContext,
promiseResolve, Js::CallInfo(CallFlags_Value, 2),
constructor,
nextValue);
}
END_SAFE_REENTRANT_CALL;
JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper* alreadyCalledWrapper = RecyclerNewStructZ(scriptContext->GetRecycler(), JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper);
alreadyCalledWrapper->alreadyResolved = false;
// j. Let steps be the algorithm steps defined in Promise.any Reject Element Functions.
// k. Let rejectElement be ! CreateBuiltinFunction(steps, << [[AlreadyCalled]], [[Index]], [[Errors]], [[Capability]], [[RemainingElements]] >> ).
// p. Set rejectElement.[[RemainingElements]] to remainingElementsCount.
Var rejectElement = library->CreatePromiseAnyRejectElementFunction(EntryAnyRejectElementFunction, index, errors, promiseCapability, remainingElementsWrapper, alreadyCalledWrapper);
// q. Set remainingElementsCount.[[Value]] to remainingElementsCount.[[Value]] + 1.
remainingElementsWrapper->remainingElements++;
// r. Perform ? Invoke(nextPromise, "then", << resultCapability.[[Resolve]], rejectElement >> ).
RecyclableObject* nextPromiseObject;
if (!JavascriptConversion::ToObject(nextPromise, scriptContext, &nextPromiseObject))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedObject);
}
Var thenVar = JavascriptOperators::GetProperty(nextPromiseObject, Js::PropertyIds::then, scriptContext);
if (!JavascriptConversion::IsCallable(thenVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
RecyclableObject* thenFunc = UnsafeVarTo<RecyclableObject>(thenVar);
BEGIN_SAFE_REENTRANT_CALL(threadContext)
{
CALL_FUNCTION(scriptContext->GetThreadContext(),
thenFunc, Js::CallInfo(CallFlags_Value, 3),
nextPromiseObject,
promiseCapability->GetResolve(),
rejectElement);
}
END_SAFE_REENTRANT_CALL;
// s.Increase index by 1.
index++;
});
// 7.d. If next is false, then
// 7.d.i. Set iteratorRecord.[[Done]] to true.
// 7.d.ii. Set remainingElementsCount.[[Value]] to remainingElementsCount.[[Value]] - 1.
remainingElementsWrapper->remainingElements--;
// 7.d.iii. If remainingElementsCount.[[Value]] is 0, then
if (remainingElementsWrapper->remainingElements == 0)
{
// 7.d.iii.1 Let error be a newly created AggregateError object.
JavascriptError* pError = library->CreateAggregateError();
JavascriptError::SetErrorsList(pError, errors, scriptContext);
JavascriptError::SetErrorMessage(pError, JSERR_PromiseAllRejected, _u(""), scriptContext);
JavascriptExceptionOperators::Throw(pError, scriptContext);
}
}
catch (const JavascriptException& err)
{
// 8. If result is an abrupt completion, then
// a. If iteratorRecord.[[Done]] is false, set result to IteratorClose(iteratorRecord, result).
// b. IfAbruptRejectPromise(result, promiseCapability).
JavascriptExceptionObject* exception = err.GetAndClear();
TryRejectWithExceptionObject(exception, promiseCapability->GetReject(), scriptContext);
}
return promiseCapability->GetPromise();
}
Var JavascriptPromise::EntryAnyRejectElementFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
ScriptContext* scriptContext = function->GetScriptContext();
PROBE_STACK(scriptContext, Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
JavascriptLibrary* library = scriptContext->GetLibrary();
Var undefinedVar = library ->GetUndefined();
Var x = args.Info.Count > 1 ? args[1] : undefinedVar;
// 1. Let F be the active function object.
JavascriptPromiseAnyRejectElementFunction* anyRejectElementFunction = VarTo<JavascriptPromiseAnyRejectElementFunction>(function);
// 2. Let alreadyCalled be F. [[AlreadyCalled]].
// 3. If alreadyCalled. [[Value]] is true, return undefined.
if (anyRejectElementFunction->IsAlreadyCalled())
{
return undefinedVar;
}
// 4. Set alreadyCalled.[[Value]] to true.
anyRejectElementFunction->SetAlreadyCalled(true);
// 5. Let index be F.[[Index]].
uint32 index = anyRejectElementFunction->GetIndex();
// 6. Let errors be F.[[Errors]].
JavascriptArray* errors = anyRejectElementFunction->GetValues();
// 7. Let promiseCapability be F.[[Capability]].
JavascriptPromiseCapability* promiseCapability = anyRejectElementFunction->GetCapabilities();
// 9. Set errors[index] to x.
errors->DirectSetItemAt(index, x);
// 8. Let remainingElementsCount be F.[[RemainingElements]].
// 10. Set remainingElementsCount.[[Value]] to remainingElementsCount.[[Value]] - 1.
// 11. If remainingElementsCount.[[Value]] is 0, then
if (anyRejectElementFunction->DecrementRemainingElements() == 0)
{
// a. Let error be a newly created AggregateError object.
JavascriptError* pError = library->CreateAggregateError();
// b. Perform ! DefinePropertyOrThrow(error, "errors", Property Descriptor { [[Configurable]]: true, [[Enumerable]]: false, [[Writable]]: true, [[Value]]: ! CreateArrayFromList(errors) }).
JavascriptError::SetErrorsList(pError, errors, scriptContext);
JavascriptError::SetErrorMessage(pError, JSERR_PromiseAllRejected, _u(""), scriptContext);
// c. Return ? Call(promiseCapability.[[Reject]], undefined, << error >> ).
return TryCallResolveOrRejectHandler(promiseCapability->GetReject(), pError, scriptContext);
}
return undefinedVar;
}
Var JavascriptPromise::EntryAllSettled(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Promise.allSettled"));
// 1. Let C be the this value.
Var constructor = args[0];
// 2. If Type(C) is not Object, throw a TypeError exception.
if (!JavascriptOperators::IsObject(constructor))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedObject, _u("Promise.allSettled"));
}
JavascriptLibrary* library = scriptContext->GetLibrary();
Var iterable;
if (args.Info.Count > 1)
{
iterable = args[1];
}
else
{
iterable = library->GetUndefined();
}
// 3. Let promiseCapability be NewPromiseCapability(C).
JavascriptPromiseCapability* promiseCapability = NewPromiseCapability(constructor, scriptContext);
// We know that constructor is an object at this point - further, we even know that it is a constructor - because NewPromiseCapability
// would throw otherwise. That means we can safely cast constructor into a RecyclableObject* now and avoid having to perform ToObject
// as part of the Invoke operation performed inside the loop below.
RecyclableObject* constructorObject = VarTo<RecyclableObject>(constructor);
uint32 index = 0;
JavascriptArray* values = nullptr;
// We can't use a simple counter for the remaining element count since each Promise.all Resolve Element Function needs to know how many
// elements are remaining when it runs and needs to update that counter for all other functions created by this call to Promise.all.
// We can't just use a static variable, either, since this element count is only used for the Promise.all Resolve Element Functions created
// by this call to Promise.all.
your_sha256_hasher* remainingElementsWrapper = RecyclerNewStructZ(scriptContext->GetRecycler(), your_sha256_hasher);
remainingElementsWrapper->remainingElements = 1;
JavascriptExceptionObject* exception = nullptr;
try
{
// 4. Let iterator be GetIterator(iterable).
RecyclableObject* iterator = JavascriptOperators::GetIterator(iterable, scriptContext);
// Abstract operation PerformPromiseAllSettled
Var resolveVar = JavascriptOperators::GetProperty(constructorObject, Js::PropertyIds::resolve, scriptContext);
if (!JavascriptConversion::IsCallable(resolveVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
RecyclableObject* resolveFunc = VarTo<RecyclableObject>(resolveVar);
values = library->CreateArray(0);
JavascriptOperators::DoIteratorStepAndValue(iterator, scriptContext, [&](Var next)
{
ThreadContext* threadContext = scriptContext->GetThreadContext();
Var nextPromise = nullptr;
BEGIN_SAFE_REENTRANT_CALL(threadContext)
{
nextPromise = CALL_FUNCTION(threadContext,
resolveFunc, Js::CallInfo(CallFlags_Value, 2),
constructorObject,
next);
}
END_SAFE_REENTRANT_CALL
JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper* alreadyCalledWrapper = RecyclerNewStructZ(scriptContext->GetRecycler(), JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper);
alreadyCalledWrapper->alreadyResolved = false;
Var resolveElement = library->CreatePromiseAllSettledResolveOrRejectElementFunction(EntryAllSettledResolveOrRejectElementFunction, index, values, promiseCapability, remainingElementsWrapper, alreadyCalledWrapper, false);
Var rejectElement = library->CreatePromiseAllSettledResolveOrRejectElementFunction(EntryAllSettledResolveOrRejectElementFunction, index, values, promiseCapability, remainingElementsWrapper, alreadyCalledWrapper, true);
remainingElementsWrapper->remainingElements++;
RecyclableObject* nextPromiseObject;
if (!JavascriptConversion::ToObject(nextPromise, scriptContext, &nextPromiseObject))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedObject);
}
Var thenVar = JavascriptOperators::GetProperty(nextPromiseObject, Js::PropertyIds::then, scriptContext);
if (!JavascriptConversion::IsCallable(thenVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
RecyclableObject* thenFunc = VarTo<RecyclableObject>(thenVar);
BEGIN_SAFE_REENTRANT_CALL(threadContext)
{
CALL_FUNCTION(scriptContext->GetThreadContext(),
thenFunc, Js::CallInfo(CallFlags_Value, 3),
nextPromiseObject,
resolveElement,
rejectElement);
}
END_SAFE_REENTRANT_CALL
index++;
});
remainingElementsWrapper->remainingElements--;
if (remainingElementsWrapper->remainingElements == 0)
{
Assert(values != nullptr);
TryCallResolveOrRejectHandler(promiseCapability->GetResolve(), values, scriptContext);
}
}
catch (const JavascriptException& err)
{
exception = err.GetAndClear();
}
if (exception != nullptr)
{
TryRejectWithExceptionObject(exception, promiseCapability->GetReject(), scriptContext);
}
return promiseCapability->GetPromise();
}
// Promise.prototype.catch as defined in ES 2015 Section 25.4.5.1
Var JavascriptPromise::EntryCatch(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Promise.prototype.catch"));
RecyclableObject* promise;
if (!JavascriptConversion::ToObject(args[0], scriptContext, &promise))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedObject, _u("Promise.prototype.catch"));
}
Var funcVar = JavascriptOperators::GetProperty(promise, Js::PropertyIds::then, scriptContext);
if (!JavascriptConversion::IsCallable(funcVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_FunctionArgument_NeedFunction, _u("Promise.prototype.catch"));
}
Var onRejected;
RecyclableObject* undefinedVar = scriptContext->GetLibrary()->GetUndefined();
if (args.Info.Count > 1)
{
onRejected = args[1];
}
else
{
onRejected = undefinedVar;
}
RecyclableObject* func = VarTo<RecyclableObject>(funcVar);
BEGIN_SAFE_REENTRANT_CALL(scriptContext->GetThreadContext())
{
return CALL_FUNCTION(scriptContext->GetThreadContext(),
func, Js::CallInfo(CallFlags_Value, 3),
promise,
undefinedVar,
onRejected);
}
END_SAFE_REENTRANT_CALL
}
// Promise.race as described in ES 2015 Section 25.4.4.3
Var JavascriptPromise::EntryRace(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Promise.race"));
// 1. Let C be the this value.
Var constructor = args[0];
// 2. If Type(C) is not Object, throw a TypeError exception.
if (!JavascriptOperators::IsObject(constructor))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedObject, _u("Promise.race"));
}
Var undefinedVar = scriptContext->GetLibrary()->GetUndefined();
Var iterable;
if (args.Info.Count > 1)
{
iterable = args[1];
}
else
{
iterable = undefinedVar;
}
// 3. Let promiseCapability be NewPromiseCapability(C).
JavascriptPromiseCapability* promiseCapability = NewPromiseCapability(constructor, scriptContext);
// We know that constructor is an object at this point - further, we even know that it is a constructor - because NewPromiseCapability
// would throw otherwise. That means we can safely cast constructor into a RecyclableObject* now and avoid having to perform ToObject
// as part of the Invoke operation performed inside the loop below.
RecyclableObject* constructorObject = VarTo<RecyclableObject>(constructor);
JavascriptExceptionObject* exception = nullptr;
try
{
// 4. Let iterator be GetIterator(iterable).
RecyclableObject* iterator = JavascriptOperators::GetIterator(iterable, scriptContext);
Var resolveVar = JavascriptOperators::GetProperty(constructorObject, Js::PropertyIds::resolve, scriptContext);
if (!JavascriptConversion::IsCallable(resolveVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
RecyclableObject* resolveFunc = VarTo<RecyclableObject>(resolveVar);
JavascriptOperators::DoIteratorStepAndValue(iterator, scriptContext, [&](Var next)
{
ThreadContext * threadContext = scriptContext->GetThreadContext();
Var nextPromise = nullptr;
BEGIN_SAFE_REENTRANT_CALL(threadContext)
{
nextPromise = CALL_FUNCTION(threadContext,
resolveFunc, Js::CallInfo(CallFlags_Value, 2),
constructorObject,
next);
}
END_SAFE_REENTRANT_CALL
RecyclableObject* nextPromiseObject;
if (!JavascriptConversion::ToObject(nextPromise, scriptContext, &nextPromiseObject))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedObject);
}
Var thenVar = JavascriptOperators::GetProperty(nextPromiseObject, Js::PropertyIds::then, scriptContext);
if (!JavascriptConversion::IsCallable(thenVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
RecyclableObject* thenFunc = VarTo<RecyclableObject>(thenVar);
BEGIN_SAFE_REENTRANT_CALL(threadContext)
{
CALL_FUNCTION(threadContext,
thenFunc, Js::CallInfo(CallFlags_Value, 3),
nextPromiseObject,
promiseCapability->GetResolve(),
promiseCapability->GetReject());
}
END_SAFE_REENTRANT_CALL
});
}
catch (const JavascriptException& err)
{
exception = err.GetAndClear();
}
if (exception != nullptr)
{
TryRejectWithExceptionObject(exception, promiseCapability->GetReject(), scriptContext);
}
return promiseCapability->GetPromise();
}
// Promise.reject as described in ES 2015 Section 25.4.4.4
Var JavascriptPromise::EntryReject(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Promise.reject"));
// 1. Let C be the this value.
Var constructor = args[0];
// 2. If Type(C) is not Object, throw a TypeError exception.
if (!JavascriptOperators::IsObject(constructor))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedObject, _u("Promise.reject"));
}
Var r;
if (args.Info.Count > 1)
{
r = args[1];
}
else
{
r = scriptContext->GetLibrary()->GetUndefined();
}
// 3. Let promiseCapability be NewPromiseCapability(C).
// 4. Perform ? Call(promiseCapability.[[Reject]], undefined, << r >>).
// 5. Return promiseCapability.[[Promise]].
return CreateRejectedPromise(r, scriptContext, constructor);
}
// Promise.resolve as described in ES 2015 Section 25.4.4.5
Var JavascriptPromise::EntryResolve(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Promise.resolve"));
Var x;
// 1. Let C be the this value.
Var constructor = args[0];
// 2. If Type(C) is not Object, throw a TypeError exception.
if (!JavascriptOperators::IsObject(constructor))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedObject, _u("Promise.resolve"));
}
if (args.Info.Count > 1)
{
x = args[1];
}
else
{
x = scriptContext->GetLibrary()->GetUndefined();
}
return PromiseResolve(constructor, x, scriptContext);
}
JavascriptPromise* JavascriptPromise::InternalPromiseResolve(Var value, ScriptContext* scriptContext)
{
Var constructor = scriptContext->GetLibrary()->GetPromiseConstructor();
Var promise = PromiseResolve(constructor, value, scriptContext);
return UnsafeVarTo<JavascriptPromise>(promise);
}
Var JavascriptPromise::PromiseResolve(Var constructor, Var value, ScriptContext* scriptContext)
{
if (VarIs<JavascriptPromise>(value))
{
Var valueConstructor = JavascriptOperators::GetProperty(
(RecyclableObject*)value,
PropertyIds::constructor,
scriptContext);
// If `value` is a Promise or Promise subclass instance and its "constructor"
// property is `constructor`, then return the value unchanged
if (JavascriptConversion::SameValue(valueConstructor, constructor))
{
return value;
}
}
return CreateResolvedPromise(value, scriptContext, constructor);
}
// Promise.prototype.then as described in ES 2015 Section 25.4.5.3
Var JavascriptPromise::EntryThen(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Promise.prototype.then"));
if (args.Info.Count < 1 || !VarIs<JavascriptPromise>(args[0]))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedPromise, _u("Promise.prototype.then"));
}
JavascriptLibrary* library = scriptContext->GetLibrary();
JavascriptPromise* promise = VarTo<JavascriptPromise>(args[0]);
RecyclableObject* rejectionHandler;
RecyclableObject* fulfillmentHandler;
if (args.Info.Count > 1 && JavascriptConversion::IsCallable(args[1]))
{
fulfillmentHandler = VarTo<RecyclableObject>(args[1]);
}
else
{
fulfillmentHandler = library->GetIdentityFunction();
}
if (args.Info.Count > 2 && JavascriptConversion::IsCallable(args[2]))
{
rejectionHandler = VarTo<RecyclableObject>(args[2]);
}
else
{
rejectionHandler = library->GetThrowerFunction();
}
return CreateThenPromise(promise, fulfillmentHandler, rejectionHandler, scriptContext);
}
// Promise.prototype.finally as described in the draft ES 2018 #sec-promise.prototype.finally
Var JavascriptPromise::EntryFinally(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Promise.prototype.finally"));
// 1. Let promise be the this value
// 2. If Type(promise) is not Object, throw a TypeError exception
if (args.Info.Count < 1 || !JavascriptOperators::IsObject(args[0]))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedObject, _u("Promise.prototype.finally"));
}
JavascriptLibrary* library = scriptContext->GetLibrary();
RecyclableObject* promise = UnsafeVarTo<RecyclableObject>(args[0]);
// 3. Let C be ? SpeciesConstructor(promise, %Promise%).
RecyclableObject* constructor = JavascriptOperators::SpeciesConstructor(promise, scriptContext->GetLibrary()->GetPromiseConstructor(), scriptContext);
// 4. Assert IsConstructor(C)
Assert(JavascriptOperators::IsConstructor(constructor));
// 5. If IsCallable(onFinally) is false
// a. Let thenFinally be onFinally
// b. Let catchFinally be onFinally
// 6. Else,
// a. Let thenFinally be a new built-in function object as defined in ThenFinally Function.
// b. Let catchFinally be a new built-in function object as defined in CatchFinally Function.
// c. Set thenFinally and catchFinally's [[Constructor]] internal slots to C.
// d. Set thenFinally and catchFinally's [[OnFinally]] internal slots to onFinally.
Var thenFinally = nullptr;
Var catchFinally = nullptr;
if (args.Info.Count > 1)
{
if (JavascriptConversion::IsCallable(args[1]))
{
//note to avoid duplicating code the ThenFinallyFunction works as both thenFinally and catchFinally using a flag
thenFinally = library->CreatePromiseThenFinallyFunction(EntryThenFinallyFunction, VarTo<RecyclableObject>(args[1]), constructor, false);
catchFinally = library->CreatePromiseThenFinallyFunction(EntryThenFinallyFunction, VarTo<RecyclableObject>(args[1]), constructor, true);
}
else
{
thenFinally = args[1];
catchFinally = args[1];
}
}
else
{
thenFinally = library->GetUndefined();
catchFinally = library->GetUndefined();
}
Assert(thenFinally != nullptr && catchFinally != nullptr);
// 7. Return ? Invoke(promise, "then", << thenFinally, catchFinally >>).
Var funcVar = JavascriptOperators::GetProperty(promise, Js::PropertyIds::then, scriptContext);
if (!JavascriptConversion::IsCallable(funcVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_FunctionArgument_NeedFunction, _u("Promise.prototype.finally"));
}
RecyclableObject* func = UnsafeVarTo<RecyclableObject>(funcVar);
BEGIN_SAFE_REENTRANT_CALL(scriptContext->GetThreadContext())
{
return CALL_FUNCTION(scriptContext->GetThreadContext(),
func, Js::CallInfo(CallFlags_Value, 3),
promise,
thenFinally,
catchFinally);
}
END_SAFE_REENTRANT_CALL
}
// ThenFinallyFunction as described in draft ES2018 #sec-thenfinallyfunctions
// AND CatchFinallyFunction as described in draft ES2018 #sec-catchfinallyfunctions
Var JavascriptPromise::EntryThenFinallyFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
JavascriptLibrary* library = scriptContext->GetLibrary();
JavascriptPromiseThenFinallyFunction* thenFinallyFunction = VarTo<JavascriptPromiseThenFinallyFunction>(function);
// 1. Let onFinally be F.[[OnFinally]]
// 2. Assert: IsCallable(onFinally)=true
Assert(JavascriptConversion::IsCallable(thenFinallyFunction->GetOnFinally()));
// 3. Let result be ? Call(onFinally, undefined)
Var result = nullptr;
BEGIN_SAFE_REENTRANT_CALL(scriptContext->GetThreadContext())
{
result = CALL_FUNCTION(scriptContext->GetThreadContext(), thenFinallyFunction->GetOnFinally(), CallInfo(CallFlags_Value, 1), library->GetUndefined());
}
END_SAFE_REENTRANT_CALL
Assert(result);
// 4. Let C be F.[[Constructor]]
// 5. Assert IsConstructor(C)
Assert(JavascriptOperators::IsConstructor(thenFinallyFunction->GetConstructor()));
// 6. Let promise be ? PromiseResolve(c, result)
Var promiseVar = CreateResolvedPromise(result, scriptContext, thenFinallyFunction->GetConstructor());
// 7. Let valueThunk be equivalent to a function that returns value
// OR 7. Let thrower be equivalent to a function that throws reason
Var valueOrReason = nullptr;
if (args.Info.Count > 1)
{
valueOrReason = args[1];
}
else
{
valueOrReason = scriptContext->GetLibrary()->GetUndefined();
}
JavascriptPromiseThunkFinallyFunction* thunkFinallyFunction = library->CreatePromiseThunkFinallyFunction(EntryThunkFinallyFunction, valueOrReason, thenFinallyFunction->GetShouldThrow());
// 8. Return ? Invoke(promise, "then", <<valueThunk>>)
RecyclableObject* promise = JavascriptOperators::ToObject(promiseVar, scriptContext);
Var funcVar = JavascriptOperators::GetProperty(promise, Js::PropertyIds::then, scriptContext);
if (!JavascriptConversion::IsCallable(funcVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_FunctionArgument_NeedFunction, _u("Promise.prototype.finally"));
}
RecyclableObject* func = VarTo<RecyclableObject>(funcVar);
BEGIN_SAFE_REENTRANT_CALL(scriptContext->GetThreadContext())
{
return CALL_FUNCTION(scriptContext->GetThreadContext(),
func, Js::CallInfo(CallFlags_Value, 2),
promiseVar,
thunkFinallyFunction);
}
END_SAFE_REENTRANT_CALL
}
// valueThunk Function as referenced within draft ES2018 #sec-thenfinallyfunctions
// and thrower as referenced within draft ES2018 #sec-catchfinallyfunctions
Var JavascriptPromise::EntryThunkFinallyFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
JavascriptPromiseThunkFinallyFunction* thunkFinallyFunction = VarTo<JavascriptPromiseThunkFinallyFunction>(function);
if (!thunkFinallyFunction->GetShouldThrow())
{
return thunkFinallyFunction->GetValue();
}
else
{
JavascriptExceptionOperators::Throw(thunkFinallyFunction->GetValue(), function->GetScriptContext());
}
}
// Promise Reject and Resolve Functions as described in ES 2015 Section 25.4.1.4.1 and 25.4.1.4.2
Var JavascriptPromise::EntryResolveOrRejectFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
JavascriptLibrary* library = scriptContext->GetLibrary();
Var undefinedVar = library->GetUndefined();
Var resolution;
if (args.Info.Count > 1)
{
resolution = args[1];
}
else
{
resolution = undefinedVar;
}
JavascriptPromiseResolveOrRejectFunction* resolveOrRejectFunction = VarTo<JavascriptPromiseResolveOrRejectFunction>(function);
if (resolveOrRejectFunction->IsAlreadyResolved())
{
return undefinedVar;
}
resolveOrRejectFunction->SetAlreadyResolved(true);
bool rejecting = resolveOrRejectFunction->IsRejectFunction();
JavascriptPromise* promise = resolveOrRejectFunction->GetPromise();
return promise->ResolveHelper(resolution, rejecting, scriptContext);
}
Var JavascriptPromise::Resolve(Var resolution, ScriptContext* scriptContext)
{
return this->ResolveHelper(resolution, false, scriptContext);
}
Var JavascriptPromise::Reject(Var resolution, ScriptContext* scriptContext)
{
return this->ResolveHelper(resolution, true, scriptContext);
}
Var JavascriptPromise::ResolveHelper(Var resolution, bool isRejecting, ScriptContext* scriptContext)
{
JavascriptLibrary* library = scriptContext->GetLibrary();
Var undefinedVar = library->GetUndefined();
// We only need to check SameValue and check for thenable resolution in the Resolve function case (not Reject)
if (!isRejecting)
{
if (JavascriptConversion::SameValue(resolution, this))
{
JavascriptError* selfResolutionError = scriptContext->GetLibrary()->CreateTypeError();
JavascriptError::SetErrorMessage(selfResolutionError, JSERR_PromiseSelfResolution, _u(""), scriptContext);
resolution = selfResolutionError;
isRejecting = true;
}
else if (VarIs<RecyclableObject>(resolution))
{
try
{
RecyclableObject* thenable = VarTo<RecyclableObject>(resolution);
Var then = JavascriptOperators::GetPropertyNoCache(thenable, Js::PropertyIds::then, scriptContext);
if (JavascriptConversion::IsCallable(then))
{
JavascriptPromiseResolveThenableTaskFunction* resolveThenableTaskFunction = library->CreatePromiseResolveThenableTaskFunction(EntryResolveThenableTaskFunction, this, thenable, VarTo<RecyclableObject>(then));
library->EnqueueTask(resolveThenableTaskFunction);
return undefinedVar;
}
}
catch (const JavascriptException& err)
{
resolution = err.GetAndClear()->GetThrownObject(scriptContext);
if (resolution == nullptr)
{
resolution = undefinedVar;
}
isRejecting = true;
}
}
}
PromiseStatus newStatus;
// Need to check rejecting state again as it might have changed due to failures
if (isRejecting)
{
newStatus = PromiseStatusCode_HasRejection;
if (!GetIsHandled())
{
scriptContext->GetLibrary()->CallNativeHostPromiseRejectionTracker(this, resolution, false);
}
}
else
{
newStatus = PromiseStatusCode_HasResolution;
}
Assert(resolution != nullptr);
// SList only supports "prepend" operation, so we need to reverse the list
// before triggering reactions
JavascriptPromiseReactionList* reactions = this->GetReactions();
if (reactions != nullptr)
{
reactions->Reverse();
}
this->result = resolution;
this->reactions = nullptr;
this->SetStatus(newStatus);
return TriggerPromiseReactions(reactions, isRejecting, resolution, scriptContext);
}
// Promise Capabilities Executor Function as described in ES 2015 Section 25.4.1.6.2
Var JavascriptPromise::EntryCapabilitiesExecutorFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
Var undefinedVar = scriptContext->GetLibrary()->GetUndefined();
Var resolve = undefinedVar;
Var reject = undefinedVar;
if (args.Info.Count > 1)
{
resolve = args[1];
if (args.Info.Count > 2)
{
reject = args[2];
}
}
JavascriptPromiseCapabilitiesExecutorFunction* capabilitiesExecutorFunction = VarTo<JavascriptPromiseCapabilitiesExecutorFunction>(function);
JavascriptPromiseCapability* promiseCapability = capabilitiesExecutorFunction->GetCapability();
if (!JavascriptOperators::IsUndefined(promiseCapability->GetResolve()) || !JavascriptOperators::IsUndefined(promiseCapability->GetReject()))
{
JavascriptError::ThrowTypeErrorVar(scriptContext, JSERR_UnexpectedMetadataFailure, _u("Promise"));
}
promiseCapability->SetResolve(resolve);
promiseCapability->SetReject(reject);
return undefinedVar;
}
// Promise Reaction Task Function as described in ES 2015 Section 25.4.2.1
Var JavascriptPromise::EntryReactionTaskFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
Var undefinedVar = scriptContext->GetLibrary()->GetUndefined();
JavascriptPromiseReactionTaskFunction* reactionTaskFunction = VarTo<JavascriptPromiseReactionTaskFunction>(function);
JavascriptPromiseReaction* reaction = reactionTaskFunction->GetReaction();
Var argument = reactionTaskFunction->GetArgument();
JavascriptPromiseCapability* promiseCapability = reaction->GetCapabilities();
RecyclableObject* handler = reaction->GetHandler();
Var handlerResult = nullptr;
JavascriptExceptionObject* exception = nullptr;
{
bool isPromiseRejectionHandled = true;
if (scriptContext->IsScriptContextInDebugMode())
{
// only necessary to determine if false if debugger is attached. This way we'll
// correctly break on exceptions raised in promises that result in uhandled rejection
// notifications
Var promiseVar = promiseCapability->GetPromise();
if (VarIs<JavascriptPromise>(promiseVar))
{
JavascriptPromise* promise = VarTo<JavascriptPromise>(promiseVar);
isPromiseRejectionHandled = !promise->WillRejectionBeUnhandled();
}
}
Js::JavascriptExceptionOperators::AutoCatchHandlerExists autoCatchHandlerExists(scriptContext, isPromiseRejectionHandled);
try
{
BEGIN_SAFE_REENTRANT_CALL(scriptContext->GetThreadContext())
{
handlerResult = CALL_FUNCTION(scriptContext->GetThreadContext(),
handler, Js::CallInfo(Js::CallFlags::CallFlags_Value, 2),
undefinedVar,
argument);
}
END_SAFE_REENTRANT_CALL
}
catch (const JavascriptException& err)
{
exception = err.GetAndClear();
}
}
if (exception != nullptr)
{
return TryRejectWithExceptionObject(exception, promiseCapability->GetReject(), scriptContext);
}
Assert(handlerResult != nullptr);
return TryCallResolveOrRejectHandler(promiseCapability->GetResolve(), handlerResult, scriptContext);
}
/**
* Determine if at the current point in time, the given promise has a path of reactions that result
* in an unhandled rejection. This doesn't account for potential of a rejection handler added later
* in time.
*/
bool JavascriptPromise::WillRejectionBeUnhandled()
{
bool willBeUnhandled = !this->GetIsHandled();
if (!willBeUnhandled)
{
// if this promise is handled, then we need to do a depth-first search over this promise's reject
// reactions. If we find a reaction that
// - associated promise is "unhandled" (ie, it's never been "then'd")
// - AND its rejection handler is our default "thrower function"
// then this promise results in an unhandled rejection path.
JsUtil::Stack<JavascriptPromise*, HeapAllocator> stack(&HeapAllocator::Instance);
SimpleHashTable<JavascriptPromise*, int, HeapAllocator> visited(&HeapAllocator::Instance);
stack.Push(this);
visited.Add(this, 1);
while (!willBeUnhandled && !stack.Empty())
{
JavascriptPromise * curr = stack.Pop();
{
JavascriptPromiseReactionList* reactions = curr->GetReactions();
JavascriptPromiseReactionList::Iterator it = reactions->GetIterator();
while (it.Next())
{
JavascriptPromiseReactionPair pair = it.Data();
JavascriptPromiseReaction* reaction = pair.rejectReaction;
Var promiseVar = reaction->GetCapabilities()->GetPromise();
if (VarIs<JavascriptPromise>(promiseVar))
{
JavascriptPromise* p = VarTo<JavascriptPromise>(promiseVar);
if (!p->GetIsHandled())
{
RecyclableObject* handler = reaction->GetHandler();
if (VarIs<JavascriptFunction>(handler))
{
JavascriptFunction* func = VarTo<JavascriptFunction>(handler);
FunctionInfo* functionInfo = func->GetFunctionInfo();
#ifdef DEBUG
if (!func->IsCrossSiteObject())
{
// assert that Thrower function's FunctionInfo hasn't changed
AssertMsg(func->GetScriptContext()->GetLibrary()->GetThrowerFunction()->GetFunctionInfo() == &JavascriptPromise::EntryInfo::Thrower, "unexpected FunctionInfo for thrower function!");
}
#endif
// If the function info is the default thrower function's function info, then assume that this is unhandled
// this will work across script contexts
if (functionInfo == &JavascriptPromise::EntryInfo::Thrower)
{
willBeUnhandled = true;
break;
}
}
}
AssertMsg(visited.HasEntry(p) == false, "Unexpected cycle in promise reaction tree!");
if (!visited.HasEntry(p))
{
stack.Push(p);
visited.Add(p, 1);
}
}
}
}
}
}
return willBeUnhandled;
}
Var JavascriptPromise::TryCallResolveOrRejectHandler(Var handler, Var value, ScriptContext* scriptContext)
{
Var undefinedVar = scriptContext->GetLibrary()->GetUndefined();
if (!JavascriptConversion::IsCallable(handler))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
RecyclableObject* handlerFunc = VarTo<RecyclableObject>(handler);
BEGIN_SAFE_REENTRANT_CALL(scriptContext->GetThreadContext())
{
return CALL_FUNCTION(scriptContext->GetThreadContext(),
handlerFunc, CallInfo(CallFlags_Value, 2),
undefinedVar,
value);
}
END_SAFE_REENTRANT_CALL
}
Var JavascriptPromise::TryRejectWithExceptionObject(JavascriptExceptionObject* exceptionObject, Var handler, ScriptContext* scriptContext)
{
Var thrownObject = exceptionObject->GetThrownObject(scriptContext);
if (thrownObject == nullptr)
{
thrownObject = scriptContext->GetLibrary()->GetUndefined();
}
return TryCallResolveOrRejectHandler(handler, thrownObject, scriptContext);
}
Var JavascriptPromise::CreateRejectedPromise(Var resolution, ScriptContext* scriptContext, Var promiseConstructor)
{
if (promiseConstructor == nullptr)
{
promiseConstructor = scriptContext->GetLibrary()->GetPromiseConstructor();
}
JavascriptPromiseCapability* promiseCapability = NewPromiseCapability(promiseConstructor, scriptContext);
TryCallResolveOrRejectHandler(promiseCapability->GetReject(), resolution, scriptContext);
return promiseCapability->GetPromise();
}
Var JavascriptPromise::CreateResolvedPromise(Var resolution, ScriptContext* scriptContext, Var promiseConstructor)
{
if (promiseConstructor == nullptr)
{
promiseConstructor = scriptContext->GetLibrary()->GetPromiseConstructor();
}
JavascriptPromiseCapability* promiseCapability = NewPromiseCapability(promiseConstructor, scriptContext);
TryCallResolveOrRejectHandler(promiseCapability->GetResolve(), resolution, scriptContext);
return promiseCapability->GetPromise();
}
Var JavascriptPromise::CreatePassThroughPromise(JavascriptPromise* sourcePromise, ScriptContext* scriptContext)
{
JavascriptLibrary* library = scriptContext->GetLibrary();
return CreateThenPromise(sourcePromise, library->GetIdentityFunction(), library->GetThrowerFunction(), scriptContext);
}
Var JavascriptPromise::CreateThenPromise(JavascriptPromise* sourcePromise, RecyclableObject* fulfillmentHandler, RecyclableObject* rejectionHandler, ScriptContext* scriptContext)
{
JavascriptFunction* defaultConstructor = scriptContext->GetLibrary()->GetPromiseConstructor();
RecyclableObject* constructor = JavascriptOperators::SpeciesConstructor(sourcePromise, defaultConstructor, scriptContext);
AssertOrFailFast(JavascriptOperators::IsConstructor(constructor));
bool isDefaultConstructor = constructor == defaultConstructor;
JavascriptPromiseCapability* promiseCapability = (JavascriptPromiseCapability*)JavascriptOperators::NewObjectCreationHelper_ReentrancySafe(constructor, isDefaultConstructor, scriptContext->GetThreadContext(), [=]()->JavascriptPromiseCapability*
{
return NewPromiseCapability(constructor, scriptContext);
});
PerformPromiseThen(sourcePromise, promiseCapability, fulfillmentHandler, rejectionHandler, scriptContext);
return promiseCapability->GetPromise();
}
void JavascriptPromise::PerformPromiseThen(
JavascriptPromise* sourcePromise,
JavascriptPromiseCapability* capability,
RecyclableObject* fulfillmentHandler,
RecyclableObject* rejectionHandler,
ScriptContext* scriptContext)
{
auto* resolveReaction = JavascriptPromiseReaction::New(capability, fulfillmentHandler, scriptContext);
auto* rejectReaction = JavascriptPromiseReaction::New(capability, rejectionHandler, scriptContext);
switch (sourcePromise->GetStatus())
{
case PromiseStatusCode_Unresolved:
JavascriptPromiseReactionPair pair;
pair.resolveReaction = resolveReaction;
pair.rejectReaction = rejectReaction;
sourcePromise->reactions->Prepend(pair);
break;
case PromiseStatusCode_HasResolution:
EnqueuePromiseReactionTask(
resolveReaction,
CrossSite::MarshalVar(scriptContext, sourcePromise->result),
scriptContext);
break;
case PromiseStatusCode_HasRejection:
{
if (!sourcePromise->GetIsHandled())
{
scriptContext->GetLibrary()->CallNativeHostPromiseRejectionTracker(
sourcePromise,
CrossSite::MarshalVar(scriptContext, sourcePromise->result),
true);
}
EnqueuePromiseReactionTask(
rejectReaction,
CrossSite::MarshalVar(scriptContext, sourcePromise->result),
scriptContext);
break;
}
default:
AssertMsg(false, "Promise status is in an invalid state");
break;
}
sourcePromise->SetIsHandled();
}
// Promise Resolve Thenable Job as described in ES 2015 Section 25.4.2.2
Var JavascriptPromise::EntryResolveThenableTaskFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
JavascriptLibrary* library = scriptContext->GetLibrary();
JavascriptPromiseResolveThenableTaskFunction* resolveThenableTaskFunction = VarTo<JavascriptPromiseResolveThenableTaskFunction>(function);
JavascriptPromise* promise = resolveThenableTaskFunction->GetPromise();
RecyclableObject* thenable = resolveThenableTaskFunction->GetThenable();
RecyclableObject* thenFunction = resolveThenableTaskFunction->GetThenFunction();
JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper* alreadyResolvedRecord = RecyclerNewStructZ(scriptContext->GetRecycler(), JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper);
alreadyResolvedRecord->alreadyResolved = false;
JavascriptPromiseResolveOrRejectFunction* resolve = library->CreatePromiseResolveOrRejectFunction(EntryResolveOrRejectFunction, promise, false, alreadyResolvedRecord);
JavascriptPromiseResolveOrRejectFunction* reject = library->CreatePromiseResolveOrRejectFunction(EntryResolveOrRejectFunction, promise, true, alreadyResolvedRecord);
JavascriptExceptionObject* exception = nullptr;
{
bool isPromiseRejectionHandled = true;
if (scriptContext->IsScriptContextInDebugMode())
{
// only necessary to determine if false if debugger is attached. This way we'll
// correctly break on exceptions raised in promises that result in uhandled rejections
isPromiseRejectionHandled = !promise->WillRejectionBeUnhandled();
}
Js::JavascriptExceptionOperators::AutoCatchHandlerExists autoCatchHandlerExists(scriptContext, isPromiseRejectionHandled);
try
{
BEGIN_SAFE_REENTRANT_CALL(scriptContext->GetThreadContext())
{
return CALL_FUNCTION(scriptContext->GetThreadContext(),
thenFunction, Js::CallInfo(Js::CallFlags::CallFlags_Value, 3),
thenable,
resolve,
reject);
}
END_SAFE_REENTRANT_CALL
}
catch (const JavascriptException& err)
{
exception = err.GetAndClear();
}
}
Assert(exception != nullptr);
return TryRejectWithExceptionObject(exception, reject, scriptContext);
}
// Promise Identity Function as described in ES 2015Section 25.4.5.3.1
Var JavascriptPromise::EntryIdentityFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
if (args.Info.Count > 1)
{
Assert(args[1] != nullptr);
return args[1];
}
else
{
return function->GetScriptContext()->GetLibrary()->GetUndefined();
}
}
// Promise Thrower Function as described in ES 2015Section 25.4.5.3.3
Var JavascriptPromise::EntryThrowerFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
Var arg;
if (args.Info.Count > 1)
{
Assert(args[1] != nullptr);
arg = args[1];
}
else
{
arg = scriptContext->GetLibrary()->GetUndefined();
}
JavascriptExceptionOperators::Throw(arg, scriptContext);
}
// Promise.all Resolve Element Function as described in ES6.0 (Release Candidate 3) Section 25.4.4.1.2
Var JavascriptPromise::EntryAllResolveElementFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
Var undefinedVar = scriptContext->GetLibrary()->GetUndefined();
Var x;
if (args.Info.Count > 1)
{
x = args[1];
}
else
{
x = undefinedVar;
}
JavascriptPromiseAllResolveElementFunction* allResolveElementFunction = VarTo<JavascriptPromiseAllResolveElementFunction>(function);
if (allResolveElementFunction->IsAlreadyCalled())
{
return undefinedVar;
}
allResolveElementFunction->SetAlreadyCalled(true);
uint32 index = allResolveElementFunction->GetIndex();
JavascriptArray* values = allResolveElementFunction->GetValues();
JavascriptPromiseCapability* promiseCapability = allResolveElementFunction->GetCapabilities();
JavascriptExceptionObject* exception = nullptr;
try
{
values->SetItem(index, x, PropertyOperation_None);
}
catch (const JavascriptException& err)
{
exception = err.GetAndClear();
}
if (exception != nullptr)
{
return TryRejectWithExceptionObject(exception, promiseCapability->GetReject(), scriptContext);
}
if (allResolveElementFunction->DecrementRemainingElements() == 0)
{
return TryCallResolveOrRejectHandler(promiseCapability->GetResolve(), values, scriptContext);
}
return undefinedVar;
}
Var JavascriptPromise::EntryAllSettledResolveOrRejectElementFunction(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
Var undefinedVar = scriptContext->GetLibrary()->GetUndefined();
Var x;
if (args.Info.Count > 1)
{
x = args[1];
}
else
{
x = undefinedVar;
}
JavascriptPromiseAllSettledResolveOrRejectElementFunction* allSettledResolveElementFunction = VarTo<JavascriptPromiseAllSettledResolveOrRejectElementFunction>(function);
if (allSettledResolveElementFunction->IsAlreadyCalled())
{
return undefinedVar;
}
allSettledResolveElementFunction->SetAlreadyCalled(true);
bool isRejecting = allSettledResolveElementFunction->IsRejectFunction();
uint32 index = allSettledResolveElementFunction->GetIndex();
JavascriptArray* values = allSettledResolveElementFunction->GetValues();
JavascriptPromiseCapability* promiseCapability = allSettledResolveElementFunction->GetCapabilities();
JavascriptExceptionObject* exception = nullptr;
try
{
RecyclableObject* obj = scriptContext->GetLibrary()->CreateObject();
Var statusString = isRejecting ?
scriptContext->GetPropertyString(PropertyIds::rejected) :
scriptContext->GetPropertyString(PropertyIds::fulfilled);
JavascriptOperators::SetProperty(obj, obj, PropertyIds::status, statusString, scriptContext);
PropertyIds valuePropId = isRejecting ? PropertyIds::reason : PropertyIds::value;
JavascriptOperators::SetProperty(obj, obj, valuePropId, x, scriptContext);
values->SetItem(index, obj, PropertyOperation_None);
}
catch (const JavascriptException& err)
{
exception = err.GetAndClear();
}
if (exception != nullptr)
{
return TryRejectWithExceptionObject(exception, promiseCapability->GetReject(), scriptContext);
}
if (allSettledResolveElementFunction->DecrementRemainingElements() == 0)
{
return TryCallResolveOrRejectHandler(promiseCapability->GetResolve(), values, scriptContext);
}
return undefinedVar;
}
#if ENABLE_TTD
void JavascriptPromise::MarkVisitKindSpecificPtrs(TTD::SnapshotExtractor* extractor)
{
if(this->result != nullptr)
{
extractor->MarkVisitVar(this->result);
}
if(this->reactions != nullptr)
{
this->reactions->Map([&](JavascriptPromiseReactionPair pair) {
pair.rejectReaction->MarkVisitPtrs(extractor);
pair.resolveReaction->MarkVisitPtrs(extractor);
});
}
}
TTD::NSSnapObjects::SnapObjectType JavascriptPromise::GetSnapTag_TTD() const
{
return TTD::NSSnapObjects::SnapObjectType::SnapPromiseObject;
}
void JavascriptPromise::ExtractSnapObjectDataInto(TTD::NSSnapObjects::SnapObject* objData, TTD::SlabAllocator& alloc)
{
JsUtil::List<TTD_PTR_ID, HeapAllocator> depOnList(&HeapAllocator::Instance);
TTD::NSSnapObjects::SnapPromiseInfo* spi = alloc.SlabAllocateStruct<TTD::NSSnapObjects::SnapPromiseInfo>();
spi->Result = this->result;
//Primitive kinds always inflated first so we only need to deal with complex kinds as depends on
if(this->result != nullptr && TTD::JsSupport::IsVarComplexKind(this->result))
{
depOnList.Add(TTD_CONVERT_VAR_TO_PTR_ID(this->result));
}
spi->Status = this->GetStatus();
spi->isHandled = this->GetIsHandled();
// get count of # of reactions
spi->ResolveReactionCount = 0;
if (this->reactions != nullptr)
{
this->reactions->Map([&spi](JavascriptPromiseReactionPair pair) {
spi->ResolveReactionCount++;
});
}
spi->RejectReactionCount = spi->ResolveReactionCount;
// move resolve & reject reactions into slab
spi->ResolveReactions = nullptr;
spi->RejectReactions = nullptr;
if(spi->ResolveReactionCount != 0)
{
spi->ResolveReactions = alloc.SlabAllocateArray<TTD::NSSnapValues::SnapPromiseReactionInfo>(spi->ResolveReactionCount);
spi->RejectReactions = alloc.SlabAllocateArray<TTD::NSSnapValues::SnapPromiseReactionInfo>(spi->RejectReactionCount);
JavascriptPromiseReactionList::Iterator it = this->reactions->GetIterator();
uint32 i = 0;
while (it.Next())
{
it.Data().resolveReaction->ExtractSnapPromiseReactionInto(spi->ResolveReactions + i, depOnList, alloc);
it.Data().rejectReaction->ExtractSnapPromiseReactionInto(spi->RejectReactions + i, depOnList, alloc);
++i;
}
}
//see what we need to do wrt dependencies
if(depOnList.Count() == 0)
{
TTD::NSSnapObjects::StdExtractSetKindSpecificInfo<TTD::NSSnapObjects::SnapPromiseInfo*, TTD::NSSnapObjects::SnapObjectType::SnapPromiseObject>(objData, spi);
}
else
{
uint32 depOnCount = depOnList.Count();
TTD_PTR_ID* depOnArray = alloc.SlabAllocateArray<TTD_PTR_ID>(depOnCount);
for(uint32 i = 0; i < depOnCount; ++i)
{
depOnArray[i] = depOnList.Item(i);
}
TTD::NSSnapObjects::StdExtractSetKindSpecificInfo<TTD::NSSnapObjects::SnapPromiseInfo*, TTD::NSSnapObjects::SnapObjectType::SnapPromiseObject>(objData, spi, alloc, depOnCount, depOnArray);
}
}
JavascriptPromise* JavascriptPromise::InitializePromise_TTD(ScriptContext* scriptContext, uint32 status, bool isHandled, Var result, SList<Js::JavascriptPromiseReaction*, HeapAllocator>& resolveReactions,SList<Js::JavascriptPromiseReaction*, HeapAllocator>& rejectReactions)
{
Recycler* recycler = scriptContext->GetRecycler();
JavascriptLibrary* library = scriptContext->GetLibrary();
JavascriptPromise* promise = library->CreatePromise();
promise->SetStatus((PromiseStatus)status);
if (isHandled)
{
promise->SetIsHandled();
}
promise->result = result;
promise->reactions = RecyclerNew(recycler, JavascriptPromiseReactionList, recycler);
SList<Js::JavascriptPromiseReaction*, HeapAllocator>::Iterator resolveIterator = resolveReactions.GetIterator();
SList<Js::JavascriptPromiseReaction*, HeapAllocator>::Iterator rejectIterator = rejectReactions.GetIterator();
bool hasResolve = resolveIterator.Next();
bool hasReject = rejectIterator.Next();
while (hasResolve && hasReject)
{
JavascriptPromiseReactionPair pair;
pair.resolveReaction = resolveIterator.Data();
pair.rejectReaction = rejectIterator.Data();
promise->reactions->Prepend(pair);
hasResolve = resolveIterator.Next();
hasReject = rejectIterator.Next();
}
AssertMsg(hasResolve == false && hasReject == false, "mismatched resolve/reject reaction counts");
promise->reactions->Reverse();
return promise;
}
#endif
// NewPromiseCapability as described in ES6.0 (draft 29) Section 25.4.1.6
JavascriptPromiseCapability* JavascriptPromise::NewPromiseCapability(Var constructor, ScriptContext* scriptContext)
{
if (!JavascriptOperators::IsConstructor(constructor))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
RecyclableObject* constructorFunc = VarTo<RecyclableObject>(constructor);
BEGIN_SAFE_REENTRANT_CALL(scriptContext->GetThreadContext())
{
return CreatePromiseCapabilityRecord(constructorFunc, scriptContext);
}
END_SAFE_REENTRANT_CALL
}
JavascriptPromiseCapability* JavascriptPromise::UnusedPromiseCapability(ScriptContext* scriptContext)
{
// OPTIMIZE: In async functions and async generators, await resolves the operand
// and then executes PerformPromiseThen, attaching handlers that resume the coroutine.
// The promise capability provided is unused. For these operations we should be able
// to eliminate the extra promise allocation.
return NewPromiseCapability(scriptContext->GetLibrary()->GetPromiseConstructor(), scriptContext);
}
// CreatePromiseCapabilityRecord as described in ES6.0 (draft 29) Section 25.4.1.6.1
JavascriptPromiseCapability* JavascriptPromise::CreatePromiseCapabilityRecord(RecyclableObject* constructor, ScriptContext* scriptContext)
{
JavascriptLibrary* library = scriptContext->GetLibrary();
Var undefinedVar = library->GetUndefined();
JavascriptPromiseCapability* promiseCapability = JavascriptPromiseCapability::New(undefinedVar, undefinedVar, undefinedVar, scriptContext);
JavascriptPromiseCapabilitiesExecutorFunction* executor = library->CreatePromiseCapabilitiesExecutorFunction(EntryCapabilitiesExecutorFunction, promiseCapability);
CallInfo callinfo = Js::CallInfo((Js::CallFlags)(Js::CallFlags::CallFlags_Value | Js::CallFlags::CallFlags_New), 2);
Var argVars[] = { constructor, executor };
Arguments args(callinfo, argVars);
Var promise = JavascriptFunction::CallAsConstructor(constructor, nullptr, args, scriptContext);
if (!JavascriptConversion::IsCallable(promiseCapability->GetResolve()) || !JavascriptConversion::IsCallable(promiseCapability->GetReject()))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction, _u("Promise"));
}
promiseCapability->SetPromise(promise);
return promiseCapability;
}
// TriggerPromiseReactions as defined in ES 2015 Section 25.4.1.7
Var JavascriptPromise::TriggerPromiseReactions(JavascriptPromiseReactionList* reactions, bool isRejecting, Var resolution, ScriptContext* scriptContext)
{
JavascriptLibrary* library = scriptContext->GetLibrary();
if (reactions != nullptr)
{
JavascriptPromiseReactionList::Iterator it = reactions->GetIterator();
while (it.Next())
{
JavascriptPromiseReaction* reaction;
if (isRejecting)
{
reaction = it.Data().rejectReaction;
}
else
{
reaction = it.Data().resolveReaction;
}
EnqueuePromiseReactionTask(reaction, resolution, scriptContext);
}
}
return library->GetUndefined();
}
void JavascriptPromise::EnqueuePromiseReactionTask(JavascriptPromiseReaction* reaction, Var resolution, ScriptContext* scriptContext)
{
Assert(resolution != nullptr);
JavascriptLibrary* library = scriptContext->GetLibrary();
JavascriptPromiseReactionTaskFunction* reactionTaskFunction = library->CreatePromiseReactionTaskFunction(EntryReactionTaskFunction, reaction, resolution);
library->EnqueueTask(reactionTaskFunction);
}
JavascriptPromiseResolveOrRejectFunction::JavascriptPromiseResolveOrRejectFunction(DynamicType* type)
: RuntimeFunction(type, &Js::JavascriptPromise::EntryInfo::ResolveOrRejectFunction), promise(nullptr), isReject(false), alreadyResolvedWrapper(nullptr)
{ }
JavascriptPromiseResolveOrRejectFunction::JavascriptPromiseResolveOrRejectFunction(DynamicType* type, FunctionInfo* functionInfo, JavascriptPromise* promise, bool isReject, JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper* alreadyResolvedRecord)
: RuntimeFunction(type, functionInfo), promise(promise), isReject(isReject), alreadyResolvedWrapper(alreadyResolvedRecord)
{ }
template <> bool VarIsImpl<JavascriptPromiseResolveOrRejectFunction>(RecyclableObject* obj)
{
if (VarIs<JavascriptFunction>(obj))
{
return VirtualTableInfo<JavascriptPromiseResolveOrRejectFunction>::HasVirtualTable(obj)
|| VirtualTableInfo<CrossSiteObject<JavascriptPromiseResolveOrRejectFunction>>::HasVirtualTable(obj);
}
return false;
}
JavascriptPromise* JavascriptPromiseResolveOrRejectFunction::GetPromise()
{
return this->promise;
}
bool JavascriptPromiseResolveOrRejectFunction::IsRejectFunction()
{
return this->isReject;
}
bool JavascriptPromiseResolveOrRejectFunction::IsAlreadyResolved()
{
Assert(this->alreadyResolvedWrapper);
return this->alreadyResolvedWrapper->alreadyResolved;
}
void JavascriptPromiseResolveOrRejectFunction::SetAlreadyResolved(bool is)
{
Assert(this->alreadyResolvedWrapper);
this->alreadyResolvedWrapper->alreadyResolved = is;
}
#if ENABLE_TTD
void JavascriptPromiseResolveOrRejectFunction::MarkVisitKindSpecificPtrs(TTD::SnapshotExtractor* extractor)
{
TTDAssert(this->promise != nullptr, "Was not expecting that!!!");
extractor->MarkVisitVar(this->promise);
}
TTD::NSSnapObjects::SnapObjectType JavascriptPromiseResolveOrRejectFunction::GetSnapTag_TTD() const
{
return TTD::NSSnapObjects::SnapObjectType::SnapPromiseResolveOrRejectFunctionObject;
}
void JavascriptPromiseResolveOrRejectFunction::ExtractSnapObjectDataInto(TTD::NSSnapObjects::SnapObject* objData, TTD::SlabAllocator& alloc)
{
TTD::NSSnapObjects::SnapPromiseResolveOrRejectFunctionInfo* sprri = alloc.SlabAllocateStruct<TTD::NSSnapObjects::SnapPromiseResolveOrRejectFunctionInfo>();
uint32 depOnCount = 1;
TTD_PTR_ID* depOnArray = alloc.SlabAllocateArray<TTD_PTR_ID>(depOnCount);
sprri->PromiseId = TTD_CONVERT_VAR_TO_PTR_ID(this->promise);
depOnArray[0] = sprri->PromiseId;
sprri->IsReject = this->isReject;
sprri->AlreadyResolvedWrapperId = TTD_CONVERT_PROMISE_INFO_TO_PTR_ID(this->alreadyResolvedWrapper);
sprri->AlreadyResolvedValue = this->alreadyResolvedWrapper->alreadyResolved;
TTD::NSSnapObjects::StdExtractSetKindSpecificInfo<TTD::NSSnapObjects::SnapPromiseResolveOrRejectFunctionInfo*, TTD::NSSnapObjects::SnapObjectType::SnapPromiseResolveOrRejectFunctionObject>(objData, sprri, alloc, depOnCount, depOnArray);
}
#endif
JavascriptPromiseCapabilitiesExecutorFunction::JavascriptPromiseCapabilitiesExecutorFunction(DynamicType* type, FunctionInfo* functionInfo, JavascriptPromiseCapability* capability)
: RuntimeFunction(type, functionInfo), capability(capability)
{ }
template <> bool VarIsImpl<JavascriptPromiseCapabilitiesExecutorFunction>(RecyclableObject* obj)
{
if (VarIs<JavascriptFunction>(obj))
{
return VirtualTableInfo<JavascriptPromiseCapabilitiesExecutorFunction>::HasVirtualTable(obj)
|| VirtualTableInfo<CrossSiteObject<JavascriptPromiseCapabilitiesExecutorFunction>>::HasVirtualTable(obj);
}
return false;
}
JavascriptPromiseCapability* JavascriptPromiseCapabilitiesExecutorFunction::GetCapability()
{
return this->capability;
}
#if ENABLE_TTD
void JavascriptPromiseCapabilitiesExecutorFunction::MarkVisitKindSpecificPtrs(TTD::SnapshotExtractor* extractor)
{
TTDAssert(false, "Not Implemented Yet");
}
TTD::NSSnapObjects::SnapObjectType JavascriptPromiseCapabilitiesExecutorFunction::GetSnapTag_TTD() const
{
TTDAssert(false, "Not Implemented Yet");
return TTD::NSSnapObjects::SnapObjectType::Invalid;
}
void JavascriptPromiseCapabilitiesExecutorFunction::ExtractSnapObjectDataInto(TTD::NSSnapObjects::SnapObject* objData, TTD::SlabAllocator& alloc)
{
TTDAssert(false, "Not Implemented Yet");
}
#endif
JavascriptPromiseCapability* JavascriptPromiseCapability::New(Var promise, Var resolve, Var reject, ScriptContext* scriptContext)
{
return RecyclerNew(scriptContext->GetRecycler(), JavascriptPromiseCapability, promise, resolve, reject);
}
Var JavascriptPromiseCapability::GetResolve()
{
return this->resolve;
}
Var JavascriptPromiseCapability::GetReject()
{
return this->reject;
}
Var JavascriptPromiseCapability::GetPromise()
{
return this->promise;
}
void JavascriptPromiseCapability::SetPromise(Var promise)
{
this->promise = promise;
}
void JavascriptPromiseCapability::SetResolve(Var resolve)
{
this->resolve = resolve;
}
void JavascriptPromiseCapability::SetReject(Var reject)
{
this->reject = reject;
}
#if ENABLE_TTD
void JavascriptPromiseCapability::MarkVisitPtrs(TTD::SnapshotExtractor* extractor)
{
TTDAssert(this->promise != nullptr && this->resolve != nullptr && this->reject != nullptr, "Seems odd, I was not expecting this!!!");
extractor->MarkVisitVar(this->promise);
extractor->MarkVisitVar(this->resolve);
extractor->MarkVisitVar(this->reject);
}
void JavascriptPromiseCapability::ExtractSnapPromiseCapabilityInto(TTD::NSSnapValues::SnapPromiseCapabilityInfo* snapPromiseCapability, JsUtil::List<TTD_PTR_ID, HeapAllocator>& depOnList, TTD::SlabAllocator& alloc)
{
snapPromiseCapability->CapabilityId = TTD_CONVERT_PROMISE_INFO_TO_PTR_ID(this);
snapPromiseCapability->PromiseVar = this->promise;
if(TTD::JsSupport::IsVarComplexKind(this->promise))
{
depOnList.Add(TTD_CONVERT_VAR_TO_PTR_ID(this->resolve));
}
snapPromiseCapability->ResolveVar = this->resolve;
if(TTD::JsSupport::IsVarComplexKind(this->resolve))
{
depOnList.Add(TTD_CONVERT_VAR_TO_PTR_ID(this->resolve));
}
snapPromiseCapability->RejectVar = this->reject;
if(TTD::JsSupport::IsVarComplexKind(this->reject))
{
depOnList.Add(TTD_CONVERT_VAR_TO_PTR_ID(this->reject));
}
}
#endif
JavascriptPromiseReaction* JavascriptPromiseReaction::New(JavascriptPromiseCapability* capabilities, RecyclableObject* handler, ScriptContext* scriptContext)
{
return RecyclerNew(scriptContext->GetRecycler(), JavascriptPromiseReaction, capabilities, handler);
}
JavascriptPromiseCapability* JavascriptPromiseReaction::GetCapabilities()
{
return this->capabilities;
}
RecyclableObject* JavascriptPromiseReaction::GetHandler()
{
return this->handler;
}
#if ENABLE_TTD
void JavascriptPromiseReaction::MarkVisitPtrs(TTD::SnapshotExtractor* extractor)
{
TTDAssert(this->handler != nullptr && this->capabilities != nullptr, "Seems odd, I was not expecting this!!!");
extractor->MarkVisitVar(this->handler);
this->capabilities->MarkVisitPtrs(extractor);
}
void JavascriptPromiseReaction::ExtractSnapPromiseReactionInto(TTD::NSSnapValues::SnapPromiseReactionInfo* snapPromiseReaction, JsUtil::List<TTD_PTR_ID, HeapAllocator>& depOnList, TTD::SlabAllocator& alloc)
{
TTDAssert(this->handler != nullptr && this->capabilities != nullptr, "Seems odd, I was not expecting this!!!");
snapPromiseReaction->PromiseReactionId = TTD_CONVERT_PROMISE_INFO_TO_PTR_ID(this);
snapPromiseReaction->HandlerObjId = TTD_CONVERT_VAR_TO_PTR_ID(this->handler);
depOnList.Add(snapPromiseReaction->HandlerObjId);
this->capabilities->ExtractSnapPromiseCapabilityInto(&snapPromiseReaction->Capabilities, depOnList, alloc);
}
#endif
template <> bool VarIsImpl<JavascriptPromiseReactionTaskFunction>(RecyclableObject* obj)
{
if (VarIs<JavascriptFunction>(obj))
{
return VirtualTableInfo<JavascriptPromiseReactionTaskFunction>::HasVirtualTable(obj)
|| VirtualTableInfo<CrossSiteObject<JavascriptPromiseReactionTaskFunction>>::HasVirtualTable(obj);
}
return false;
}
JavascriptPromiseReaction* JavascriptPromiseReactionTaskFunction::GetReaction()
{
return this->reaction;
}
Var JavascriptPromiseReactionTaskFunction::GetArgument()
{
return this->argument;
}
#if ENABLE_TTD
void JavascriptPromiseReactionTaskFunction::MarkVisitKindSpecificPtrs(TTD::SnapshotExtractor* extractor)
{
TTDAssert(this->argument != nullptr && this->reaction != nullptr, "Was not expecting this!!!");
extractor->MarkVisitVar(this->argument);
this->reaction->MarkVisitPtrs(extractor);
}
TTD::NSSnapObjects::SnapObjectType JavascriptPromiseReactionTaskFunction::GetSnapTag_TTD() const
{
return TTD::NSSnapObjects::SnapObjectType::SnapPromiseReactionTaskFunctionObject;
}
void JavascriptPromiseReactionTaskFunction::ExtractSnapObjectDataInto(TTD::NSSnapObjects::SnapObject* objData, TTD::SlabAllocator& alloc)
{
TTD::NSSnapObjects::SnapPromiseReactionTaskFunctionInfo* sprtfi = alloc.SlabAllocateStruct<TTD::NSSnapObjects::SnapPromiseReactionTaskFunctionInfo>();
JsUtil::List<TTD_PTR_ID, HeapAllocator> depOnList(&HeapAllocator::Instance);
sprtfi->Argument = this->argument;
if(this->argument != nullptr && TTD::JsSupport::IsVarComplexKind(this->argument))
{
depOnList.Add(TTD_CONVERT_VAR_TO_PTR_ID(this->argument));
}
this->reaction->ExtractSnapPromiseReactionInto(&sprtfi->Reaction, depOnList, alloc);
//see what we need to do wrt dependencies
if(depOnList.Count() == 0)
{
TTD::NSSnapObjects::StdExtractSetKindSpecificInfo<TTD::NSSnapObjects::SnapPromiseReactionTaskFunctionInfo*, TTD::NSSnapObjects::SnapObjectType::SnapPromiseReactionTaskFunctionObject>(objData, sprtfi);
}
else
{
uint32 depOnCount = depOnList.Count();
TTD_PTR_ID* depOnArray = alloc.SlabAllocateArray<TTD_PTR_ID>(depOnCount);
for(uint32 i = 0; i < depOnCount; ++i)
{
depOnArray[i] = depOnList.Item(i);
}
TTD::NSSnapObjects::StdExtractSetKindSpecificInfo<TTD::NSSnapObjects::SnapPromiseReactionTaskFunctionInfo*, TTD::NSSnapObjects::SnapObjectType::SnapPromiseReactionTaskFunctionObject>(objData, sprtfi, alloc, depOnCount, depOnArray);
}
}
#endif
template <> bool VarIsImpl<JavascriptPromiseThenFinallyFunction>(RecyclableObject* obj)
{
if (VarIs<JavascriptFunction>(obj))
{
return VirtualTableInfo<JavascriptPromiseThenFinallyFunction>::HasVirtualTable(obj)
|| VirtualTableInfo<CrossSiteObject<JavascriptPromiseThenFinallyFunction>>::HasVirtualTable(obj);
}
return false;
}
template <> bool VarIsImpl<JavascriptPromiseThunkFinallyFunction>(RecyclableObject* obj)
{
if (VarIs<JavascriptFunction>(obj))
{
return VirtualTableInfo<JavascriptPromiseThunkFinallyFunction>::HasVirtualTable(obj)
|| VirtualTableInfo<CrossSiteObject<JavascriptPromiseThunkFinallyFunction>>::HasVirtualTable(obj);
}
return false;
}
template <> bool VarIsImpl<JavascriptPromiseResolveThenableTaskFunction>(RecyclableObject* obj)
{
if (VarIs<JavascriptFunction>(obj))
{
return VirtualTableInfo<JavascriptPromiseResolveThenableTaskFunction>::HasVirtualTable(obj)
|| VirtualTableInfo<CrossSiteObject<JavascriptPromiseResolveThenableTaskFunction>>::HasVirtualTable(obj);
}
return false;
}
JavascriptPromise* JavascriptPromiseResolveThenableTaskFunction::GetPromise()
{
return this->promise;
}
RecyclableObject* JavascriptPromiseResolveThenableTaskFunction::GetThenable()
{
return this->thenable;
}
RecyclableObject* JavascriptPromiseResolveThenableTaskFunction::GetThenFunction()
{
return this->thenFunction;
}
#if ENABLE_TTD
void JavascriptPromiseResolveThenableTaskFunction::MarkVisitKindSpecificPtrs(TTD::SnapshotExtractor* extractor)
{
TTDAssert(false, "Not Implemented Yet");
}
TTD::NSSnapObjects::SnapObjectType JavascriptPromiseResolveThenableTaskFunction::GetSnapTag_TTD() const
{
TTDAssert(false, "Not Implemented Yet");
return TTD::NSSnapObjects::SnapObjectType::Invalid;
}
void JavascriptPromiseResolveThenableTaskFunction::ExtractSnapObjectDataInto(TTD::NSSnapObjects::SnapObject* objData, TTD::SlabAllocator& alloc)
{
TTDAssert(false, "Not Implemented Yet");
}
#endif
JavascriptPromiseAllSettledResolveOrRejectElementFunction::JavascriptPromiseAllSettledResolveOrRejectElementFunction(DynamicType* type)
: JavascriptPromiseAllResolveElementFunction(type), alreadyCalledWrapper(nullptr), isRejecting(false)
{ }
JavascriptPromiseAllSettledResolveOrRejectElementFunction::JavascriptPromiseAllSettledResolveOrRejectElementFunction(DynamicType* type, FunctionInfo* functionInfo, uint32 index, JavascriptArray* values, JavascriptPromiseCapability* capabilities, your_sha256_hasher* remainingElementsWrapper, JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper* alreadyCalledWrapper, bool isRejecting)
: JavascriptPromiseAllResolveElementFunction(type, functionInfo, index, values, capabilities, remainingElementsWrapper), alreadyCalledWrapper(alreadyCalledWrapper), isRejecting(isRejecting)
{ }
bool JavascriptPromiseAllSettledResolveOrRejectElementFunction::IsAlreadyCalled() const
{
Assert(this->alreadyCalledWrapper);
return this->alreadyCalledWrapper->alreadyResolved;
}
void JavascriptPromiseAllSettledResolveOrRejectElementFunction::SetAlreadyCalled(const bool is)
{
Assert(this->alreadyCalledWrapper);
this->alreadyCalledWrapper->alreadyResolved = is;
}
bool JavascriptPromiseAllSettledResolveOrRejectElementFunction::IsRejectFunction()
{
return this->isRejecting;
}
template <> bool VarIsImpl<JavascriptPromiseAllSettledResolveOrRejectElementFunction>(RecyclableObject* obj)
{
if (VarIs<JavascriptFunction>(obj))
{
return VirtualTableInfo<JavascriptPromiseAllSettledResolveOrRejectElementFunction>::HasVirtualTable(obj)
|| VirtualTableInfo<CrossSiteObject<JavascriptPromiseAllSettledResolveOrRejectElementFunction>>::HasVirtualTable(obj);
}
return false;
}
#if ENABLE_TTD
void JavascriptPromiseAllSettledResolveOrRejectElementFunction::MarkVisitKindSpecificPtrs(TTD::SnapshotExtractor* extractor)
{
TTDAssert(this->capabilities != nullptr && this->remainingElementsWrapper != nullptr && this->alreadyCalledWrapper != nullptr && this->values != nullptr, "Don't think these can be null");
this->capabilities->MarkVisitPtrs(extractor);
extractor->MarkVisitVar(this->values);
}
TTD::NSSnapObjects::SnapObjectType JavascriptPromiseAllSettledResolveOrRejectElementFunction::GetSnapTag_TTD() const
{
return TTD::NSSnapObjects::SnapObjectType::SnapPromiseAllSettledResolveOrRejectElementFunctionObject;
}
void JavascriptPromiseAllSettledResolveOrRejectElementFunction::ExtractSnapObjectDataInto(TTD::NSSnapObjects::SnapObject* objData, TTD::SlabAllocator& alloc)
{
TTD::NSSnapObjects::SnapPromiseAllResolveElementFunctionInfo* sprai = alloc.SlabAllocateStruct<TTD::NSSnapObjects::SnapPromiseAllResolveElementFunctionInfo>();
JsUtil::List<TTD_PTR_ID, HeapAllocator> depOnList(&HeapAllocator::Instance);
this->capabilities->ExtractSnapPromiseCapabilityInto(&sprai->Capabilities, depOnList, alloc);
sprai->Index = this->index;
sprai->RemainingElementsWrapperId = TTD_CONVERT_PROMISE_INFO_TO_PTR_ID(this->remainingElementsWrapper);
sprai->RemainingElementsValue = this->remainingElementsWrapper->remainingElements;
sprai->Values = TTD_CONVERT_VAR_TO_PTR_ID(this->values);
depOnList.Add(sprai->Values);
sprai->AlreadyCalled = this->alreadyCalled;
uint32 depOnCount = depOnList.Count();
TTD_PTR_ID* depOnArray = alloc.SlabAllocateArray<TTD_PTR_ID>(depOnCount);
for (uint32 i = 0; i < depOnCount; ++i)
{
depOnArray[i] = depOnList.Item(i);
}
TTD::NSSnapObjects::StdExtractSetKindSpecificInfo<TTD::NSSnapObjects::SnapPromiseAllResolveElementFunctionInfo*, TTD::NSSnapObjects::SnapObjectType::SnapPromiseAllResolveElementFunctionObject>(objData, sprai, alloc, depOnCount, depOnArray);
}
#endif
JavascriptPromiseAnyRejectElementFunction::JavascriptPromiseAnyRejectElementFunction(DynamicType* type)
: JavascriptPromiseAllResolveElementFunction(type), alreadyCalledWrapper(nullptr)
{ }
JavascriptPromiseAnyRejectElementFunction::JavascriptPromiseAnyRejectElementFunction(DynamicType* type, FunctionInfo* functionInfo, uint32 index, JavascriptArray* values, JavascriptPromiseCapability* capabilities, your_sha256_hasher* remainingElementsWrapper, JavascriptPromiseResolveOrRejectFunctionAlreadyResolvedWrapper* alreadyCalledWrapper)
: JavascriptPromiseAllResolveElementFunction(type, functionInfo, index, values, capabilities, remainingElementsWrapper), alreadyCalledWrapper(alreadyCalledWrapper)
{ }
#if ENABLE_TTD
void JavascriptPromiseAnyRejectElementFunction::MarkVisitKindSpecificPtrs(TTD::SnapshotExtractor* extractor)
{
TTDAssert(this->capabilities != nullptr && this->remainingElementsWrapper != nullptr && this->alreadyCalledWrapper != nullptr && this->values != nullptr, "Don't think these can be null");
this->capabilities->MarkVisitPtrs(extractor);
extractor->MarkVisitVar(this->values);
}
TTD::NSSnapObjects::SnapObjectType JavascriptPromiseAnyRejectElementFunction::GetSnapTag_TTD() const
{
return TTD::NSSnapObjects::SnapObjectType::SnapPromiseAnyRejectElementFunctionObject;
}
void JavascriptPromiseAnyRejectElementFunction::ExtractSnapObjectDataInto(TTD::NSSnapObjects::SnapObject* objData, TTD::SlabAllocator& alloc)
{
TTD::NSSnapObjects::SnapPromiseAllResolveElementFunctionInfo* sprai = alloc.SlabAllocateStruct<TTD::NSSnapObjects::SnapPromiseAllResolveElementFunctionInfo>();
JsUtil::List<TTD_PTR_ID, HeapAllocator> depOnList(&HeapAllocator::Instance);
this->capabilities->ExtractSnapPromiseCapabilityInto(&sprai->Capabilities, depOnList, alloc);
sprai->Index = this->index;
sprai->RemainingElementsWrapperId = TTD_CONVERT_PROMISE_INFO_TO_PTR_ID(this->remainingElementsWrapper);
sprai->RemainingElementsValue = this->remainingElementsWrapper->remainingElements;
sprai->Values = TTD_CONVERT_VAR_TO_PTR_ID(this->values);
depOnList.Add(sprai->Values);
sprai->AlreadyCalled = this->alreadyCalled;
uint32 depOnCount = depOnList.Count();
TTD_PTR_ID* depOnArray = alloc.SlabAllocateArray<TTD_PTR_ID>(depOnCount);
for (uint32 i = 0; i < depOnCount; ++i)
{
depOnArray[i] = depOnList.Item(i);
}
TTD::NSSnapObjects::StdExtractSetKindSpecificInfo<TTD::NSSnapObjects::SnapPromiseAllResolveElementFunctionInfo*, TTD::NSSnapObjects::SnapObjectType::SnapPromiseAllResolveElementFunctionObject>(objData, sprai, alloc, depOnCount, depOnArray);
}
#endif
template <> bool VarIsImpl<JavascriptPromiseAnyRejectElementFunction>(RecyclableObject* obj)
{
if (VarIs<JavascriptFunction>(obj))
{
return VirtualTableInfo<JavascriptPromiseAnyRejectElementFunction>::HasVirtualTable(obj)
|| VirtualTableInfo<CrossSiteObject<JavascriptPromiseAnyRejectElementFunction>>::HasVirtualTable(obj);
}
return false;
}
JavascriptPromiseAllResolveElementFunction::JavascriptPromiseAllResolveElementFunction(DynamicType* type)
: RuntimeFunction(type, &Js::JavascriptPromise::EntryInfo::AllResolveElementFunction), index(0), values(nullptr), capabilities(nullptr), remainingElementsWrapper(nullptr), alreadyCalled(false)
{ }
JavascriptPromiseAllResolveElementFunction::JavascriptPromiseAllResolveElementFunction(DynamicType* type, FunctionInfo* functionInfo, uint32 index, JavascriptArray* values, JavascriptPromiseCapability* capabilities, your_sha256_hasher* remainingElementsWrapper)
: RuntimeFunction(type, functionInfo), index(index), values(values), capabilities(capabilities), remainingElementsWrapper(remainingElementsWrapper), alreadyCalled(false)
{ }
template <> bool VarIsImpl<JavascriptPromiseAllResolveElementFunction>(RecyclableObject* obj)
{
if (VarIs<JavascriptFunction>(obj))
{
return VirtualTableInfo<JavascriptPromiseAllResolveElementFunction>::HasVirtualTable(obj)
|| VirtualTableInfo<CrossSiteObject<JavascriptPromiseAllResolveElementFunction>>::HasVirtualTable(obj);
}
return false;
}
JavascriptPromiseCapability* JavascriptPromiseAllResolveElementFunction::GetCapabilities()
{
return this->capabilities;
}
uint32 JavascriptPromiseAllResolveElementFunction::GetIndex()
{
return this->index;
}
uint32 JavascriptPromiseAllResolveElementFunction::GetRemainingElements()
{
return this->remainingElementsWrapper->remainingElements;
}
JavascriptArray* JavascriptPromiseAllResolveElementFunction::GetValues()
{
return this->values;
}
uint32 JavascriptPromiseAllResolveElementFunction::DecrementRemainingElements()
{
return --(this->remainingElementsWrapper->remainingElements);
}
bool JavascriptPromiseAllResolveElementFunction::IsAlreadyCalled() const
{
return this->alreadyCalled;
}
void JavascriptPromiseAllResolveElementFunction::SetAlreadyCalled(const bool is)
{
this->alreadyCalled = is;
}
#if ENABLE_TTD
void JavascriptPromiseAllResolveElementFunction::MarkVisitKindSpecificPtrs(TTD::SnapshotExtractor* extractor)
{
TTDAssert(this->capabilities != nullptr && this->remainingElementsWrapper != nullptr && this->values != nullptr, "Don't think these can be null");
this->capabilities->MarkVisitPtrs(extractor);
extractor->MarkVisitVar(this->values);
}
TTD::NSSnapObjects::SnapObjectType JavascriptPromiseAllResolveElementFunction::GetSnapTag_TTD() const
{
return TTD::NSSnapObjects::SnapObjectType::SnapPromiseAllResolveElementFunctionObject;
}
void JavascriptPromiseAllResolveElementFunction::ExtractSnapObjectDataInto(TTD::NSSnapObjects::SnapObject* objData, TTD::SlabAllocator& alloc)
{
TTD::NSSnapObjects::SnapPromiseAllResolveElementFunctionInfo* sprai = alloc.SlabAllocateStruct<TTD::NSSnapObjects::SnapPromiseAllResolveElementFunctionInfo>();
JsUtil::List<TTD_PTR_ID, HeapAllocator> depOnList(&HeapAllocator::Instance);
this->capabilities->ExtractSnapPromiseCapabilityInto(&sprai->Capabilities, depOnList, alloc);
sprai->Index = this->index;
sprai->RemainingElementsWrapperId = TTD_CONVERT_PROMISE_INFO_TO_PTR_ID(this->remainingElementsWrapper);
sprai->RemainingElementsValue = this->remainingElementsWrapper->remainingElements;
sprai->Values = TTD_CONVERT_VAR_TO_PTR_ID(this->values);
depOnList.Add(sprai->Values);
sprai->AlreadyCalled = this->alreadyCalled;
uint32 depOnCount = depOnList.Count();
TTD_PTR_ID* depOnArray = alloc.SlabAllocateArray<TTD_PTR_ID>(depOnCount);
for(uint32 i = 0; i < depOnCount; ++i)
{
depOnArray[i] = depOnList.Item(i);
}
TTD::NSSnapObjects::StdExtractSetKindSpecificInfo<TTD::NSSnapObjects::SnapPromiseAllResolveElementFunctionInfo*, TTD::NSSnapObjects::SnapObjectType::SnapPromiseAllResolveElementFunctionObject>(objData, sprai, alloc, depOnCount, depOnArray);
}
#endif
Var JavascriptPromise::EntryGetterSymbolSpecies(RecyclableObject* function, CallInfo callInfo, ...)
{
ARGUMENTS(args, callInfo);
Assert(args.Info.Count > 0);
return args[0];
}
//static
JavascriptPromise* JavascriptPromise::CreateEnginePromise(ScriptContext *scriptContext)
{
JavascriptPromiseResolveOrRejectFunction *resolve = nullptr;
JavascriptPromiseResolveOrRejectFunction *reject = nullptr;
JavascriptPromise *promise = scriptContext->GetLibrary()->CreatePromise();
JavascriptPromise::InitializePromise(promise, &resolve, &reject, scriptContext);
return promise;
}
} // namespace Js
```
|
Landon Deireragea (born 16 May 1960) is a Nauruan politician.
Parliamentary role
Deireragea has been elected to parliament in the 2008 general elections, gaining the seat of Cyril Buraman.
He represents the Anetan Constituency in the Parliament of Nauru.
Deireragea was defeated in the 2013 parliamentary elections, with Cyril Buraman taking the seat.
Deputy Speaker
After the June 2010 general elections Deireragea was elected Deputy Speaker of Parliament. In this role he deputizes for the Speaker of Parliament. Thus far in his term the office of speaker has fallen vacant twice, during which time Deireragea became Acting Speaker. The first period was the longest, July 9 until November 1, 2010. This period of vacancy was caused by the removal of Aloysius Amwano from office and was drawn out by deadlock over who should be speaker. Finally Ludwig Scotty was elected, ending Deireragea's acting speakership. The second period was brief, from April 18 until April 25, 2013, between the resignation of Speaker Scotty and the election of Godfrey Thoma.
Background
Deireragea is a close relative of former parliamentarians Maein Deireragea and James Deireragea, who both served in the parliament for the Anabar Constituency. Politics in Nauru tends to be family oriented.
See also
Politics of Nauru
Elections in Nauru
2008 Nauruan parliamentary election
References
Members of the Parliament of Nauru
Speakers of the Parliament of Nauru
1960 births
Living people
People from Anetan District
21st-century Nauruan politicians
|
```less
table.diffview {
border: 0px;
border-spacing: 0px;
border-collapse: collapse;
width: 100%;
tr td, tr th {
border: none !important;
padding: 0 !important;
}
.change code {
white-space: pre-wrap;
}
.diff-added {
background: @diffAddedBackground !important;
.ch-added {
background: @diffAddedTokenBackground;
font-weight: bold;
}
}
.diff-removed {
background: @diffRemovedBackground;
.ch-removed {
background: @diffRemovedTokenBackground;
}
}
.diff-marker {
background: @diffMarkerBackground;
color: @diffMarkerColor
}
.diff-marker td {
padding-left: 1em;
}
tr.conflict {
border-left: 2px solid @conflictBorderColor;
border-right: 2px solid @conflictBorderColor;
}
tr.conflict.header {
border-top: 2px solid @conflictBorderColor;
border-bottom: 2px solid @conflictBorderColor;
background-color: @conflictHeaderBackgroundColor;
}
tr.conflict.header td {
color: @conflictHeaderColor;
}
tr.conflict td.ui {
padding-left: 0.5rem;
padding-top: 0.5rem;
}
tr.conflict.footer {
border-bottom: 2px solid @conflictBorderColor;
}
.line-a,
.line-b {
width: 3em;
text-align: right;
color: @diffLineNumberColor;
}
.marker {
width: 2.5em;
text-align: center;
}
.change {
text-align: left;
}
.diff-added .line-b:before,
.diff-removed .line-a:before,
.diff-unchanged .line-a:before,
.diff-unchanged .line-b:before {
content: attr(data-content);
}
.marker:before {
content: attr(data-content);
}
}
table.diffview.update {
.diff-added {
background: @diffUpdateAddedBackground !important;
.ch-added {
background: @diffUpdateAddedTokenBackground;
outline: @diffUpdateInlineAddedOutline;
font-weight: bold;
}
}
}
@media only print {
table.diffview.update {
.diff-added {
outline: 1px solid black;
}
}
}
```
|
```java
/*
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing,
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* specific language governing permissions and limitations
*/
package org.apache.guacamole.language;
import org.apache.guacamole.GuacamoleServerBusyException;
/**
* A {@link GuacamoleServerBusyException} whose associated message is
* translatable and can be passed through an arbitrary translation service,
* producing a human-readable message in the user's native language.
*/
public class TranslatableGuacamoleServerBusyException extends GuacamoleServerBusyException implements Translatable {
/**
* A translatable, human-readable description of the exception that
* occurred.
*/
private final TranslatableMessage translatableMessage;
/**
* Creates a new TranslatableGuacamoleServerBusyException with the given
* message and cause. The message must be provided in both non-translatable
* (readable as-written) and translatable forms.
*
* @param message
* A human-readable description of the exception that occurred. This
* message should be readable on its own and as-written, without
* requiring a translation service.
*
* @param translatableMessage
* A translatable, human-readable description of the exception that
* occurred.
*
* @param cause
* The cause of this exception.
*/
public TranslatableGuacamoleServerBusyException(String message, TranslatableMessage translatableMessage, Throwable cause) {
super(message, cause);
this.translatableMessage = translatableMessage;
}
/**
* Creates a new TranslatableGuacamoleServerBusyException with the given
* message. The message must be provided in both non-translatable (readable
* as-written) and translatable forms.
*
* @param message
* A human-readable description of the exception that occurred. This
* message should be readable on its own and as-written, without
* requiring a translation service.
*
* @param translatableMessage
* A translatable, human-readable description of the exception that
* occurred.
*/
public TranslatableGuacamoleServerBusyException(String message, TranslatableMessage translatableMessage) {
super(message);
this.translatableMessage = translatableMessage;
}
/**
* Creates a new TranslatableGuacamoleServerBusyException with the given
* message and cause. The message must be provided in both non-translatable
* (readable as-written) and translatable forms.
*
* @param message
* A human-readable description of the exception that occurred. This
* message should be readable on its own and as-written, without
* requiring a translation service.
*
* @param key
* The arbitrary key which can be used to look up the message to be
* displayed in the user's native language.
*
* @param cause
* The cause of this exception.
*/
public TranslatableGuacamoleServerBusyException(String message, String key, Throwable cause) {
this(message, new TranslatableMessage(key), cause);
}
/**
* Creates a new TranslatableGuacamoleServerBusyException with the given
* message. The message must be provided in both non-translatable (readable
* as-written) and translatable forms.
*
* @param message
* A human-readable description of the exception that occurred. This
* message should be readable on its own and as-written, without
* requiring a translation service.
*
* @param key
* The arbitrary key which can be used to look up the message to be
* displayed in the user's native language.
*/
public TranslatableGuacamoleServerBusyException(String message, String key) {
this(message, new TranslatableMessage(key));
}
@Override
public TranslatableMessage getTranslatableMessage() {
return translatableMessage;
}
}
```
|
```xml
import { usePreferAnyProp, usePreferProp } from './usePreferProp';
describe('usePreferProp', () => {
it('prefers the prop with default true', async () => {
expect(usePreferProp(true)).toBe(true);
expect(usePreferProp(true, true)).toBe(true);
expect(usePreferProp(true, false)).toBe(false);
expect(usePreferProp(true, undefined, true)).toBe(true);
expect(usePreferProp(true, undefined, false)).toBe(false);
expect(usePreferProp(true, true, true)).toBe(true);
expect(usePreferProp(true, false, false)).toBe(false);
expect(usePreferProp(true, false, true)).toBe(false);
expect(usePreferProp(true, true, false)).toBe(true);
});
it('prefers the prop with default false', async () => {
expect(usePreferProp(false)).toBe(false);
expect(usePreferProp(false, true)).toBe(true);
expect(usePreferProp(false, false)).toBe(false);
expect(usePreferProp(false, undefined, true)).toBe(true);
expect(usePreferProp(false, undefined, false)).toBe(false);
expect(usePreferProp(false, true, true)).toBe(true);
expect(usePreferProp(false, false, false)).toBe(false);
expect(usePreferProp(false, false, true)).toBe(false);
expect(usePreferProp(false, true, false)).toBe(true);
});
});
describe('usePreferAnyProp', () => {
it('prefers the prop with default undefined', async () => {
expect(usePreferAnyProp(undefined)).toBeUndefined();
expect(usePreferAnyProp(undefined, true)).toBe(true);
expect(usePreferAnyProp(undefined, false)).toBe(false);
expect(usePreferAnyProp(undefined, undefined, true)).toBe(true);
expect(usePreferAnyProp(undefined, undefined, false)).toBe(false);
expect(usePreferAnyProp(undefined, true, true)).toBe(true);
expect(usePreferAnyProp(undefined, false, false)).toBe(false);
expect(usePreferAnyProp(undefined, false, true)).toBe(false);
expect(usePreferAnyProp(undefined, true, false)).toBe(true);
});
it('prefers the prop with default true', async () => {
expect(usePreferAnyProp(true)).toBe(true);
expect(usePreferAnyProp(true, true)).toBe(true);
expect(usePreferAnyProp(true, false)).toBe(false);
expect(usePreferAnyProp(true, undefined, true)).toBe(true);
expect(usePreferAnyProp(true, undefined, false)).toBe(false);
expect(usePreferAnyProp(true, true, true)).toBe(true);
expect(usePreferAnyProp(true, false, false)).toBe(false);
expect(usePreferAnyProp(true, false, true)).toBe(false);
expect(usePreferAnyProp(true, true, false)).toBe(true);
});
it('prefers the prop with default false', async () => {
expect(usePreferAnyProp(false)).toBe(false);
expect(usePreferAnyProp(false, true)).toBe(true);
expect(usePreferAnyProp(false, false)).toBe(false);
expect(usePreferAnyProp(false, undefined, true)).toBe(true);
expect(usePreferAnyProp(false, undefined, false)).toBe(false);
expect(usePreferAnyProp(false, true, true)).toBe(true);
expect(usePreferAnyProp(false, false, false)).toBe(false);
expect(usePreferAnyProp(false, false, true)).toBe(false);
expect(usePreferAnyProp(false, true, false)).toBe(true);
});
});
```
|
```javascript
/* your_sha256_hash--------------
*
* # D3.js - zoomable treemap
*
* Demo of treemap setup with zoom and .json data source
*
* Version: 1.0
* Latest update: August 1, 2015
*
* your_sha256_hash------------ */
$(function () {
// Create Uniform checkbox
$(".treemap_actions").uniform({
radioClass: 'choice'
});
// Initialize chart
treemap('#d3-treemap', 800);
// Chart setup
function treemap(element, height) {
// Basic setup
// ------------------------------
// Define main variables
var d3Container = d3.select(element),
width = d3Container.node().getBoundingClientRect().width,
root,
node;
// Construct scales
// ------------------------------
// Horizontal
var x = d3.scale.linear()
.range([0, width]);
// Vertical
var y = d3.scale.linear().range([0, height]);
// Colors
var color = d3.scale.category20();
// Create chart
// ------------------------------
// Add SVG element
var container = d3Container.append("svg");
// Add SVG group
var svg = container
.attr("width", width)
.attr("height", height)
.append("g")
.attr("transform", "translate(.5,.5)")
.style("font-size", 12)
.style("overflow", "hidden")
.style("text-indent", 2);
// Construct chart layout
// ------------------------------
// Treemap
var treemap = d3.layout.treemap()
.round(false)
.size([width, height])
.sticky(true)
.value(function(d) { return d.size; });
// Load data
// ------------------------------
d3.json("assets/demo_data/d3/other/treemap.json", function(data) {
node = root = data;
var nodes = treemap.nodes(root)
.filter(function(d) { return !d.children; });
// Add cells
// ------------------------------
// Bind data
var cell = svg.selectAll(".d3-treemap-cell")
.data(nodes)
.enter()
.append("g")
.attr("class", "d3-treemap-cell")
.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; })
.style("cursor", "pointer")
.on("click", function(d) { return zoom(node == d.parent ? root : d.parent); });
// Append cell rects
cell.append("rect")
.attr("width", function(d) { return d.dx - 1; })
.attr("height", function(d) { return d.dy - 1; })
.style("fill", function(d, i) { return color(i); });
// Append text
cell.append("text")
.attr("x", function(d) { return d.dx / 2; })
.attr("y", function(d) { return d.dy / 2; })
.attr("dy", ".35em")
.attr("text-anchor", "middle")
.text(function(d) { return d.name; })
.style("fill", "#fff")
.style("opacity", function(d) { d.width = this.getComputedTextLength(); return d.dx > d.width ? 1 : 0; });
});
// Change data
// ------------------------------
d3.selectAll(".treemap_actions").on("change", change);
// Change data function
function change() {
treemap.value(this.value == "size" ? size : count).nodes(root);
zoom(node);
}
// Size
function size(d) {
return d.size;
}
// Count
function count(d) {
return 1;
}
// Zoom
function zoom(d) {
var kx = width / d.dx, ky = height / d.dy;
x.domain([d.x, d.x + d.dx]);
y.domain([d.y, d.y + d.dy]);
// Cell transition
var t = svg.selectAll(".d3-treemap-cell").transition()
.duration(500)
.attr("transform", function(d) { return "translate(" + x(d.x) + "," + y(d.y) + ")"; });
// Cell rect transition
t.select("rect")
.attr("width", function(d) { return kx * d.dx - 1; })
.attr("height", function(d) { return ky * d.dy - 1; })
// Text transition
t.select("text")
.attr("x", function(d) { return kx * d.dx / 2; })
.attr("y", function(d) { return ky * d.dy / 2; })
.style("opacity", function(d) { return kx * d.dx > d.width ? 1 : 0; });
node = d;
d3.event.stopPropagation();
}
// Add click event
d3.select(window).on("click", function() { zoom(root); });
// Resize chart
// ------------------------------
// Call function on window resize
d3.select(window).on('resize', resize);
// Call function on sidebar width change
d3.select('.sidebar-control').on('click', resize);
// Resize function
//
// Since D3 doesn't support SVG resize by default,
// we need to manually specify parts of the graph that need to
// be updated on window resize
function resize() {
// Layout variables
width = d3Container.node().getBoundingClientRect().width;
// Layout
// -------------------------
// Main svg width
container.attr("width", width);
// Width of appended group
svg.attr("width", width);
// Horizontal range
x.range([0, width]);
// Redraw chart
zoom(root);
}
}
});
```
|
```kotlin
package mega.privacy.android.data.mapper.shares
import mega.privacy.android.domain.entity.shares.AccessPermission
import nz.mega.sdk.MegaShare
import javax.inject.Inject
/**
* AccessPermission mapper
*/
internal class AccessPermissionIntMapper @Inject constructor() {
/**
* Maps [AccessPermission] to its MegaApi int value
*/
operator fun invoke(accessPermission: AccessPermission) = when (accessPermission) {
AccessPermission.READ -> MegaShare.ACCESS_READ
AccessPermission.READWRITE -> MegaShare.ACCESS_READWRITE
AccessPermission.FULL -> MegaShare.ACCESS_FULL
AccessPermission.OWNER -> MegaShare.ACCESS_OWNER
AccessPermission.UNKNOWN -> MegaShare.ACCESS_UNKNOWN
}
}
```
|
Convoy QP 1 was an Arctic convoy of the PQ/QP series which ran during the Second World War.
It was one of a series of convoys run to return Allied ships from Soviet northern ports to home ports in Britain.
It sailed in late September 1941, reaching Allied ports in mid-October. All ships arrived safely.
Background
In August 1941 Britain had run a convoy of military supplies to Archangel in Northern Russia to support the Soviets in resisting the German invasion of June 1941.
This operation, codenamed Dervish, had been a success, leading to the inauguration of a monthly convoy cycle of supply ships; the PQ convoys taking supplies and war materiel to Russia, and the simultaneous QP convoys returning the empty ships.
PQ 1, comprising 10 ships, left Iceland on 28 September, while QP 1, made up of the seven Dervish ships, and seven Soviet freighters, left Archangel the same day.
Ships
QP 1 comprised 14 merchant ships: These were the seven vessels (one Dutch and six British merchants that made up the Dervish convoy, now unloaded and sailing in ballast, and seven Soviet ships carrying trade goods (mainly timber) for the western allies. The Convoy Commodore was, as before, Capt. John Dowding RNR in Llanstephan Castle.
The ocean escort comprised the destroyer and the three ASW trawlers which had escorted the Dervish ships; these were accompanied by the cruiser and destroyer , which had arrived the previous day with a British and an American diplomatic mission, and RAF personnel.
Local escort was provided by three Royal Navy minesweepers that had escorted Dervish, and were now stationed in North Russia for this purpose.
Distant cover was provided by units of the Home Fleet, which were engaged in Operation EJ, a series of air strikes on targets in occupied Norway.
Voyage
QP 1 departed Archangel on 28 September 1941, accompanied by the local escort, which returned to Archangel after two days. On 2 October London detached for a fast independent transit to Scapa Flow, and was replaced by the cruiser . On 4 October the oiler joined the convoy, escorted by the destroyer . On 5 October the trawler Ophelia developed mechanical problems and was towed by Active to Iceland. Two Soviet freighters (one of which, Sukhona, was over 20 years old and referred to by Electras crew as 'Smokey Joe') were unable to keep up and dropped out of the convoy; both arrived safely after an independent voyage.
On 8 October aircraft from the carrier attacked shipping and other targets along the coast of Vestfjord. Several ships were hit, and in the absence of any response from the Luftwaffe, all aircraft returned safely.
There was no interference by German forces and QP 1 arrived in Scapa Flow without harm on 10 October.
Ships involved
QP sailed from Archangel on 28 September and arrived at Scapa Flow on 10 October. It comprised 14 merchant ships and 11 escorts, though not all were present at one time.
Notes
References
TJ Cain, A Sellwood: HMS Electra (1976)
Paul Kemp : Convoy! Drama in Arctic Waters (1993)
Bob Ruegg, Arnold Hague : Convoys to Russia (1992)
Stephen Roskill, The War at Sea 1939-1945 Vol I (1954) HMSO (ISBN none)
External links
QP 1 at Convoyweb
QP 1
|
The Manhattan Republican Party is a regional affiliate of the United States Republican Party for the Borough of Manhattan in New York City, New York.
Leadership
The Manhattan Republican Party is governed by its 500+ member New York County Republican Committee, elected from and by registered Republicans with residence within the borough. In addition, there is a party executive, that, since 2017 has consisted of:
Chairwoman
Andrea Catsimatidis
First Vice-chairman
Robert Morgan
Second Vice-chairman
Peter Hein
Secretary
Debra Leible
Treasurer
Nick Viest
Vice-presidents
Dr. Jeff Ascherman, Will Brown Jr., John Catsimatidis Jr., Margo Catsimatidis, Edwin DeLaCruz, Charles E. Dorkey, III, Bradley Fishel, Joyce Giuffra, Pete Holmberg, Troy Johnson, David Laska, Ken Moltner, Dr. Devi Nampiaparampil, Helen Qiu, Ashton Theodore Randle, Matt Rich, Todd Shapiro, Donna Soloway, Chris Taylor, Jackie Toboroff, and Frederic M. Umane.
Political Director
Robert Morgan Jr.
History
Founded alongside the New York Republican State Committee in 1855, the party has never held control of the Borough, and has constantly been behind the Manhattan Democratic Party, however, the party has seen several prominent figures elected nationally despite this, including: Theodore Roosevelt, Fiorello LaGuardia, Frederic René Coudert Jr., Ruth Pratt, Jacob K. Javits, MacNeil Mitchell, Louis J. Lefkowitz, Stanley M. Isaacs, John Lindsay, Theodore R. Kupferman, Whitney North Seymour Jr., Bill Green, Roy Goodman, John Ravitz, Charles Millard, Andrew Eristoff, Rudy Giuliani, Michael Bloomberg, and Thomas E. Dewey.
For the two decades from 1990 to 2010, the Manhattan Republican Party was very competitive with their Democratic counterparts, electing two mayors, Giuliani and Bloomberg, and maintaining a centrist and moderate outlook when compared to the rest of the Party, in line with Rockefeller Republican views. However, the party would decline as its leadership began to support Donald Trump and his policies, which resulted in the party's moderate and centrist voter base largely swinging to the Democrats.
Executive Committee (1855-1890)
The party originally did not have a singular executive, but rather a committee acting as the party's executive. Mostly an extension of the New York County Republican Committee, the Executive Committee had the New York Committee perform most of the day-to-day operations for the party and only intervened when a deadlock was reached. Membership to the Executive Committee was largely ceremonial and reserved for the more senior members of the party. Throughout its existence, the Committee was filled with members who were bought and paid controlled opposition to William M. Tweed, allowing him to practically rule the city by decree until his downfall in 1871.
Jacob M. Patterson (1890-1894)
Described as a political boss, Jacob M. Patterson ran an effective political machine in Manhattan to rival the power of Tammany Hall. However, voices within the party, led by Edwin Einstein, opposed the machine and boss politics. Patterson would enter a feud with Senator Thomas C. Platt, who had taken control of the New York Republican State Committee, when he voted for Benjamin Harrison at the 1892 Republican National Convention against Platt's wishes. Platt and his supporters was able to have a party convention called in 1894 which saw Patterson replaced, however, Platt's men where unable to take control of the party.
William Brookfield (1894-1895)
In a highly contentious convention in 1894, the party elected William Brookfield as chairman defying Senator Thomas C. Platt who sought to take control of the city's party. Brookfield was supported by Patterson, and most of the older leaders of the Borough's Party, and his election resulted in violent protests by Platt men outside the hall which had to be repulsed by police. Brookfield was a member of the Committee of Seventy which nominated a fusion candidate to defeat Tammany hall in the 1895 New York City mayoral election. Platt, however, would not end his campaign for control over the city's party and was able to get another convention called in 1895 which saw Brookfield be removed from office.
Edward Lauterbach (1895)
Attorney Edward Lauterbach, a Platt man, would serve as "temporary chairman" in 1895 until a new convention could be called to elect a new chairman.
Matthew Linn Bruce (1895-1904)
A Rutgers College educated Lawyer, Matthew Linn Bruce moved to New York City in 1890, working as a clerk for a law firm, and being involved in his local assembly's Republican politics. He was admitted to the Bar in 1894, and was elected chairman of the party in 1895. During his time as chairman, he sought to combat election fraud, especially fraud committed by fellow Republicans, earning him the ire of a contingent of the party. In December 1903 he was pressured to retire by Governor Odell, with his resignation coming in January 1904. He would go on to be elected the Lieutenant Governor of New York serving from 1905 to 1906 when he resigned to accept a seat on the New York Supreme Court.
William Halpin (1904-1905)
Chairman for a single year. He had been selected chairman in 1904, and during his acceptance speech, he called the Manhattan Republican party too "self-centered" and urged the party to toe the national line and support William Howard Taft. Despite his backing from Taft, allegations surfaced that Halpin was corrupt, and a group of businessmen pressured for an election to replace him. Halpin would face off against two other candidates and lose.
Herbert Parsons (1905-1910)
Coming from a long line of prominent lawyers, Herbert Parsons was a Yale Law School educated lawyer and was elected to the New York City Board of Aldermen from 1900 to 1904 when he was elected to Congress to represent the 13th district. Parsons was elected chairman during a period of intense infighting among the Republican committee, he was officially backed by Theodore Roosevelt and business interests, while the incumbent Halpin was backed by William Howard Taft, a third candidate, J. Van Vechten Olcott, would be endorsed by Senator Thomas C. Platt. He would serve as chairman until 1910 when he also lost his re-election bid for a third term to Congress and would return to his law practice. Despite his resignation, he continued to offer counsel and advice to the inexperienced Griscom on naming candidates.
Lloyd C. Griscom (1910-1912)
A University of Pennsylvania Law School educated lawyer, Lloyd C. Griscom served in a series of diplomatic offices, as the secretary to ambassador to the United Kingdom Thomas F. Bayard and ambassador himself to Persia (1901), Japan (1902 to 1906), Brazil (1906 to 1907) and Italy (1907 to 1909). Upon his return to Manhattan in 1910, he became involved in Republican social circles. In 1910, the New York County Republican Committee chairman Parsons resigned, and Griscom was offered the office by the political boss and close personal friend Otto Bannard, who had unsuccessfully run for mayor in 1905. Lacking any experience or training, Griscom accepted the offer, as he described, in "fear and trembling." Shortly after becoming party chairman, Griscom would go on to help found the New York Young Republican Club along with thirty-one other Manhattanite Republican politicos. He would be the first member of that organization to serve as party chairman. As chairman, he had to find a suitable candidate for the 1910 New York state election and ended up choosing another lawyer and friend, Henry L. Stimson. This caused problems as incumbent president William Howard Taft opposed Stimson, while former president Theodore Roosevelt supported Stimson. Roosevelt ended up personally campaigning for Stimson, who ended up narrowly losing to John Alden Dix. However, the leader of Tammany Hall told Griscom after the election, if the campaign lasted another week, he would have expected Stimson to win. Griscom resigned shortly after the 1912 Republican National Convention, which he described as "the most painful situations I ever knew and led to my ultimate disgust with politics."
Samuel S. Koenig (1912-1933)
A Hungarian-Jew immigrant and New York University School of Law educated lawyer, Koenig was elected the leader of the sixth ward and was a presidential elector in 1900. He was elected Secretary of State of New York in 1908, losing re-election in 1910, and in 1915 he was hand selected as the chairman of the party by Griscom when he resigned, serving until 1933.
Chase Mellen Jr. (1933-1935)
Elected in 1933, defeating the incumbent Samuel S. Koenig, Chase Mellen Jr., a Harvard graduate, WWI veteran, and member of the New York Young Republican Club which helped him oust the incumbent Chairman Koening. Mellen ran an anti-establishment tenure of the party, insisting that "statesmen" and other career politicians had no place in the Manhattan Republican Party. In 1934, Mellen endorsed Joseph McGoldrick alongside the chairman of the Brooklyn Republicans to become New York City Comptroller, in an election where McGoldrick would win. Mellen would resign in 1935 after a period where seemingly all his endorsed candidates would either refuse to run for re-election or outright refuse his endorsement. His daughter, Marisa would go on to be the leader of the Republicans-for-Roosevelt in New York City.
Kenneth F. Simpson (1935-1940)
A Harvard Law School educated lawyer and veteran of the Pancho Villa Expedition,World War I, and like his predecessor, also a member of the New York Young Republican Club, Simpson was a prominent Roosevelt Republican, he was elected the chairman of the party in 1935 and led the party through five of its most turbulent years. He successfully got Fiorello La Guardia re-elected, severely damaging the power of the Democratic Tammany Hall in the city and campaigned heavily for Thomas E. Dewey's 1938 bid for governor. Despite losing the election, due to his campaign efforts, Simpson was named to the Republican National Committee. However, Simpson and Dewey would have a series of clashes culminating in Simpson's resignation as party chairman over the rejection of the removal of David B. Costuma as one of the states electors in December 1940. He would be elected to the United States House of Representatives for the 17th district. However, he would die only 20 days into his term on January 25, 1941, from a heart attack.
Thomas J. Curran (1940-1958)
A Manhattan native, Curran served during WWI. He, like his predecessor, was also a member of the New York Young Republican Club being the third successive party chairman to hail from that organization. In 1928, he became an Assistant United States Attorney in the Southern District of New York. In 1933 he was elected as a New York City alderman and was elected the council's minority leader in 1934. He was elected the chairman of the party in 1940. During his time as chairman, he would challenge Robert F. Wagner during the 1944 New York state election, losing 3,294,576 to 2,899,497. He supported the abolition of the United States Electoral College to the point where, before an assembly of the 1944 NY electors, he stated that this would likely be their last meeting. Curran would die in office on January 20, 1958.
Bernard Newman (1958-1962)
A local judge, Bernard Newman was selected as the party chairman in 1958 and acted as a rival to the powerful Tammany Hall boss Carmine DeSapio. During his tenure he restructured the entire party in 1961, heavily strengthening the party's executive branch, and weakening the party's committee. He was also remembered for his lengthy and loud rivalry with mayor Robert F. Wagner Jr., calling him a "peanut politician" during the 1960 United States presidential election when he welcomed and met with John F. Kennedy but not Richard Nixon. In 1962 Mayor Wagner named Newman to the Family Court and Governor Rockefeller would name him to the New York Supreme Court and also served in various federal courts.
Vincent Albano Jr. (1962-1981)
A banker born in 1914, Vincent Albano Jr. got involved in politics in 1949 when he became the Republican leader of his Assembly District in Stuyvesant Town. Identified with the more liberal faction of the party, he led a push to have more women run in elections against their male Democratic counterparts. His Democratic counterparts called him a "corrupt political boss" following accusations he bribed the city for $840,000 in contracts to be awarded to companies run by his personal friends, and for putting his family members on the party payroll. In 1980 he was the oldest Republican chairman in the state and supported George H. W. Bush during the 1980 Republican Party presidential primaries over eventual winner Ronald Reagan. Albano would die in office at the age of 67 from a heart attack and would be a return of a member or alumnus of the New York Young Republican Club holding the office after a brief intermission with the tenure of Bernard Newman. The Vincent F. Albano Jr. Playground is named in his honor.
Roy M. Goodman (1981-2002)
Grandson and heir to the fortune of Israel Matz, the founder of the Ex-Lax pharmaceutical company, Roy M. Goodman was a figurehead of the so-called silk-stocking Republicans who were even more moderate, liberal, and left-leaning than the Rockefeller Republicans. Goodman was elected to the New York State Senate in 1968, serving until 2002, with his 33 years in the Senate being one of the longest tenures in New York State history. He ran for mayor in 1977 being defeated in a landslide by Mario Cuomo and Ed Koch, despite polls showing him up 5 to 6%. Goodman would become the party chairman in 1981 and hold the office for over two decades until 2002. He was an alumnus of the New York Young Republican Club and would be the last member or alumnus of that organization to hold the office of party chairman. During this, he frequently clashed with the party due to his support of gun control, gay marriage, and a restoration of the death penalty. As such, he had little sway over the party. The committee ran most of the day-to-day, with Goodman preoccupied in Albany and only coming down to Manhattan for galas and fundraisers on behalf of the committee. After leaving both the senate and chairmanship in 2002, Mayor Michael Bloomberg named him the President of the United Nations Development Corporation which sought to replace and then demolish the Headquarters of the United Nations.
John Ravitz (2002-2003)
Following his departure from the State Assembly after an unsuccessful bid to the State Senate in 2002, John Ravitz briefly became chairman of the party until his selection to be the executive director of the New York Board of Elections in 2003.
James Ortenzio (2003-2007)
In 2003, James Ortenzio, chairman of the Hudson River Park Trust from 1999 to his election, and influential local businessman who owned several meat packing facilities was elected chairman of the party. He would retire from the chairmanship in 2007, however, it was revealed he had been committing tax-evasion and receiving large "donations" during his time in office. As chairman, Ortenzio had to submit an Annual Statement of Financial Disclosure with the New York State Ethics Commission, and in September 2004 he received $100,000 from Fisher Brothers for consulting services, which he did not disclose. He also did not disclose a payment of $80,000 to arbitrate in favor of Air Pegasus building a helipad near the Hudson River Park. He pleaded guilty to tax evasion in 2007 to evade jail time.
Despite being the chairman when a Manhattanite Republican, Michael Bloomberg, was mayor of New York, Bloomberg had no affiliation to the Manhattan Republican Part whatsoever, interacting with Ortenzio only during select public ceremonies, and never outside of official duties. Additionally, when the scope of Ortenzio's corruption became apparent in 2007, Bloomberg switched affiliations to Independent. Although Ortenzio was not the deciding factor in Bloomberg leaving the party, it did contribute to his distrust of the party and its inner workings.
Jennifer Saul-Yaffa (2007-2011)
The daughter of former Metropolitan Transportation Authority director Andrew Saul, she was elected to succeed Ortenzio in 2007. Then Jennifer Yaffa, she was seen largely as a continuation of his tenure, with both being closely aligned to Governor Pataki. A hands off Chairwoman, she let the New York County Republican Committee make most important decisions, acting mostly as a mouthpiece for the party. During what should've been a high point in the Republican party's popularity in the city, she and the other borough chairs had to deal with the sudden departure of mayor Michael Bloomberg from the Republican party to run as an Independent during the 2009 New York City mayoral election. In order to appear on the ballot as a Republican for mayor, one has to get the support from at least three of the borough's Republican parties. The Queens and Bronx parties where adamantly against Bloomberg, while the Staten Island and Brooklyn parties where reluctantly supporting him. This left the decision of if Bloomberg where to appear as a Republican on the ballot to Yaffa and the Manhattan Republican Party. In part due to Pataki's support for Bloomberg, Yaffa and the party backed Bloomberg.
Daniel Issacs (2011-2015)
A local attorney, Issacs was elected the chairman of the party in 2011 and focused most of his tenure in getting younger, college aged Republicans more involved in the party's day-to-day operations. However, his tenure would be rocked with scandal when he was offered a $25,000 bribe to help Democratic state Senator Malcolm Smith get on the Republican ballot for the 2013 New York City mayoral election. Issacs would be removed from the office by Edward F. Cox, chairman of the New York Republican State Committee, in 2015, not due to his scandal, but due to the fact his administration of the Manhattan Republican Party left it teetering on the edge of bankruptcy and from pressure from the Malpass family.
Adele Malpass (2015-2017)
Adele Malpass, wife of David Malpass, was elected the party's chairwoman in 2015. A former Senate Budget Committee staffer, during her tenure, she focused heavily on defeating Bill de Blasio in the 2017 New York City mayoral election, hosting a series of Republican candidates including Paul Massey, a real estate executive, Michel Faulkner, a pastor from Harlem, Richard Dietl, a retired NYPD detective, and the eventual candidate Nicole Malliotakis, an assemblywoman. In 2015 the party hosted NYC Police Commissioner Raymond Kelly at the Metropolitan Republican Club in an effort to draft him to run for mayor, however, he would decline to be a candidate. Although officially neutral on who the candidate would be, the party, and chairwoman Malpass actively limited Dietl's campaign, calling him too risky to run against DeBalsio due to his ability to generate headlines due to his crass and unprofessional behavior and speech. The Staten Island assemblywoman Malliotakis would win the primary, and go on to lose to de Blasio 66%-28%.
After the 2016 United States presidential election, the Manhattan Republican Party focused its efforts on the Upper East Side, where it sees the most support. Painting themselves as still moderates in line with the policies of Mayor Bloomberg, the party hoped to win a seat on the city council during the 2017 New York City Council election. However Adele's husband, David, was named the Under Secretary of the Treasury for International Affairs by President Trump in 2017, directly tying the Manhattan party to the president and his policies. The backlash to the Trump presidency prevented their hopeful swell of moderate Democrats voting for them.
After leaving the office Adele has served as a board member for the American Journalism Institute, has worked as a reporter for the Washington Examiner and The New York Sun as well as being the president of The Daily Caller News Foundation.
Andrea Catsimatidis (2017-present)
In 2017, the party elected Andrea Catsimatidis as their chairwoman. At the age of 29, Catsimatidis victory raised some eyebrows within the party, since her father, John Catsimatidis, was a lifelong Democrat and large donar to the Democrats. In response to this Andrea stated that "of course I'm a Republican", she had previously serviced as the President of the NYU College Republicans and was married to the grandson of Richard Nixon, Christopher Nixon Cox until their divorce in 2014. She stated after her election, that despite her being pro-life, she will toe the Manhattan Republican Party's platforms of being Pro-choice, pro-LGBTQ, and generally Socially Liberal.
On October 12, 2018, the party hosted Gavin McInnes, the founder of the Proud Boys and the co-founder of Vice at the Metropolitan Republican Club. The meeting would be met with protestors, and a fight broke out inside the club. The doors to the club where defaced with Circle-As and three people would be charged with assault.
Catsimatidis' party would feud with members of the New York Young Republican Club, who are mostly Millennials and Pro-Trump Populists that are led by Gavin M. Wax, despite them having endorsed Catsimatidis for chairwoman. The more moderate leadership of the party led by Catsimatidis has sought to prevent them from appearing on the ballot for the 500-member borough committee. The party's leadership submitted a list of young republicans to a NYC judge arguing that they failed to qualify for the ballot due to residency requirements, and the judge agreed, removing their names from the ballot.
Despite their still small numbers compared to the Democrats, the Manhattan Republicans continue to grow, with more Republicans voting for Trump in 2020 United States presidential election than in the 2016 United States presidential election and with Curtis Sliwa performing the best out of any Republican mayoral candidate since Bloomberg in 2009. In the wake of the January 6 United States Capitol attack, the Manhattan Republican Party, in a joint statement with the Queens County Republican Party and Bronx GOP, decried the attack, with Chairwoman Catsimatidis stating that "All riots are bad. We condemn any violence regardless of who perpetrates it and what their political affiliations are." However, Catsimatidis also claimed that the attack was instigated and performed by Antifa actors.
In June 2021, the party held a fundraiser and hosted various hopeful candidates from the 2024 Republican Party presidential primaries including Mike Pompeo, Marco Rubio (who both would decline to run), Tim Scott, and Ron DeSantis.
Current elected officials
As of 2023, the Manhattan Republican Party has no elected officials in the New York Senate, New York House of Representatives, Mayor of New York, or New York City Council. As of 2023 there are only 106,000 registered Republicans in the Borough to the Democrats 878,000.
Edgar J. Nathan was the last Republican to hold the office of Manhattan Borough president, doing so from 1942 to 1945.
Affiliates
The Metropolitan Republican Club, located at 122 E 83rd St, was founded in 1902 by Reformist Roosevelt Republicans, but transformed into a center for more conservative members of the party to meet and host talks. The club is frequently used by the Manhattan Republican Party to host speakers, and also to meet with party leadership and voters.
The New York Young Republican Club was founded in 1856 as the New York Young Men's Republican Union, but the current iteration of the organization was founded in 1911 and incorporated in 1912. The club is the oldest and largest chapter of the Young Republicans and has had hundreds of its alumni go on to be elected to public office. The group has slowly developed a more conservative and populist strain, drifting from its Rockefeller Republican and Moderate Republican roots, becoming strong and vocal supporters of President Donald J. Trump. The club has been led by Gavin M. Wax, its 76th president, since April 2019.
The Gertrude & Morrison Parker West Side Republican Club, located at 50 West 72nd Street, was founded in 1898 as the West Side Republican Club and is the official Republican club for the 67th and 75th Assembly districts representing the Upper West Side. In 2002 it was renamed in memory of longtime president and community leader, Morrison Parker, and his wife and longtime club secretary Gertrude.
The Vincent F. Albano Midtown Republican Club is the official Republican club for the 74th Assembly District and was founded by Vincent F. Albano, who served as its first president, prior to his election as party chairman. After Albano's death the club would be renamed in his memory. The neighborhoods represented by the club include Stuyvesant Town, Peter Cooper Village, Waterside Plaza, Alphabet City, Tudor City, Kips Bay, Turtle Bay, the East Village and portions of the Lower East Side.
The Knickerbocker Republican Club was founded in 1976 and is the official Republican club for the 76th Assembly district. The club has several famous alumni, including former Governor George Pataki, former mayors Rudy Giuliani and Ed Koch, New York State Comptroller Edward Regan, Congressmen Bill Green, and several assemblymen, councilmen and candidates for other offices, including Bret Schundler, two time candidate for Governor of New Jersey.
The Liberty Club is a Republican networking platform created by Andrea Catsimatidis for Republican donors to give back and connect those who funded local, state and national Republican campaign throughout New York City and Palm Beach, Florida. The group promotes electoral reform, outreach and community engagement, and branding for local candidates and party affiliates.
See Also
Kings County Republican Party
Queens County Republican Party
Bronx Republican Party
Staten Island Republican Party
New York Republican State Committee
References
New York Republican State Committee
1855 establishments in New York (state)
Organizations based in Manhattan
|
Pipe Creek is a stream located primarily in Bandera County, Texas, in the United States.
Pipe Creek was so named in 1852, when a pioneer settler lost his tobacco pipe there. The stream is the namesake of the community Pipe Creek, located near the intersection of SH 16 and FM 1283.
Course
The stream rises in southwestern Kendall County, traveling through rural areas. Shortly after entering into Bandera County, Pipe Creek briefly flows through the Kronsky State Natural Area. Bear Springs Creek flows into Pipe Creek just northeast of the unincorporated town Pipe Creek. The stream flows under SH 16 just east of the town and runs parallel to FM 1283, before flowing into Red Bluff Creek near Bandera Falls.
See also
Pipe Creek, Texas
List of rivers of Texas
References
Rivers of Bandera County, Texas
Rivers of Texas
|
```sqlpl
select 1 as id
union all
select * from {{ ref('node_0') }}
union all
select * from {{ ref('node_4') }}
union all
select * from {{ ref('node_87') }}
union all
select * from {{ ref('node_186') }}
union all
select * from {{ ref('node_203') }}
union all
select * from {{ ref('node_375') }}
```
|
Hybrid nuclear fusion–fission (hybrid nuclear power) is a proposed means of generating power by use of a combination of nuclear fusion and fission processes.
The basic idea is to use high-energy fast neutrons from a fusion reactor to trigger fission in non-fissile fuels like U-238 or Th-232. Each neutron can trigger several fission events, multiplying the energy released by each fusion reaction hundreds of times. As the fission fuel is not fissile, there is no self-sustaining chain reaction from fission. This would not only make fusion designs more economical in power terms, but also be able to burn fuels that were not suitable for use in conventional fission plants, even their nuclear waste.
In general terms, the hybrid is similar in concept to the fast breeder reactor, which uses a compact high-energy fission core in place of the hybrid's fusion core. Another similar concept is the accelerator-driven subcritical reactor, which uses a particle accelerator to provide the neutrons instead of nuclear reactions.
History
The concept dates to the 1950s, and was strongly advocated by Hans Bethe during the 1970s. At that time the first powerful fusion experiments were being built, but it would still be many years before they could be economically competitive. Hybrids were proposed as a way of greatly accelerating their market introduction, producing energy even before the fusion systems reached break-even. However, detailed studies of the economics of the systems suggested they could not compete with existing fission reactors.
The idea was abandoned and lay dormant until the 2000s, when the continued delays in reaching break-even led to a brief revival around 2009. These studies generally concentrated on the nuclear waste disposal aspects of the design, as opposed to the production of energy. The concept has seen cyclical interest since then, based largely on the success or failure of more conventional solutions like the Yucca Mountain nuclear waste repository
Another major design effort for energy production was started at Lawrence Livermore National Laboratory (LLNL) under their LIFE program. Industry input led to the abandonment of the hybrid approach for LIFE, which was then re-designed as a pure-fusion system. LIFE was cancelled when the underlying technology, from the National Ignition Facility, failed to reach its design performance goals.
Apollo Fusion, a company founded by Google executive Mike Cassidy in 2017, was also reported to be focused on using the subcritical nuclear fusion-fission hybrid method. Their web site is now focussed on their hall effect thrusters, and mentions fusion only in passing.
On 2022, September 9, Professor Peng Xianjue of the Chinese Academy of Engineering Physics announced that the Chinese government had approved the construction of the world’s largest pulsed-powerplant - the Z-FFR, namely Z(-pinch)-Fission-Fusion Reactor- in Chengdu, Sichuan province. Neutrons produced in a Z-pinch facility (endowed with cylindrical symmetry and fuelled with deuterium and tritium) will strike a coaxial blanket including both uranium and lithium isotopes. Uranium fission will boost the facility’s overall heat output by 10 to 20 times. Interaction of lithium and neutrons will provide tritium for further fueling. Innovative, quasi-spherical geometry near the core of Z-FFR leads to high performance of Z-pinch discharge. According to Prof. Xianjue, this will considerably speed up the use of fusion energy and prepare it for commercial power production by 2035.
Fission basics
Conventional fission power systems rely on a chain reaction of nuclear fission events that release a few neutrons that cause further fission events. By careful arrangement and the use of various absorber materials the system can be set in a balance of released and absorbed neutrons, known as criticality.
Natural uranium is a mix of several isotopes, mainly a trace amount of 235U and over 99% 238U. When they undergo fission, both of these isotopes release fast neutrons with an energy distribution peaking around 1 to 2 MeV. This energy is too low to cause fission in 238U, which means it cannot sustain a chain reaction. 235U will undergo fission when struck by neutrons of this energy, so it is possible for 235U to sustain a chain reaction. There are too few 235U atoms in natural uranium to sustain a chain reaction, the atoms are spread out too far and the chance a neutron will hit one is too small. Chain reactions are accomplished by concentrating, or enriching, the fuel, increasing the amount of 235U to produce enriched uranium, while the leftover, now mostly 238U, is a waste product known as depleted uranium. 235U will sustain a chain reaction if enriched to about 20% of the fuel mass.
235U will undergo fission more easily if the neutrons are of lower energy, the so-called thermal neutrons. Neutrons can be slowed to thermal energies through collisions with a neutron moderator material, the easiest to use are the hydrogen atoms found in water. By placing the fission fuel in water, the probability that the neutrons will cause fission in another 235U is greatly increased, which means the level of enrichment needed to reach criticality is greatly reduced. This leads to the concept of reactor-grade enriched uranium, with the amount of 235U increased from just less than 1% in natural ore to between 3 and 5%, depending on the reactor design. This is in contrast to weapons-grade enrichment, which increases to the 235U to at least 20%, and more commonly, over 90%.
In order to maintain criticality, the fuel has to retain that extra concentration of 235U. A typical fission reactor burns off enough of the 235U to cause the reaction to stop over a period on the order of a few months. A combination of burnup of the 235U along with the creation of neutron absorbers, or poisons, as part of the fission process eventually results in the fuel mass not being able to maintain criticality. This burned up fuel has to be removed and replaced with fresh fuel. The result is nuclear waste that is highly radioactive and filled with long-lived radionuclides that present a safety concern.
The waste contains most of the 235U it started with, only 1% or so of the energy in the fuel is extracted by the time it reaches the point where it is no longer fissile. One solution to this problem is to reprocess the fuel, which uses chemical processes to separate the 235U (and other non-poison elements) from the waste, and then mixes the extracted 235U5 in fresh fuel loads. This reduces the amount of new fuel that needs to be mined and also concentrates the unwanted portions of the waste into a smaller load. Reprocessing is expensive, however, and it has generally been more economical to simply buy fresh fuel from the mine.
Like 235U, 239Pu can maintain a chain reaction, so it is a useful reactor fuel. However, 239Pu is not found in commercially useful amounts in nature. Another possibility is to breed 239Pu from the 238U through neutron capture, or various other means. This process only occurs with higher-energy neutrons than would be found in a moderated reactor, so a conventional reactor only produces small amounts of Pu when the neutron is captured within the fuel mass before it is moderated.
More typically, special reactors are used that are designed specifically for the breeding of 239Pu. The simplest way to achieve this is to further enrich the original 235U fuel well beyond what is needed for use in a moderated reactor, to the point where the 235U maintains criticality even with the fast neutrons. The extra fast neutrons escaping the fuel load can then be used to breed fuel in a 238U assembly surrounding the reactor core, most commonly taken from the stocks of depleted uranium. 239Pu can also be used for the core, which means once the system is up and running, it can be refuelled using the 239Pu it creates, with enough left over to feed into other reactors as well.
Extracting the 239Pu from the 238U feedstock can be achieved with chemical processing, in the same fashion as normal reprocessing. The difference is that the mass will contain far fewer other elements, particularly some of the highly radioactive fission products found in normal nuclear waste. Unfortunately it is a tendency that breeder reactors in the "free world" (like the SNR-300, the Integral fast reactor) that have been built were demolished before operation, as a "symbol" (as Bill Clinton has stated). The Prototype Fast Breeder Reactor passed tests in 2017 and apparently is about to face the same fate, leaving some military reactors and the Russian BN-800 reactor operating, mostly consuming spent nuclear fuel.
Fusion basics
Fusion reactors typically burn a mixture of deuterium (D) and tritium (T). When heated to millions of degrees, the kinetic energy in the fuel begins to overcome the natural electrostatic repulsion between nuclei, the so-called coulomb barrier, and the fuel begins to undergo fusion. This reaction gives off an alpha particle and a high energy neutron of 14 MeV. A key requirement to the economic operation of a fusion reactor is that the alphas deposit their energy back into the fuel mix, heating it so that additional fusion reactions take place. This leads to a condition not unlike the chain reaction in the fission case, known as ignition.
Deuterium can be obtained by the separation of hydrogen isotopes in sea water (see heavy water production). Tritium has a short half life of just over a decade, so only trace amounts are found in nature. To fuel the reactor, the neutrons from the reaction are used to breed more tritium through a reaction in a blanket of lithium surrounding the reaction chamber. Tritium breeding is key to the success of a D-T fusion cycle, and to date this technique has not been demonstrated. Predictions based on computer modeling suggests that the breeding ratios are quite small and a fusion plant would barely be able to cover its own use. Many years would be needed to breed enough surplus to start another reactor.
Hybrid concepts
Fusion–fission designs essentially replace the lithium blanket with a blanket of fission fuel, either natural uranium ore or even nuclear waste. The fusion neutrons have more than enough energy to cause fission in the 238U, as well as many of the other elements in the fuel, including some of the transuranic waste elements. The reaction can continue even when all of the 235U is burned off; the rate is controlled not by the neutrons from the fission events, but the neutrons being supplied by the fusion reactor.
Fission occurs naturally because each event gives off more than one neutron capable of producing additional fission events. Fusion, at least in D-T fuel, gives off only a single neutron, and that neutron is not capable of producing more fusion events. When that neutron strikes fissile material in the blanket, one of two reactions may occur. In many cases, the kinetic energy of the neutron will cause one or two neutrons to be struck out of the nucleus without causing fission. These neutrons still have enough energy to cause other fission events. In other cases the neutron will be captured and cause fission, which will release two or three neutrons. This means that every fusion neutron in the fusion–fission design can result in anywhere between two and four neutrons in the fission fuel.
This is a key concept in the hybrid concept, known as fission multiplication. For every fusion event, several fission events may occur, each of which gives off much more energy than the original fusion, about 11 times. This greatly increases the total power output of the reactor. This has been suggested as a way to produce practical fusion reactors in spite of the fact that no fusion reactor has yet reached break-even, by multiplying the power output using cheap fuel or waste. However, a number of studies have repeatedly demonstrated that this only becomes practical when the overall reactor is very large, 2 to 3 GWt, which makes it expensive to build.
These processes also have the side-effect of breeding 239Pu or 233U, which can be removed and used as fuel in conventional fission reactors. This leads to an alternate design where the primary purpose of the fusion–fission reactor is to reprocess waste into new fuel. Although far less economical than chemical reprocessing, this process also burns off some of the nastier elements instead of simply physically separating them out. This also has advantages for non-proliferation, as enrichment and reprocessing technologies are also associated with nuclear weapons production. However, the cost of the nuclear fuel produced is very high, and is unlikely to be able to compete with conventional sources.
Neutron economy
A key issue for the fusion–fission concept is the number and lifetime of the neutrons in the various processes, the so-called neutron economy.
In a pure fusion design, the neutrons are used for breeding tritium in a lithium blanket. Natural lithium consists of about 92% 7Li and the rest is mostly 6Li. 7Li breeding requires neutron energies even higher than those released by fission, around 5 MeV, well within the range of energies provided by fusion. This reaction produces tritium and helium-4, and another slow neutron. 6Li can react with high or low energy neutrons, including those released by the 7Li reaction. This means that a single fusion reaction can produce several tritiums, which is a requirement if the reactor is going to make up for natural decay and losses in the fusion processes.
When the lithium blanket is replaced, or supplanted, by fission fuel in the hybrid design, neutrons that do react with the fissile material are no longer available for tritium breeding. The new neutrons released from the fission reactions can be used for this purpose, but only in 6Li. One could process the lithium to increase the amount of 6Li in the blanket, making up for these losses, but the downside to this process is that the 6Li reaction only produces one tritium atom. Only the high-energy reaction between the fusion neutron and 7Li can create more than one tritium, and this is essential for keeping the reactor running.
To address this issue, at least some of the fission neutrons must also be used for tritium breeding in 6Li. Every one that does is no longer available for fission, reducing the reactor output. This requires a very careful balance if one wants the reactor to be able to produce enough tritium to keep itself running, while also producing enough fission events to keep the fission side energy positive. If these cannot be accomplished simultaneously, there is no reason to build a hybrid. Even if this balance can be maintained, it might only occur at a level that is economically infeasible.
Overall economy
Through the early development of the hybrid concept the question of overall economics appeared difficult to handle. A series of studies starting in the late 1970s provided a much clearer picture of the hybrid in a complete fuel cycle, and allowed the economics to be better understood. These studies appeared to indicate there was no reason to build a hybrid.
One of the most detailed of these studies was published in 1980 by Los Alamos National Laboratory (LANL). Their study noted that the hybrid would produce most of its energy indirectly, both through the fission events in its own reactor, and much more by providing Pu-239 to fuel conventional fission reactors. In this overall picture, the hybrid is essentially identical to the breeder reactor, which uses fast neutrons from plutonium fission to breed more fuel in a fission blanket in largely the same fashion as the hybrid. Both require chemical processing to remove the bred Pu-239, both presented the same proliferation and safety risks as a result, and both produced about the same amount of fuel. Since that fuel is the primary source of energy in the overall cycle, the two systems were almost identical in the end.
What was not identical, however, was the technical maturity of the two designs. The hybrid would require considerable additional research and development before it would be known if it could even work, and even if that were demonstrated, the result would be a system essentially identical to breeders which were already being built at that time. The report concluded:
The investment of time and money required to commercialize the hybrid cycle could only be justified by a real or perceived advantage of the hybrid over the classical FBR. Our analysis leads us to conclude that no such advantage exists. Therefore, there is not sufficient incentive to demonstrate and commercialize the fusion–fission hybrid.
Rationale
The fusion process alone currently does not achieve sufficient gain (power output over power input) to be viable as a power source. By using the excess neutrons from the fusion reaction to in turn cause a high-yield fission reaction (close to 100%) in the surrounding subcritical fissionable blanket, the net yield from the hybrid fusion–fission process can provide a targeted gain of 100 to 300 times the input energy (an increase by a factor of three or four over fusion alone). Even allowing for high inefficiencies on the input side (i.e. low laser efficiency in ICF and Bremsstrahlung losses in Tokamak designs), this can still yield sufficient heat output for economical electric power generation. This can be seen as a shortcut to viable fusion power until more efficient pure fusion technologies can be developed, or as an end in itself to generate power, and also consume existing stockpiles of nuclear fissionables and waste products.
In the LIFE project at the Lawrence Livermore National Laboratory LLNL, using technology developed at the National Ignition Facility, the goal is to use fuel pellets of deuterium and tritium surrounded by a fissionable blanket to produce energy sufficiently greater than the input (laser) energy for electrical power generation. The principle involved is to induce inertial confinement fusion (ICF) in the fuel pellet which acts as a highly concentrated point source of neutrons which in turn converts and fissions the outer fissionable blanket. In parallel with the ICF approach, the University of Texas at Austin is developing a system based on the tokamak fusion reactor, optimising for nuclear waste disposal versus power generation. The principles behind using either ICF or tokamak reactors as a neutron source are essentially the same (the primary difference being that ICF is essentially a point-source of neutrons while Tokamaks are more diffuse toroidal sources).
Use to dispose of nuclear waste
The surrounding blanket can be a fissile material (enriched uranium or plutonium) or a fertile material (capable of conversion to a fissionable material by neutron bombardment) such as thorium, depleted uranium or spent nuclear fuel. Such subcritical reactors (which also include particle accelerator-driven neutron spallation systems) offer the only currently-known means of active disposal (versus storage) of spent nuclear fuel without reprocessing. Fission by-products produced by the operation of commercial light water nuclear reactors (LWRs) are long-lived and highly radioactive, but they can be consumed using the excess neutrons in the fusion reaction along with the fissionable components in the blanket, essentially destroying them by nuclear transmutation and producing a waste product which is far safer and less of a risk for nuclear proliferation. The waste would contain significantly reduced concentrations of long-lived, weapons-usable actinides per gigawatt-year of electric energy produced compared to the waste from a LWR. In addition, there would be about 20 times less waste per unit of electricity produced. This offers the potential to efficiently use the very large stockpiles of enriched fissile materials, depleted uranium, and spent nuclear fuel.
Safety
In contrast to current commercial fission reactors, hybrid reactors potentially demonstrate what is considered inherently safe behavior because they remain deeply subcritical under all conditions and decay heat removal is possible via passive mechanisms. The fission is driven by neutrons provided by fusion ignition events, and is consequently not self-sustaining. If the fusion process is deliberately shut off or the process is disrupted by a mechanical failure, the fission damps out and stops nearly instantly. This is in contrast to the forced damping in a conventional reactor by means of control rods which absorb neutrons to reduce the neutron flux below the critical, self-sustaining, level. The inherent danger of a conventional fission reactor is any situation leading to a positive feedback, runaway, chain reaction such as occurred during the Chernobyl disaster. In a hybrid configuration the fission and fusion reactions are decoupled, i.e. while the fusion neutron output drives the fission, the fission output has no effect whatsoever on the fusion reaction, completely eliminating any chance of a positive feedback loop.
Fuel cycle
There are three main components to the hybrid fusion fuel cycle: deuterium, tritium, and fissionable elements. Deuterium can be derived by the separation of hydrogen isotopes in seawater (see heavy water production). Tritium may be generated in the hybrid process itself by absorption of neutrons in lithium bearing compounds. This would entail an additional lithium-bearing blanket and a means of collection. Small amounts of tritium are also produced by neutron activation in nuclear fission reactors, particularly when heavy water is used as a neutron moderator or coolant. The third component is externally derived fissionable materials from demilitarized supplies of fissionables, or commercial nuclear fuel and waste streams. Fusion driven fission also offers the possibility of using thorium as a fuel, which would greatly increase the potential amount of fissionables available. The extremely energetic nature of the fast neutrons emitted during the fusion events (up to 0.17 the speed of light) can allow normally non-fissioning 238U to undergo fission directly (without conversion first to 239Pu), enabling refined natural Uranium to be used with very low enrichment, while still maintaining a deeply subcritical regime.
Engineering considerations
Practical engineering designs must first take into account safety as the primary goal. All designs should incorporate passive cooling in combination with refractory materials to prevent melting and reconfiguration of fissionables into geometries capable of un-intentional criticality. Blanket layers of Lithium bearing compounds will generally be included as part of the design to generate Tritium to allow the system to be self-supporting for one of the key fuel element components. Tritium, because of its relatively short half-life and extremely high radioactivity, is best generated on-site to obviate the necessity of transportation from a remote location. D-T fuel can be manufactured on-site using Deuterium derived from heavy water production and Tritium generated in the hybrid reactor itself. Nuclear spallation to generate additional neutrons can be used to enhance the fission output, with the caveat that this is a tradeoff between the number of neutrons (typically 20-30 neutrons per spallation event) against a reduction of the individual energy of each neutron. This is a consideration if the reactor is to use natural Thorium as a fuel. While high energy (0.17c) neutrons produced from fusion events are capable of directly causing fission in both Thorium and 238U, the lower energy neutrons produced by spallation generally cannot. This is a tradeoff that affects the mixture of fuels against the degree of spallation used in the design.
See also
Subcritical reactor, a broad category of designs using various external neutron sources including spallation to generate non-self-sustaining fission (hybrid fusion–fission reactors fall into this category).
Muon-catalyzed fusion, which uses exotic particles to achieve fusion ignition at relatively low temperatures.
Breeder reactor, a nuclear reactor that generates more fissile material in fuel than it consumes.
Generation IV reactor, next generation fission reactor designs claiming much higher safety, and greatly increased fuel use efficiency.
Traveling wave reactor, a pure fission reactor with a moving reaction zone, which is also capable of consuming wastes from LWRs and using depleted Uranium as a fuel.
Liquid fluoride thorium reactor, a fission reactor which uses molten thorium fluoride salt fuel, capable of consuming wastes from LWRs.
Integral Fast Reactor, a fission fast breeder reactor which uses reprocessing via electrorefining at the reactor site, capable of consuming wastes from LWRs and using depleted Uranium as a fuel.
Aneutronic fusion a category of nuclear reactions in which only a small part (or none) of the energy released is carried away by energetic neutrons.
Project PACER, a reverse of this concept, attempts to use small fission explosions to ignite hydrogen fusion (fusion bombs) for power generation
Cold fusion
COLEX process (isotopic separation)
References
Citations
Bibliography
Further reading
External links
Potential Role of Lasers for Sustainable Fission Energy Production and Transmutation of Nuclear Waste C.D. Bowman and J. Magill
Laser Inertial Fusion–Fission Energy (LIFE) Project at the Lawrence Livermore National Laboratory,
Nuclear Fusion–Fission Hybrid Could Destroy Nuclear Waste And Contribute to Carbon-Free Energy Future University of Texas at Austin
Ralph Moir's fusion–fission hybrid page – contains many research papers about the topic
International Thorium Energy Organisation - www.IThEO.org
Nuclear technology
Nuclear fusion
Nuclear fission
|
Agnes Mukabaranga is a Rwandan politician. Mukabaranga is a member of the Christian Democratic Party (PDC) and member of both the Pan-African Parliament and former member of both the National Assembly and the Rwandan Senate. She is a lawyer by profession.
Political career
Mukabaranga was appointed an inaugural member of the transitional National Assembly, which was set up following the 1994 Rwandan genocide, and was loosely based on the Arusha Accords agreed the previous year. In 2003, a new permanent constitution was approved for the country in a referendum, which established a multi-party state with a bicameral parliament consisting of a senate and a chamber of deputies. Mukabaranga was appointed to the new senate following the election of Paul Kagame as the first president under the new constitution. She was one of 39 women elected or appointed to the parliament that year, compared with 41 men. Promising to fight for justice and reconciliation in the country following the genocide, she emphasised the role of women in the process, saying "Women are more prepared to make compromises, are more peace-loving and more conciliatory".
In 2013, having previously left the senate, Mukabaranga was elected for a six month term as the spokesperson for the National Consultative Forum for Political Parties, a role she held jointly with a nurse and political newcomer, Sylvie Mpongera of the Rwanda Socialist Party (PSR).
Personal life
Agnes Mukabaranga lost her brothers in the Rwandan genocide, and is a mother to four children.
References
Year of birth missing (living people)
Living people
Members of the Pan-African Parliament from Rwanda
Members of the Senate (Rwanda)
Centrist Democratic Party (Rwanda) politicians
21st-century Rwandan women politicians
21st-century Rwandan politicians
Women members of the Pan-African Parliament
|
Raphoe South (; ), or South Raphoe, is a barony in County Donegal, Ireland. Baronies were mainly cadastral rather than administrative units. They acquired modest local taxation and spending functions in the 19th century before being superseded by the Local Government (Ireland) Act 1898.
Etymology
Raphoe South takes its name from Raphoe town, in Irish Ráth Bhoth, "ringfort of the huts."
Geography
Raphoe South is located in the centre of County Donegal; the River Finn flows through it.
History
Raphoe South was the ancient territory of the O'Mulligan, O'Pattan, McGlinchy and McCrossans. The barony of Raphoe was divided into South and North between 1807 and 1821.
List of settlements
Below is a list of settlements in Raphoe South:
Ballybofey
Castlefinn
Convoy
Killygordon
References
Baronies of County Donegal
|
Schizovalva brunneovesta is a moth of the family Gelechiidae. It was described by Anthonie Johannes Theodorus Janse in 1960. It is found in Namibia.
References
Moths described in 1960
Schizovalva
|
```smalltalk
// <copyright file="IProvideMeterMetrics.cs" company="App Metrics Contributors">
// </copyright>
using System;
namespace App.Metrics.Meter
{
public interface IProvideMeterMetrics
{
/// <summary>
/// Instantiates an instance of a <see cref="IMeter" />
/// </summary>
/// <param name="options">The details of the <see cref="IMeter" /> that is being marked</param>
/// <returns>A new instance of an <see cref="IMeter" /> or the existing registered instance of the meter</returns>
IMeter Instance(MeterOptions options);
/// <summary>
/// Instantiates an instance of a <see cref="IMeter" />
/// </summary>
/// <typeparam name="T">The type of <see cref="IMeter" /> to instantiate</typeparam>
/// <param name="options">The details of the <see cref="IMeter" /> that is being marked</param>
/// <param name="builder">The function used to build the meter metric.</param>
/// <returns>A new instance of an <see cref="IMeter" /> or the existing registered instance of the meter</returns>
IMeter Instance<T>(MeterOptions options, Func<T> builder)
where T : IMeterMetric;
/// <summary>
/// Instantiates an instance of a <see cref="IMeter" />
/// </summary>
/// <param name="options">The details of the <see cref="IMeter" /> that is being marked</param>
/// <param name="tags">
/// The runtime tags to set in addition to those defined on the options, this will create a separate metric per unique <see cref="MetricTags"/>
/// </param>
/// <returns>
/// A new instance of an <see cref="IMeter" /> or the existing registered instance of the meter
/// </returns>
IMeter Instance(MeterOptions options, MetricTags tags);
/// <summary>
/// Instantiates an instance of a <see cref="IMeter" />
/// </summary>
/// <typeparam name="T">The type of <see cref="IMeter" /> to instantiate</typeparam>
/// <param name="options">The details of the <see cref="IMeter" /> that is being marked</param>
/// <param name="tags">
/// The runtime tags to set in addition to those defined on the options, this will create a separate metric per unique <see cref="MetricTags"/>
/// </param>
/// <param name="builder">The function used to build the meter metric.</param>
/// <returns>
/// A new instance of an <see cref="IMeter" /> or the existing registered instance of the meter
/// </returns>
IMeter Instance<T>(MeterOptions options, MetricTags tags, Func<T> builder)
where T : IMeterMetric;
}
}
```
|
Absolute Pleasure is a live album by Detroit rock band Electric Six. It is composed of recordings from shows at both First Avenue in Minneapolis, Minnesota and the Double Door in Chicago, Illinois.
Track listing
"It's Showtime!" (from I Shall Exterminate Everything Around Me That Restricts Me From Being The Master)
"Down At McDonnelzzz" (from I Shall Exterminate Everything Around Me That Restricts Me From Being The Master)
"Danger! High Voltage" (from Fire)
"Future Is In The Future" (from Señor Smoke)
"Dirty Ball" (from Flashy)
"When I Get To The Green Building" (from I Shall Exterminate Everything Around Me That Restricts Me From Being The Master)
"Gay Bar" (from Fire)
"Infected Girls" (from Switzerland)
"Jam It In The Hole" (from Zodiac)
"She's White" (from Fire)
"Body Shot" (from KILL)
"Dance Epidemic" (from Señor Smoke)
"I Buy The Drugs" (from Switzerland)
"Hello! I See You!" (from Heartbeats and Brainwaves)
"Crazy Horses" (The Osmonds cover)
"Dance Commander" (from Fire)
"Synthesizer" (from Fire)
Personnel
Dick Valentine - vocals
Tait Nucleus? - synthesizer
The Colonel - guitar
- guitar
Percussion World - drums
Smorgasbord - bass
Absolute Treasure
Absolute Treasure was originally announced as a film alongside Absolute Pleasure with both intended as companion piece recordings of live-shows to celebrate the band's 10th anniversary. The initial announcement stated that the band would be playing a special anniversary gig at the O2 Shepherd's Bush Empire in London on December 15, 2012, consisting of two sets: the first being made up of greatest hits and the second being the album Fire, performed in its entirety. Plans to film the performance fell through, but, otherwise, the gig went ahead as planned. In addition to the two sets, Dick Valentine opened the show with a small solo set and the band performed an encore.
In 2013, the band resurrected the project, raising production funds via a Kickstarter campaign. The show was performed at St. Andrews Hall in Detroit, Michigan on September 7, 2013.
Among other fundraising perks, the band offered five opportunities for people to choose a song of their choice for the band to record a cover version of. The songs selected were "Gary's In the Park" by Gary Wilson, "Maneater" by Hall & Oates, "Pokémon Theme" by Jason Paige, "Rock DJ" by Robbie Williams, "She Drives Me Crazy" by Fine Young Cannibals and "2112: Overture/The Temple of Syrinx" by Rush. The success and popularity of these covers lead to the band's second Kickstarter project, "Mimicry and Memories", a full covers album.
Track listing
The band performed a different setlist to the one featured on their "Absolute Pleasure" album. Among others, it featured a song from their album "Mustang" that was released between "Absolute Pleasure" and "Absolute Treasure".
"Down At McDonnelzzz" (from I Shall Exterminate Everything Around Me That Restricts Me From Being The Master)
"Devil Nights" (from Señor Smoke)
"Transatlantic Flight" (from Flashy)
"Future Is In The Future" (from Señor Smoke)
"Danger! High Voltage" (from Fire)
"Show Me What Your Lights Mean" (from Mustang)
"Steal Your Bones" (from KILL)
"Hello! I See You" (from Heartbeats and Brainwaves)
"Gay Bar" (from Fire)
"Jam It In The Hole" (from Zodiac)
"Clusterfuck!" (from Zodiac)
"Body Shot" (from KILL)
"Synthesizer" (from Fire)
"Dance Epidemic" (from Señor Smoke)
"I Buy The Drugs" (from Switzerland)
"Dance Commander" (from Fire)
-Encore-
"Formula 409" (from Flashy)
"Rip It!" (from I Shall Exterminate Everything Around Me That Restricts Me From Being The Master)
"We Were Witchy Witchy White Women" (from Flashy)
Personnel
Dick Valentine - vocals
Tait Nucleus? - synthesizer
- guitar, background vocals
Percussion World - drums
Smörgåsbord - bass
Da Ve - guitar, background vocals
References
External links
2014 films
American independent films
2014 documentary films
Electric Six albums
2012 live albums
2010s English-language films
2010s American films
|
```kotlin
package com.cyl.musiclake.bean
/**
* Des :
* Author : master.
* Date : 2018/9/11 .
*/
data class LoginSocket(var accesstoken: String?)
```
|
Ypthima sesara, also known by its common name common Fijian ringlet is a species from the genus Ypthima. This butterfly was first described by William Chapman Hewitson in 1865.
References
Ypthima
|
```java
/*
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package org.apache.beam.examples;
import java.io.File;
import java.nio.charset.StandardCharsets;
import org.apache.beam.examples.DebuggingWordCount.WordCountOptions;
import org.apache.beam.sdk.testing.TestPipeline;
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.io.Files;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Tests for {@link DebuggingWordCount}. */
@RunWith(JUnit4.class)
public class DebuggingWordCountTest {
@Rule public TemporaryFolder tmpFolder = new TemporaryFolder();
private String getFilePath(String filePath) {
if (filePath.contains(":")) {
return filePath.replace("\\", "/").split(":", -1)[1];
}
return filePath;
}
@Test
public void testDebuggingWordCount() throws Exception {
File inputFile = tmpFolder.newFile();
File outputFile = tmpFolder.newFile();
Files.asCharSink(inputFile, StandardCharsets.UTF_8)
.write("stomach secret Flourish message Flourish here Flourish");
WordCountOptions options = TestPipeline.testingPipelineOptions().as(WordCountOptions.class);
options.setInputFile(getFilePath(inputFile.getAbsolutePath()));
options.setOutput(getFilePath(outputFile.getAbsolutePath()));
DebuggingWordCount.runDebuggingWordCount(options);
}
}
```
|
The 2003 Central Asian Games also known as the 5th Central Asian Games were held in Dushanbe, Tajikistan in 2003.
Participating nations
Kazakhstan
Kyrgyzstan
Tajikistan
Turkmenistan
Uzbekistan
Sports
Medal table
References
Central Asian Games
Central Asian Games, 2003
Central Asian Games, 2003
Sport in Dushanbe
Central Asian Games
Multi-sport events in Tajikistan
International sports competitions hosted by Tajikistan
|
```c++
#include "vox_scene_importer.h"
#include "../../constants/voxel_string_names.h"
#include "../../meshers/cubes/voxel_mesher_cubes.h"
#include "../../storage/voxel_buffer_gd.h"
#include "../../streams/vox/vox_data.h"
#include "../../util/godot/classes/image_texture.h"
#include "../../util/godot/classes/mesh_instance_3d.h"
#include "../../util/godot/classes/packed_scene.h"
#include "../../util/godot/classes/resource_saver.h"
#include "../../util/godot/classes/standard_material_3d.h"
#include "../../util/godot/core/array.h"
#include "../../util/profiling.h"
#include "vox_import_funcs.h"
using namespace zylann::godot;
namespace zylann::voxel::magica {
String VoxelVoxSceneImporter::_zn_get_importer_name() const {
return "VoxelVoxSceneImporter";
}
String VoxelVoxSceneImporter::_zn_get_visible_name() const {
return "VoxelVoxSceneImporter";
}
PackedStringArray VoxelVoxSceneImporter::_zn_get_recognized_extensions() const {
PackedStringArray extensions;
extensions.append("vox");
return extensions;
}
String VoxelVoxSceneImporter::_zn_get_preset_name(int p_idx) const {
return "Default";
}
int VoxelVoxSceneImporter::_zn_get_preset_count() const {
return 1;
}
String VoxelVoxSceneImporter::_zn_get_save_extension() const {
return "tscn";
}
String VoxelVoxSceneImporter::_zn_get_resource_type() const {
return "PackedScene";
}
double VoxelVoxSceneImporter::_zn_get_priority() const {
// Higher import priority means the importer is preferred over another.
// By default, use this importer (the other Vox importer has lower priority).
return 1.0;
}
int VoxelVoxSceneImporter::_zn_get_import_order() const {
return IMPORT_ORDER_SCENE;
}
void VoxelVoxSceneImporter::_zn_get_import_options(
StdVector<ImportOptionWrapper> &p_out_options, const String &p_path, int p_preset_index) const {
p_out_options.push_back(ImportOptionWrapper(PropertyInfo(Variant::BOOL, "store_colors_in_texture"), false));
p_out_options.push_back(ImportOptionWrapper(PropertyInfo(Variant::FLOAT, "scale"), 1.f));
p_out_options.push_back(ImportOptionWrapper(PropertyInfo(Variant::BOOL, "enable_baked_lighting"), true));
}
bool VoxelVoxSceneImporter::_zn_get_option_visibility(
const String &p_path, const StringName &p_option_name, const KeyValueWrapper p_options) const {
return true;
}
namespace {
void add_mesh_instance(Ref<Mesh> mesh, ::Node *parent, ::Node *owner, Vector3 offset, bool p_enable_baked_lighting) {
MeshInstance3D *mesh_instance = memnew(MeshInstance3D);
mesh_instance->set_mesh(mesh);
parent->add_child(mesh_instance);
mesh_instance->set_owner(owner);
mesh_instance->set_position(offset);
// Assuming `GI_MODE_DYNAMIC` means GIProbe and SDFGI?
mesh_instance->set_gi_mode(GeometryInstance3D::GI_MODE_DYNAMIC);
// TODO Colliders? Needs conventions or attributes probably.
// But due to the nature of voxels, users may often prefer to place colliders themselves (slopes notably).
}
struct VoxMesh {
Ref<Mesh> mesh;
Vector3 pivot;
};
Error process_scene_node_recursively(const Data &data, int node_id, Node3D *parent_node, Node3D *&out_root_node,
int depth, const StdVector<VoxMesh> &meshes, float scale, bool p_enable_baked_lighting) {
//
ERR_FAIL_COND_V(depth > 10, ERR_INVALID_DATA);
const Node *vox_node = data.get_node(node_id);
switch (vox_node->type) {
case Node::TYPE_TRANSFORM: {
Node3D *node = memnew(Node3D);
if (out_root_node == nullptr) {
out_root_node = node;
} else {
ERR_FAIL_COND_V(parent_node == nullptr, ERR_BUG);
parent_node->add_child(node);
node->set_owner(out_root_node);
}
const TransformNode *vox_transform_node = reinterpret_cast<const TransformNode *>(vox_node);
node->set_transform(
Transform3D(vox_transform_node->rotation.basis, Vector3(vox_transform_node->position) * scale));
process_scene_node_recursively(data, vox_transform_node->child_node_id, node, out_root_node, depth + 1,
meshes, scale, p_enable_baked_lighting);
// If the parent isn't anything special and has only one child,
// it may be cleaner to flatten the hierarchy. We keep the root node unaffected.
// TODO Any way to not need a string to check if a node is a specific class?
if (node != out_root_node && node->get_class() == "Node3D" && node->get_child_count() == 1) {
Node3D *child = Object::cast_to<Node3D>(node->get_child(0));
if (child != nullptr) {
node->remove_child(child);
parent_node->remove_child(node);
child->set_transform(node->get_transform() * child->get_transform());
// TODO Would be nice if I could just replace the node without any fuss but `replace_by` is too busy
parent_node->add_child(child);
// Removal from previous parent unsets the owner, so we have to set it again
child->set_owner(out_root_node);
memdelete(node);
}
}
} break;
case Node::TYPE_GROUP: {
const GroupNode *vox_group_node = reinterpret_cast<const GroupNode *>(vox_node);
for (unsigned int i = 0; i < vox_group_node->child_node_ids.size(); ++i) {
const int child_node_id = vox_group_node->child_node_ids[i];
process_scene_node_recursively(data, child_node_id, parent_node, out_root_node, depth + 1, meshes,
scale, p_enable_baked_lighting);
}
} break;
case Node::TYPE_SHAPE: {
ERR_FAIL_COND_V(parent_node == nullptr, ERR_BUG);
ERR_FAIL_COND_V(out_root_node == nullptr, ERR_BUG);
const ShapeNode *vox_shape_node = reinterpret_cast<const ShapeNode *>(vox_node);
const VoxMesh &mesh_data = meshes[vox_shape_node->model_id];
ERR_FAIL_COND_V(mesh_data.mesh.is_null(), ERR_BUG);
const Vector3 offset = -mesh_data.pivot * scale;
add_mesh_instance(mesh_data.mesh, parent_node, out_root_node, offset, p_enable_baked_lighting);
} break;
default:
ERR_FAIL_V(ERR_INVALID_DATA);
break;
}
return OK;
}
/*Error save_stex(const Ref<Image> &p_image, const String &p_to_path,
bool p_mipmaps, int p_texture_flags, bool p_streamable,
bool p_detect_3d, bool p_detect_srgb) {
//
FileAccess *f = FileAccess::open(p_to_path, FileAccess::WRITE);
ERR_FAIL_NULL_V(f, ERR_CANT_OPEN);
f->store_8('G');
f->store_8('D');
f->store_8('S');
f->store_8('T'); //godot streamable texture
f->store_16(p_image->get_width());
f->store_16(0);
f->store_16(p_image->get_height());
f->store_16(0);
f->store_32(p_texture_flags);
uint32_t format = 0;
if (p_streamable) {
format |= StreamTexture::FORMAT_BIT_STREAM;
}
if (p_mipmaps) {
format |= StreamTexture::FORMAT_BIT_HAS_MIPMAPS; //mipmaps bit
}
if (p_detect_3d) {
format |= StreamTexture::FORMAT_BIT_DETECT_3D;
}
if (p_detect_srgb) {
format |= StreamTexture::FORMAT_BIT_DETECT_SRGB;
}
// COMPRESS_LOSSLESS
const bool lossless_force_png = ProjectSettings::get_singleton()->get("rendering/lossless_compression/force_png");
// Note: WebP has a size limit
const bool use_webp = !lossless_force_png && p_image->get_width() <= 16383 && p_image->get_height() <= 16383;
Ref<Image> image = p_image->duplicate();
if (p_mipmaps) {
image->generate_mipmaps();
} else {
image->clear_mipmaps();
}
const int mmc = image->get_mipmap_count() + 1;
if (use_webp) {
format |= StreamTexture::FORMAT_BIT_WEBP;
} else {
format |= StreamTexture::FORMAT_BIT_PNG;
}
f->store_32(format);
f->store_32(mmc);
for (int i = 0; i < mmc; i++) {
if (i > 0) {
image->shrink_x2();
}
PoolVector<uint8_t> data;
if (use_webp) {
data = Image::webp_lossless_packer(image);
} else {
data = Image::png_packer(image);
}
const int data_len = data.size();
f->store_32(data_len);
PoolVector<uint8_t>::Read r = data.read();
f->store_buffer(r.ptr(), data_len);
}
memdelete(f);
return OK;
}*/
// template <typename K, typename T>
// T try_get(const Map<K, T> &map, const K &key, T defval) {
// const Map<K, T>::Element *e = map.find(key);
// if (e != nullptr) {
// return e->value();
// }
// return defval;
// }
} // namespace
Error VoxelVoxSceneImporter::_zn_import(const String &p_source_file, const String &p_save_path,
const KeyValueWrapper p_options, StringListWrapper p_out_platform_variants,
StringListWrapper p_out_gen_files) const {
ZN_PROFILE_SCOPE();
const bool p_store_colors_in_textures = p_options.get("store_colors_in_texture");
const float p_scale = p_options.get("scale");
const bool p_enable_baked_lighting = p_options.get("enable_baked_lighting");
magica::Data data;
const Error load_err = data.load_from_file(p_source_file);
ERR_FAIL_COND_V(load_err != OK, load_err);
StdVector<VoxMesh> meshes;
meshes.resize(data.get_model_count());
// Get color palette
Ref<VoxelColorPalette> palette;
palette.instantiate();
for (unsigned int i = 0; i < data.get_palette().size(); ++i) {
Color8 color = data.get_palette()[i];
palette->set_color8(i, color);
}
Ref<VoxelMesherCubes> mesher;
mesher.instantiate();
mesher->set_color_mode(VoxelMesherCubes::COLOR_MESHER_PALETTE);
mesher->set_palette(palette);
mesher->set_greedy_meshing_enabled(true);
mesher->set_store_colors_in_texture(p_store_colors_in_textures);
FixedArray<Ref<StandardMaterial3D>, 2> materials;
for (unsigned int i = 0; i < materials.size(); ++i) {
Ref<StandardMaterial3D> &mat = materials[i];
mat.instantiate();
mat->set_roughness(1.f);
if (!p_store_colors_in_textures) {
// In this case we store colors in vertices
mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
}
}
materials[1]->set_transparency(StandardMaterial3D::TRANSPARENCY_ALPHA);
// Build meshes from voxel models
for (unsigned int model_index = 0; model_index < data.get_model_count(); ++model_index) {
const magica::Model &model = data.get_model(model_index);
VoxelBuffer voxels(VoxelBuffer::ALLOCATOR_DEFAULT);
voxels.create(model.size + Vector3iUtil::create(VoxelMesherCubes::PADDING * 2));
voxels.decompress_channel(VoxelBuffer::CHANNEL_COLOR);
Span<uint8_t> dst_color_indices;
ERR_FAIL_COND_V(!voxels.get_channel_as_bytes(VoxelBuffer::CHANNEL_COLOR, dst_color_indices), ERR_BUG);
Span<const uint8_t> src_color_indices = to_span_const(model.color_indexes);
copy_3d_region_zxy(dst_color_indices, voxels.get_size(), Vector3iUtil::create(VoxelMesherCubes::PADDING),
src_color_indices, model.size, Vector3i(), model.size);
StdVector<unsigned int> surface_index_to_material;
Ref<Image> atlas;
Ref<Mesh> mesh = magica::build_mesh(voxels, **mesher, surface_index_to_material, atlas, p_scale, Vector3());
if (mesh.is_null()) {
continue;
}
// Save atlas
// TODO Saving atlases separately is impossible because of path_to_url
// Instead, I do like ResourceImporterScene: I leave them UNCOMPRESSED inside the materials...
/*String atlas_path;
if (atlas.is_valid()) {
atlas_path = String("{0}.atlas{1}.stex").format(varray(p_save_path, model_index));
const Error save_stex_err = save_stex(atlas, atlas_path, false, 0, true, true, true);
ERR_FAIL_COND_V_MSG(save_stex_err != OK, save_stex_err,
String("Failed to save {0}").format(varray(atlas_path)));
}*/
// DEBUG
// if (atlas.is_valid()) {
// atlas->save_png(String("debug_atlas{0}.png").format(varray(model_index)));
// }
// Assign materials
if (p_store_colors_in_textures) {
// Can't share materials at the moment, because each atlas is specific to its mesh
for (unsigned int surface_index = 0; surface_index < surface_index_to_material.size(); ++surface_index) {
const unsigned int material_index = surface_index_to_material[surface_index];
CRASH_COND(material_index >= materials.size());
Ref<StandardMaterial3D> material = materials[material_index]->duplicate();
if (atlas.is_valid()) {
// TODO Do I absolutely HAVE to load this texture back to memory AND renderer just so import works??
// Ref<Texture> texture = ResourceLoader::load(atlas_path);
// TODO THIS IS A WORKAROUND, it is not supposed to be an ImageTexture...
// See earlier code, I could not find any way to reference a separate StreamTexture.
Ref<ImageTexture> texture = ImageTexture::create_from_image(atlas);
material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, texture);
material->set_texture_filter(StandardMaterial3D::TEXTURE_FILTER_NEAREST);
}
mesh->surface_set_material(surface_index, material);
}
} else {
for (unsigned int surface_index = 0; surface_index < surface_index_to_material.size(); ++surface_index) {
const unsigned int material_index = surface_index_to_material[surface_index];
CRASH_COND(material_index >= materials.size());
mesh->surface_set_material(surface_index, materials[material_index]);
}
}
VoxMesh mesh_info;
mesh_info.mesh = mesh;
// In MagicaVoxel scene graph, pivots are at the center of models, not at the lower corner.
// TODO I don't know if this is correct, but I could not find a reference saying how that pivot should be
// calculated
mesh_info.pivot = (voxels.get_size() / 2 - Vector3iUtil::create(1));
meshes[model_index] = mesh_info;
}
Node3D *root_node = nullptr;
if (data.get_root_node_id() != -1) {
// Convert scene graph into a node tree
process_scene_node_recursively(
data, data.get_root_node_id(), nullptr, root_node, 0, meshes, p_scale, p_enable_baked_lighting);
ERR_FAIL_COND_V(root_node == nullptr, ERR_INVALID_DATA);
} else if (meshes.size() > 0) {
// Some vox files don't have a scene graph
root_node = memnew(Node3D);
const VoxMesh &mesh0 = meshes[0];
add_mesh_instance(mesh0.mesh, root_node, root_node, Vector3(), p_enable_baked_lighting);
}
// Save meshes
for (unsigned int model_index = 0; model_index < meshes.size(); ++model_index) {
ZN_PROFILE_SCOPE();
Ref<Mesh> mesh = meshes[model_index].mesh;
String res_save_path = String("{0}.model{1}.mesh").format(varray(p_save_path, model_index));
// `FLAG_CHANGE_PATH` did not do what I thought it did.
mesh->set_path(res_save_path);
const Error mesh_save_err = save_resource(mesh, res_save_path, ResourceSaver::FLAG_NONE);
ERR_FAIL_COND_V_MSG(
mesh_save_err != OK, mesh_save_err, String("Failed to save {0}").format(varray(res_save_path)));
}
root_node->set_name(p_save_path.get_file().get_basename());
// Save scene
{
ZN_PROFILE_SCOPE();
Ref<PackedScene> scene;
scene.instantiate();
scene->pack(root_node);
String scene_save_path = p_save_path + String(".tscn");
const Error save_err = save_resource(scene, scene_save_path, ResourceSaver::FLAG_NONE);
memdelete(root_node);
ERR_FAIL_COND_V_MSG(save_err != OK, save_err, "Cannot save scene to file '" + scene_save_path);
}
return OK;
}
} // namespace zylann::voxel::magica
```
|
Bellbird may refer to:
Birds
Neotropical bellbird (genus Procnias), of South and Central America
Crested bellbird (Oreoica gutturalis), of Australia
New Zealand bellbird (Anthornis melanura)
Bell miner (Manorina melanophrys), colloquially known in Australia as the bellbird
Other uses
Bellbird, New South Wales, Australia
Bellbird (TV series), a 1967-1977 Australian TV production
Bellbird (film), a 2019 New Zealand film by director Hamish Bennett
|
India competed at the 2013 World Championships in Athletics from August 10 to August 18 in Moscow, Russia.
A team of 15 athletes was announced to represent the country in the event.
Results
(q – qualified, NM – no mark, SB – season best)
Men
Walking events
Field events
Women
Walking events
Track events
References
External links
IAAF World Championships – India
Nations at the 2013 World Championships in Athletics
World Championships in Athletics
2013
|
Gladiators is a sports entertainment television show that was an international success during the 1990s and early 2000s with versions of the show being filmed for local broadcasters in the United States, the United Kingdom, Finland, Japan, Australia, South Africa, Sweden, Nigeria, and Denmark. Russia, Germany, The Netherlands, South Korea and the Bahamas would also compete in international shows during the series, despite the fact that they did not have their own domestic series.
After a lengthy break, Gladiators was revived in 2008 in the UK, the US and Australia; in 2009 Lebanon created their own series featuring competitors from all over the Arab region and in 2012 Sweden brought back their version which proved most successful of all revivals, with another revival airing in Finland during 2017 and 2019. A further British revival will be aired in 2023, followed by an Australian revival.
The concept of the show is that athletic members of the public battle against the show's own Gladiators (often semi-professional or ex-athletes) to claim points in several events that require speed, strength and skill. In the final event of the show, "The Eliminator" the contenders race against each other (with starting times based on previous events), with the first to finish winning the episode and moving onto the next round.
A children's derivative of the concept was also made in the US, called Gladiators 2000 (a.k.a G2) (1994–1996). A UK variant of this was aired starting in 1995, called Gladiators: Train 2 Win. A one-off, celebrity derivative primetime special in the US, called Superstar American Gladiators aired on ABC on May 4, 1995.
History
1990s success
The initial concept for the show by Dan Carr and John C. Ferraro was held in Erie, Pennsylvania, in the USA before being sold to Samuel Goldwyn Productions/MGM where the format was adapted and televised as American Gladiators with the first series airing over 1989–90. As the show progressed, new events were introduced along with new Gladiators, sometimes retiring previous Gladiators.
Following the success of American Gladiators, other countries began to produce their own versions of the show with the UK and Finland starting production in 1992. American Gladiators had already picked up a cult following in the UK after being shown on late night TV. The UK, most noticeably adapted the concept into a large arena (the National Indoor Arena in Birmingham), glamorising the show, often adapting events from the American series as well as introducing many of their own, often more high-tech. Winners from the UK and Finnish series would then go over to America, to film a special show of American Gladiators in which they competed against the current American champions along with selected athletes from other territories such as Japan and the Bahamas and South Korea.
In early 1995, the first full scale international competition was launched in which selected Gladiators from the American, Finnish and British series competed against contender champions from those three countries. A fourth country, Russia was added but as they did not have their own domestic series, the Gladiators and contenders were hand-picked by Russian TV producers. The Finnish series ceased production after International Gladiators 1.
In 1995, Australia began production of their own show, basing it on the UK series. After the first series, a three part 'Ashes' mini series was filmed in Australia, in which a selection of British and Australian Gladiators faced champions from the opposing countries. Australia then went on to compete in International Gladiators 2 along with the UK and the US. Russia also returned, even though they still did not have a domestic series. Germany and South Africa also competed even though they too did not have their own domestic series.
Decline
After International Gladiators 2, the American Gladiators series ceased production due to falling ratings, although a live dinner show ran in Florida between 1996 and 1998. The UK and Australia continued to produce their own editions of the show, with the UK continuing to add new events to its roster (retiring some due to safety reasons) with Australia adding events from the UK series in its second and third series.
In 1996, the UK and Australia faced each other again in 'the Ashes 2' this time held in the UK Gladiator arena and an Australia vs. Russia mini series was filmed in Australia with two of the Russian Gladiators who had appeared in International Gladiators 2 appearing alongside new faces. After both of the mini series were filmed and aired, the Australian show was cancelled due to falling ratings, even though plans for a fourth domestic series had commenced, which would include a brand new event that would be exclusive to Australia. A third series of International Gladiators was planned to be filmed in Australia, but this was cancelled after ITV and LWT refused to finance another series. A third Ashes series was also planned for 1997, but this was also cancelled by the time the UK's sixth domestic series aired.
In 1997, South Africa competed against the UK in the Springbok Challenge held in the UK Gladiator arena, despite the fact that they did not have their own domestic series. Only one of the South African Gladiators who appeared in International Gladiators 2 appeared.
In 1998, there were plans for the show to have a massive overhaul, but this was cancelled after it was announced that the UK series was to be axed due to falling ratings. A final mini series in which past champions competed was filmed instead. It was at this time that South Africa finally began production of their own series and in 2000, a team of UK Gladiators and contenders went over to film the Springbok Challenge 2, a series filmed exclusively for South African TV only.
New millennium
With the South African production in full swing, other territories began producing their own versions. Sweden began producing their own version in 2000 under the name Gladiatorerna, with the old UK apparatus being shipped over. Before TV4 started producing its own seasons, the American version was broadcast in the 1990s with Swedish commentators. Short lived series in Nigeria (2002) and Denmark (2003) followed.
In 2001, the South African series was overhauled, but it proved unpopular with viewers and the show was axed. Sweden continued to produce Gladiators, creating an event unique to the series, Spidercage, before being axed in 2004.
The revival
In August 2007, NBC confirmed that a revival of American Gladiators would be produced by Reveille Productions and MGM Television to air mid season during early 2008. In addition to events from the original show, the series drew elements from the 1990s UK series as well as being updated for the new millennium in which several events would be played over water. The UK also produced a revival of Gladiators. In September 2007, the Seven Network in Australia announced that it too was reviving Gladiators, although unlike the American revival, the Australian revival was to follow the lines of its predecessor rather than be overhauled.
The first episode of the new American Gladiators premiered on Sunday 6 January 2008 proving to be a ratings hit. A second season was instantly commissioned. At the same time, it was announced that Sky One were commissioning a UK revival which would follow the basis set by the American revival.
The Australian revival premiered on 30 March 2008 with the UK series starting on Sunday 11 May. Both revivals proved instant ratings hits for their respective channels. On 12 May 2008, the second season of the American show began, with the series being moved to a bigger arena.
Due to low ratings, the Seven Network placed filming for a second series on hold and released the Gladiators from their holding contracts. NBC similarly have yet to commission a third series due to ratings for the second series being lower than expected.
The UK revival first aired in August 2008, a second series aired in January 2009. On 20 May 2009, the UK series was axed by the new controller for Sky 1, Stuart Murphy.
The Arab World launched its own version in 2009 featuring contenders and Gladiators from all over the Arab region. It only lasted one season.
Between 2012 and 2017, the Swedish version, known as Gladiatorerna, made a return to television and the revived show proved to be successful and is the longest lasting revival of the franchise.
Potential revivals
In July 2014, Arthur A. Smith company announced plans to bring American Gladiators back again for the third time and were shopping the idea to networks to give it a home, this version would have incorporated elements that were inspired by films such as The Hunger Games along with mixed martial arts.
In August 2018, actor Seth Rogen and Evan Goldberg announced plans to bring American Gladiators back again for the fourth time and are shopping the idea to distributors who are interested in the revival.
In August 2019, former UK gladiator Wolf said in a Lorraine interview, he has been begging TV producers to bring back the UK version of the show for a third time. Davina McCall expressed an interest to host the show later that month.
In September 2021, it was reported that MGM Television has teaming up with WWE for a reboot of American Gladiators that will featuring WWE wrestlers. The project is currently being pitched to broadcasters and streaming platforms.
Second official revivals
In July 2022, Metro reported that BBC One were in talks to bring back the UK version. Filming was rumoured to take place in Sheffield Arena early next year. The revival was confirmed by the BBC on 25 August 2022.
In July 2023, following the BBC’s revival of the British version, the Australian version of the show was confirmed to return for the second time and is set to be revived by Warner Bros. Television Studios.
Format
In a standard Gladiators show, two female and two male contenders face each other and the Gladiators in anywhere from four to seven events. The line up of events differs across each show with different Gladiators playing the different events dependent on their skill type. Towards the end of the initial UK and American series, the male and female contenders did not necessarily play the same events. Contenders score points for winning against the Gladiators, with the winner having a time advantage in the last event the contenders compete in, the Eliminator.
The winner of the Eliminator goes through to the next round (or wins the series) unless a qualifying time is needed for the next round.
Shows are usually presented by a male and female host (with the exception of all but two seasons of the original American Gladiators, which were presented by two male hosts), as well as a main referee (often wearing a striped black and white shirt, in the style of an American football referee) presiding over events, handing out disqualifications or red and yellow cards to contenders or Gladiators if needed. A timekeeper is often present behind the referee but these are not always referred to or provide a speaking role. An unseen commentator will provide play by play accounts (again with the exception of the original American Gladiators series, where the on-screen hosts also provided the play by play)
The show is filmed in front of a live studio audience made up of fans and supporters of the contenders. It is not uncommon for the cameras to focus on particular crowd members or banners. Some incarnations of the show such as the Australian and original UK series have cheerleaders to provide background entertainment.
Events
There have been 35 events involving Gladiators (as well as the Eliminator) across the incarnations. Four of the events have an alternate name in certain territories. A different selection of the events will be played in each episode. No single territory has had all thirty five events on its roster. The UK had the biggest number of events during its initial run with twenty three events.
All events were created by either the American or UK series with the exception of "Soccer Shootout" (South Africa) and "Spidercage" (Sweden). The UK notably adapted some of the American events, with the adaptations becoming the standard design for the concept. For example, the UK version of "Skytrack" would later be adopted by the Australian and American revival series whereas the UK concept of the American event "Tug-o-War" known as "Tilt" eventually superseded Tug-o-War for the 2008 American revival.
Over the course of the original UK and American series, several events were dropped, often due to safety reasons. The Eliminator was the only event which was played in every episode across every territory.
The Gladiators
There have been more than 300 Gladiators across all participating territories. Inevitably, there has been some repeat usage of names, and there have been seven instances where the same name has been used twice in a territory for a televised series. The original American Gladiators had two different Gladiators named Lace, and the names Siren and Titan have been used in both the original and revival formats of the American show. The names Amazon, Panther, Siren and Warrior have been used for both the original and revived UK shows. The name Valkyria was used both in the original and revived series in Sweden. The names Panther, Ice, Scorpio, Tornado, Lightning, Blade, Cyclone, Fierce/Hurja, Flash, Force, Shadow, Thunder, Viper, Nitro, Tiger (Tiikeri), Terminator, Cobra, Rebel, Hurricane, Laser, Phoenix, Destroyer, Rocket, Dynamite, Sabre, Bullit as (Bullet), Delta and Steel have been used for both male and female Gladiators.
Most Gladiators come from either a bodybuilding or athletic background. Seven Olympic athletes have competed as Gladiators: Amazon (Sharron Davies) (UK), Nightshade (Judy Simpson) (UK), Rebel (Jennifer Stoute) (UK), Olympia (Tatiana Grigorieva) (AUS Revival), Hurricane (Breaux Greer) (US Revival), Predator (Du'aine Ladejo) (UK Revival) and Battleaxe (Shirley Webb) (UK Revival).
There have been a few instances where contenders have become Gladiators. Minna Ryynänen, a quarter-finalist from the first series of Finnish Gladiators returned as Gladiator Safiiri for the next series. UK season 3 and International Gladiators 1 champion Eunice Huthart became Gladiator Blaze. However, Eunice only competed as Blaze in non televised live shows, opting to perform as herself in future televised episodes. Australian series 2 champion and International Gladiators 2 runner-up Lourene Bevaart became Glacier, American Gladiators 2008 series 1 champions Monica Carlson and Evan Dollard becoming Jet and Rocket respectively (this was actually mentioned as part of the "prize package" for this season) and after a seven-year gap, Gladiatorerna season 5 winner Patrick Lessa joined the Swedish team for the 2012 revival as Gladiator Baron Samedi, series 4 Gladiaattorit champion Janica Timonen joined the 5th series as Siren (Seireeni).
Only two Gladiators have played for two different domestic series in differing countries; Vulcan (John Seru) who was originally an Australian Gladiator who transferred to the UK team for Season 7 upon the end of the Australian series and Fox (Tammy Baker) who transferred from the UK to the South African team when the UK series finished. Laser (Tina Andrew), a UK Gladiator went on to compete as Sheena, a member of a South African team for the Springbok Challenge 1. However, she did not compete in the domestic South African series.
Some Gladiators have died since their Gladiator careers ended, including Siren, Havoc, Hawk, Rage, Atlas, Thunder, and Gold from the original American Gladiators, Dynamite and Spartak from Russia, Zeke and Indra from Sweden, Sahara and Samson from South Africa, Ninja from Japan, Viking from Finland, Sapphire from Nigeria, and Falcon from the United Kingdom.
International versions
Domestic series
A number of versions were cancelled in the pre-production stage: these are France's Gladiateur (Gladiator) in 1993, Spain's Gladiadors in 1994, Poland's Gladiatorzy (Gladius) in 1999, the Italian Gladiatore in 2008, and the Turkish version Gladyiators in 2009.
Zodiac TV, who worked alongside TV4 and MTV Produktion to produce Gladiatorerna and Gladiatorerne, also started to create series in Russia, Germany, and Benelux (Netherlands, Belgium and Luxembourg), but they never materialised.
International series and specials
Notes
Spin-offs
Other ventures
Broadband website
On January 28, 2008, a broadband website will pay homage to the original series called americangladiators.com where it features clip of the original which all have been re-digitalized as clips would reintroduce original Gladiators and give fans an update on where they are today. Future segments would also include "Best Hits" and stunts that were performed on the show.
Tour
In 2008, MGM, Reveille and Flor-Jon Films Inc. revealed a special American Gladiators U.S. cross-country tour.
Cartoon
MGM along with Johnny Ferraro have put into development a cartoon series based on the show but has never aired.
Movie
In 2009, Johnny Ferraro wanted to bring a live-action movie of American Gladiators. Former Legendary Pictures chief marketing officer Scott Mednick was producing the film where the goal was to create an action story that takes place inside the world Ferraro created.
30 for 30
On April 12, 2021; it was announced by Vice Studios & ESPN Films that a documentary about American Gladiators has been set for an upcoming episode of the ESPN series 30 for 30 helmed by Ben Berman.
References
External links
Reality television series franchises
sv:Gladiatorerna (TV-program)
|
```python
#
#
# path_to_url
#
# Unless required by applicable law or agreed to in writing, software
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
from typing import Any, Optional
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
from check_shapes import check_shapes, inherit_check_shapes
from ..base import MeanAndVariance, Module, Parameter, TensorType
from ..config import default_float
from ..quadrature import hermgauss
from ..utilities import to_default_float, to_default_int
from .base import Likelihood, MonteCarloLikelihood
class Softmax(MonteCarloLikelihood):
"""
The soft-max multi-class likelihood. It can only provide a stochastic
Monte-Carlo estimate of the variational expectations term, but this
added variance tends to be small compared to that due to mini-batching
(when using the SVGP model).
"""
def __init__(self, num_classes: int, **kwargs: Any) -> None:
super().__init__(input_dim=None, latent_dim=num_classes, observation_dim=None, **kwargs)
self.num_classes = self.latent_dim
@inherit_check_shapes
def _log_prob(self, X: TensorType, F: TensorType, Y: TensorType) -> tf.Tensor:
return -tf.nn.sparse_softmax_cross_entropy_with_logits(logits=F, labels=Y[:, 0])
@inherit_check_shapes
def _conditional_mean(self, X: TensorType, F: TensorType) -> tf.Tensor:
return tf.nn.softmax(F)
@inherit_check_shapes
def _conditional_variance(self, X: TensorType, F: TensorType) -> tf.Tensor:
p = self.conditional_mean(X, F)
return p - p ** 2
class RobustMax(Module):
r"""
This class represent a multi-class inverse-link function. Given a vector
:math:`f=[f_1, f_2, ... f_k]`, the result of the mapping is
.. math::
y = [y_1 ... y_k]
with
.. math::
y_i = \left\{
\begin{array}{ll}
(1-\varepsilon) & \textrm{if} \ i = \textrm{argmax}(f) \\
\varepsilon/(k-1) & \textrm{otherwise}
\end{array}
\right.
where :math:`k` is the number of classes.
"""
@check_shapes(
"epsilon: []",
)
def __init__(self, num_classes: int, epsilon: float = 1e-3, **kwargs: Any) -> None:
"""
`epsilon` represents the fraction of 'errors' in the labels of the
dataset. This may be a hard parameter to optimize, so by default
it is set un-trainable, at a small value.
"""
super().__init__(**kwargs)
transform = tfp.bijectors.Sigmoid()
prior = tfp.distributions.Beta(to_default_float(0.2), to_default_float(5.0))
self.epsilon = Parameter(epsilon, transform=transform, prior=prior, trainable=False)
self.num_classes = num_classes
self._squash = 1e-6
@check_shapes(
"F: [broadcast batch..., latent_dim]",
"return: [batch..., latent_dim]",
)
def __call__(self, F: TensorType) -> tf.Tensor:
i = tf.argmax(F, 1)
return tf.one_hot(i, self.num_classes, 1.0 - self.epsilon, self.eps_k1)
@property # type: ignore[misc] # Mypy doesn't like decorated properties.
@check_shapes(
"return: []",
)
def eps_k1(self) -> tf.Tensor:
return self.epsilon / (self.num_classes - 1.0)
@check_shapes(
"val: [batch...]",
"return: [batch...]",
)
def safe_sqrt(self, val: TensorType) -> tf.Tensor:
return tf.sqrt(tf.maximum(val, 1e-10))
@check_shapes(
"Y: [broadcast batch..., observation_dim]",
"mu: [broadcast batch..., latent_dim]",
"var: [broadcast batch..., latent_dim]",
"gh_x: [n_quad_points]",
"gh_w: [n_quad_points]",
"return: [batch..., observation_dim]",
)
def prob_is_largest(
self, Y: TensorType, mu: TensorType, var: TensorType, gh_x: TensorType, gh_w: TensorType
) -> tf.Tensor:
Y = to_default_int(Y)
# work out what the mean and variance is of the indicated latent function.
oh_on = tf.cast(
tf.one_hot(tf.reshape(Y, (-1,)), self.num_classes, 1.0, 0.0), dtype=mu.dtype
)
mu_selected = tf.reduce_sum(oh_on * mu, 1)
var_selected = tf.reduce_sum(oh_on * var, 1)
# generate Gauss Hermite grid
X = tf.reshape(mu_selected, (-1, 1)) + gh_x * tf.reshape(
self.safe_sqrt(2.0 * var_selected), (-1, 1)
)
# compute the CDF of the Gaussian between the latent functions and the grid (including the selected function)
dist = (tf.expand_dims(X, 1) - tf.expand_dims(mu, 2)) / tf.expand_dims(
self.safe_sqrt(var), 2
)
cdfs = 0.5 * (1.0 + tf.math.erf(dist / np.sqrt(2.0)))
cdfs = cdfs * (1 - 2 * self._squash) + self._squash
# blank out all the distances on the selected latent function
oh_off = tf.cast(
tf.one_hot(tf.reshape(Y, (-1,)), self.num_classes, 0.0, 1.0), dtype=mu.dtype
)
cdfs = cdfs * tf.expand_dims(oh_off, 2) + tf.expand_dims(oh_on, 2)
# take the product over the latent functions, and the sum over the GH grid.
return tf.reduce_prod(cdfs, axis=[1]) @ tf.reshape(gh_w / np.sqrt(np.pi), (-1, 1))
class MultiClass(Likelihood):
def __init__(
self, num_classes: int, invlink: Optional[RobustMax] = None, **kwargs: Any
) -> None:
"""
A likelihood for multi-way classification. Currently the only valid
choice of inverse-link function (invlink) is an instance of RobustMax.
For most problems, the stochastic `Softmax` likelihood may be more
appropriate (note that you then cannot use Scipy optimizer).
"""
super().__init__(input_dim=None, latent_dim=num_classes, observation_dim=None, **kwargs)
self.num_classes = num_classes
self.num_gauss_hermite_points = 20
if invlink is None:
invlink = RobustMax(self.num_classes)
if not isinstance(invlink, RobustMax):
raise NotImplementedError
self.invlink = invlink
@inherit_check_shapes
def _log_prob(self, X: TensorType, F: TensorType, Y: TensorType) -> tf.Tensor:
hits = tf.equal(tf.expand_dims(tf.argmax(F, 1), 1), tf.cast(Y, tf.int64))
yes = tf.ones(tf.shape(Y), dtype=default_float()) - self.invlink.epsilon
no = tf.zeros(tf.shape(Y), dtype=default_float()) + self.invlink.eps_k1
p = tf.where(hits, yes, no)
return tf.reduce_sum(tf.math.log(p), axis=-1)
@inherit_check_shapes
def _variational_expectations(
self, X: TensorType, Fmu: TensorType, Fvar: TensorType, Y: TensorType
) -> tf.Tensor:
gh_x, gh_w = hermgauss(self.num_gauss_hermite_points)
p = self.invlink.prob_is_largest(Y, Fmu, Fvar, gh_x, gh_w)
ve = p * tf.math.log(1.0 - self.invlink.epsilon) + (1.0 - p) * tf.math.log(
self.invlink.eps_k1
)
return tf.reduce_sum(ve, axis=-1)
@inherit_check_shapes
def _predict_mean_and_var(
self, X: TensorType, Fmu: TensorType, Fvar: TensorType
) -> MeanAndVariance:
possible_outputs = [
tf.fill(tf.stack([tf.shape(Fmu)[0], 1]), np.array(i, dtype=np.int64))
for i in range(self.num_classes)
]
ps = [self._predict_non_logged_density(X, Fmu, Fvar, po) for po in possible_outputs]
ps = tf.transpose(tf.stack([tf.reshape(p, (-1,)) for p in ps]))
return ps, ps - tf.square(ps)
@inherit_check_shapes
def _predict_log_density(
self, X: TensorType, Fmu: TensorType, Fvar: TensorType, Y: TensorType
) -> tf.Tensor:
return tf.reduce_sum(
tf.math.log(self._predict_non_logged_density(X, Fmu, Fvar, Y)), axis=-1
)
@check_shapes(
"X: [broadcast batch..., input_dim]",
"Fmu: [broadcast batch..., latent_dim]",
"Fvar: [broadcast batch..., latent_dim]",
"Y: [broadcast batch..., observation_dim]",
"return: [batch..., observation_dim]",
)
def _predict_non_logged_density(
self, X: TensorType, Fmu: TensorType, Fvar: TensorType, Y: TensorType
) -> tf.Tensor:
gh_x, gh_w = hermgauss(self.num_gauss_hermite_points)
p = self.invlink.prob_is_largest(Y, Fmu, Fvar, gh_x, gh_w)
den = p * (1.0 - self.invlink.epsilon) + (1.0 - p) * (self.invlink.eps_k1)
return den
@inherit_check_shapes
def _conditional_mean(self, X: TensorType, F: TensorType) -> tf.Tensor:
return self.invlink(F)
@inherit_check_shapes
def _conditional_variance(self, X: TensorType, F: TensorType) -> tf.Tensor:
p = self.conditional_mean(X, F)
return p - tf.square(p)
```
|
```glsl
module Fable.Tests.ClosureTests
open Util.Testing
let private addFn a b = a + b
[<Fact>]
let testAddThroughTrivialFn () =
addFn 2 2 |> equal 4
[<Fact>]
let testLocalsWithFcalls () =
let a = addFn 1 0
let b = 2
let c = addFn 3 0
a + b + c |> equal 6
[<Fact>]
let testLocalFunction () =
let locAdd1 a =
addFn 1 a
locAdd1 2 |> equal 3
[<Fact>]
let testInlineLambda () =
1 |> fun x -> x + 1 |> fun x -> x - 3 |> equal (-1)
let add42 = addFn 42
[<Fact>]
let testPartialApply () =
add42 3 |> equal 45
let test a = a, (fun b c -> a, b, c)
[<Fact>]
let testTupledLambda () =
(test 1 |> snd) 2 3 |> equal (1, 2, 3)
let map f x =
f x
let staticFnPassthrough x = x //uniform parameters
let staticFnAdd1 x = x + 1
[<Fact>]
let ``fn as param should also accept static functions`` () =
let a = 3
let b = 2
let w = {|X = 1|}
a |> equal 3
b |> equal 2
a |> map staticFnAdd1 |> equal 4
b |> map staticFnAdd1 |> equal 3
a |> map staticFnPassthrough |> equal 3
let wRes = w |> map staticFnPassthrough
wRes.X |> equal 1
[<Fact>]
let ``Closure captures trivial case variable and does not break borrow checker`` () =
let a = 3
let b = 2
let res = a |> map (fun x -> b + x)//b is captured, so it is borrowed
a |> equal 3
b |> equal 2
res |> equal 5
type Wrapped = {
Value: string
}
[<Fact>]
let ``Closure captures and clones`` () =
let a = { Value = "a" }
let b = { Value = "b" }
let res1 = a |> map (fun x -> x.Value + b.Value)//capture b, clone
let res2 = a |> map (fun x -> x.Value + b.Value + "x")//capture b, clone
res1 |> equal "ab"
res2 |> equal "abx"
[<Fact>]
let ``Closure can be declared locally and passed to a fn`` () =
let x = "x"
let cl s = s + x
let res1 = "a." |> map (cl)//capture b, clone
let res2 = "b." |> map (cl)//capture b, clone
x |> equal "x"// prevent inlining
res1 |> equal "a.x"
res2 |> equal "b.x"
[<Fact>]
let ``Closure can close over another closure and call`` () =
let x = "x"
let cl1 s = s + x
let cl2 s = cl1 s + x
let res1 = "a." |> map (cl2)//capture b, clone
let res2 = "b." |> map (cl2)//capture b, clone
let res3 = "c." |> map (cl1)//capture b, clone
x |> equal "x"// prevent inlining
res1 |> equal "a.xx"
res2 |> equal "b.xx"
res3 |> equal "c.x"
[<Fact>]
let ``Closures can accept multiple params`` () =
let x = { Value = "x"}
let cl a b c =
(a + b + c + x.Value)
let res1 = cl "a" "b" "c"
let res2 = cl "d" "e" "f"
x.Value |> equal "x" // prevent inlining
res1 |> equal "abcx"
res2 |> equal "defx"
[<Fact>]
let ``parameterless closure works - unit type in`` () =
let x = { Value = "x"}
let cl () = ("closed." + x.Value)
let res1 = cl()
let res2 = cl()
x.Value |> equal "x" // prevent inlining
res1 |> equal "closed.x"
res2 |> equal "closed.x"
[<Fact>]
let ``Mutable capture works`` () =
let mutable x = 0
let incrementX () =
x <- x + 1
incrementX()
x |> equal 1
incrementX()
x |> equal 2
incrementX()
x |> equal 3
type MutWrapped = {
mutable MutValue: int
}
[<Fact>]
let ``Capture works with type with interior mutability`` () =
let x = { MutValue = 0 }
let incrementX () =
x.MutValue <- x.MutValue + 1
incrementX()
x.MutValue |> equal 1
incrementX()
x.MutValue |> equal 2
incrementX()
x.MutValue |> equal 3
let returnClosure () =
let a = { Value = "a" }
let b = { Value = "b" }
fun x -> a.Value + b.Value + x
[<Fact>]
let ``Closure actually owns internals`` () =
let cl = returnClosure()
cl "x" |> equal "abx"
let returnClosureWithMutableCaptures () =
let mutable a = 1
let b = { MutValue = 2 }
fun x -> a + b.MutValue + x
[<Fact>]
let ``Closure with mutable captures works`` () =
let cl = returnClosureWithMutableCaptures()
cl 3 |> equal 6
let returnMultipleClosureTypes isInc =
if isInc
then fun x -> x + 1
else fun x -> x - 1
[<Fact>]
let ``Closure with multiple return types works`` () =
let inc = returnMultipleClosureTypes true
inc 2 |> equal 3
let dec = returnMultipleClosureTypes false
dec 2 |> equal 1
let incrementWith i =
let f x = x + i
f
[<Fact>]
let ``Closure that captures value-type args works`` () =
let inc3 = incrementWith 3
inc3 2 |> equal 5
let fib_tail n =
let rec fib n a b =
if n <= 1 then a
else fib (n - 1) (a + b) a
fib n 1UL 0UL
let fib_tail_clo m n =
let rec fib n a b =
if n <= m then a
else fib (n - 1) (a + b) a
fib n 1UL 0UL
let fib_rec n =
let rec fib n =
if n <= 2 then 1UL
else fib (n - 1) + fib (n - 2)
fib n
let fib_rec_clo m n =
let rec fib n =
if n <= m then 1UL
else fib (n - 1) + fib (n - 2)
fib n
[<Fact>]
let ``Tail recursive non-capturing closures work`` () =
let n = fib_tail 30
n |> equal 832040UL
[<Fact>]
let ``Tail recursive capturing closures also work`` () =
let n = fib_tail_clo 1 30
n |> equal 832040UL
[<Fact>]
let ``Non-tail recursive non-capturing closures work`` () =
let n = fib_rec 30
n |> equal 832040UL
[<Fact>]
let ``Non-tail recursive capturing closures also work`` () =
let n = fib_rec_clo 2 30
n |> equal 832040UL
let rec closure0 () () : int32 = 5
let v0 : (unit -> int32) = closure0()
[<Fact>]
let ``Closures with multiple unit arguments work`` () =
v0() |> equal 5
```
|
```css
Vertical percentages are relative to container width, not height
Vertically center text
Use `z-index` to specify the stack order of elements that overlap
Clearfix for layouts
Equal width table cells
```
|
Defibrotide, sold under the brand name Defitelio, is a mixture of single-stranded oligonucleotides that is purified from the intestinal mucosa of pigs. It is used to treat veno-occlusive disease of the liver of people having had a bone marrow transplant, with different limitations in the US and the European Union. It works by protecting the cells lining blood vessels in the liver and preventing blood clotting; the way it does this is not well understood.
The most common side effects include abnormally low blood pressure (hypotension), diarrhea, vomiting, nausea and nosebleeds (epistaxis). Serious potential side effects that were identified include bleeding (hemorrhage) and allergic reactions. Defibrotide should not be used in people who are having bleeding complications or who are taking blood thinners or other medicines that reduce the body's ability to form clots. Use of the drug is generally limited by a strong risk of life-threatening bleeding in the brain, eyes, lungs, gastrointestinal tract, urinary tract, and nose. Some people have hypersensitivity reactions.
Defibrotide was approved for medical use in the European Union in October 2013, in the United States in March 2016, and in Australia in July 2020. Defibrotide is the first FDA-approved therapy for treatment of severe hepatic VOD, a rare and life-threatening liver condition.
Medical uses
In the European Union defibrotide is indicated for the treatment of severe hepatic veno-occlusive disease (VOD) also known as sinusoidal obstructive syndrome (SOS) in hematopoietic stem-cell transplantation (HSCT) therapy for adults, adolescents, children, and infants over one month of age.
Defibrotide is used to treat veno-occlusive disease of the liver of people having had a bone marrow transplant, with different limitations in the US and the European Union. As of 2016, however, randomized placebo controlled trials have not been done.
Hematopoietic stem cell transplantation (HSCT) is a procedure performed in some people to treat certain blood or bone marrow cancers. Immediately before an HSCT procedure, a patient receives chemotherapy. Hepatic VOD can occur in people who receive chemotherapy and HSCT. Hepatic VOD is a condition in which some of the veins in the liver become blocked, causing swelling and a decrease in blood flow inside the liver, which may lead to liver damage. In the most severe form of hepatic VOD, the patient may also develop failure of the kidneys and lungs. Fewer than two percent of people develop severe hepatic VOD after HSCT, but as many as 80 percent of people who develop severe hepatic VOD do not survive.
It is administered by intravenous infusion in a doctor's office or clinic.
Contraindications
Use of defibrotide for people who are already taking anticoagulants is dangerous and use of other drugs that affect platelet aggregation, like NSAIDs, should be done with care. Defibrotide should not be given to people who have a difficult time maintaining a steady blood pressure.
Adverse effects
There is a high risk of bleeding and some people have had hypersensitivity reactions to defibrotide.
Common adverse effects, occurring in between 1 and 10% of people, included impaired blood clotting, vomiting, low blood pressure, bleeding in the brain, eyes, lungs, stomach or intestines, in the urine, and at catheterization sites.
Other side effects have included diarrhea, nosebleeds, sepsis, graft vs host disease, and pneumonia.
Pregnant women should not take defibrotide and women should not become pregnant while taking it; it has not been tested in pregnant women but at normal doses it caused hemolytic abortion in rats.
Pharmacology
Defibrotide's mechanism of action is poorly understood. In vitro studies have shown that it protects the endothelium lining blood vessels from damage by fludarabine, a chemotherapy drug, and from a few other insults like serum starvation. It also appears to increase t-PA function and decrease plasminogen activator inhibitor-1 activity.
Chemistry
Defibrotide is a mixture of single-stranded oligonucleotides. The chemical name is polydeoxyribonucleotide, sodium salt. It is purified from the intestinal mucosa of pigs.
History
The efficacy of defibrotide was investigated in 528 participants treated in three studies: two prospective clinical trials and an expanded access study. The participants enrolled in all three studies had a diagnosis of hepatic VOD with liver or kidney abnormalities after hematopoietic stem cell transplantation (HSCT). The studies measured the percentage of participants who were still alive 100 days after HSCT (overall survival). In the three studies, 38 to 45 percent of participants treated with defibrotide were alive 100 days after HSCT. Based on published reports and analyses of participant-level data, the expected survival rates 100 days after HSCT would be 21 to 31 percent for participants with severe hepatic VOD who received only supportive care or interventions other than defibrotide.
Society and culture
Legal status
Defibrotide was approved in the European Union for use in treating veno-occlusive disease of the liver of people having had a bone marrow transplant in 2013; Gentium had developed it. At the end of that year, Jazz Pharmaceuticals acquired Gentium.
In March 2016, the U.S. Food and Drug Administration (FDA) approved it for a similar use. Defibrotide is the first FDA-approved therapy for treatment of severe hepatic VOD, a rare and life-threatening liver condition. The FDA granted the application for defibrotide priority review status and orphan drug designation. The FDA granted approval of Defitelio to Jazz Pharmaceuticals.
Defibrotide was approved for medical use in Japan in June 2019.
Defibrotide was approved for medical use in Australia in July 2020.
References
Further reading
External links
Anticoagulants
Orphan drugs
|
is a Japanese manga series by Akinobu Uraku and published by Square Enix. It was adapted into an anime television series by Pierrot and directed by Hayato Date. It was broadcast on TV Tokyo from April to September 2002. The anime series was released on DVD by Geneon Entertainment in North America and released by Manga Entertainment in the UK and by Tokyo Night Train in Australia. It aired in Canada on the digital channel G4techTV, starting on July 22, 2007. It was also aired on ABS-CBN and Hero TV in the Philippines and Adult Swim in Australia.
Plot
Under Tokyo's underground railway system is a world called , populated by Elemental Users, people who can manipulate various elements. When the Maiden of Life, Ruri Sarasa, and her bodyguard, Gravity User Chelsea Rorec escape to the surface, they take refuge with swordsman Rumina Asagi and his bespectacled best friend Ginnosuke Isuzu. During a battle with the flame-using Seki, Rumina is killed and then resurrected by Ruri. The revived Rumina finds he now has the power to manipulate air, a rare talent amongst the Underground people. Realizing Ruri is in danger, Rumina vows to protect her, even if it means going to the Underground to rescue her from her eventual captors before she gets sacrificed.
Rumina eventually goes to the Underground with Chelsea and Ginosuke after Ruri is kidnapped. As soon as they arrive they encounter a genetic experiment from The Company but manage to escape.
Characters
Rumina is a high school student, who dreams of having a pretty girl, but ends up finding himself speechless when confronted with them. As the series begins, he is starting a new school year and wants to avoid continuing his reputation as a fighter. But he still fought with 3 boys at high school. However, as it made him appear to be scary and dangerous, his dream was crushed. One day he encounters two strange girls who change his life forever. In an effort to protect the cute Ruri from harm, Rumina fights hard, but eventually loses. Ruri's powers of life revive him, and with new life comes the amazing ability to control wind powers. Rumina joins Chelsea in protecting Ruri and joins their battle in the Tokyo Underground. He falls in love with Ruri and has some sort of romantic feelings for Chelsea as well.
Ruri is known as the . She is very polite and kind, and is the type to address everyone with the honorific "-sama." She's very compassionate and shows signs of affection to Rumina. Ruri used her life powers to bring back Rumina from death when he is killed trying to protect her and Chelsea. Her unusual powers make her a target for evil forces in the Underground. The Company wants Ruri so that she can use her power to bring the dragons back to life and then use them to attack the surface world. She falls in love with Rumina. In the final volume, it is revealed that Ruri is actually a clone of Sarasa, Kashin's older sister and the original Maiden of Life. When the attempt to use Sarasa to awaken the Ron failed, Ruri was cloned to perform the task.
Chelsea is Ruri's bodyguard/tutor, and accompanies her when escaping from the Underground. Chelsea controls powers related to gravity and has a personality to match. She is very dedicated to her task of protecting Ruri, and would gladly lay down her life – in fact she spends much of the early episodes bashing Rumina on the head for being too familiar with Ruri. Chelsea's gravity-power is very strong, and she is a tough opponent. She always argues with Rumina and always gets into a fight with each other, however she later respects him and also develops feelings for him.
Ginosuke is Rumina's best friend since childhood. He has no special elemental powers, but he is very intelligent although he isn't exactly what one would refer to as 'street smart'. He later uses a very useful weapon that fires elemental attacks. His personality is somewhat timid, but he has a lot of common sense, and can be very fierce if he has to be. Ginosuke always wears his very thick glasses that change his appearance so much that his friends can't recognize him without them.
Allies
A rebel against the company who uses an Aerogun. Referred to Ginnosuke as "Master Sui" after he saved him from Company agents. Hates the Company after they took his lover away and destroyed the village they were living in. Joins in on the fight again Pairon's Fang and discovers his lover was a mind-control puppet of Sound. He is able to restore her memories after the fight. Later searches for Rumina's group in the slums and joins Ginnosuke's team in the Tournament.
Shiel is an Electric User who is first seen as a Company Agent sent out to confirm Rumina's elemental powers. Following the recapturing of Ruri by Company agents Pairon and Teil, she is assigned as her replacement bodyguard. As their relationship deepens, Shiel undergoes a change of heart (much like Chelsea) and helps Ruri escape for a second time. She views Ruri as a sister following their time together.
Member #2 of the Rorec Fan Club, helps Rumina's group for the sake of Chelsea. Beings to notice the Company's corruption after seeing Pairon's look upon Rumina. After falling to the slums, she becomes part of Ginnosuke's team in the tournament in hopes to find Rumina and Chelsea.
Member #3 of the Rorec Fan Club; she can be found to be violent when someone insults Chelsea, such as Rumina calling Chelsea "blondie". After falling to the slums, she becomes part of Ginnosuke's team in the tournament in hopes to find Rumina and Chelsea.
A Magnetism User and younger brother to Rou. Desires to be an A-Class Soldier to the company, better than Kashin and Seki. When Pairon gave him the opportunity by killing Rumina's group, he took it with his brother joining him in the effort. When he lost, as Pairon foresaw, he was sent down to the slums with Rumina's group, Rou, and Shamuri. Despite his differences, he joins Rumina's team in the Tournament to get out of the slums and find his brother. Uses metal yo-yos as his weapons. He seems to have concerns and feelings for a beast-hybrid girl, 04.
A hybrid-beast girl who rounds up Rumina, Chelsea, and Kourin to participate in the Tournament, in order to gain a wish from the Slum's mysterious leader. Wants to get out of the slums so she kind find info on helping her with her condition: if she fights too much she can get feral, resulting in using too much energy and might die. Kourin knows of her condition and promises to help her out.
The Company
The contains thousands of elemental users, and most are hostile. They wish to bring complete destruction to those who dwell on the surface. Their hatred for the surface world stems from the belief that they were abandoned by them, which really isn't true since only the scientists actually knew of their existence underground. They are also the people who want to awaken the dragons (called "ron") to complete their revenge and are willing to sacrifice Ruri to accomplish their goal. Chelsea and Shiel both turn against the company in order to get Ruri (Maiden of Life) to safety and away from the company.
Lord
The leader/founder of the Company, ranked #1. He organized the Company to make the Underground a better place. He strongly desires to take revenge on the surface, after he was forced to kill his sister who was attached to a machine by the scientists. Because of how Ruri remind Kashin of his sister, he's shown to be very caring toward her; he even was very upset at Pairon for upsetting her. Also, Seki is his long-time friend. It is later revealed that Kashin's sister was actually the original Maiden of Life, and Ruri was cloned from her when the attempt to use her to revive the Ron failed.
Ranked #2 in the Company and has Ruri's custody in his jurisdiction. Proven to be the most sinister and cunning member in the Company. Pairon is a "Pure" Water user, permitting him to be unaffected by electricity and subdue people by their blood (a person's body is 80% made of water). Compared to everyone in the Underground, he has no background information, which gave Seki concerns. Has a hatred toward Kashin, especially when he gave him the scars on his face.
Ranked #3 in the Company, a scientist in charge of finding where the Ron are sealed. Reports to Pairon on his efforts.
Ranked #5 in the Company, a Fire user, one of the 8 A-class warriors, and co-founder/long-time friend of Kashin. The first Company agent sent after Ruri and Chelsea and originally killed Rumina. Impressed of Rumina's wind powers after being revived by Ruri. Suspicious of Pairon methods and activities as he has no background info left behind by the scientists.
The highest-ranked soldier of the Company. A reckless Water-user who loves a challenge. Went with Pairon to capture Ruri at Rumina's school. After being defeated by Rumina, he was determined for a rematch, which he did at the Underground Hole. When Rumina tried to save him, Tailor told him about the Underground's bitterness toward the surface, especially when his poor parents sold him to the scientists. He removed Rumina's grip and fell down the Underground Hole, claiming he will not die and will cross paths with Rumina again. Also, referred to by Rumina as "pony-tail".
A large magnetism-user. Fought Chelsea and Rumina in an Underground village and lost. Later, joined his younger brother Kourin(another magnetism user) to fight Rumina and the others, but lost again. After being thrown to the Slums, join Ginnosuke's group in the Tournament in hopes to find his younger brother.
A female ice-user who wields a whip. Fought Chelsea at the Underground Hole and lost. Been spying on Rumina's group afterwards, planning a rematch with Chelsea, but ends up in the Slums. Found by Shiel and joins Rumina's team in the Tournament in hopes of getting out of the slums.
Pairon's Fang
A band of highly or death-sentenced criminals who help Pairon keep the "peace" and search for power-users. Sent after Ruri during her second escape and kill Rumina's group. They were all defeated before Ruri was re-captured by Pairon. Members: Heat, a big guy who uses heat energy for explosions and superstrength (defeated by Chelsea); Smoke, a swordsman with smoke generating powers and multiple bladed weapons (defeated by Rumina); Sound Illusion; a sadistic child who uses sound vibration attacks and a flute to mind control people into his slaves, like Sui's lover (defeated after being fooled by Jilherts that she was under his control); and Shadow, a female who uses nerve gas to fool people she can move between shadows (defeated by Ginnosuke with his aerogun).
The Ron
Like the elemental power user humans, the Ron were created by the same scientists. According to Chelsea, they physically resemble dragons of mythology but are merely artificial forms of life. The Ron lie dormant, but the Company intends to use Ruri's power of life to revive them and set them upon the surface world to punish those who had wronged them so many years ago. The Ron share the same bitterness as most of the Underground humans. When they are finally seen, it is revealed that in their dormant state the Ron resemble dolphins, and only become the dragon-like life forms through the Maiden's power.
Media
Manga
Anime
References
External links
Official Enix Website
Official Pierrot Website
Official Pierrot Website
Official Manga Entertainment Minisite
1998 manga
2002 anime television series debuts
Discotek Media
Geneon USA
Gangan Comics manga
Pierrot (company)
Shōnen manga
Square Enix franchises
TV Tokyo original programming
|
```php
<?php
/**
*/
namespace OC\Core\Command\SystemTag;
use OC\Core\Command\Base;
use OCP\SystemTag\ISystemTag;
use OCP\SystemTag\ISystemTagManager;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class ListCommand extends Base {
public function __construct(
protected ISystemTagManager $systemTagManager,
) {
parent::__construct();
}
protected function configure() {
$this
->setName('tag:list')
->setDescription('list tags')
->addOption(
'visibilityFilter',
null,
InputOption::VALUE_OPTIONAL,
'filter by visibility (1,0)'
)
->addOption(
'nameSearchPattern',
null,
InputOption::VALUE_OPTIONAL,
'optional search pattern for the tag name (infix)'
);
parent::configure();
}
protected function execute(InputInterface $input, OutputInterface $output): int {
$tags = $this->systemTagManager->getAllTags(
$input->getOption('visibilityFilter'),
$input->getOption('nameSearchPattern')
);
$this->writeArrayInOutputFormat($input, $output, $this->formatTags($tags));
return 0;
}
/**
* @param ISystemtag[] $tags
* @return array
*/
private function formatTags(array $tags): array {
$result = [];
foreach ($tags as $tag) {
$result[$tag->getId()] = [
'name' => $tag->getName(),
'access' => ISystemTag::ACCESS_LEVEL_LOOKUP[$tag->getAccessLevel()],
];
}
return $result;
}
}
```
|
Jack Watson (14 May 1915 – 4 July 1999) was an English actor who appeared in many British films and television dramas from the 1950s onwards.
Early life
Watson was born in Thorney, Cambridgeshire. He was the son of a Gaiety Girl, Barbara Hughes, and a music hall comedian, Nosmo King. Watson often appeared on stage with his father as straight man, where he was known simply as Hubert.
Military service
During the Second World War he was a physical training instructor in the Royal Navy, and his physique was much in evidence in many of his subsequent screen roles.
Career
During the war Watson was resident compère of the BBC radio comedy The Navy Mixture. After the war, his talent as an impersonator resulted in his becoming a regular on BBC radio programmes such as Take it from Here, Hancock's Half Hour and The Clitheroe Kid. He gradually made the transition to television, where his first major role was in Coronation Street, in which he became Elsie Tanner's (Pat Phoenix) first lover. Watson appeared in Coronation Street as Bill Gregory on and off between 1961 and 1984 ; his final episode in 1984 was also the final episode for Pat Phoenix who played his love interest Elsie Tanner in the series. He was one of the villains in the 1966 episode of The Avengers entitled 'Silent Dust' ', chasing Diana Rigg on horseback with a whip. He also appeared as the publican in the 1967 episode of the same series entitled 'The Living Dead'. He appeared as a powerful but shell-shocked ex-soldier in Dr. Finlay's Casebook, in an episode entitled "Not qualified" which formed part of the 8th series of the popular British programme. Probably his best-known television role was as Llud, Arthur's craggy sidekick in Arthur of the Britons. His last major TV role was in the award-winning Edge of Darkness (1985).
Watson appeared in over 70 films, including: On the Beat (1962) in which he played a police sergeant, Peeping Tom, This Sporting Life, Grand Prix, Tobruk, The McKenzie Break, The Devil's Brigade and The Wild Geese (1978), plus in the Music video of Intaferon - Steam Hammer Sam (published 1983).
Filmography
Captain Horatio Hornblower (1951) – Capt. Sylvester (uncredited)
Peeping Tom (1960) – Chief Insp. Gregg
Konga (1961) – Supt. Brown
Fate Takes a Hand (1961) – Bulldog
The Queen's Guards (1961) – Sergeant Johnson
Time to Remember (1962) – Insp. Bolam
Out of the Fog (1962) – Sgt. Harry Tracey
On the Beat (1962) – Police Sergeant
Master Spy (1963) – Capt. Foster
Five to One (1963) – Insp. Davis
This Sporting Life (1963) – Len Miller
The Gorgon (1964) – Ratoff
The Hill (1965) – Jock McGrath
Night Caller from Outer Space (1965) – Sgt. Hawkins
The Idol (1966) – Police Inspector
Grand Prix (1966) – Jeff Jordan
Tobruk (1967) – Sgt. Maj. Tyne
The Devil's Brigade (1968) – Cpl. Peacock
The Strange Affair (1968) – Quince
Decline and Fall... of a Birdwatcher (1968) – Gallery Warder
Every Home Should Have One (1970) – McLaughlin
The McKenzie Break (1970) – Gen. Kerr
Kidnapped (1971) – James Stewart
Tower of Evil (1972) – Hamp
From Beyond the Grave (1974) – Sir Michael Sinclair (segment 4 "The Door")
11 Harrowhouse (1974) – Miller, 11 Harrowhouse Security
Juggernaut (1974) – Chief Engineer Mallicent
The Four Musketeers (1974) – Busigny
Schizo (1976) – William Haskin
The Purple Taxi (1977) – Sean
The Wild Geese (1978) – R.S.M. Sandy Young
North Sea Hijack (1980) – Olafsen
The Sea Wolves (1980) – Maclean
Masada (1981) – Decurion
Marco Polo (1982) – Old Sailor
Diana (1984) – Uncle Mark
Tangiers (1982) – Donovan
Christopher Columbus (1985) – Father Marchena
Personal life
Watson married Betty Garland, a BBC engineer, in 1943 and remained married until his death in 1999. They had two daughters and a son. He lived in Bath, England.
Death
He died on 4 July 1999, aged 84, of blood cancer.
References
External links
1915 births
1999 deaths
English male film actors
English male television actors
People from Fenland District
Royal Navy personnel of World War II
Male actors from Cambridgeshire
20th-century English male actors
Royal Navy sailors
Deaths from blood cancer
Deaths from cancer in England
|
```go
package archive
import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func TestUnzipFile(t *testing.T) {
dir := t.TempDir()
/*
Archive structure.
0
1
2.txt
1.txt
0.txt
*/
err := UnzipFile("./testdata/sample_archive.zip", dir)
assert.NoError(t, err)
archiveDir := dir + "/sample_archive"
assert.FileExists(t, filepath.Join(archiveDir, "0.txt"))
assert.FileExists(t, filepath.Join(archiveDir, "0", "1.txt"))
assert.FileExists(t, filepath.Join(archiveDir, "0", "1", "2.txt"))
}
```
|
```yaml
- category: Linear regression models
description: ""
tiles:
- title: Comparison of two means
subtitle: With a t-test
href: t-test.ipynb
thumbnail: thumbnails/t_test.png
- title: Multiple linear regression
subtitle: Personality dimensions
href: ESCS_multiple_regression.ipynb
thumbnail: thumbnails/escs_multiple_regression.png
- title: Regression splines
subtitle: Cherry blossoms
href: splines_cherry_blossoms.ipynb
thumbnail: thumbnails/splines_cherry_blossoms.png
- title: Hierarchical linear regression
subtitle: Pigs growth
href: multi-level_regression.ipynb
thumbnail: thumbnails/multi_level_regression.png
- title: Hierarchical linear regression
subtitle: Sleep deprivation
href: sleepstudy.ipynb
thumbnail: thumbnails/sleepstudy.png
- title: Hierarchical linear regression
subtitle: Radon contamination
href: radon_example.ipynb
thumbnail: thumbnails/radon_example.png
- title: Bayesian workflow
subtitle: Strack RRR analysis replication
href: Strack_RRR_re_analysis.ipynb
thumbnail: thumbnails/strack_rrr_re_analysis.png
- title: Bayesian workflow
subtitle: Police officer's dilemma
href: shooter_crossed_random_ANOVA.ipynb
thumbnail: thumbnails/shooter_crossed_random_anova.png
- title: Robust linear regression
subtitle: With the Student's T distribution
href: t_regression.ipynb
thumbnail: thumbnails/t_regression.png
- title: Predict new groups
subtitle: With Hierarchical models
href: predict_new_groups.ipynb
thumbnail: thumbnails/predict_new_group.png
- title: Polynomial regression
subtitle: Learning gravity with Bayesian stats
href: polynomial_regression.ipynb
thumbnail: thumbnails/polynomial_regression.png
- category: Generalized Linear Models
description: ""
tiles:
- title: Logistic regression
subtitle: Model vote intention
href: logistic_regression.ipynb
thumbnail: thumbnails/logistic_regression.png
- title: Logistic regression
subtitle: Model comparison with ArviZ
href: model_comparison.ipynb
thumbnail: thumbnails/model_comparison.png
- title: Hierarchical logistic regression
subtitle: With the Binomial family
href: hierarchical_binomial_bambi.ipynb
thumbnail: thumbnails/hierarchical_binomial_bambi.png
- title: Regression for binary responses
subtitle: Alternative link functions
href: alternative_links_binary.ipynb
thumbnail: thumbnails/alternative_links_binary.png
- title: Wald and Gamma regression
subtitle: Australian insurance claims
href: wald_gamma_glm.ipynb
thumbnail: thumbnails/wald_gamma_glm.png
- title: Negative Binomial regression
subtitle: Students absence
href: negative_binomial.ipynb
thumbnail: thumbnails/negative_binomial.png
- title: Beta regression
subtitle: With many datasets
href: beta_regression.ipynb
thumbnail: thumbnails/beta_regression.png
- title: Categorical outcomes
subtitle: When the outcome is not a number
href: categorical_regression.ipynb
thumbnail: thumbnails/categorical_regression.png
- title: Circular regression
subtitle: For directional statistics
href: circular_regression.ipynb
thumbnail: thumbnails/circular_regression.png
- title: Quantile regression
subtitle: Model a percentile
href: quantile_regression.ipynb
thumbnail: thumbnails/quantile_regression.png
- title: MrP (Multilevel Regression and Post-stratification)
subtitle: Survey Data and Representative Sampling
href: mister_p.ipynb
thumbnail: thumbnails/mr_p_adjustment.png
- title: Zero inflated models
subtitle: When the outcome is mostly zeros and or is overdispersed
href: zero_inflated_regression.ipynb
thumbnail: thumbnails/zip_model_pps.png
- title: Ordinal regression
subtitle: Model ordered category outcomes
href: ordinal_regression.ipynb
thumbnail: thumbnails/ordinal_regression.png
- category: More advanced models
description: ""
tiles:
- title: Distributional models
subtitle: Many parameters simultaneously
href: distributional_models.ipynb
thumbnail: thumbnails/distributional_models.png
- title: Gaussian processes
subtitle: In one dimension
href: hsgp_1d.ipynb
thumbnail: thumbnails/hsgp_1d.png
- title: Gaussian processes
subtitle: In multiple dimensions
href: hsgp_2d.ipynb
thumbnail: thumbnails/hsgp_2d.png
- title: Survival models
subtitle: Model censored data
href: survival_model.ipynb
thumbnail: thumbnails/survival_adoption_times.png
- title: Orthogonal Polynomial regression
subtitle: Polynomials that avoid multicollinearity
href: orthogonal_polynomial_reg.ipynb
thumbnail: thumbnails/orthogonal_polynomial_reg.png
- category: Tools to interpret model outputs
description: ""
tiles:
- title: Predictions
subtitle: Compute and plot predictions on new data
href: plot_predictions.ipynb
thumbnail: thumbnails/plot_predictions.png
- title: Comparisons
subtitle: Compare outputs between groups
href: plot_comparisons.ipynb
thumbnail: thumbnails/plot_comparisons.png
- title: Slopes
subtitle: Determine how the response changes
href: plot_slopes.ipynb
thumbnail: thumbnails/plot_slopes.png
- title: Advanced interpret usage
subtitle: Create data grids and compute complex quantities of interest
href: interpret_advanced_usage.ipynb
thumbnail: thumbnails/advanced_interpret.png
- category: Alternative sampling backends
description: ""
tiles:
- title: Using other samplers
subtitle: JAX based samplers
href: alternative_samplers.ipynb
```
|
```javascript
/**
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
'use strict';
// MODULES //
var bench = require( '@stdlib/bench' );
var uniform = require( '@stdlib/random/iter/uniform' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
var pkg = require( './../package.json' ).name;
var iterAhaversin = require( './../lib' );
// MAIN //
bench( pkg, function benchmark( b ) {
var rand;
var iter;
var i;
rand = uniform( 0.0, 1.0 );
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
iter = iterAhaversin( rand );
if ( typeof iter !== 'object' ) {
b.fail( 'should return an object' );
}
}
b.toc();
if ( !isIteratorLike( iter ) ) {
b.fail( 'should return an iterator protocol-compliant object' );
}
b.pass( 'benchmark finished' );
b.end();
});
bench( pkg+'::iteration', function benchmark( b ) {
var rand;
var iter;
var z;
var i;
rand = uniform( 0.0, 1.0 );
iter = iterAhaversin( rand );
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
z = iter.next().value;
if ( isnan( z ) ) {
b.fail( 'should not return NaN' );
}
}
b.toc();
if ( isnan( z ) ) {
b.fail( 'should not return NaN' );
}
b.pass( 'benchmark finished' );
b.end();
});
```
|
```swift
//
// Heap.swift
// Written for the Swift Algorithm Club by Kevin Randrup and Matthijs Hollemans
//
public struct Heap<T> {
/** The array that stores the heap's nodes. */
var nodes = [T]()
/**
* Determines how to compare two nodes in the heap.
* Use '>' for a max-heap or '<' for a min-heap,
* or provide a comparing method if the heap is made
* of custom elements, for example tuples.
*/
private var orderCriteria: (T, T) -> Bool
/**
* Creates an empty heap.
* The sort function determines whether this is a min-heap or max-heap.
* For comparable data types, > makes a max-heap, < makes a min-heap.
*/
public init(sort: @escaping (T, T) -> Bool) {
self.orderCriteria = sort
}
/**
* Creates a heap from an array. The order of the array does not matter;
* the elements are inserted into the heap in the order determined by the
* sort function. For comparable data types, '>' makes a max-heap,
* '<' makes a min-heap.
*/
public init(array: [T], sort: @escaping (T, T) -> Bool) {
self.orderCriteria = sort
configureHeap(from: array)
}
/**
* Configures the max-heap or min-heap from an array, in a bottom-up manner.
* Performance: This runs pretty much in O(n).
*/
private mutating func configureHeap(from array: [T]) {
nodes = array
for i in stride(from: (nodes.count/2-1), through: 0, by: -1) {
shiftDown(i)
}
}
public var isEmpty: Bool {
return nodes.isEmpty
}
public var count: Int {
return nodes.count
}
/**
* Returns the index of the parent of the element at index i.
* The element at index 0 is the root of the tree and has no parent.
*/
@inline(__always) internal func parentIndex(ofIndex i: Int) -> Int {
return (i - 1) / 2
}
/**
* Returns the index of the left child of the element at index i.
* Note that this index can be greater than the heap size, in which case
* there is no left child.
*/
@inline(__always) internal func leftChildIndex(ofIndex i: Int) -> Int {
return 2*i + 1
}
/**
* Returns the index of the right child of the element at index i.
* Note that this index can be greater than the heap size, in which case
* there is no right child.
*/
@inline(__always) internal func rightChildIndex(ofIndex i: Int) -> Int {
return 2*i + 2
}
/**
* Returns the maximum value in the heap (for a max-heap) or the minimum
* value (for a min-heap).
*/
public func peek() -> T? {
return nodes.first
}
/**
* Adds a new value to the heap. This reorders the heap so that the max-heap
* or min-heap property still holds. Performance: O(log n).
*/
public mutating func insert(_ value: T) {
nodes.append(value)
shiftUp(nodes.count - 1)
}
/**
* Adds a sequence of values to the heap. This reorders the heap so that
* the max-heap or min-heap property still holds. Performance: O(log n).
*/
public mutating func insert<S: Sequence>(_ sequence: S) where S.Iterator.Element == T {
for value in sequence {
insert(value)
}
}
/**
* Allows you to change an element. This reorders the heap so that
* the max-heap or min-heap property still holds.
*/
public mutating func replace(index i: Int, value: T) {
guard i < nodes.count else { return }
remove(at: i)
insert(value)
}
/**
* Removes the root node from the heap. For a max-heap, this is the maximum
* value; for a min-heap it is the minimum value. Performance: O(log n).
*/
@discardableResult public mutating func remove() -> T? {
guard !nodes.isEmpty else { return nil }
if nodes.count == 1 {
return nodes.removeLast()
} else {
// Use the last node to replace the first one, then fix the heap by
// shifting this new first node into its proper position.
let value = nodes[0]
nodes[0] = nodes.removeLast()
shiftDown(0)
return value
}
}
/**
* Removes an arbitrary node from the heap. Performance: O(log n).
* Note that you need to know the node's index.
*/
@discardableResult public mutating func remove(at index: Int) -> T? {
guard index < nodes.count else { return nil }
let size = nodes.count - 1
if index != size {
nodes.swapAt(index, size)
shiftDown(from: index, until: size)
shiftUp(index)
}
return nodes.removeLast()
}
/**
* Takes a child node and looks at its parents; if a parent is not larger
* (max-heap) or not smaller (min-heap) than the child, we exchange them.
*/
internal mutating func shiftUp(_ index: Int) {
var childIndex = index
let child = nodes[childIndex]
var parentIndex = self.parentIndex(ofIndex: childIndex)
while childIndex > 0 && orderCriteria(child, nodes[parentIndex]) {
nodes[childIndex] = nodes[parentIndex]
childIndex = parentIndex
parentIndex = self.parentIndex(ofIndex: childIndex)
}
nodes[childIndex] = child
}
/**
* Looks at a parent node and makes sure it is still larger (max-heap) or
* smaller (min-heap) than its childeren.
*/
internal mutating func shiftDown(from index: Int, until endIndex: Int) {
let leftChildIndex = self.leftChildIndex(ofIndex: index)
let rightChildIndex = leftChildIndex + 1
// Figure out which comes first if we order them by the sort function:
// the parent, the left child, or the right child. If the parent comes
// first, we're done. If not, that element is out-of-place and we make
// it "float down" the tree until the heap property is restored.
var first = index
if leftChildIndex < endIndex && orderCriteria(nodes[leftChildIndex], nodes[first]) {
first = leftChildIndex
}
if rightChildIndex < endIndex && orderCriteria(nodes[rightChildIndex], nodes[first]) {
first = rightChildIndex
}
if first == index { return }
nodes.swapAt(index, first)
shiftDown(from: first, until: endIndex)
}
internal mutating func shiftDown(_ index: Int) {
shiftDown(from: index, until: nodes.count)
}
}
// MARK: - Searching
extension Heap where T: Equatable {
/** Get the index of a node in the heap. Performance: O(n). */
public func index(of node: T) -> Int? {
return nodes.index(where: { $0 == node })
}
/** Removes the first occurrence of a node from the heap. Performance: O(n). */
@discardableResult public mutating func remove(node: T) -> T? {
if let index = index(of: node) {
return remove(at: index)
}
return nil
}
}
```
|
Mercedes () is a city in Buenos Aires Province, Argentina. It is located 100 km (62 miles) west from Buenos Aires and 30 km (18 miles) southwest of Luján. It is the administrative headquarters for the district (partido) of Mercedes as well as of the judicial district. The Catedral Basílica de Mercedes-Luján, located in the city, is the seat of the Roman Catholic Archdiocese of Mercedes-Luján.
Mercedes has a population of 51,967 people (51,5% women, 48,5% men) as per the .
History
Mercedes was first established as a fortress against native indigenous attacks. Its original name was "La Guardia de Luján" and it was one of several fortress built in the borders of Buenos Aires to protect this city and gather the people living in the county near.
It became a town on 25 June 1752 when founded by José de Zárate during a military campaign known as "La Valerosa". In 1777 viceroy Pedro de Cevallos proposed moving the town, but actually it was moved to its present location by viceroy Juan José de Vértiz on 8 May 1779. When moved its name was changed to "Nuestra Señora de las Mercedes".
Mercedes is one of the few towns in Argentina in which three different railways meet, thus been connected with large commercial areas as Buenos Aires as well as the Pacific Ocean, the Andes range and the pampas plains. This was a powerful reason during the 19th century for proposing the city as the capital of Buenos Aires Province. Finally La Plata became capital, but Mercedes became known as the "West Pearl".
In 1812 the Mercedes Partido was established because of the city's increasing population and commercial activities. The first municipal government was elected in 1856. Then-governor of Buenos Aires, Mariano Saavedra, officially named it "Ciudad de Mercedes" in 1865, the same year that railway came to Mercedes for the first time.
Churches
The most important churches in the city are:
Our Lady of Mercedes Cathedral located on San Martín square, also the location of the italianate "Palacio Municipal" (city hall) and numerous cafés and restaurants. A library founded by President Domingo Faustino Sarmiento is located a few streets away. Built in neogothic style and inaugurated on April 16, 1921, in 1934 received "cathedral" status by Pope bull. The Cathedral was declared National Monument of Argentina by a decree signed by president Cristina Fernández in 2010.
St. Patrick's Church: Inaugurated on March 17, 1932 and remodeled in 2003, it has 2,500 m2 and a large number of vitraux, a figure representing St. Patrick among them. This church also has the largest pipe organ in South America, with 4,700 tubes. It was directly brought from Germany. A group of gargoyles (18 in total) decorate the exterior of the church.
St. Luis Gonzaga Church: designated by architect Pedro Benoit ('s son), is the oldest in the city, having been inaugurated as a chapel in 1891, after twelve years of construction. The chapel received "church" status in December 1941.
Transport
Railway
Mercedes has three railway stations, with two of them still active: Mercedes (Sarmiento) is terminus of the Sarmiento Line diesel branch from Moreno and Mercedes (San Martín) is part of the San Martín Railway line where long-distance services are operated by state-owned companies Trenes Argentinos and Ferrobaires to Rufino and Alberdi respectively. The station was originally built by the Buenos Aires and Pacific Railway. Mercedes Sarmiento and San Martín are also located few meters to one another.
The third station is Mercedes (Belgrano), originally built by French-owned Compañía General and inactive since the 1970s. That station is far from the city's commercial area.
Railway stations with the name "Mercedes" are:
Notes:
1 The building is currently occupied by several non-profit associations.
Road
Mercedes can be reached from the city of Buenos Aires by the "Acceso Oeste" and then by National Route 5 until km. 100. From the city of Lobos by Provincial Route 41 to the north (80-km length) and from Chivilcoy by Route 5 to the northwest. The city can also be reached from San Antonio de Areco after completing 50 km-length (31 km) by Provincial Route 41.
Mercedes has a bus terminal, located near the Mercedes (Sarmiento) railway station.
Geography
Location
The city of Mercedes is 34° 39'south latitude and 59° 25' west longitude, along the Luján River. It is 35 km (30 min by car) from the city of Luján, one of the most important religious center and pilgrimage of Argentina; 100 km (62 mi) from Buenos Aires and, 152 km (94 mi) from La Plata, capital of the province.
Climate
The climate of this region is the Mesopotamian type temperate humid with an annual average of 16 °C (60.8 °F). The winter is mild with average temperatures of 9 °C (48.2 °F), while the summer is mild with an average temperature of 23 °C (73.4 °F).
Popular culture
On the outskirts of Mercedes there is an old pulpería or rural bar and store, institutions which enjoy mythical status in gaucho culture. Known as "lo de Cacho" (Cacho's), it claims to be the last pulpería of the Pampas and retains the atmosphere of 1850, the year it opened. There is an original wanted poster for the outlaw Juan Moreira and reminders of gauchos, their culture and knife fights.
There is an old war memorial called "La Cruz de Palo". It is a wooden cross remembering where the last of the native attacks to Mercedes took place on 27 October 1823.
Mercedes is known for its peaches and salami, been the venue for the National Peach Fair (Fiesta Nacional del Durazno) as well as the National Salami Fair (Fiesta Nacional del Salame Quintero). Both fairs have their own queen elected each year.
Miscellanea
Mercedes has been the birthplace of several football players (Lucas Biglia), musicians, writers and journalists. Nevertheless, it is most known as the town where president Héctor José Cámpora was born as well as the military dictator and president Jorge Rafael Videla.
The city was organized by a-hundred-meters-long square blocks (as a Roman castra). The streets are numbered with even numbers from South to North and with odd numbers from East to West. Thus, is really easy to orient, find addresses and calculate distances along the city.
Gallery
External links
Intendencia de Mercedes (City hall of Mercedes)
Mercedes Newspaper
Mercedes News 24 hours
Cities in Argentina
Populated places in Buenos Aires Province
Populated places established in 1752
1750s establishments in the Viceroyalty of Peru
1752 establishments in South America
|
```java
/*
*/
package docs.javadsl;
import akka.actor.ActorSystem;
// #imports
import akka.stream.alpakka.huawei.pushkit.*;
import akka.stream.alpakka.huawei.pushkit.javadsl.HmsPushKit;
import akka.stream.alpakka.huawei.pushkit.models.AndroidConfig;
import akka.stream.alpakka.huawei.pushkit.models.AndroidNotification;
import akka.stream.alpakka.huawei.pushkit.models.BasicNotification;
import akka.stream.alpakka.huawei.pushkit.models.ClickAction;
import akka.stream.alpakka.huawei.pushkit.models.ErrorResponse;
import akka.stream.alpakka.huawei.pushkit.models.PushKitNotification;
import akka.stream.alpakka.huawei.pushkit.models.PushKitResponse;
import akka.stream.alpakka.huawei.pushkit.models.Response;
import akka.stream.alpakka.huawei.pushkit.models.Tokens;
// #imports
import akka.stream.javadsl.Sink;
import akka.stream.javadsl.Source;
import scala.collection.immutable.Set;
import java.util.List;
import java.util.concurrent.CompletionStage;
public class PushKitExamples {
public static void example() {
ActorSystem system = ActorSystem.create();
// #simple-send
HmsSettings config = HmsSettings.create(system);
PushKitNotification notification =
PushKitNotification.fromJava()
.withNotification(BasicNotification.fromJava().withTitle("title").withBody("body"))
.withAndroidConfig(
AndroidConfig.fromJava()
.withNotification(
AndroidNotification.fromJava()
.withClickAction(ClickAction.fromJava().withType(3))))
.withTarget(new Tokens(new Set.Set1<>("token").toSeq()));
Source.single(notification).runWith(HmsPushKit.fireAndForget(config), system);
// #simple-send
// #asFlow-send
CompletionStage<List<Response>> result =
Source.single(notification)
.via(HmsPushKit.send(config))
.map(
res -> {
if (!res.isFailure()) {
PushKitResponse response = (PushKitResponse) res;
System.out.println("Response " + response);
} else {
ErrorResponse response = (ErrorResponse) res;
System.out.println("Send error " + response);
}
return res;
})
.runWith(Sink.seq(), system);
// #asFlow-send
}
}
```
|
```shell
CPU benchmark with `dd`
Detect your linux distribution
Incorrect time on dual boot systems
Commands to shutdown or restart the system
Get hardware stack details with `lspci`
```
|
The men's synchronized 10 metre platform was one of eight diving events included in the Diving at the 2004 Summer Olympics programme.
The competition was held as an outright final:
Final 14 August — Each pair of divers performed five dives freely chosen from the five diving groups, with two dives limited to a 2.0 degree of difficulty and the others without limitation. Divers could perform different dives during the same dive if both presented the same difficulty degree. The final ranking was determined by the score attained by the pair after all five dives had been performed.
Results
References
Sources
Diving. Official Report of the XXVIII Olympiad - Results
Men
2004
Men's events at the 2004 Summer Olympics
|
```java
/*
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing,
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* specific language governing permissions and limitations
*/
package org.apache.guacamole.properties;
import com.google.common.io.BaseEncoding;
import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.GuacamoleServerException;
/**
* A GuacamoleProperty whose value is a byte array. The bytes of the byte array
* must be represented as a hexadecimal string within the property value. The
* hexadecimal string is case-insensitive.
*/
public abstract class ByteArrayProperty implements GuacamoleProperty<byte[]> {
@Override
public byte[] parseValue(String value) throws GuacamoleException {
// If no property provided, return null.
if (value == null)
return null;
// Return value parsed from hex
try {
return BaseEncoding.base16().decode(value.toUpperCase());
}
// Fail parse if hex invalid
catch (IllegalArgumentException e) {
throw new GuacamoleServerException("Invalid hexadecimal value.", e);
}
}
}
```
|
Anthony Pratt may refer to:
Anthony Pratt (businessman) (born 1960), Australian billionaire, executive chairman of Pratt Industries and board member of Visy Industries
Anthony D. G. Pratt (born 1937), British art director
Anthony E. Pratt (1903–1994), English musician and inventor of the board game Cluedo/Clue
|
```c++
#include "DBWriter.h"
#include "DBReader.h"
#include "Debug.h"
#include "Util.h"
#include "FileUtil.h"
#include "Concat.h"
#include "itoa.h"
#include "Timer.h"
#include "Parameters.h"
#define SIMDE_ENABLE_NATIVE_ALIASES
#include <simde/simde-common.h>
#include <cstdlib>
#include <cstdio>
#include <sstream>
#include <unistd.h>
#ifdef OPENMP
#include <omp.h>
#endif
DBWriter::DBWriter(const char *dataFileName_, const char *indexFileName_, unsigned int threads, size_t mode, int dbtype)
: threads(threads), mode(mode), dbtype(dbtype) {
dataFileName = strdup(dataFileName_);
indexFileName = strdup(indexFileName_);
dataFiles = new FILE *[threads];
dataFilesBuffer = new char *[threads];
dataFileNames = new char *[threads];
indexFiles = new FILE *[threads];
indexFileNames = new char *[threads];
compressedBuffers=NULL;
compressedBufferSizes=NULL;
if((mode & Parameters::WRITER_COMPRESSED_MODE) != 0){
compressedBuffers = new char*[threads];
compressedBufferSizes = new size_t[threads];
cstream = new ZSTD_CStream*[threads];
state = new int[threads];
threadBuffer = new char*[threads];
threadBufferSize = new size_t[threads];
threadBufferOffset = new size_t[threads];
}
starts = new size_t[threads];
std::fill(starts, starts + threads, 0);
offsets = new size_t[threads];
std::fill(offsets, offsets + threads, 0);
if((mode & Parameters::WRITER_COMPRESSED_MODE) != 0 ){
datafileMode = "wb+";
} else {
datafileMode = "wb";
}
closed = true;
}
size_t DBWriter::addToThreadBuffer(const void *data, size_t itmesize, size_t nitems, int threadIdx) {
size_t bytesToWrite = (itmesize*nitems);
size_t bytesLeftInBuffer = threadBufferSize[threadIdx] - threadBufferOffset[threadIdx];
if( (itmesize*nitems) >= bytesLeftInBuffer ){
size_t newBufferSize = std::max(threadBufferSize[threadIdx] + bytesToWrite, threadBufferSize[threadIdx] * 2 );
threadBufferSize[threadIdx] = newBufferSize;
threadBuffer[threadIdx] = (char*) realloc(threadBuffer[threadIdx], newBufferSize);
if(compressedBuffers[threadIdx] == NULL){
Debug(Debug::ERROR) << "Realloc of buffer for " << threadIdx << " failed. Buffer size = " << threadBufferSize[threadIdx] << "\n";
EXIT(EXIT_FAILURE);
}
}
memcpy(threadBuffer[threadIdx] + threadBufferOffset[threadIdx], data, bytesToWrite);
threadBufferOffset[threadIdx] += bytesToWrite;
return bytesToWrite;
}
DBWriter::~DBWriter() {
delete[] offsets;
delete[] starts;
delete[] indexFileNames;
delete[] indexFiles;
delete[] dataFileNames;
delete[] dataFilesBuffer;
delete[] dataFiles;
free(indexFileName);
free(dataFileName);
if(compressedBuffers){
delete [] threadBuffer;
delete [] threadBufferSize;
delete [] threadBufferOffset;
delete [] compressedBuffers;
delete [] compressedBufferSizes;
delete [] cstream;
delete [] state;
}
}
void DBWriter::sortDatafileByIdOrder(DBReader<unsigned int> &dbr) {
#pragma omp parallel
{
int thread_idx = 0;
#ifdef OPENMP
thread_idx = omp_get_thread_num();
#endif
#pragma omp for schedule(static)
for (size_t id = 0; id < dbr.getSize(); id++) {
char *data = dbr.getData(id, thread_idx);
size_t length = dbr.getEntryLen(id);
writeData(data, (length == 0 ? 0 : length - 1), dbr.getDbKey(id), thread_idx);
}
};
}
// allocates heap memory, careful
char* makeResultFilename(const char* name, size_t split) {
std::ostringstream ss;
ss << name << "." << split;
std::string s = ss.str();
return strdup(s.c_str());
}
void DBWriter::open(size_t bufferSize) {
if (bufferSize == SIZE_MAX) {
if (Util::getTotalSystemMemory() < (8ull * 1024 * 1024 * 1024)) {
// reduce this buffer if our system does not have much memory
// createdb runs into trouble since it creates 2x32 splits with 64MB each (=4GB)
// 8MB should be enough
bufferSize = 8ull * 1024 * 1024;
} else {
bufferSize = 32ull * 1024 * 1024;
}
}
for (unsigned int i = 0; i < threads; i++) {
dataFileNames[i] = makeResultFilename(dataFileName, i);
indexFileNames[i] = makeResultFilename(indexFileName, i);
dataFiles[i] = FileUtil::openAndDelete(dataFileNames[i], datafileMode.c_str());
int fd = fileno(dataFiles[i]);
int flags;
if ((flags = fcntl(fd, F_GETFL, 0)) < 0 || fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1) {
Debug(Debug::ERROR) << "Can not set mode for " << dataFileNames[i] << "!\n";
EXIT(EXIT_FAILURE);
}
dataFilesBuffer[i] = new(std::nothrow) char[bufferSize];
Util::checkAllocation(dataFilesBuffer[i], "Cannot allocate buffer for DBWriter");
incrementMemory(bufferSize);
this->bufferSize = bufferSize;
// set buffer to 64
if (setvbuf(dataFiles[i], dataFilesBuffer[i], _IOFBF, bufferSize) != 0) {
Debug(Debug::WARNING) << "Write buffer could not be allocated (bufferSize=" << bufferSize << ")\n";
}
indexFiles[i] = FileUtil::openAndDelete(indexFileNames[i], "w");
fd = fileno(indexFiles[i]);
if ((flags = fcntl(fd, F_GETFL, 0)) < 0 || fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1) {
Debug(Debug::ERROR) << "Can not set mode for " << indexFileNames[i] << "!\n";
EXIT(EXIT_FAILURE);
}
if (setvbuf(indexFiles[i], NULL, _IOFBF, bufferSize) != 0) {
Debug(Debug::WARNING) << "Write buffer could not be allocated (bufferSize=" << bufferSize << ")\n";
}
if (dataFiles[i] == NULL) {
perror(dataFileNames[i]);
EXIT(EXIT_FAILURE);
}
if (indexFiles[i] == NULL) {
perror(indexFileNames[i]);
EXIT(EXIT_FAILURE);
}
if((mode & Parameters::WRITER_COMPRESSED_MODE) != 0){
compressedBufferSizes[i] = 2097152;
threadBufferSize[i] = 2097152;
state[i] = false;
compressedBuffers[i] = (char*) malloc(compressedBufferSizes[i]);
incrementMemory(compressedBufferSizes[i]);
threadBuffer[i] = (char*) malloc(threadBufferSize[i]);
incrementMemory(threadBufferSize[i]);
cstream[i] = ZSTD_createCStream();
}
}
closed = false;
}
void DBWriter::writeDbtypeFile(const char* path, int dbtype, bool isCompressed) {
if (dbtype == Parameters::DBTYPE_OMIT_FILE) {
return;
}
std::string name = std::string(path) + ".dbtype";
FILE* file = FileUtil::openAndDelete(name.c_str(), "wb");
dbtype = isCompressed ? dbtype | (1 << 31) : dbtype & ~(1 << 31);
#if SIMDE_ENDIAN_ORDER == SIMDE_ENDIAN_BIG
dbtype = __builtin_bswap32(dbtype);
#endif
size_t written = fwrite(&dbtype, sizeof(int), 1, file);
if (written != 1) {
Debug(Debug::ERROR) << "Can not write to data file " << name << "\n";
EXIT(EXIT_FAILURE);
}
if (fclose(file) != 0) {
Debug(Debug::ERROR) << "Cannot close file " << name << "\n";
EXIT(EXIT_FAILURE);
}
}
void DBWriter::close(bool merge, bool needsSort) {
// close all datafiles
for (unsigned int i = 0; i < threads; i++) {
if (fclose(dataFiles[i]) != 0) {
Debug(Debug::ERROR) << "Cannot close data file " << dataFileNames[i] << "\n";
EXIT(EXIT_FAILURE);
}
if (fclose(indexFiles[i]) != 0) {
Debug(Debug::ERROR) << "Cannot close index file " << indexFileNames[i] << "\n";
EXIT(EXIT_FAILURE);
}
}
if(compressedBuffers){
for (unsigned int i = 0; i < threads; i++) {
free(compressedBuffers[i]);
decrementMemory(compressedBufferSizes[i]);
free(threadBuffer[i]);
decrementMemory(threadBufferSize[i]);
ZSTD_freeCStream(cstream[i]);
}
}
merge = getenv("MMSEQS_FORCE_MERGE") != NULL ? true : merge;
mergeResults(dataFileName, indexFileName, (const char **) dataFileNames, (const char **) indexFileNames,
threads, merge, ((mode & Parameters::WRITER_LEXICOGRAPHIC_MODE) != 0), needsSort);
writeDbtypeFile(dataFileName, dbtype, (mode & Parameters::WRITER_COMPRESSED_MODE) != 0);
for (unsigned int i = 0; i < threads; i++) {
delete [] dataFilesBuffer[i];
decrementMemory(bufferSize);
free(dataFileNames[i]);
free(indexFileNames[i]);
}
closed = true;
}
void DBWriter::writeStart(unsigned int thrIdx) {
checkClosed();
if (thrIdx >= threads) {
Debug(Debug::ERROR) << "Thread index " << thrIdx << " > maximum thread number " << threads << "\n";
EXIT(EXIT_FAILURE);
}
starts[thrIdx] = offsets[thrIdx];
if((mode & Parameters::WRITER_COMPRESSED_MODE) != 0){
state[thrIdx] = INIT_STATE;
threadBufferOffset[thrIdx]=0;
int cLevel = 3;
size_t const initResult = ZSTD_initCStream(cstream[thrIdx], cLevel);
if (ZSTD_isError(initResult)) {
Debug(Debug::ERROR) << "ZSTD_initCStream() error in thread " << thrIdx << ". Error "
<< ZSTD_getErrorName(initResult) << "\n";
EXIT(EXIT_FAILURE);
}
}
}
size_t DBWriter::writeAdd(const char* data, size_t dataSize, unsigned int thrIdx) {
checkClosed();
if (thrIdx >= threads) {
Debug(Debug::ERROR) << "Thread index " << thrIdx << " > maximum thread number " << threads << "\n";
EXIT(EXIT_FAILURE);
}
bool isCompressedDB = (mode & Parameters::WRITER_COMPRESSED_MODE) != 0;
if(isCompressedDB && state[thrIdx] == INIT_STATE && dataSize < 60){
state[thrIdx] = NOTCOMPRESSED;
}
size_t totalWriten = 0;
if(isCompressedDB && (state[thrIdx] == INIT_STATE || state[thrIdx] == COMPRESSED) ) {
state[thrIdx] = COMPRESSED;
// zstd seems to have a hard time with elements < 60
ZSTD_inBuffer input = { data, dataSize, 0 };
while (input.pos < input.size) {
ZSTD_outBuffer output = {compressedBuffers[thrIdx], compressedBufferSizes[thrIdx], 0};
size_t toRead = ZSTD_compressStream( cstream[thrIdx], &output, &input); /* toRead is guaranteed to be <= ZSTD_CStreamInSize() */
if (ZSTD_isError(toRead)) {
Debug(Debug::ERROR) << "ZSTD_compressStream() error in thread " << thrIdx << ". Error "
<< ZSTD_getErrorName(toRead) << "\n";
EXIT(EXIT_FAILURE);
}
size_t written = addToThreadBuffer(compressedBuffers[thrIdx], sizeof(char), output.pos, thrIdx);
if (written != output.pos) {
Debug(Debug::ERROR) << "Can not write to data file " << dataFileNames[thrIdx] << "\n";
EXIT(EXIT_FAILURE);
}
offsets[thrIdx] += written;
totalWriten += written;
}
}else{
size_t written;
if(isCompressedDB){
written = addToThreadBuffer(data, sizeof(char), dataSize, thrIdx);
}else{
written = fwrite(data, sizeof(char), dataSize, dataFiles[thrIdx]);
}
if (written != dataSize) {
Debug(Debug::ERROR) << "Can not write to data file " << dataFileNames[thrIdx] << "\n";
EXIT(EXIT_FAILURE);
}
offsets[thrIdx] += written;
}
return totalWriten;
}
void DBWriter::writeEnd(unsigned int key, unsigned int thrIdx, bool addNullByte, bool addIndexEntry) {
// close stream
bool isCompressedDB = (mode & Parameters::WRITER_COMPRESSED_MODE) != 0;
if(isCompressedDB) {
size_t compressedLength = 0;
if(state[thrIdx] == COMPRESSED) {
ZSTD_outBuffer output = {compressedBuffers[thrIdx], compressedBufferSizes[thrIdx], 0};
size_t remainingToFlush = ZSTD_endStream(cstream[thrIdx], &output); /* close frame */
// std::cout << compressedLength << std::endl;
if (ZSTD_isError(remainingToFlush)) {
Debug(Debug::ERROR) << "ZSTD_endStream() error in thread " << thrIdx << ". Error "
<< ZSTD_getErrorName(remainingToFlush) << "\n";
EXIT(EXIT_FAILURE);
}
if (remainingToFlush) {
Debug(Debug::ERROR) << "Stream not flushed\n";
EXIT(EXIT_FAILURE);
}
size_t written = addToThreadBuffer(compressedBuffers[thrIdx], sizeof(char), output.pos, thrIdx);
compressedLength = threadBufferOffset[thrIdx];
offsets[thrIdx] += written;
if (written != output.pos) {
Debug(Debug::ERROR) << "Can not write to data file " << dataFileNames[thrIdx] << "\n";
EXIT(EXIT_FAILURE);
}
}else {
compressedLength = offsets[thrIdx] - starts[thrIdx];
}
unsigned int compressedLengthInt = static_cast<unsigned int>(compressedLength);
size_t written2 = fwrite(&compressedLengthInt, sizeof(unsigned int), 1, dataFiles[thrIdx]);
if (written2 != 1) {
Debug(Debug::ERROR) << "Can not write entry length to data file " << dataFileNames[thrIdx] << "\n";
EXIT(EXIT_FAILURE);
}
offsets[thrIdx] += sizeof(unsigned int);
writeThreadBuffer(thrIdx, compressedLength);
}
size_t totalWritten = 0;
// entries are always separated by a null byte
if (addNullByte == true) {
char nullByte = '\0';
if(isCompressedDB && state[thrIdx]==NOTCOMPRESSED){
nullByte = static_cast<char>(0xFF);
}
const size_t written = fwrite(&nullByte, sizeof(char), 1, dataFiles[thrIdx]);
if (written != 1) {
Debug(Debug::ERROR) << "Can not write to data file " << dataFileNames[thrIdx] << "\n";
EXIT(EXIT_FAILURE);
}
totalWritten += written;
offsets[thrIdx] += 1;
}
if (addIndexEntry == true) {
size_t length = offsets[thrIdx] - starts[thrIdx];
// keep original size in index
if (isCompressedDB && state[thrIdx]==COMPRESSED) {
ZSTD_frameProgression progression = ZSTD_getFrameProgression(cstream[thrIdx]);
length = progression.consumed + totalWritten;
}
if (isCompressedDB && state[thrIdx]==NOTCOMPRESSED) {
length -= sizeof(unsigned int);
}
writeIndexEntry(key, starts[thrIdx], length, thrIdx);
}
}
void DBWriter::writeIndexEntry(unsigned int key, size_t offset, size_t length, unsigned int thrIdx){
char buffer[1024];
size_t len = indexToBuffer(buffer, key, offset, length );
size_t written = fwrite(buffer, sizeof(char), len, indexFiles[thrIdx]);
if (written != len) {
Debug(Debug::ERROR) << "Can not write to data file " << dataFileName[thrIdx] << "\n";
EXIT(EXIT_FAILURE);
}
}
void DBWriter::writeData(const char *data, size_t dataSize, unsigned int key, unsigned int thrIdx, bool addNullByte, bool addIndexEntry) {
writeStart(thrIdx);
writeAdd(data, dataSize, thrIdx);
writeEnd(key, thrIdx, addNullByte, addIndexEntry);
}
size_t DBWriter::indexToBuffer(char *buff1, unsigned int key, size_t offsetStart, size_t len){
char * basePos = buff1;
char * tmpBuff = Itoa::u32toa_sse2(static_cast<uint32_t>(key), buff1);
*(tmpBuff-1) = '\t';
tmpBuff = Itoa::u64toa_sse2(static_cast<uint64_t>(offsetStart), tmpBuff);
*(tmpBuff-1) = '\t';
tmpBuff = Itoa::u64toa_sse2(static_cast<uint64_t>(len), tmpBuff);
*(tmpBuff-1) = '\n';
*(tmpBuff) = '\0';
return tmpBuff - basePos;
}
void DBWriter::alignToPageSize(int thrIdx) {
size_t currentOffset = offsets[thrIdx];
size_t pageSize = Util::getPageSize();
size_t newOffset = ((pageSize - 1) & currentOffset) ? ((currentOffset + pageSize) & ~(pageSize - 1)) : currentOffset;
char nullByte = '\0';
for (size_t i = currentOffset; i < newOffset; ++i) {
size_t written = fwrite(&nullByte, sizeof(char), 1, dataFiles[thrIdx]);
if (written != 1) {
Debug(Debug::ERROR) << "Can not write to data file " << dataFileNames[thrIdx] << "\n";
EXIT(EXIT_FAILURE);
}
}
offsets[thrIdx] = newOffset;
}
void DBWriter::checkClosed() {
if (closed == true) {
Debug(Debug::ERROR) << "Trying to read a closed database. Datafile=" << dataFileName << "\n";
EXIT(EXIT_FAILURE);
}
}
void DBWriter::mergeResults(const std::string &outFileName, const std::string &outFileNameIndex,
const std::vector<std::pair<std::string, std::string >> &files,
const bool lexicographicOrder) {
const char **datafilesNames = new const char *[files.size()];
const char **indexFilesNames = new const char *[files.size()];
for (size_t i = 0; i < files.size(); i++) {
datafilesNames[i] = files[i].first.c_str();
indexFilesNames[i] = files[i].second.c_str();
}
mergeResults(outFileName.c_str(), outFileNameIndex.c_str(), datafilesNames, indexFilesNames, files.size(), true, lexicographicOrder);
delete[] datafilesNames;
delete[] indexFilesNames;
// leave only one dbtype file behind
if (files.size() > 0) {
std::string typeSrc = files[0].first + ".dbtype";
std::string typeDest = outFileName + ".dbtype";
if (FileUtil::fileExists(typeSrc.c_str())) {
std::rename(typeSrc.c_str(), typeDest.c_str());
}
for (size_t i = 1; i < files.size(); i++) {
std::string typeFile = files[i].first + ".dbtype";
if (FileUtil::fileExists(typeFile.c_str())) {
FileUtil::remove(typeFile.c_str());
}
}
}
}
template <>
void DBWriter::writeIndexEntryToFile(FILE *outFile, char *buff1, DBReader<unsigned int>::Index &index){
char * tmpBuff = Itoa::u32toa_sse2((uint32_t)index.id,buff1);
*(tmpBuff-1) = '\t';
size_t currOffset = index.offset;
tmpBuff = Itoa::u64toa_sse2(currOffset, tmpBuff);
*(tmpBuff-1) = '\t';
uint32_t sLen = index.length;
tmpBuff = Itoa::u32toa_sse2(sLen,tmpBuff);
*(tmpBuff-1) = '\n';
*(tmpBuff) = '\0';
fwrite(buff1, sizeof(char), (tmpBuff - buff1), outFile);
}
template <>
void DBWriter::writeIndexEntryToFile(FILE *outFile, char *buff1, DBReader<std::string>::Index &index)
{
size_t keyLen = index.id.length();
char * tmpBuff = (char*)memcpy((void*)buff1, (void*)index.id.c_str(), keyLen);
tmpBuff+=keyLen;
*(tmpBuff) = '\t';
tmpBuff++;
size_t currOffset = index.offset;
tmpBuff = Itoa::u64toa_sse2(currOffset, tmpBuff);
*(tmpBuff-1) = '\t';
uint32_t sLen = index.length;
tmpBuff = Itoa::u32toa_sse2(sLen,tmpBuff);
*(tmpBuff-1) = '\n';
*(tmpBuff) = '\0';
fwrite(buff1, sizeof(char), (tmpBuff - buff1), outFile);
}
template <>
void DBWriter::writeIndex(FILE *outFile, size_t indexSize, DBReader<unsigned int>::Index *index) {
char buff1[1024];
for (size_t id = 0; id < indexSize; id++) {
writeIndexEntryToFile(outFile, buff1, index[id]);
}
}
template <>
void DBWriter::writeIndex(FILE *outFile, size_t indexSize, DBReader<std::string>::Index *index){
char buff1[1024];
for (size_t id = 0; id < indexSize; id++) {
writeIndexEntryToFile(outFile, buff1, index[id]);
}
}
void DBWriter::mergeResults(const char *outFileName, const char *outFileNameIndex,
const char **dataFileNames, const char **indexFileNames,
unsigned long fileCount, bool mergeDatafiles,
bool lexicographicOrder, bool indexNeedsToBeSorted) {
Timer timer;
std::vector<std::vector<std::string>> dataFilenames;
for (unsigned int i = 0; i < fileCount; ++i) {
dataFilenames.emplace_back(FileUtil::findDatafiles(dataFileNames[i]));
}
// merge results into one result file
if (dataFilenames.size() > 1) {
std::vector<FILE*> datafiles;
std::vector<size_t> mergedSizes;
for (unsigned int i = 0; i < dataFilenames.size(); i++) {
std::vector<std::string>& filenames = dataFilenames[i];
size_t cumulativeSize = 0;
for (size_t j = 0; j < filenames.size(); ++j) {
FILE* fh = fopen(filenames[j].c_str(), "r");
if (fh == NULL) {
Debug(Debug::ERROR) << "Can not open result file " << filenames[j] << "!\n";
EXIT(EXIT_FAILURE);
}
struct stat sb;
if (fstat(fileno(fh), &sb) < 0) {
int errsv = errno;
Debug(Debug::ERROR) << "Failed to fstat file " << filenames[j] << ". Error " << errsv << ".\n";
EXIT(EXIT_FAILURE);
}
datafiles.emplace_back(fh);
cumulativeSize += sb.st_size;
}
mergedSizes.push_back(cumulativeSize);
}
if (mergeDatafiles) {
FILE *outFh = FileUtil::openAndDelete(outFileName, "w");
Concat::concatFiles(datafiles, outFh);
if (fclose(outFh) != 0) {
Debug(Debug::ERROR) << "Cannot close data file " << outFileName << "\n";
EXIT(EXIT_FAILURE);
}
}
for (unsigned int i = 0; i < datafiles.size(); ++i) {
if (fclose(datafiles[i]) != 0) {
Debug(Debug::ERROR) << "Cannot close data file in merge\n";
EXIT(EXIT_FAILURE);
}
}
if (mergeDatafiles) {
for (unsigned int i = 0; i < dataFilenames.size(); i++) {
std::vector<std::string>& filenames = dataFilenames[i];
for (size_t j = 0; j < filenames.size(); ++j) {
FileUtil::remove(filenames[j].c_str());
}
}
}
// merge index
mergeIndex(indexFileNames, dataFilenames.size(), mergedSizes);
} else if (dataFilenames.size() == 1) {
std::vector<std::string>& filenames = dataFilenames[0];
if (filenames.size() == 1) {
// In single thread dbreader mode it will create a .0
// that should be moved to the final destination dest instead of dest.0
FileUtil::move(filenames[0].c_str(), outFileName);
} else {
DBReader<unsigned int>::moveDatafiles(filenames, outFileName);
}
} else {
FILE *outFh = FileUtil::openAndDelete(outFileName, "w");
if (fclose(outFh) != 0) {
Debug(Debug::ERROR) << "Cannot close data file " << outFileName << "\n";
EXIT(EXIT_FAILURE);
}
outFh = FileUtil::openAndDelete(outFileNameIndex, "w");
if (fclose(outFh) != 0) {
Debug(Debug::ERROR) << "Cannot close index file " << outFileNameIndex << "\n";
EXIT(EXIT_FAILURE);
}
}
if (dataFilenames.size() > 0) {
if (indexNeedsToBeSorted) {
DBWriter::sortIndex(indexFileNames[0], outFileNameIndex, lexicographicOrder);
FileUtil::remove(indexFileNames[0]);
} else {
FileUtil::move(indexFileNames[0], outFileNameIndex);
}
}
Debug(Debug::INFO) << "Time for merging to " << FileUtil::baseName(outFileName) << ": " << timer.lap() << "\n";
}
void DBWriter::mergeIndex(const char** indexFilenames, unsigned int fileCount, const std::vector<size_t> &dataSizes) {
FILE *index_file = fopen(indexFilenames[0], "a");
if (index_file == NULL) {
perror(indexFilenames[0]);
EXIT(EXIT_FAILURE);
}
size_t globalOffset = dataSizes[0];
for (unsigned int fileIdx = 1; fileIdx < fileCount; fileIdx++) {
DBReader<unsigned int> reader(indexFilenames[fileIdx], indexFilenames[fileIdx], 1, DBReader<unsigned int>::USE_INDEX);
reader.open(DBReader<unsigned int>::HARDNOSORT);
if (reader.getSize() > 0) {
DBReader<unsigned int>::Index * index = reader.getIndex();
for (size_t i = 0; i < reader.getSize(); i++) {
size_t currOffset = index[i].offset;
index[i].offset = globalOffset + currOffset;
}
writeIndex(index_file, reader.getSize(), index);
}
reader.close();
FileUtil::remove(indexFilenames[fileIdx]);
globalOffset += dataSizes[fileIdx];
}
if (fclose(index_file) != 0) {
Debug(Debug::ERROR) << "Cannot close index file " << indexFilenames[0] << "\n";
EXIT(EXIT_FAILURE);
}
}
void DBWriter::sortIndex(const char *inFileNameIndex, const char *outFileNameIndex, const bool lexicographicOrder){
if (lexicographicOrder == false) {
// sort the index
DBReader<unsigned int> indexReader(inFileNameIndex, inFileNameIndex, 1, DBReader<unsigned int>::USE_INDEX);
indexReader.open(DBReader<unsigned int>::NOSORT);
DBReader<unsigned int>::Index *index = indexReader.getIndex();
FILE *index_file = FileUtil::openAndDelete(outFileNameIndex, "w");
writeIndex(index_file, indexReader.getSize(), index);
if (fclose(index_file) != 0) {
Debug(Debug::ERROR) << "Cannot close index file " << outFileNameIndex << "\n";
EXIT(EXIT_FAILURE);
}
indexReader.close();
} else {
DBReader<std::string> indexReader(inFileNameIndex, inFileNameIndex, 1, DBReader<std::string>::USE_INDEX);
indexReader.open(DBReader<std::string>::SORT_BY_ID);
DBReader<std::string>::Index *index = indexReader.getIndex();
FILE *index_file = FileUtil::openAndDelete(outFileNameIndex, "w");
writeIndex(index_file, indexReader.getSize(), index);
if (fclose(index_file) != 0) {
Debug(Debug::ERROR) << "Cannot close index file " << outFileNameIndex << "\n";
EXIT(EXIT_FAILURE);
}
indexReader.close();
}
}
void DBWriter::writeThreadBuffer(unsigned int idx, size_t dataSize) {
size_t written = fwrite(threadBuffer[idx], 1, dataSize, dataFiles[idx]);
if (written != dataSize) {
Debug(Debug::ERROR) << "writeThreadBuffer: Could not write to data file " << dataFileNames[idx] << "\n";
EXIT(EXIT_FAILURE);
}
}
void DBWriter::createRenumberedDB(const std::string& dataFile, const std::string& indexFile, const std::string& origData, const std::string& origIndex, int sortMode) {
DBReader<unsigned int>* lookupReader = NULL;
FILE *sLookup = NULL;
if (origData.empty() == false && origIndex.empty() == false) {
lookupReader = new DBReader<unsigned int>(origData.c_str(), origIndex.c_str(), 1, DBReader<unsigned int>::USE_LOOKUP);
lookupReader->open(DBReader<unsigned int>::NOSORT);
sLookup = FileUtil::openAndDelete((dataFile + ".lookup").c_str(), "w");
}
DBReader<unsigned int> reader(dataFile.c_str(), indexFile.c_str(), 1, DBReader<unsigned int>::USE_INDEX);
reader.open(sortMode);
std::string indexTmp = indexFile + "_tmp";
FILE *sIndex = FileUtil::openAndDelete(indexTmp.c_str(), "w");
char buffer[1024];
std::string strBuffer;
strBuffer.reserve(1024);
DBReader<unsigned int>::LookupEntry* lookup = NULL;
if (lookupReader != NULL) {
lookup = lookupReader->getLookup();
}
for (size_t i = 0; i < reader.getSize(); i++) {
DBReader<unsigned int>::Index *idx = (reader.getIndex(i));
size_t len = DBWriter::indexToBuffer(buffer, i, idx->offset, idx->length);
int written = fwrite(buffer, sizeof(char), len, sIndex);
if (written != (int) len) {
Debug(Debug::ERROR) << "Can not write to data file " << indexFile << "_tmp\n";
EXIT(EXIT_FAILURE);
}
if (lookupReader != NULL) {
size_t lookupId = lookupReader->getLookupIdByKey(idx->id);
DBReader<unsigned int>::LookupEntry copy = lookup[lookupId];
copy.id = i;
copy.entryName = SSTR(idx->id);
lookupReader->lookupEntryToBuffer(strBuffer, copy);
written = fwrite(strBuffer.c_str(), sizeof(char), strBuffer.size(), sLookup);
if (written != (int) strBuffer.size()) {
Debug(Debug::ERROR) << "Could not write to lookup file " << indexFile << "_tmp\n";
EXIT(EXIT_FAILURE);
}
strBuffer.clear();
}
}
if (fclose(sIndex) != 0) {
Debug(Debug::ERROR) << "Cannot close index file " << indexTmp << "\n";
EXIT(EXIT_FAILURE);
}
reader.close();
std::rename(indexTmp.c_str(), indexFile.c_str());
if (lookupReader != NULL) {
if (fclose(sLookup) != 0) {
Debug(Debug::ERROR) << "Cannot close file " << dataFile << ".lookup\n";
EXIT(EXIT_FAILURE);
}
lookupReader->close();
delete lookupReader;
}
}
```
|
Marco Del Prete (born 17 August 1965) is an Italian swimmer. He competed in the men's 200 metre breaststroke at the 1984 Summer Olympics.
References
External links
1965 births
Living people
Olympic swimmers for Italy
Swimmers at the 1984 Summer Olympics
Swimmers from Rome
Italian male breaststroke swimmers
20th-century Italian people
|
```javascript
'use strict'
module.exports = hashToSegments
function hashToSegments (hash) {
return [
hash.slice(0, 2),
hash.slice(2, 4),
hash.slice(4)
]
}
```
|
```c++
//
// strdate.cpp
//
//
// The strdate() family of functions, which return the current data as a string.
//
#include <corecrt_internal_securecrt.h>
#include <corecrt_internal_time.h>
// Returns the current date as a string of the form "MM/DD/YY". These functions
// return an error code on failure, or zero on success. The buffer must be at
// least nine characters in size.
template <typename Character>
static errno_t __cdecl common_strdate_s(
_Out_writes_z_(size_in_chars) Character* const buffer,
_In_ _In_range_(>=, 9) size_t const size_in_chars
) throw()
{
_VALIDATE_RETURN_ERRCODE(buffer != nullptr && size_in_chars > 0, EINVAL);
_RESET_STRING(buffer, size_in_chars);
_VALIDATE_RETURN_ERRCODE(size_in_chars >= 9, ERANGE);
SYSTEMTIME local_time;
GetLocalTime(&local_time);
int const month = local_time.wMonth;
int const day = local_time.wDay;
int const year = local_time.wYear % 100;
static Character const zero_char = static_cast<Character>('0');
#pragma warning(disable:__WARNING_POTENTIAL_BUFFER_OVERFLOW_HIGH_PRIORITY) // 26015
// Store the components of the date into the string in MM/DD/YY form:
buffer[0] = static_cast<Character>(month / 10 + zero_char); // Tens of month
buffer[1] = static_cast<Character>(month % 10 + zero_char); // Units of month
buffer[2] = static_cast<Character>('/');
buffer[3] = static_cast<Character>(day / 10 + zero_char); // Tens of day
buffer[4] = static_cast<Character>(day % 10 + zero_char); // Units of day
buffer[5] = static_cast<Character>('/');
buffer[6] = static_cast<Character>(year / 10 + zero_char); // Tens of year
buffer[7] = static_cast<Character>(year % 10 + zero_char); // Units of year
buffer[8] = static_cast<Character>('\0');
return 0;
}
extern "C" errno_t __cdecl _strdate_s(char* const buffer, size_t const size_in_chars)
{
return common_strdate_s(buffer, size_in_chars);
}
extern "C" errno_t __cdecl _wstrdate_s(wchar_t* const buffer, size_t const size_in_chars)
{
return common_strdate_s(buffer, size_in_chars);
}
// Returns the current date as a string of the form "MM/DD/YY". These functions
// assume that the provided result buffer is at least nine characters in length.
// Each returns the buffer on success, or null on failure.
template <typename Character>
_Success_(return != 0)
static Character* __cdecl common_strdate(_Out_writes_z_(9) Character* const buffer) throw()
{
errno_t const status = common_strdate_s(buffer, 9);
if (status != 0)
return nullptr;
return buffer;
}
extern "C" char* __cdecl _strdate(char* const buffer)
{
return common_strdate(buffer);
}
extern "C" wchar_t* __cdecl _wstrdate(wchar_t* const buffer)
{
return common_strdate(buffer);
}
```
|
```javascript
import { NAMESPACE_SEP } from './constants';
export default function createPromiseMiddleware(app) {
return () => next => action => {
const { type } = action;
if (isEffect(type)) {
return new Promise((resolve, reject) => {
next({
__dva_resolve: resolve,
__dva_reject: reject,
...action,
});
});
} else {
return next(action);
}
};
function isEffect(type) {
if (!type || typeof type !== 'string') return false;
const [namespace] = type.split(NAMESPACE_SEP);
const model = app._models.filter(m => m.namespace === namespace)[0];
if (model) {
if (model.effects && model.effects[type]) {
return true;
}
}
return false;
}
}
```
|
ABK Workers Alliance (ABK standing for "Activision-Blizzard-King") is a group of organized workers from video game company Activision Blizzard. Formed in response to a July 2021 state lawsuit against the company for harassment and discriminatory work practices, the worker advocacy group A Better ABK organized walkouts and demonstrations against the company's policy and practices. The quality assurance workers of subsidiary Raven Software went on strike in December after part of the team was fired. The striking workers announced their union as the Game Workers Alliance in late January 2022 and offered to end the strike pending their union's recognition.
Background
California's Department of Fair Employment and Housing sued Activision Blizzard in July 2021 with claims of having fostered a toxic "frat boy" work culture in which women were routinely subject to harassment and discrimination. The company's dismissive response upset employees, who sought to see the company's workplace issues addressed. Activision Blizzard, worth $65 billion, employs about 10,000 people. A Better ABK, a worker advocacy group, formed in response to the allegations to push for company change.
History
A Better ABK organized two walkouts at Blizzard Activision in 2021 in response to the sexual harassment case against the company. In July, the group organized a "Walkout for Equality" for specific internal policy changes on topics including arbitration, diversity, and recruitment. Another walkout in November followed a Wall Street Journal report that CEO Bobby Kotick had known and not acted on harassment and abuse claims. Over 100 employees demonstrated outside Blizzard's headquarters and 1,700 workers signed a petition for Kotick's resignation.
During the same period, the ABK Workers Alliance took several public actions. The group listed four demands: ending forced arbitration, more inclusive hiring protocol, increased compensation policy transparency, and an audit of the company's internal policies by a neutral third party. The Alliance objected to Kotick's choice of legal counsel to audit the company's workplace and in September, filed a unfair labor practice suit with the National Labor Relations Board for what the group described as intimidation and coersion to prevent their discussion of wage disparity and forced arbitration policy. As part of a series of changes announced in response to the sexual harassment lawsuit, the company agreed to waive forced arbitration in cases about sexual harassment and discrimination. Their demand met, the alliance celebrated. In the time after the Wall Street Journal report on the CEO, one of the Alliance's main organizers, senior test analyst Jessica Gonzalez, left the company for personal reasons.
In early December 2021, a subsidiary of Activision Blizzard based in Wisconsin that supports the Call of Duty series, Raven Software, fired 12 quality assurance workers—about a third of the team. The employees had just completed a five-week, end-of-year "crunch" overtime period and the team had been promised pay restructuring for higher salaries. The team and other workers walked out in response. Later in the week, a group, as the ABK Workers Alliance, formally announced that the multi-day walkout had become an open-ended strike action, and they were both raising funds for a strike fund and beginning a union drive. Ultimately, 20 quality assurance workers and 60 other staff participated in the strike, from Raven's 300 total. Since the group was not unionized, the strike did not have union protections. Forgoing salaries during the work stoppage, the group's strike fund sought to offset the workers' lost wages. The fund surpassed $350,000 by early January 2022. The Communication Workers of America aided the organizing workers, who began signing union cards.
The quality assurance workers announced their intent to unionize with the Communication Workers of America's CODE-CWA campaign as the Game Workers Alliance in late January 2022. They offered to end the strike, contingent upon the company recognizing the union. The Alliance wants more realistic development timelines, less crunch time, more transparency from management, more career development opportunities, and more empowerment of underrepresented voices. Activision Blizzard denied their request to voluntarily recognize the union.
During the ABK Workers Alliance's organizing efforts, Microsoft announced that it would be acquiring the company for 70 billion. The organized workers said that their goals of workplace improvements and securing employee rights remained unchanged.
As Activision Blizzard sought to settle its sexual harassment lawsuit with the Equal Employment Opportunity Commission, the CWA objected on behalf of an employee affected by harassment and retaliation, seeking a fairness hearing.
In May 2022, the Game Workers Alliance announced that they had voted to unionize, having reached a count of 19 – 2 in favor. As a result, the National Labor Relations Board officially recognized the Game Workers Alliance as a union.
Following the Raven QA team's successful unionization, the 20-member QA team of Blizzard Albany (formerly known as Vicarious Visions) announced a unionization drive in July 2022 as GWA Albany. The vote passed (14–0), forming the second union at an Activizion Blizzard subsidiary.
References
Further reading
External links
Game Workers Alliance (official)
Video game trade unions
Activision Blizzard
Trade unions in the United States
Activision Blizzard
|
```objective-c
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of NVIDIA CORPORATION nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
#ifndef _SAMPLE_PARTICLES_INPUT_EVENT_IDS_H
#define _SAMPLE_PARTICLES_INPUT_EVENT_IDS_H
#include <SampleBaseInputEventIds.h>
// InputEvents used by SampleParticles
enum SampleParticlesInputEventIds
{
SAMPLE_PARTICLES_FIRST = NUM_SAMPLE_BASE_INPUT_EVENT_IDS,
RAYGUN_SHOT ,
CHANGE_PARTICLE_CONTENT ,
NUM_SAMPLE_PARTICLES_INPUT_EVENT_IDS,
};
#endif
```
|
Tell Moutasaalem is a tell (or archaeological settlement mound) in the Khabur River Valley in northern Syria dated by pottery finds to the latter Neolithic era. Middle Paleolithic flint artefacts have been recovered from this site as well. Given that tell sites are not considered to have been occupied in the Middle Paleolithic, it is thought that these artefacts were brought to the site at a later stage, either by humans or natural processes. The site was recorded during an archaeological survey of the Upper Khabur area in 1990-1.
References
Former populated places in Syria
Upper Mesopotamia
Archaeological sites in al-Hasakah Governorate
Tells (archaeology)
Neolithic sites in Syria
|
```go
/*
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package runtime
import (
"fmt"
"reflect"
"strings"
"k8s.io/apimachinery/pkg/conversion"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/naming"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/sets"
)
// Scheme defines methods for serializing and deserializing API objects, a type
// registry for converting group, version, and kind information to and from Go
// schemas, and mappings between Go schemas of different versions. A scheme is the
// foundation for a versioned API and versioned configuration over time.
//
// In a Scheme, a Type is a particular Go struct, a Version is a point-in-time
// identifier for a particular representation of that Type (typically backwards
// compatible), a Kind is the unique name for that Type within the Version, and a
// Group identifies a set of Versions, Kinds, and Types that evolve over time. An
// Unversioned Type is one that is not yet formally bound to a type and is promised
// to be backwards compatible (effectively a "v1" of a Type that does not expect
// to break in the future).
//
// Schemes are not expected to change at runtime and are only threadsafe after
// registration is complete.
type Scheme struct {
// versionMap allows one to figure out the go type of an object with
// the given version and name.
gvkToType map[schema.GroupVersionKind]reflect.Type
// typeToGroupVersion allows one to find metadata for a given go object.
// The reflect.Type we index by should *not* be a pointer.
typeToGVK map[reflect.Type][]schema.GroupVersionKind
// unversionedTypes are transformed without conversion in ConvertToVersion.
unversionedTypes map[reflect.Type]schema.GroupVersionKind
// unversionedKinds are the names of kinds that can be created in the context of any group
// or version
// TODO: resolve the status of unversioned types.
unversionedKinds map[string]reflect.Type
// Map from version and resource to the corresponding func to convert
// resource field labels in that version to internal version.
fieldLabelConversionFuncs map[schema.GroupVersionKind]FieldLabelConversionFunc
// defaulterFuncs is an array of interfaces to be called with an object to provide defaulting
// the provided object must be a pointer.
defaulterFuncs map[reflect.Type]func(interface{})
// converter stores all registered conversion functions. It also has
// default converting behavior.
converter *conversion.Converter
// versionPriority is a map of groups to ordered lists of versions for those groups indicating the
// default priorities of these versions as registered in the scheme
versionPriority map[string][]string
// observedVersions keeps track of the order we've seen versions during type registration
observedVersions []schema.GroupVersion
// schemeName is the name of this scheme. If you don't specify a name, the stack of the NewScheme caller will be used.
// This is useful for error reporting to indicate the origin of the scheme.
schemeName string
}
// FieldLabelConversionFunc converts a field selector to internal representation.
type FieldLabelConversionFunc func(label, value string) (internalLabel, internalValue string, err error)
// NewScheme creates a new Scheme. This scheme is pluggable by default.
func NewScheme() *Scheme {
s := &Scheme{
gvkToType: map[schema.GroupVersionKind]reflect.Type{},
typeToGVK: map[reflect.Type][]schema.GroupVersionKind{},
unversionedTypes: map[reflect.Type]schema.GroupVersionKind{},
unversionedKinds: map[string]reflect.Type{},
fieldLabelConversionFuncs: map[schema.GroupVersionKind]FieldLabelConversionFunc{},
defaulterFuncs: map[reflect.Type]func(interface{}){},
versionPriority: map[string][]string{},
schemeName: naming.GetNameFromCallsite(internalPackages...),
}
s.converter = conversion.NewConverter(s.nameFunc)
// Enable couple default conversions by default.
utilruntime.Must(RegisterEmbeddedConversions(s))
utilruntime.Must(RegisterStringConversions(s))
return s
}
// nameFunc returns the name of the type that we wish to use to determine when two types attempt
// a conversion. Defaults to the go name of the type if the type is not registered.
func (s *Scheme) nameFunc(t reflect.Type) string {
// find the preferred names for this type
gvks, ok := s.typeToGVK[t]
if !ok {
return t.Name()
}
for _, gvk := range gvks {
internalGV := gvk.GroupVersion()
internalGV.Version = APIVersionInternal // this is hacky and maybe should be passed in
internalGVK := internalGV.WithKind(gvk.Kind)
if internalType, exists := s.gvkToType[internalGVK]; exists {
return s.typeToGVK[internalType][0].Kind
}
}
return gvks[0].Kind
}
// fromScope gets the input version, desired output version, and desired Scheme
// from a conversion.Scope.
func (s *Scheme) fromScope(scope conversion.Scope) *Scheme {
return s
}
// Converter allows access to the converter for the scheme
func (s *Scheme) Converter() *conversion.Converter {
return s.converter
}
// AddUnversionedTypes registers the provided types as "unversioned", which means that they follow special rules.
// Whenever an object of this type is serialized, it is serialized with the provided group version and is not
// converted. Thus unversioned objects are expected to remain backwards compatible forever, as if they were in an
// API group and version that would never be updated.
//
// TODO: there is discussion about removing unversioned and replacing it with objects that are manifest into
// every version with particular schemas. Resolve this method at that point.
func (s *Scheme) AddUnversionedTypes(version schema.GroupVersion, types ...Object) {
s.addObservedVersion(version)
s.AddKnownTypes(version, types...)
for _, obj := range types {
t := reflect.TypeOf(obj).Elem()
gvk := version.WithKind(t.Name())
s.unversionedTypes[t] = gvk
if old, ok := s.unversionedKinds[gvk.Kind]; ok && t != old {
panic(fmt.Sprintf("%v.%v has already been registered as unversioned kind %q - kind name must be unique in scheme %q", old.PkgPath(), old.Name(), gvk, s.schemeName))
}
s.unversionedKinds[gvk.Kind] = t
}
}
// AddKnownTypes registers all types passed in 'types' as being members of version 'version'.
// All objects passed to types should be pointers to structs. The name that go reports for
// the struct becomes the "kind" field when encoding. Version may not be empty - use the
// APIVersionInternal constant if you have a type that does not have a formal version.
func (s *Scheme) AddKnownTypes(gv schema.GroupVersion, types ...Object) {
s.addObservedVersion(gv)
for _, obj := range types {
t := reflect.TypeOf(obj)
if t.Kind() != reflect.Ptr {
panic("All types must be pointers to structs.")
}
t = t.Elem()
s.AddKnownTypeWithName(gv.WithKind(t.Name()), obj)
}
}
// AddKnownTypeWithName is like AddKnownTypes, but it lets you specify what this type should
// be encoded as. Useful for testing when you don't want to make multiple packages to define
// your structs. Version may not be empty - use the APIVersionInternal constant if you have a
// type that does not have a formal version.
func (s *Scheme) AddKnownTypeWithName(gvk schema.GroupVersionKind, obj Object) {
s.addObservedVersion(gvk.GroupVersion())
t := reflect.TypeOf(obj)
if len(gvk.Version) == 0 {
panic(fmt.Sprintf("version is required on all types: %s %v", gvk, t))
}
if t.Kind() != reflect.Ptr {
panic("All types must be pointers to structs.")
}
t = t.Elem()
if t.Kind() != reflect.Struct {
panic("All types must be pointers to structs.")
}
if oldT, found := s.gvkToType[gvk]; found && oldT != t {
panic(fmt.Sprintf("Double registration of different types for %v: old=%v.%v, new=%v.%v in scheme %q", gvk, oldT.PkgPath(), oldT.Name(), t.PkgPath(), t.Name(), s.schemeName))
}
s.gvkToType[gvk] = t
for _, existingGvk := range s.typeToGVK[t] {
if existingGvk == gvk {
return
}
}
s.typeToGVK[t] = append(s.typeToGVK[t], gvk)
// if the type implements DeepCopyInto(<obj>), register a self-conversion
if m := reflect.ValueOf(obj).MethodByName("DeepCopyInto"); m.IsValid() && m.Type().NumIn() == 1 && m.Type().NumOut() == 0 && m.Type().In(0) == reflect.TypeOf(obj) {
if err := s.AddGeneratedConversionFunc(obj, obj, func(a, b interface{}, scope conversion.Scope) error {
// copy a to b
reflect.ValueOf(a).MethodByName("DeepCopyInto").Call([]reflect.Value{reflect.ValueOf(b)})
// clear TypeMeta to match legacy reflective conversion
b.(Object).GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{})
return nil
}); err != nil {
panic(err)
}
}
}
// KnownTypes returns the types known for the given version.
func (s *Scheme) KnownTypes(gv schema.GroupVersion) map[string]reflect.Type {
types := make(map[string]reflect.Type)
for gvk, t := range s.gvkToType {
if gv != gvk.GroupVersion() {
continue
}
types[gvk.Kind] = t
}
return types
}
// AllKnownTypes returns the all known types.
func (s *Scheme) AllKnownTypes() map[schema.GroupVersionKind]reflect.Type {
return s.gvkToType
}
// ObjectKinds returns all possible group,version,kind of the go object, true if the
// object is considered unversioned, or an error if it's not a pointer or is unregistered.
func (s *Scheme) ObjectKinds(obj Object) ([]schema.GroupVersionKind, bool, error) {
// Unstructured objects are always considered to have their declared GVK
if _, ok := obj.(Unstructured); ok {
// we require that the GVK be populated in order to recognize the object
gvk := obj.GetObjectKind().GroupVersionKind()
if len(gvk.Kind) == 0 {
return nil, false, NewMissingKindErr("unstructured object has no kind")
}
if len(gvk.Version) == 0 {
return nil, false, NewMissingVersionErr("unstructured object has no version")
}
return []schema.GroupVersionKind{gvk}, false, nil
}
v, err := conversion.EnforcePtr(obj)
if err != nil {
return nil, false, err
}
t := v.Type()
gvks, ok := s.typeToGVK[t]
if !ok {
return nil, false, NewNotRegisteredErrForType(s.schemeName, t)
}
_, unversionedType := s.unversionedTypes[t]
return gvks, unversionedType, nil
}
// Recognizes returns true if the scheme is able to handle the provided group,version,kind
// of an object.
func (s *Scheme) Recognizes(gvk schema.GroupVersionKind) bool {
_, exists := s.gvkToType[gvk]
return exists
}
func (s *Scheme) IsUnversioned(obj Object) (bool, bool) {
v, err := conversion.EnforcePtr(obj)
if err != nil {
return false, false
}
t := v.Type()
if _, ok := s.typeToGVK[t]; !ok {
return false, false
}
_, ok := s.unversionedTypes[t]
return ok, true
}
// New returns a new API object of the given version and name, or an error if it hasn't
// been registered. The version and kind fields must be specified.
func (s *Scheme) New(kind schema.GroupVersionKind) (Object, error) {
if t, exists := s.gvkToType[kind]; exists {
return reflect.New(t).Interface().(Object), nil
}
if t, exists := s.unversionedKinds[kind.Kind]; exists {
return reflect.New(t).Interface().(Object), nil
}
return nil, NewNotRegisteredErrForKind(s.schemeName, kind)
}
// AddIgnoredConversionType identifies a pair of types that should be skipped by
// conversion (because the data inside them is explicitly dropped during
// conversion).
func (s *Scheme) AddIgnoredConversionType(from, to interface{}) error {
return s.converter.RegisterIgnoredConversion(from, to)
}
// AddConversionFunc registers a function that converts between a and b by passing objects of those
// types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce
// any other guarantee.
func (s *Scheme) AddConversionFunc(a, b interface{}, fn conversion.ConversionFunc) error {
return s.converter.RegisterUntypedConversionFunc(a, b, fn)
}
// AddGeneratedConversionFunc registers a function that converts between a and b by passing objects of those
// types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce
// any other guarantee.
func (s *Scheme) AddGeneratedConversionFunc(a, b interface{}, fn conversion.ConversionFunc) error {
return s.converter.RegisterGeneratedUntypedConversionFunc(a, b, fn)
}
// AddFieldLabelConversionFunc adds a conversion function to convert field selectors
// of the given kind from the given version to internal version representation.
func (s *Scheme) AddFieldLabelConversionFunc(gvk schema.GroupVersionKind, conversionFunc FieldLabelConversionFunc) error {
s.fieldLabelConversionFuncs[gvk] = conversionFunc
return nil
}
// AddTypeDefaultingFunc registers a function that is passed a pointer to an
// object and can default fields on the object. These functions will be invoked
// when Default() is called. The function will never be called unless the
// defaulted object matches srcType. If this function is invoked twice with the
// same srcType, the fn passed to the later call will be used instead.
func (s *Scheme) AddTypeDefaultingFunc(srcType Object, fn func(interface{})) {
s.defaulterFuncs[reflect.TypeOf(srcType)] = fn
}
// Default sets defaults on the provided Object.
func (s *Scheme) Default(src Object) {
if fn, ok := s.defaulterFuncs[reflect.TypeOf(src)]; ok {
fn(src)
}
}
// Convert will attempt to convert in into out. Both must be pointers. For easy
// testing of conversion functions. Returns an error if the conversion isn't
// possible. You can call this with types that haven't been registered (for example,
// a to test conversion of types that are nested within registered types). The
// context interface is passed to the convertor. Convert also supports Unstructured
// types and will convert them intelligently.
func (s *Scheme) Convert(in, out interface{}, context interface{}) error {
unstructuredIn, okIn := in.(Unstructured)
unstructuredOut, okOut := out.(Unstructured)
switch {
case okIn && okOut:
// converting unstructured input to an unstructured output is a straight copy - unstructured
// is a "smart holder" and the contents are passed by reference between the two objects
unstructuredOut.SetUnstructuredContent(unstructuredIn.UnstructuredContent())
return nil
case okOut:
// if the output is an unstructured object, use the standard Go type to unstructured
// conversion. The object must not be internal.
obj, ok := in.(Object)
if !ok {
return fmt.Errorf("unable to convert object type %T to Unstructured, must be a runtime.Object", in)
}
gvks, unversioned, err := s.ObjectKinds(obj)
if err != nil {
return err
}
gvk := gvks[0]
// if no conversion is necessary, convert immediately
if unversioned || gvk.Version != APIVersionInternal {
content, err := DefaultUnstructuredConverter.ToUnstructured(in)
if err != nil {
return err
}
unstructuredOut.SetUnstructuredContent(content)
unstructuredOut.GetObjectKind().SetGroupVersionKind(gvk)
return nil
}
// attempt to convert the object to an external version first.
target, ok := context.(GroupVersioner)
if !ok {
return fmt.Errorf("unable to convert the internal object type %T to Unstructured without providing a preferred version to convert to", in)
}
// Convert is implicitly unsafe, so we don't need to perform a safe conversion
versioned, err := s.UnsafeConvertToVersion(obj, target)
if err != nil {
return err
}
content, err := DefaultUnstructuredConverter.ToUnstructured(versioned)
if err != nil {
return err
}
unstructuredOut.SetUnstructuredContent(content)
return nil
case okIn:
// converting an unstructured object to any type is modeled by first converting
// the input to a versioned type, then running standard conversions
typed, err := s.unstructuredToTyped(unstructuredIn)
if err != nil {
return err
}
in = typed
}
meta := s.generateConvertMeta(in)
meta.Context = context
return s.converter.Convert(in, out, meta)
}
// ConvertFieldLabel alters the given field label and value for an kind field selector from
// versioned representation to an unversioned one or returns an error.
func (s *Scheme) ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error) {
conversionFunc, ok := s.fieldLabelConversionFuncs[gvk]
if !ok {
return DefaultMetaV1FieldSelectorConversion(label, value)
}
return conversionFunc(label, value)
}
// ConvertToVersion attempts to convert an input object to its matching Kind in another
// version within this scheme. Will return an error if the provided version does not
// contain the inKind (or a mapping by name defined with AddKnownTypeWithName). Will also
// return an error if the conversion does not result in a valid Object being
// returned. Passes target down to the conversion methods as the Context on the scope.
func (s *Scheme) ConvertToVersion(in Object, target GroupVersioner) (Object, error) {
return s.convertToVersion(true, in, target)
}
// UnsafeConvertToVersion will convert in to the provided target if such a conversion is possible,
// but does not guarantee the output object does not share fields with the input object. It attempts to be as
// efficient as possible when doing conversion.
func (s *Scheme) UnsafeConvertToVersion(in Object, target GroupVersioner) (Object, error) {
return s.convertToVersion(false, in, target)
}
// convertToVersion handles conversion with an optional copy.
func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) (Object, error) {
var t reflect.Type
if u, ok := in.(Unstructured); ok {
typed, err := s.unstructuredToTyped(u)
if err != nil {
return nil, err
}
in = typed
// unstructuredToTyped returns an Object, which must be a pointer to a struct.
t = reflect.TypeOf(in).Elem()
} else {
// determine the incoming kinds with as few allocations as possible.
t = reflect.TypeOf(in)
if t.Kind() != reflect.Ptr {
return nil, fmt.Errorf("only pointer types may be converted: %v", t)
}
t = t.Elem()
if t.Kind() != reflect.Struct {
return nil, fmt.Errorf("only pointers to struct types may be converted: %v", t)
}
}
kinds, ok := s.typeToGVK[t]
if !ok || len(kinds) == 0 {
return nil, NewNotRegisteredErrForType(s.schemeName, t)
}
gvk, ok := target.KindForGroupVersionKinds(kinds)
if !ok {
// try to see if this type is listed as unversioned (for legacy support)
// TODO: when we move to server API versions, we should completely remove the unversioned concept
if unversionedKind, ok := s.unversionedTypes[t]; ok {
if gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{unversionedKind}); ok {
return copyAndSetTargetKind(copy, in, gvk)
}
return copyAndSetTargetKind(copy, in, unversionedKind)
}
return nil, NewNotRegisteredErrForTarget(s.schemeName, t, target)
}
// target wants to use the existing type, set kind and return (no conversion necessary)
for _, kind := range kinds {
if gvk == kind {
return copyAndSetTargetKind(copy, in, gvk)
}
}
// type is unversioned, no conversion necessary
if unversionedKind, ok := s.unversionedTypes[t]; ok {
if gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{unversionedKind}); ok {
return copyAndSetTargetKind(copy, in, gvk)
}
return copyAndSetTargetKind(copy, in, unversionedKind)
}
out, err := s.New(gvk)
if err != nil {
return nil, err
}
if copy {
in = in.DeepCopyObject()
}
meta := s.generateConvertMeta(in)
meta.Context = target
if err := s.converter.Convert(in, out, meta); err != nil {
return nil, err
}
setTargetKind(out, gvk)
return out, nil
}
// unstructuredToTyped attempts to transform an unstructured object to a typed
// object if possible. It will return an error if conversion is not possible, or the versioned
// Go form of the object. Note that this conversion will lose fields.
func (s *Scheme) unstructuredToTyped(in Unstructured) (Object, error) {
// the type must be something we recognize
gvks, _, err := s.ObjectKinds(in)
if err != nil {
return nil, err
}
typed, err := s.New(gvks[0])
if err != nil {
return nil, err
}
if err := DefaultUnstructuredConverter.FromUnstructured(in.UnstructuredContent(), typed); err != nil {
return nil, fmt.Errorf("unable to convert unstructured object to %v: %v", gvks[0], err)
}
return typed, nil
}
// generateConvertMeta constructs the meta value we pass to Convert.
func (s *Scheme) generateConvertMeta(in interface{}) *conversion.Meta {
return s.converter.DefaultMeta(reflect.TypeOf(in))
}
// copyAndSetTargetKind performs a conditional copy before returning the object, or an error if copy was not successful.
func copyAndSetTargetKind(copy bool, obj Object, kind schema.GroupVersionKind) (Object, error) {
if copy {
obj = obj.DeepCopyObject()
}
setTargetKind(obj, kind)
return obj, nil
}
// setTargetKind sets the kind on an object, taking into account whether the target kind is the internal version.
func setTargetKind(obj Object, kind schema.GroupVersionKind) {
if kind.Version == APIVersionInternal {
// internal is a special case
// TODO: look at removing the need to special case this
obj.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{})
return
}
obj.GetObjectKind().SetGroupVersionKind(kind)
}
// SetVersionPriority allows specifying a precise order of priority. All specified versions must be in the same group,
// and the specified order overwrites any previously specified order for this group
func (s *Scheme) SetVersionPriority(versions ...schema.GroupVersion) error {
groups := sets.String{}
order := []string{}
for _, version := range versions {
if len(version.Version) == 0 || version.Version == APIVersionInternal {
return fmt.Errorf("internal versions cannot be prioritized: %v", version)
}
groups.Insert(version.Group)
order = append(order, version.Version)
}
if len(groups) != 1 {
return fmt.Errorf("must register versions for exactly one group: %v", strings.Join(groups.List(), ", "))
}
s.versionPriority[groups.List()[0]] = order
return nil
}
// PrioritizedVersionsForGroup returns versions for a single group in priority order
func (s *Scheme) PrioritizedVersionsForGroup(group string) []schema.GroupVersion {
ret := []schema.GroupVersion{}
for _, version := range s.versionPriority[group] {
ret = append(ret, schema.GroupVersion{Group: group, Version: version})
}
for _, observedVersion := range s.observedVersions {
if observedVersion.Group != group {
continue
}
found := false
for _, existing := range ret {
if existing == observedVersion {
found = true
break
}
}
if !found {
ret = append(ret, observedVersion)
}
}
return ret
}
// PrioritizedVersionsAllGroups returns all known versions in their priority order. Groups are random, but
// versions for a single group are prioritized
func (s *Scheme) PrioritizedVersionsAllGroups() []schema.GroupVersion {
ret := []schema.GroupVersion{}
for group, versions := range s.versionPriority {
for _, version := range versions {
ret = append(ret, schema.GroupVersion{Group: group, Version: version})
}
}
for _, observedVersion := range s.observedVersions {
found := false
for _, existing := range ret {
if existing == observedVersion {
found = true
break
}
}
if !found {
ret = append(ret, observedVersion)
}
}
return ret
}
// PreferredVersionAllGroups returns the most preferred version for every group.
// group ordering is random.
func (s *Scheme) PreferredVersionAllGroups() []schema.GroupVersion {
ret := []schema.GroupVersion{}
for group, versions := range s.versionPriority {
for _, version := range versions {
ret = append(ret, schema.GroupVersion{Group: group, Version: version})
break
}
}
for _, observedVersion := range s.observedVersions {
found := false
for _, existing := range ret {
if existing.Group == observedVersion.Group {
found = true
break
}
}
if !found {
ret = append(ret, observedVersion)
}
}
return ret
}
// IsGroupRegistered returns true if types for the group have been registered with the scheme
func (s *Scheme) IsGroupRegistered(group string) bool {
for _, observedVersion := range s.observedVersions {
if observedVersion.Group == group {
return true
}
}
return false
}
// IsVersionRegistered returns true if types for the version have been registered with the scheme
func (s *Scheme) IsVersionRegistered(version schema.GroupVersion) bool {
for _, observedVersion := range s.observedVersions {
if observedVersion == version {
return true
}
}
return false
}
func (s *Scheme) addObservedVersion(version schema.GroupVersion) {
if len(version.Version) == 0 || version.Version == APIVersionInternal {
return
}
for _, observedVersion := range s.observedVersions {
if observedVersion == version {
return
}
}
s.observedVersions = append(s.observedVersions, version)
}
func (s *Scheme) Name() string {
return s.schemeName
}
// internalPackages are packages that ignored when creating a default reflector name. These packages are in the common
// call chains to NewReflector, so they'd be low entropy names for reflectors
var internalPackages = []string{"k8s.io/apimachinery/pkg/runtime/scheme.go"}
```
|
Leopoldo García-Colín Scherer (27 November 1930, in Mexico City – 8 October 2012, in Mexico City) was a Mexican scientist specialized in Thermodynamics and Statistical Mechanics who received the National Prize for Arts and Sciences in 1988.
He was a member of The National College, a former president of the Mexican Society of Physics (SMF, 1972–1973) and has received honorary degrees from several universities, including the National Autonomous University of Mexico (UNAM) and the Metropolitan Autonomous University (UAM).
Career
He obtained a Chemistry degree at Universidad Nacional Autónoma de México (UNAM) in 1953. The Ph.D. in Physics at the University of Maryland in 1959. He was professor at Benemérita Universidad Autónoma de Puebla from 1960 to 1963, and at Facultad de Ciencias in UNAM from 1967 to 1984. Later, he participated in research at the Centro Nuclear de Salazar, a Nuclear center in Mexico; assistant director of Basic Investigation of Processes at Instituto Mexicano del Petróleo from 1967 to 1974, professor at Instituto de Investigaciones de Materiales in UNAM during the period from 1984 to 1988. At the end of his career he had a tenure position at Universidad Autónoma Metropolitana at Iztapalapa. He was elected to El Colegio Nacional in September 12, 1977. He was member of the Sistema Nacional de Investigadores with the highest level, III, since 1988. He received a honoris causa Ph. D from the National University of Mexico in April, 2007.
References
External links
Biography at The National College
2012 deaths
Scientists from Mexico City
Members of El Colegio Nacional (Mexico)
20th-century Mexican physicists
National Autonomous University of Mexico alumni
University of Maryland, College Park alumni
Academic staff of the Meritorious Autonomous University of Puebla
Academic staff of the National Autonomous University of Mexico
Academic staff of Universidad Autónoma Metropolitana
1930 births
TWAS fellows
|
Tienocerasis an orthoceratoid genus from the Permian of China (Hunan). Orthoceratoids are slender conical or near cylindrical, orthoconic, nautiloid cephalopods from the Paleozoic. Nautiloids, which include a number of different extinct orders, were far more diverse and numerous in the past, but are represented today by only two closely related genera.
Teinoceras is represented by a smooth orthocone that enlarges slightly with growth and that has a lenticular (i.e. "lens-shaped") cross section. The middle of the dorsum and venter (top and bottom) are flattened or depressed and the dorsolateral and ventrolateral areas have longitudinal depressions. Sutures, formed where septa join the outer wall, have mid-dorsal, mid-ventral, and sharp lateral lobes separated by narrow ventrolateral and dorsolateral saddles. The siphuncle, which is small, runs through the middle.
The exact relationship of Tienoceras within the orthoceratoids is unknown.
References
Sweet, W.C. 1964; Nautiloidea—Orthocerida, in the Treatise on Invertebrate Paleontology, Part K Nautiloidea; Geological Society of America and University of Kansas press
Sepkoski, J.J. Jr. 2002. A compendium of fossil marine animal genera. Bulletins of American Paleontology 363: 1–560.
Nautiloids
|
```javascript
Use hosted scripts to increase performance
Modify a website's URL
Warn user if **Back** button is pressed
Window.sessionStorage
Drag and Drop API
```
|
Robin Sebastian is a British actor, best known for his portrayals of Kenneth Williams. A native of London, he has played Williams in recreations of Round the Horne and Hancock's Half Hour on stage, screen and radio.
Personal life
Raised in Headley, Surrey, Sebastian was educated at Highfield Prep School in Liphook, the King's School, Canterbury, Manchester University (reading History of Art) and the Arts Educational Schools Acting Company. He lives with his wife Lucy in West London.
Theatre credits
as Kenneth Williams in The Missing Hancocks, Assembly Rooms Edinburgh
as Willy Bambury in Fallen Angels, UK tour
as Robin Craigie in Volcano, Vaudeville Theatre London and UK tour
as Kenneth Williams in Stop Messing About, Leicester Square Theatre London and UK tour
as Kenneth Williams in Round The Horne - Unseen and Uncut, Theatre Royal Brighton and UK tour
as Lt Gruber in 'Allo 'Allo, UK tour
as Carmen Ghia in The Producers, UK tour and West End
as Cardinal Richelieu in The Three Musketeers, Bristol Old Vic
as Willy Bambury in Fallen Angels, Vienna's English Theatre
as Kenneth Williams in Round the Horne ... Revisited, West End and UK tour
as Cecil Graham in Lady Windermere's Fan, Vienna's English Theatre
as Algernon in The Importance of Being Earnest, Torch Theatre Milford Haven
Radio credits
as Kenneth Williams in The Missing Hancocks, Radio 4
as Kenneth Williams in Twice Ken is Plenty, Radio 4
TV credits
as Kenneth Williams in The Lost Sitcoms: Hancock's Half Hour, BBC4
as James Ferman in Holy Flying Circus, Hillbilly Productions, BBC4
as jewellery clerk in Catastrophe, Avalon Productions, Channel 4
as arrogant husband in Sherlock Series 2, Hartswood, BBC1
as Kenneth Williams in Round the Horne ... Revisited, FictionLab, BBC4
as Narrator in Yours Faithfully Edna Welthorpe (Mrs) Polkadot Productions, University Of Leicester
External links
References
Living people
English male film actors
English male stage actors
English male television actors
Male actors from London
1965 births
People from Mole Valley (district)
|
Shensiplusia was a genus of moths of the family Noctuidae. The species in the genus have been transferred to Chrysodeixis.
References
Natural History Museum Lepidoptera genus database
Chrysodeixis at funet, listing Shensiplusia as a synonym
Plusiinae
|
```c++
//
// NetException.cpp
//
// Library: Net
// Package: NetCore
// Module: NetException
//
// and Contributors.
//
//
#include "Poco/Net/NetException.h"
#include <typeinfo>
using Poco::IOException;
namespace Poco {
namespace Net {
POCO_IMPLEMENT_EXCEPTION(NetException, IOException, "Net Exception")
POCO_IMPLEMENT_EXCEPTION(InvalidAddressException, NetException, "Invalid address")
POCO_IMPLEMENT_EXCEPTION(InvalidSocketException, NetException, "Invalid socket")
POCO_IMPLEMENT_EXCEPTION(ServiceNotFoundException, NetException, "Service not found")
POCO_IMPLEMENT_EXCEPTION(ConnectionAbortedException, NetException, "Software caused connection abort")
POCO_IMPLEMENT_EXCEPTION(ConnectionResetException, NetException, "Connection reset by peer")
POCO_IMPLEMENT_EXCEPTION(ConnectionRefusedException, NetException, "Connection refused")
POCO_IMPLEMENT_EXCEPTION(DNSException, NetException, "DNS error")
POCO_IMPLEMENT_EXCEPTION(HostNotFoundException, DNSException, "Host not found")
POCO_IMPLEMENT_EXCEPTION(NoAddressFoundException, DNSException, "No address found")
POCO_IMPLEMENT_EXCEPTION(InterfaceNotFoundException, NetException, "Interface not found")
POCO_IMPLEMENT_EXCEPTION(NoMessageException, NetException, "No message received")
POCO_IMPLEMENT_EXCEPTION(MessageException, NetException, "Malformed message")
POCO_IMPLEMENT_EXCEPTION(MultipartException, MessageException, "Malformed multipart message")
POCO_IMPLEMENT_EXCEPTION(HTTPException, NetException, "HTTP Exception")
POCO_IMPLEMENT_EXCEPTION(NotAuthenticatedException, HTTPException, "No authentication information found")
POCO_IMPLEMENT_EXCEPTION(UnsupportedRedirectException, HTTPException, "Unsupported HTTP redirect (protocol change)")
POCO_IMPLEMENT_EXCEPTION(FTPException, NetException, "FTP Exception")
POCO_IMPLEMENT_EXCEPTION(SMTPException, NetException, "SMTP Exception")
POCO_IMPLEMENT_EXCEPTION(POP3Exception, NetException, "POP3 Exception")
POCO_IMPLEMENT_EXCEPTION(ICMPException, NetException, "ICMP Exception")
POCO_IMPLEMENT_EXCEPTION(NTPException, NetException, "NTP Exception")
POCO_IMPLEMENT_EXCEPTION(HTMLFormException, NetException, "HTML Form Exception")
POCO_IMPLEMENT_EXCEPTION(WebSocketException, NetException, "WebSocket Exception")
POCO_IMPLEMENT_EXCEPTION(UnsupportedFamilyException, NetException, "Unknown or unsupported socket family")
POCO_IMPLEMENT_EXCEPTION(AddressFamilyMismatchException, NetException, "Address family mismatch")
} } // namespace Poco::Net
```
|
```c++
/*
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "ProguardLineRange.h"
#include <utility>
ProguardLineRange::ProguardLineRange(
uint32_t s, uint32_t e, uint32_t os, uint32_t oe, std::string ogn)
: start(s),
end(e),
original_start(os),
original_end(oe),
original_name(std::move(ogn)) {}
bool ProguardLineRange::operator==(const ProguardLineRange& other) const {
return this->start == other.start && this->end == other.end &&
this->original_start == other.original_start &&
this->original_end == other.original_end &&
this->original_name == other.original_name;
}
bool ProguardLineRange::remaps_to_range() const {
return original_start != 0 && original_end != 0;
}
bool ProguardLineRange::remaps_to_single_line() const {
return original_start != 0 && original_end == 0;
}
bool ProguardLineRange::matches(uint32_t line) const {
return start <= line && end >= line;
}
```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.