text:
static const int __STDC__ = 1;
static const int __STDC_HOSTED__ = 1;
static const int __GNUC__ = 4;
static const int __GNUC_MINOR__ = 7;
static const int __GNUC_PATCHLEVEL__ = 2;
static const char __VERSION__ = "4.7.2";
static const int __ATOMIC_RELAXED = 0;
static const int __ATOMIC_SEQ_CST = 5;
static const int __ATOMIC_ACQUIRE = 2;
static const int __ATOMIC_RELEASE = 3;
static const int __ATOMIC_ACQ_REL = 4;
static const int __ATOMIC_CONSUME = 1;
static const int __FINITE_MATH_ONLY__ = 0;
static const int __SIZEOF_INT__ = 4;
static const int __SIZEOF_LONG__ = 4;
static const int __SIZEOF_LONG_LONG__ = 8;
static const int __SIZEOF_SHORT__ = 2;
static const int __SIZEOF_FLOAT__ = 4;
static const int __SIZEOF_DOUBLE__ = 8;
static const int __SIZEOF_LONG_DOUBLE__ = 12;
static const int __SIZEOF_SIZE_T__ = 4;
static const int __CHAR_BIT__ = 8;
static const int __BIGGEST_ALIGNMENT__ = 16;
static const int __ORDER_LITTLE_ENDIAN__ = 1234;
static const int __ORDER_BIG_ENDIAN__ = 4321;
static const int __ORDER_PDP_ENDIAN__ = 3412;
static const int __BYTE_ORDER__ = __ORDER_LITTLE_ENDIAN__;
static const int __FLOAT_WORD_ORDER__ = __ORDER_LITTLE_ENDIAN__;
static const int __SIZEOF_POINTER__ = 4;
static const int __SIZE_TYPE__ = unsigned int;
static const int __PTRDIFF_TYPE__ = int;
static const int __WCHAR_TYPE__ = int;
static const int __WINT_TYPE__ = unsigned int;
static const int __INTMAX_TYPE__ = long long int;
static const int __UINTMAX_TYPE__ = long long unsigned int;
static const int __CHAR16_TYPE__ = short unsigned int;
static const int __CHAR32_TYPE__ = unsigned int;
static const int __SIG_ATOMIC_TYPE__ = int;
static const int __INT8_TYPE__ = signed char;
static const int __INT16_TYPE__ = short int;
static const int __INT32_TYPE__ = int;
static const int __INT64_TYPE__ = long long int;
static const int __UINT8_TYPE__ = unsigned char;
static const int __UINT16_TYPE__ = short unsigned int;
static const int __UINT32_TYPE__ = unsigned int;
static const int __UINT64_TYPE__ = long long unsigned int;
static const int __INT_LEAST8_TYPE__ = signed char;
static const int __INT_LEAST16_TYPE__ = short int;
static const int __INT_LEAST32_TYPE__ = int;
static const int __INT_LEAST64_TYPE__ = long long int;
static const int __UINT_LEAST8_TYPE__ = unsigned char;
static const int __UINT_LEAST16_TYPE__ = short unsigned int;
static const int __UINT_LEAST32_TYPE__ = unsigned int;
static const int __UINT_LEAST64_TYPE__ = long long unsigned int;
static const int __INT_FAST8_TYPE__ = signed char;
static const int __INT_FAST16_TYPE__ = int;
static const int __INT_FAST32_TYPE__ = int;
static const int __INT_FAST64_TYPE__ = long long int;
static const int __UINT_FAST8_TYPE__ = unsigned char;
static const int __UINT_FAST16_TYPE__ = unsigned int;
static const int __UINT_FAST32_TYPE__ = unsigned int;
static const int __UINT_FAST64_TYPE__ = long long unsigned int;
static const int __INTPTR_TYPE__ = int;
static const int __UINTPTR_TYPE__ = unsigned int;
static const int __GXX_ABI_VERSION = 1002;
static const int __SCHAR_MAX__ = 127;
static const int __SHRT_MAX__ = 32767;
static const int __INT_MAX__ = 2147483647;
static const long __LONG_MAX__ = 2147483647L;
static const long long __LONG_LONG_MAX__ = 9223372036854775807LL;
static const int __WCHAR_MAX__ = 2147483647;
static const int __WCHAR_MIN__ = (-__WCHAR_MAX__ - 1);
static const int __WINT_MAX__ = 4294967295U;
static const int __WINT_MIN__ = 0U;
static const int __PTRDIFF_MAX__ = 2147483647;
static const int __SIZE_MAX__ = 4294967295U;
static const long long __INTMAX_MAX__ = 9223372036854775807LL;
static const int __INTMAX_C(c) = c ## LL;
static const int __UINTMAX_MAX__ = 18446744073709551615ULL;
static const int __UINTMAX_C(c) = c ## ULL;
static const int __SIG_ATOMIC_MAX__ = 2147483647;
static const int __SIG_ATOMIC_MIN__ = (-__SIG_ATOMIC_MAX__ - 1);
static const int __INT8_MAX__ = 127;
static const int __INT16_MAX__ = 32767;
static const int __INT32_MAX__ = 2147483647;
static const long long __INT64_MAX__ = 9223372036854775807LL;
static const int __UINT8_MAX__ = 255;
static const int __UINT16_MAX__ = 65535;
static const int __UINT32_MAX__ = 4294967295U;
static const int __UINT64_MAX__ = 18446744073709551615ULL;
static const int __INT_LEAST8_MAX__ = 127;
static const int __INT8_C(c) = c;
static const int __INT_LEAST16_MAX__ = 32767;
static const int __INT16_C(c) = c;
static const int __INT_LEAST32_MAX__ = 2147483647;
static const int __INT32_C(c) = c;
static const long long __INT_LEAST64_MAX__ = 9223372036854775807LL;
static const int __INT64_C(c) = c ## LL;
static const int __UINT_LEAST8_MAX__ = 255;
static const int __UINT8_C(c) = c;
static const int __UINT_LEAST16_MAX__ = 65535;
static const int __UINT16_C(c) = c;
static const int __UINT_LEAST32_MAX__ = 4294967295U;
static const int __UINT32_C(c) = c ## U;
static const int __UINT_LEAST64_MAX__ = 18446744073709551615ULL;
static const int __UINT64_C(c) = c ## ULL;
static const int __INT_FAST8_MAX__ = 127;
static const int __INT_FAST16_MAX__ = 2147483647;
static const int __INT_FAST32_MAX__ = 2147483647;
static const long long __INT_FAST64_MAX__ = 9223372036854775807LL;
static const int __UINT_FAST8_MAX__ = 255;
static const int __UINT_FAST16_MAX__ = 4294967295U;
static const int __UINT_FAST32_MAX__ = 4294967295U;
static const int __UINT_FAST64_MAX__ = 18446744073709551615ULL;
static const int __INTPTR_MAX__ = 2147483647;
static const int __UINTPTR_MAX__ = 4294967295U;
static const int __FLT_EVAL_METHOD__ = 2;
static const int __DEC_EVAL_METHOD__ = 2;
static const int __FLT_RADIX__ = 2;
static const int __FLT_MANT_DIG__ = 24;
static const int __FLT_DIG__ = 6;
static const int __FLT_MIN_EXP__ = (-125);
static const int __FLT_MIN_10_EXP__ = (-37);
static const int __FLT_MAX_EXP__ = 128;
static const int __FLT_MAX_10_EXP__ = 38;
static const int __FLT_DECIMAL_DIG__ = 9;
static const double __FLT_MAX__ = 3.40282346638528859812e+38F;
static const double __FLT_MIN__ = 1.17549435082228750797e-38F;
static const double __FLT_EPSILON__ = 1.19209289550781250000e-7F;
static const double __FLT_DENORM_MIN__ = 1.40129846432481707092e-45F;
static const int __FLT_HAS_DENORM__ = 1;
static const int __FLT_HAS_INFINITY__ = 1;
static const int __FLT_HAS_QUIET_NAN__ = 1;
static const int __DBL_MANT_DIG__ = 53;
static const int __DBL_DIG__ = 15;
static const int __DBL_MIN_EXP__ = (-1021);
static const int __DBL_MIN_10_EXP__ = (-307);
static const int __DBL_MAX_EXP__ = 1024;
static const int __DBL_MAX_10_EXP__ = 308;
static const int __DBL_DECIMAL_DIG__ = 17;
static const double __DBL_MAX__ = ((double)1.79769313486231570815e+308L);
static const double __DBL_MIN__ = ((double)2.22507385850720138309e-308L);
static const double __DBL_EPSILON__ = ((double)2.22044604925031308085e-16L);
static const double __DBL_DENORM_MIN__ = ((double)4.94065645841246544177e-324L);
static const int __DBL_HAS_DENORM__ = 1;
static const int __DBL_HAS_INFINITY__ = 1;
static const int __DBL_HAS_QUIET_NAN__ = 1;
static const int __LDBL_MANT_DIG__ = 64;
static const int __LDBL_DIG__ = 18;
static const int __LDBL_MIN_EXP__ = (-16381);
static const int __LDBL_MIN_10_EXP__ = (-4931);
static const int __LDBL_MAX_EXP__ = 16384;
static const int __LDBL_MAX_10_EXP__ = 4932;
static const int __DECIMAL_DIG__ = 21;
static const long __LDBL_MAX__ = 1.18973149535723176502e+4932L;
static const long __LDBL_MIN__ = 3.36210314311209350626e-4932L;
static const long __LDBL_EPSILON__ = 1.08420217248550443401e-19L;
static const long __LDBL_DENORM_MIN__ = 3.64519953188247460253e-4951L;
static const int __LDBL_HAS_DENORM__ = 1;
static const int __LDBL_HAS_INFINITY__ = 1;
static const int __LDBL_HAS_QUIET_NAN__ = 1;
static const int __DEC32_MANT_DIG__ = 7;
static const int __DEC32_MIN_EXP__ = (-94);
static const int __DEC32_MAX_EXP__ = 97;
static const double __DEC32_MIN__ = 1E-95DF;
static const double __DEC32_MAX__ = 9.999999E96DF;
static const double __DEC32_EPSILON__ = 1E-6DF;
static const double __DEC32_SUBNORMAL_MIN__ = 0.000001E-95DF;
static const int __DEC64_MANT_DIG__ = 16;
static const int __DEC64_MIN_EXP__ = (-382);
static const int __DEC64_MAX_EXP__ = 385;
static const double __DEC64_MIN__ = 1E-383DD;
static const double __DEC64_MAX__ = 9.999999999999999E384DD;
static const double __DEC64_EPSILON__ = 1E-15DD;
static const double __DEC64_SUBNORMAL_MIN__ = 0.000000000000001E-383DD;
static const int __DEC128_MANT_DIG__ = 34;
static const int __DEC128_MIN_EXP__ = (-6142);
static const int __DEC128_MAX_EXP__ = 6145;
static const long double __DEC128_MIN__ = 1E-6143DL;
static const long double __DEC128_MAX__ = 9.999999999999999999999999999999999E6144DL;
static const long double __DEC128_EPSILON__ = 1E-33DL;
static const long double __DEC128_SUBNORMAL_MIN__ = 0.000000000000000000000000000000001E-6143DL;
static const int _FORTIFY_SOURCE = 2;
static const int __GNUC_GNU_INLINE__ = 1;
static const int __NO_INLINE__ = 1;
static const int __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1;
static const int __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1;
static const int __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1;
static const int __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1;
static const int __GCC_ATOMIC_BOOL_LOCK_FREE = 2;
static const int __GCC_ATOMIC_CHAR_LOCK_FREE = 2;
static const int __GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2;
static const int __GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2;
static const int __GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2;
static const int __GCC_ATOMIC_SHORT_LOCK_FREE = 2;
static const int __GCC_ATOMIC_INT_LOCK_FREE = 2;
static const int __GCC_ATOMIC_LONG_LOCK_FREE = 2;
static const int __GCC_ATOMIC_LLONG_LOCK_FREE = 2;
static const int __GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1;
static const int __GCC_ATOMIC_POINTER_LOCK_FREE = 2;
static const int __GCC_HAVE_DWARF2_CFI_ASM = 1;
static const int __PRAGMA_REDEFINE_EXTNAME = 1;
static const int __SSP__ = 1;
static const int __SIZEOF_WCHAR_T__ = 4;
static const int __SIZEOF_WINT_T__ = 4;
static const int __SIZEOF_PTRDIFF_T__ = 4;
static const int __i386 = 1;
static const int __i386__ = 1;
static const int i386 = 1;
static const int __i686 = 1;
static const int __i686__ = 1;
static const int __pentiumpro = 1;
static const int __pentiumpro__ = 1;
static const int __gnu_linux__ = 1;
static const int __linux = 1;
static const int __linux__ = 1;
static const int linux = 1;
static const int __unix = 1;
static const int __unix__ = 1;
static const int unix = 1;
static const int __ELF__ = 1;
static const int __DECIMAL_BID_FORMAT__ = 1;
static const int _FEATURES_H = 1;
static const int __USE_ANSI = 1;
static const int __GNUC_PREREQ(maj,min) = ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min));
static const int _BSD_SOURCE = 1;
static const int _SVID_SOURCE = 1;
static const int _POSIX_SOURCE = 1;
static const long _POSIX_C_SOURCE = 200809L;
static const int __USE_POSIX_IMPLICITLY = 1;
static const int __USE_POSIX = 1;
static const int __USE_POSIX2 = 1;
static const int __USE_POSIX199309 = 1;
static const int __USE_POSIX199506 = 1;
static const int __USE_XOPEN2K = 1;
static const int __USE_ISOC95 = 1;
static const int __USE_ISOC99 = 1;
static const int __USE_XOPEN2K8 = 1;
static const int _ATFILE_SOURCE = 1;
static const int __USE_MISC = 1;
static const int __USE_BSD = 1;
static const int __USE_SVID = 1;
static const int __USE_ATFILE = 1;
static const int __USE_FORTIFY_LEVEL = 0;
static const int __STDC_IEC_559__ = 1;
static const int __STDC_IEC_559_COMPLEX__ = 1;
static const long __STDC_ISO_10646__ = 200009L;
static const int __GNU_LIBRARY__ = 6;
static const int __GLIBC__ = 2;
static const int __GLIBC_MINOR__ = 15;
static const int __GLIBC_PREREQ(maj,min) = ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min));
static const int __GLIBC_HAVE_LONG_LONG = 1;
static const int _SYS_CDEFS_H = 1;
static const int __LEAF = , __leaf__;
static const int __LEAF_ATTR = __attribute__ ((__leaf__));
static const int __THROW = __attribute__ ((__nothrow__ __LEAF));
static const int __THROWNL = __attribute__ ((__nothrow__));
static const int __NTH(fct) = __attribute__ ((__nothrow__ __LEAF)) fct;
static const int __P(args) = args;
static const int __PMT(args) = args;
static const int __CONCAT(x,y) = x ## y;
static const int __STRING(x) = #x;
static const int __ptr_t = void *;
static const int __long_double_t = long double;
static const int __bos(ptr) = __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1);
static const int __bos0(ptr) = __builtin_object_size (ptr, 0);
static const int __warndecl(name,msg) = extern void name (void) __attribute__((__warning__ (msg)));
static const int __warnattr(msg) = __attribute__((__warning__ (msg)));
static const int __errordecl(name,msg) = extern void name (void) __attribute__((__error__ (msg)));
static const int __flexarr = [];
static const int __REDIRECT(name,proto,alias) = name proto __asm__ (__ASMNAME (#alias));
static const int __REDIRECT_NTH(name,proto,alias) = name proto __asm__ (__ASMNAME (#alias)) __THROW;
static const int __REDIRECT_NTHNL(name,proto,alias) = name proto __asm__ (__ASMNAME (#alias)) __THROWNL;
static const int __ASMNAME(cname) = __ASMNAME2 (__USER_LABEL_PREFIX__, cname);
static const int __ASMNAME2(prefix,cname) = __STRING (prefix) cname;
static const int __attribute_malloc__ = __attribute__ ((__malloc__));
static const int __attribute_pure__ = __attribute__ ((__pure__));
static const int __attribute_const__ = __attribute__ ((__const__));
static const int __attribute_used__ = __attribute__ ((__used__));
static const int __attribute_noinline__ = __attribute__ ((__noinline__));
static const int __attribute_deprecated__ = __attribute__ ((__deprecated__));
static const int __attribute_format_arg__(x) = __attribute__ ((__format_arg__ (x)));
static const int __attribute_format_strfmon__(a,b) = __attribute__ ((__format__ (__strfmon__, a, b)));
static const int __nonnull(params) = __attribute__ ((__nonnull__ params));
static const int __attribute_warn_unused_result__ = __attribute__ ((__warn_unused_result__));
static const int __always_inline = __inline __attribute__ ((__always_inline__));
static const int __extern_inline = extern __inline;
static const int __extern_always_inline = extern __always_inline __attribute__ ((__artificial__));
static const int __va_arg_pack() = __builtin_va_arg_pack ();
static const int __va_arg_pack_len() = __builtin_va_arg_pack_len ();
static const int __restrict_arr = __restrict;
static const int __WORDSIZE = 32;
static const int __LDBL_REDIR1(name,proto,alias) = name proto;
static const int __LDBL_REDIR(name,proto) = name proto;
static const int __LDBL_REDIR1_NTH(name,proto,alias) = name proto __THROW;
static const int __LDBL_REDIR_NTH(name,proto) = name proto __THROW;
static const int __REDIRECT_LDBL(name,proto,alias) = __REDIRECT (name, proto, alias);
static const int __REDIRECT_NTH_LDBL(name,proto,alias) = __REDIRECT_NTH (name, proto, alias);
static const int __WORDSIZE = 32;
typedef unsigned int size_t;
typedef int wchar_t;
static const int NULL = ((void *)0);
static const int _STDLIB_H = 1;
static const int WNOHANG = 1;
static const int WUNTRACED = 2;
static const int WSTOPPED = 2;
static const int WEXITED = 4;
static const int WCONTINUED = 8;
static const int WNOWAIT = 0x01000000;
static const int __WNOTHREAD = 0x20000000;
static const int __WALL = 0x40000000;
static const int __WCLONE = 0x80000000;
static const int __WEXITSTATUS(status) = (((status) & 0xff00) >> 8);
static const int __WTERMSIG(status) = ((status) & 0x7f);
static const int __WSTOPSIG(status) = __WEXITSTATUS(status);
static const int __WIFEXITED(status) = (__WTERMSIG(status) == 0);
static const int __WIFSIGNALED(status) = (((signed char) (((status) & 0x7f) + 1) >> 1) > 0);
static const int __WIFSTOPPED(status) = (((status) & 0xff) == 0x7f);
static const int __WIFCONTINUED(status) = ((status) == __W_CONTINUED);
static const int __WCOREDUMP(status) = ((status) & __WCOREFLAG);
static const int __W_EXITCODE(ret,sig) = ((ret) << 8 | (sig));
static const int __W_STOPCODE(sig) = ((sig) << 8 | 0x7f);
static const int __W_CONTINUED = 0xffff;
static const int __WCOREFLAG = 0x80;
static const int _ENDIAN_H = 1;
static const int __LITTLE_ENDIAN = 1234;
static const int __BIG_ENDIAN = 4321;
static const int __PDP_ENDIAN = 3412;
static const int __BYTE_ORDER = __LITTLE_ENDIAN;
static const int __FLOAT_WORD_ORDER = __BYTE_ORDER;
static const int LITTLE_ENDIAN = __LITTLE_ENDIAN;
static const int BIG_ENDIAN = __BIG_ENDIAN;
static const int PDP_ENDIAN = __PDP_ENDIAN;
static const int BYTE_ORDER = __BYTE_ORDER;
static const int __LONG_LONG_PAIR(HI,LO) = LO, HI;
static const int _BITS_BYTESWAP_H = 1;
static const int __bswap_constant_16(x) = ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)));
static const int __bswap_16(x) = (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) (x); if (__builtin_constant_p (__x)) __v = __bswap_constant_16 (__x); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }));
static const int __bswap_constant_32(x) = ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24));
static const int __bswap_32(x) = (__extension__ ({ register unsigned int __v, __x = (x); if (__builtin_constant_p (__x)) __v = __bswap_constant_32 (__x); else __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); __v; }));
static const int __bswap_constant_64(x) = (__extension__ ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56)));
static const int __bswap_64(x) = (__extension__ ({ union { __extension__ unsigned long long int __ll; unsigned long int __l[2]; } __w, __r; if (__builtin_constant_p (x)) __r.__ll = __bswap_constant_64 (x); else { __w.__ll = (x); __r.__l[0] = __bswap_32 (__w.__l[1]); __r.__l[1] = __bswap_32 (__w.__l[0]); } __r.__ll; }));
static const int htobe16(x) = __bswap_16 (x);
static const int htole16(x) = (x);
static const int be16toh(x) = __bswap_16 (x);
static const int le16toh(x) = (x);
static const int htobe32(x) = __bswap_32 (x);
static const int htole32(x) = (x);
static const int be32toh(x) = __bswap_32 (x);
static const int le32toh(x) = (x);
static const int htobe64(x) = __bswap_64 (x);
static const int htole64(x) = (x);
static const int be64toh(x) = __bswap_64 (x);
static const int le64toh(x) = (x);
union wait
  {
    int w_status;
    struct
      {
 unsigned int __w_termsig:7;
 unsigned int __w_coredump:1;
 unsigned int __w_retcode:8;
 unsigned int:16;
      } __wait_terminated;
    struct
      {
 unsigned int __w_stopval:8;
 unsigned int __w_stopsig:8;
 unsigned int:16;
      } __wait_stopped;
  };
static const int w_termsig = __wait_terminated.__w_termsig;
static const int w_coredump = __wait_terminated.__w_coredump;
static const int w_retcode = __wait_terminated.__w_retcode;
static const int w_stopsig = __wait_stopped.__w_stopsig;
static const int w_stopval = __wait_stopped.__w_stopval;
static const int __WAIT_INT(status) = (__extension__ (((union { __typeof(status) __in; int __i; }) { .__in = (status) }).__i));
typedef union
  {
    union wait *__uptr;
    int *__iptr;
  } __WAIT_STATUS __attribute__ ((__transparent_union__));
static const int __WAIT_STATUS_DEFN = int *;
static const int WEXITSTATUS(status) = __WEXITSTATUS (__WAIT_INT (status));
static const int WTERMSIG(status) = __WTERMSIG (__WAIT_INT (status));
static const int WSTOPSIG(status) = __WSTOPSIG (__WAIT_INT (status));
static const int WIFEXITED(status) = __WIFEXITED (__WAIT_INT (status));
static const int WIFSIGNALED(status) = __WIFSIGNALED (__WAIT_INT (status));
static const int WIFSTOPPED(status) = __WIFSTOPPED (__WAIT_INT (status));
static const int WIFCONTINUED(status) = __WIFCONTINUED (__WAIT_INT (status));
typedef struct
  {
    int quot;
    int rem;
  } div_t;
typedef struct
  {
    long int quot;
    long int rem;
  } ldiv_t;
static const int __ldiv_t_defined = 1;
__extension__ typedef struct
  {
    long long int quot;
    long long int rem;
  } lldiv_t;
static const int __lldiv_t_defined = 1;
static const int RAND_MAX = 2147483647;
static const int EXIT_FAILURE = 1;
static const int EXIT_SUCCESS = 0;
static const int MB_CUR_MAX = (__ctype_get_mb_cur_max ());
extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) ;
extern double atof (__const char *__nptr)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern int atoi (__const char *__nptr)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern long int atol (__const char *__nptr)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
__extension__ extern long long int atoll (__const char *__nptr)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern double strtod (__const char *__restrict __nptr,
        char **__restrict __endptr)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern float strtof (__const char *__restrict __nptr,
       char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern long double strtold (__const char *__restrict __nptr,
       char **__restrict __endptr)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern long int strtol (__const char *__restrict __nptr,
   char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern unsigned long int strtoul (__const char *__restrict __nptr,
      char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
__extension__
extern long long int strtoq (__const char *__restrict __nptr,
        char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
           char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
__extension__
extern long long int strtoll (__const char *__restrict __nptr,
         char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
     char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) ;
extern long int a64l (__const char *__s)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
static const int _SYS_TYPES_H = 1;
static const int _BITS_TYPES_H = 1;
static const int __WORDSIZE = 32;
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
__extension__ typedef long long int __quad_t;
__extension__ typedef unsigned long long int __u_quad_t;
static const int __S16_TYPE = short int;
static const int __U16_TYPE = unsigned short int;
static const int __S32_TYPE = int;
static const int __U32_TYPE = unsigned int;
static const int __SLONGWORD_TYPE = long int;
static const int __ULONGWORD_TYPE = unsigned long int;
static const int __SQUAD_TYPE = __quad_t;
static const int __UQUAD_TYPE = __u_quad_t;
static const int __SWORD_TYPE = int;
static const int __UWORD_TYPE = unsigned int;
static const int __SLONG32_TYPE = long int;
static const int __ULONG32_TYPE = unsigned long int;
static const int __S64_TYPE = __quad_t;
static const int __U64_TYPE = __u_quad_t;
static const int __STD_TYPE = __extension__ typedef;
static const int _BITS_TYPESIZES_H = 1;
static const int __DEV_T_TYPE = __UQUAD_TYPE;
static const int __UID_T_TYPE = __U32_TYPE;
static const int __GID_T_TYPE = __U32_TYPE;
static const int __INO_T_TYPE = __ULONGWORD_TYPE;
static const int __INO64_T_TYPE = __UQUAD_TYPE;
static const int __MODE_T_TYPE = __U32_TYPE;
static const int __NLINK_T_TYPE = __UWORD_TYPE;
static const int __OFF_T_TYPE = __SLONGWORD_TYPE;
static const int __OFF64_T_TYPE = __SQUAD_TYPE;
static const int __PID_T_TYPE = __S32_TYPE;
static const int __RLIM_T_TYPE = __ULONGWORD_TYPE;
static const int __RLIM64_T_TYPE = __UQUAD_TYPE;
static const int __BLKCNT_T_TYPE = __SLONGWORD_TYPE;
static const int __BLKCNT64_T_TYPE = __SQUAD_TYPE;
static const int __FSBLKCNT_T_TYPE = __ULONGWORD_TYPE;
static const int __FSBLKCNT64_T_TYPE = __UQUAD_TYPE;
static const int __FSFILCNT_T_TYPE = __ULONGWORD_TYPE;
static const int __FSFILCNT64_T_TYPE = __UQUAD_TYPE;
static const int __ID_T_TYPE = __U32_TYPE;
static const int __CLOCK_T_TYPE = __SLONGWORD_TYPE;
static const int __TIME_T_TYPE = __SLONGWORD_TYPE;
static const int __USECONDS_T_TYPE = __U32_TYPE;
static const int __SUSECONDS_T_TYPE = __SLONGWORD_TYPE;
static const int __DADDR_T_TYPE = __S32_TYPE;
static const int __SWBLK_T_TYPE = __SLONGWORD_TYPE;
static const int __KEY_T_TYPE = __S32_TYPE;
static const int __CLOCKID_T_TYPE = __S32_TYPE;
static const int __TIMER_T_TYPE = void *;
static const int __BLKSIZE_T_TYPE = __SLONGWORD_TYPE;
static const int __FSID_T_TYPE = struct { int __val[2]; };
static const int __SSIZE_T_TYPE = __SWORD_TYPE;
static const int __FD_SETSIZE = 1024;
__extension__ typedef __u_quad_t __dev_t;
__extension__ typedef unsigned int __uid_t;
__extension__ typedef unsigned int __gid_t;
__extension__ typedef unsigned long int __ino_t;
__extension__ typedef __u_quad_t __ino64_t;
__extension__ typedef unsigned int __mode_t;
__extension__ typedef unsigned int __nlink_t;
__extension__ typedef long int __off_t;
__extension__ typedef __quad_t __off64_t;
__extension__ typedef int __pid_t;
__extension__ typedef struct { int __val[2]; } __fsid_t;
__extension__ typedef long int __clock_t;
__extension__ typedef unsigned long int __rlim_t;
__extension__ typedef __u_quad_t __rlim64_t;
__extension__ typedef unsigned int __id_t;
__extension__ typedef long int __time_t;
__extension__ typedef unsigned int __useconds_t;
__extension__ typedef long int __suseconds_t;
__extension__ typedef int __daddr_t;
__extension__ typedef long int __swblk_t;
__extension__ typedef int __key_t;
__extension__ typedef int __clockid_t;
__extension__ typedef void * __timer_t;
__extension__ typedef long int __blksize_t;
__extension__ typedef long int __blkcnt_t;
__extension__ typedef __quad_t __blkcnt64_t;
__extension__ typedef unsigned long int __fsblkcnt_t;
__extension__ typedef __u_quad_t __fsblkcnt64_t;
__extension__ typedef unsigned long int __fsfilcnt_t;
__extension__ typedef __u_quad_t __fsfilcnt64_t;
__extension__ typedef int __ssize_t;
typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
__extension__ typedef int __intptr_t;
__extension__ typedef unsigned int __socklen_t;
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
typedef __loff_t loff_t;
typedef __ino_t ino_t;
typedef __dev_t dev_t;
typedef __gid_t gid_t;
typedef __mode_t mode_t;
typedef __nlink_t nlink_t;
typedef __uid_t uid_t;
typedef __off_t off_t;
typedef __pid_t pid_t;
typedef __id_t id_t;
typedef __ssize_t ssize_t;
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
typedef __key_t key_t;
static const int __clock_t_defined = 1;
typedef __clock_t clock_t;
static const int __time_t_defined = 1;
typedef __time_t time_t;
static const int __clockid_t_defined = 1;
typedef __clockid_t clockid_t;
static const int __timer_t_defined = 1;
typedef __timer_t timer_t;
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
static const int __intN_t(N,MODE) = typedef int int ##N ##_t __attribute__ ((__mode__ (MODE)));
static const int __u_intN_t(N,MODE) = typedef unsigned int u_int ##N ##_t __attribute__ ((__mode__ (MODE)));
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
typedef int register_t __attribute__ ((__mode__ (__word__)));
static const int __BIT_TYPES_DEFINED__ = 1;
static const int _SYS_SELECT_H = 1;
static const int __FD_ZERO(fdsp) = do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; stosl" : "=c" (__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)), "1" (&__FDS_BITS (fdsp)[0]) : "memory"); } while (0);
static const int __FD_SET(d,set) = ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d)));
static const int __FD_CLR(d,set) = ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d)));
static const int __FD_ISSET(d,set) = ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0);
static const int _SIGSET_H_types = 1;
typedef int __sig_atomic_t;
static const int _SIGSET_NWORDS = (1024 / (8 * sizeof (unsigned long int)));
typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
  } __sigset_t;
typedef __sigset_t sigset_t;
static const int __timespec_defined = 1;
struct timespec
  {
    __time_t tv_sec;
    long int tv_nsec;
  };
static const int _STRUCT_TIMEVAL = 1;
struct timeval
  {
    __time_t tv_sec;
    __suseconds_t tv_usec;
  };
typedef __suseconds_t suseconds_t;
typedef long int __fd_mask;
static const int __NFDBITS = (8 * (int) sizeof (__fd_mask));
static const int __FD_ELT(d) = ((d) / __NFDBITS);
static const int __FD_MASK(d) = ((__fd_mask) 1 << ((d) % __NFDBITS));
typedef struct
  {
    __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
static const int __FDS_BITS(set) = ((set)->__fds_bits);
  } fd_set;
static const int FD_SETSIZE = __FD_SETSIZE;
typedef __fd_mask fd_mask;
static const int NFDBITS = __NFDBITS;
static const int FD_SET(fd,fdsetp) = __FD_SET (fd, fdsetp);
static const int FD_CLR(fd,fdsetp) = __FD_CLR (fd, fdsetp);
static const int FD_ISSET(fd,fdsetp) = __FD_ISSET (fd, fdsetp);
static const int FD_ZERO(fdsetp) = __FD_ZERO (fdsetp);
extern int select (int __nfds, fd_set *__restrict __readfds,
     fd_set *__restrict __writefds,
     fd_set *__restrict __exceptfds,
     struct timeval *__restrict __timeout);
extern int pselect (int __nfds, fd_set *__restrict __readfds,
      fd_set *__restrict __writefds,
      fd_set *__restrict __exceptfds,
      const struct timespec *__restrict __timeout,
      const __sigset_t *__restrict __sigmask);
static const int _SYS_SYSMACROS_H = 1;
__extension__
extern unsigned int gnu_dev_major (unsigned long long int __dev)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
__extension__
extern unsigned int gnu_dev_minor (unsigned long long int __dev)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
__extension__
extern unsigned long long int gnu_dev_makedev (unsigned int __major,
            unsigned int __minor)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
static const int major(dev) = gnu_dev_major (dev);
static const int minor(dev) = gnu_dev_minor (dev);
static const int makedev(maj,min) = gnu_dev_makedev (maj, min);
typedef __blksize_t blksize_t;
typedef __blkcnt_t blkcnt_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
static const int _BITS_PTHREADTYPES_H = 1;
static const int __SIZEOF_PTHREAD_ATTR_T = 36;
static const int __SIZEOF_PTHREAD_MUTEX_T = 24;
static const int __SIZEOF_PTHREAD_MUTEXATTR_T = 4;
static const int __SIZEOF_PTHREAD_COND_T = 48;
static const int __SIZEOF_PTHREAD_COND_COMPAT_T = 12;
static const int __SIZEOF_PTHREAD_CONDATTR_T = 4;
static const int __SIZEOF_PTHREAD_RWLOCK_T = 32;
static const int __SIZEOF_PTHREAD_RWLOCKATTR_T = 8;
static const int __SIZEOF_PTHREAD_BARRIER_T = 20;
static const int __SIZEOF_PTHREAD_BARRIERATTR_T = 4;
typedef unsigned long int pthread_t;
typedef union
{
  char __size[36];
  long int __align;
} pthread_attr_t;
typedef struct __pthread_internal_slist
{
  struct __pthread_internal_slist *__next;
} __pthread_slist_t;
typedef union
{
  struct __pthread_mutex_s
  {
    int __lock;
    unsigned int __count;
    int __owner;
    int __kind;
    unsigned int __nusers;
    __extension__ union
    {
      int __spins;
      __pthread_slist_t __list;
    };
  } __data;
  char __size[24];
  long int __align;
} pthread_mutex_t;
typedef union
{
  char __size[4];
  long int __align;
} pthread_mutexattr_t;
typedef union
{
  struct
  {
    int __lock;
    unsigned int __futex;
    __extension__ unsigned long long int __total_seq;
    __extension__ unsigned long long int __wakeup_seq;
    __extension__ unsigned long long int __woken_seq;
    void *__mutex;
    unsigned int __nwaiters;
    unsigned int __broadcast_seq;
  } __data;
  char __size[48];
  __extension__ long long int __align;
} pthread_cond_t;
typedef union
{
  char __size[4];
  long int __align;
} pthread_condattr_t;
typedef unsigned int pthread_key_t;
typedef int pthread_once_t;
typedef union
{
  struct
  {
    int __lock;
    unsigned int __nr_readers;
    unsigned int __readers_wakeup;
    unsigned int __writer_wakeup;
    unsigned int __nr_readers_queued;
    unsigned int __nr_writers_queued;
    unsigned char __flags;
    unsigned char __shared;
    unsigned char __pad1;
    unsigned char __pad2;
    int __writer;
  } __data;
  char __size[32];
  long int __align;
} pthread_rwlock_t;
typedef union
{
  char __size[8];
  long int __align;
} pthread_rwlockattr_t;
typedef volatile int pthread_spinlock_t;
typedef union
{
  char __size[20];
  long int __align;
} pthread_barrier_t;
typedef union
{
  char __size[4];
  int __align;
} pthread_barrierattr_t;
static const int __cleanup_fct_attribute = __attribute__ ((__regparm__ (1)));
extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
extern char *initstate (unsigned int __seed, char *__statebuf,
   size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
struct random_data
  {
    int32_t *fptr;
    int32_t *rptr;
    int32_t *state;
    int rand_type;
    int rand_deg;
    int rand_sep;
    int32_t *end_ptr;
  };
extern int random_r (struct random_data *__restrict __buf,
       int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
extern int srandom_r (unsigned int __seed, struct random_data *__buf)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
   size_t __statelen,
   struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
extern int setstate_r (char *__restrict __statebuf,
         struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
extern long int nrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
extern long int jrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
struct drand48_data
  {
    unsigned short int __x[3];
    unsigned short int __old_x[3];
    unsigned short int __c;
    unsigned short int __init;
    unsigned long long int __a;
  };
extern int drand48_r (struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
extern int lrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
extern int mrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
extern int seed48_r (unsigned short int __seed16v[3],
       struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
extern int lcong48_r (unsigned short int __param[7],
        struct drand48_data *__buffer)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
extern void *calloc (size_t __nmemb, size_t __size)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
extern void *realloc (void *__ptr, size_t __size)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
static const int _ALLOCA_H = 1;
extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
static const int alloca(size) = __builtin_alloca (size);
extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
extern char *getenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern char *__secure_getenv (__const char *__name)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
extern int setenv (__const char *__name, __const char *__value, int __replace)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern int system (__const char *__command) ;
extern char *realpath (__const char *__restrict __name,
         char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) ;
typedef int (*__compar_fn_t) (__const void *, __const void *);
extern void *bsearch (__const void *__key, __const void *__base,
        size_t __nmemb, size_t __size, __compar_fn_t __compar)
     __attribute__ ((__nonnull__ (1, 2, 5))) ;
extern void qsort (void *__base, size_t __nmemb, size_t __size,
     __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
__extension__ extern long long int llabs (long long int __x)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
extern div_t div (int __numer, int __denom)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
__extension__ extern lldiv_t lldiv (long long int __numer,
        long long int __denom)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *gcvt (double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
extern char *qecvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qecvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) ;
extern int mbtowc (wchar_t *__restrict __pwc,
     __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) ;
extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)) ;
extern size_t mbstowcs (wchar_t *__restrict __pwcs,
   __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
extern size_t wcstombs (char *__restrict __s,
   __const wchar_t *__restrict __pwcs, size_t __n)
     __attribute__ ((__nothrow__ , __leaf__));
extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
extern int getsubopt (char **__restrict __optionp,
        char *__const *__restrict __tokens,
        char **__restrict __valuep)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;
extern int getloadavg (double __loadavg[], int __nelem)
     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));


text:
set -ex

compiler_root=src/compiler

PATH=$PATH:$compiler_root

# we need this for bootstrapping
protoc -I$compiler_root $compiler_root/google/protobuf/swift-descriptor.proto --cpp_out=$compiler_root

# build the swift generator
scripts/build.sh

# compile the swift descriptors into the runtime library
protoc -I$compiler_root $compiler_root/google/protobuf/{swift-,}descriptor.proto --swift_out=src/ProtocolBuffers/runtime-pb-swift/

redpajama_set_name: RedPajamaGithub


text:
<?php

header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();

?>


text:
     NAME
	  glXQueryExtensionsString - return list of supported
	  extensions

     C SPECIFICATION
	  const	char * glXQueryExtensionsString( Display *dpy,
						 int screen )

     PARAMETERS
	  dpy	  Specifies the	connection to the X server.

	  screen  Specifies the	screen.

     DESCRIPTION
	  glXQueryExtensionsString  returns a pointer to a string
	  describing which GLX extensions are supported	on the
	  connection. The string is null-terminated and	contains a
	  space-separated list of extension names.  (The extension
	  names	themselves never contain spaces.) If there are no
	  extensions to	GLX, then the empty string is returned.

     NOTES
	  glXQueryExtensionsString is available	only if	the GLX
	  version is 1.1 or greater.

	  glXQueryExtensionsString only	returns	information about GLX
	  extensions. Call glGetString to get a	list of	GL extensions.

     SEE ALSO
	  glGetString, glXQueryVersion,	glXQueryServerString,
	  glXGetClientString


text:
import { AsyncIterableX } from '../asynciterable';

class CatchAllAsyncIterable<TSource> extends AsyncIterableX<TSource> {
  private _source: Iterable<AsyncIterable<TSource>>;

  constructor(source: Iterable<AsyncIterable<TSource>>) {
    super();
    this._source = source;
  }

  async *[Symbol.asyncIterator]() {
    let error = null, hasError = false;

    for (let source of this._source) {
      const it = source[Symbol.asyncIterator]();

      error = null;
      hasError = false;

      while (1) {
        let c = <TSource>{};

        try {
          const { done, value } = await it.next();
          if (done) { break; }
          c = value;
        } catch (e) {
          error = e;
          hasError = true;
          break;
        }

        yield c;
      }

      if (!hasError) { break; }
    }

    if (hasError) { throw error; }
  }
}

export function _catchAll<TSource>(source: Iterable<AsyncIterable<TSource>>): AsyncIterableX<TSource> {
  return new CatchAllAsyncIterable<TSource>(source);
}

export function _catch<T>(source: AsyncIterable<T>, ...args: AsyncIterable<T>[]): AsyncIterableX<T> {
  return _catchAll<T>([source].concat(args));
}

export function _catchStatic<T>(...source: AsyncIterable<T>[]): AsyncIterableX<T> {
  return _catchAll(source);
}


text:
[% page.banner = "Grants - Third Quarter, 2003" %]
[% page.title = page.banner %]

The Perl Foundation is proud to announce the recipients of the
latest round of grants for the development of Perl, the Perl modules
in the Comprehensive Perl Archive Network (CPAN), and Parrot.

Larry Wall, the creator of Perl, will receive $40,000 to work on
the design of Perl 6's object system.  Larry will also be on call to
answer questions from the Perl 5 development team. The Foundation is
indebted to Larry for his tireless work on the difficult task of
designing the language and this grant acknowledges his work in the
Perl community and on the Perl language.

Daniel Grunblatt will receive $2,000 to enhance Parrot's
Just-in-Time (JIT) engine to support the SGI MIPS, Intel IA-64, and HP
PA/RISC CPU architectures. Daniel will also work on improving Parrot's
JIT speed on other popular CPU architectures, including Intel ARM, HP
Alpha, IBM PowerPC, Intel x86, and Sun SPARC. Daniel's grant also
includes making significant improvements to the Parrot debugger.

Leopold Toetsch will receive $4,000 to redesign the file format for
compiled Parrot programs.  Leopold's work is necessary for Parrot
programs to dynamically load external modules. This grant will also
enable Parrot programs to evaluate source code generated at
runtime.

Pete Sergeant will receive $4,000 for work on Rich Text Format
(RTF) parsing modules, to improve Perl's ability to work with RTF, a
document format widely supported by dozens of word processors,
including Microsoft Word. The grant will allow developers to use Perl
to develop applications that use RTF by updating the core RTF modules
on CPAN; building a set of translators and applications; and the
creation of a website for Perl RTF modules and discussion.

Autrijus Tang will receive $2,000 for two months development to
kick start internationalization of Slash, the database-driven
application server that powers slashdot.org and use.perl.org, the most
widely used open-source Perl solution for such tasks. Slash's lack of
internationalization support has hindered its widespread adoption,
which this grant aims to rectify. Goals include implementing Cascading
Style Sheets (CSS) and internationalized paged templates; a Chinese
localization; and an "Interface Language" option allowing users to
select their own display language.

Parrot is a virtual machine used to efficiently execute bytecode
for interpreted languages - specifically, Perl 6, although the project
aims to support other languages in the future. Parrot will be the core
of the Perl interpreter; it will be the target platform to which Perl
6 code is compiled.

The Perl Foundation is dedicated to the advancement of the Perl
programming language through open discussion, collaboration, design,
and code. The Perl Foundation is a non-profit, 501(c)(3) organization
based in Holland, Michigan.

For further information:

Comprehensive Perl Archive Network (CPAN)

Perl and RTF

Parrot development

The Perl Foundation

The Perl Directory


text:
(function() {
	"use strict";

	function Toolbar(options) {
		this.$super(options);
	}

	Toolbar.prototype = {
		build: function() {

		}
	};

	Toolbar.fname = 'Toolbar';
	UI.component('toolbar', Toolbar);
})();


text:
<?php

namespace Test\PublicNamespace;

class UtilTest extends \Test\TestCase {
	protected function setUp(): void {
		parent::setUp();
		\OCP\Contacts::clear();
	}

	/**
	* @dataProvider channelProvider
	*
	* @param string $channel
	*/
	public function testOverrideChannel($channel) {
		\OCP\Util::setChannel($channel);
		$actual = \OCP\Util::getChannel($channel);
		$this->assertEquals($channel, $actual);
	}

	public function channelProvider() {
		return [
			['daily'],
			['beta'],
			['stable'],
			['production']
		];
	}
}


text:
Object::Object()
{
}

Object::~Object()
{
}

void Object::update(sf::Time delta)
{
}

void Object::draw(sf::RenderTarget &target, sf::RenderStates states) const
{
    states.transform *= getTransform();
    /// ...
}

////////////////////////////////////////////////////////////////////////////////
// EOF
////////////////////////////////////////////////////////////////////////////////


text:
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

require('redux');
require('./turn-order-8a79879b.js');
require('immer');
require('lodash.isplainobject');
require('./reducer-fee48cb6.js');
require('rfc6902');
require('./initialize-89b89fff.js');
require('./base-3237f024.js');
var master = require('./master-6aa82914.js');

exports.Master = master.Master;


text:
class TagsController < ApplicationController
  respond_to :json, :html

  def index
    @ordered_tags = Tag.by_article_count
    @tags = Tag.order(:name)
    respond_with do |format|
      format.json { render json: @tags.tokens(params[:q]) }
    end
  end

  def new
    respond_with @tag = Tag.new
  end

  def create
    respond_with @tag = Tag.create(tag_params)
  end

  def show
    @tag = find_tag_by_params
  end

  def edit
    @tag = find_tag_by_params
  end

  private

  def find_tag_by_params
    Tag.find(params[:id])
  end

  def tag_params
    params.require(:tag).permit(:name)
  end
end


text:
"use strict";
const suite = require("../document-suite");

exports["compare siblings"] = function () {
  const SIBLINGS = 10000;
  let parent;
  let children;
  let it;

  return suite({
    setup: function (document) {
      parent = document.createElement("div");
      children = new Array(Math.max(SIBLINGS, this.count));
      if (children.length % 2 === 1) {
        ++children.length; // avoid looking up a .5 index
      }

      for (let i = 0; i < children.length; ++i) {
        children[i] = document.createElement("span");
        parent.appendChild(children[i]);
      }

      it = 0;
    },
    fn: function () {
      children[it].compareDocumentPosition(children[(it + children.length / 2) % children.length]);
      ++it;
    }
  });
};

exports["compare descendant"] = function () {
  const DEPTH = 1000;
  const JUNK_CHILDREN = 10;
  let parent;
  let deepest;

  return suite({
    setup: function (document) {
      parent = document.createElement("div");
      deepest = parent;

      for (let i = 0; i < DEPTH; ++i) {
        const newNode = document.createElement("div");
        for (let j = 0; j < JUNK_CHILDREN; ++j) {
          newNode.appendChild(document.createElement("div"));
        }

        deepest.appendChild(newNode);
        deepest = newNode;
      }
    },
    fn: function () {
      parent.compareDocumentPosition(deepest);
    }
  });
};

exports["compare ancestor"] = function () {
  const DEPTH = 1000;
  const JUNK_CHILDREN = 10;
  let parent;
  let deepest;

  return suite({
    setup: function (document) {
      parent = document.createElement("div");
      deepest = parent;

      for (let i = 0; i < DEPTH; ++i) {
        const newNode = document.createElement("div");
        for (let j = 0; j < JUNK_CHILDREN; ++j) {
          newNode.appendChild(document.createElement("div"));
        }

        deepest.appendChild(newNode);
        deepest = newNode;
      }
    },
    fn: function () {
      deepest.compareDocumentPosition(parent);
    }
  });
};


text:
type: archive
layout: default
---

    {% if page.title == 'Archive' %}

{{ page.title }}

        {% include archive_index.html %}
    {% else %}

Archive: {{ page.title }}

    {% endif %}
    {% if page.tag and content != '' %}

            {{ content }}

Blogposts about {{ page.title }}:

    {% endif %}
    {% unless page.title == 'Archive' %}

            {% if page.tag %}
                {% include archive_tag.html %}
            {% endif %}

    {% endunless %}


text:
select c1.cohort_definition_id, c1.subject_id, de1.drug_concept_id, datediff(dd,de1.drug_era_start_date, de1.drug_era_end_date) as count_value
INTO #raw_907
FROM @CDM_schema.drug_era de1
{@cohort_period_only == 'true'} ?
{join #HERACLES_cohort c1} : {join #HERACLES_cohort_subject c1} on de1.person_id = c1.subject_id
where 1=1
{@cohort_period_only == 'true'} ? {	AND de1.drug_era_start_date>=c1.cohort_start_date and de1.drug_era_start_date<=c1.cohort_end_date }
{@drug_concept_ids != ''} ? { AND de1.drug_concept_id in (@drug_concept_ids)}
;

WITH cteRawData as
(
    select cohort_definition_id, drug_concept_id AS stratum_1, count_value FROM #raw_907
),
    overallStats as
  (
      select cohort_definition_id,
        stratum_1,
        avg(1.0 * count_value) as avg_value,
        stdev(count_value) as stdev_value,
        min(count_value) as min_value,
        max(count_value) as max_value,
        count_big(*) as total
      from cteRawData
      group by cohort_definition_id, stratum_1
  ),
    valueStats as
  (
      select cohort_definition_id,
        stratum_1,
        count_value,
        total,
        SUM(total) over (partition by cohort_definition_id, stratum_1 order by count_value ROWS UNBOUNDED PRECEDING) as accumulated
      FROM (
             select cohort_definition_id, stratum_1, count_value, count_big(*) as total
             FROM cteRawData
             GROUP BY cohort_definition_id, stratum_1, count_value
           ) D
  )
select o.cohort_definition_id,
  907 as analysis_id,
  CAST(o.stratum_1 as VARCHAR) as stratum_1,
  cast( '' as varchar(1) ) as stratum_2,
  cast( '' as varchar(1) ) as stratum_3,cast( '' as varchar(1) ) as stratum_4, cast( '' as varchar(1) ) as stratum_5,
  o.total as count_value,
  o.min_value,
  o.max_value,
  o.avg_value,
  coalesce(o.stdev_value, 0.0) as stdev_value,
  MIN(case when s.accumulated >= .50 * o.total then count_value else o.max_value end) as median_value,
  MIN(case when s.accumulated >= .10 * o.total then count_value else o.max_value end) as p10_value,
  MIN(case when s.accumulated >= .25 * o.total then count_value else o.max_value end) as p25_value,
  MIN(case when s.accumulated >= .75 * o.total then count_value else o.max_value end) as p75_value,
  MIN(case when s.accumulated >= .90 * o.total then count_value else o.max_value end) as p90_value
into #results_dist_907
from valueStats s
join overallStats o on s.cohort_definition_id = o.cohort_definition_id and s.stratum_1 = o.stratum_1
GROUP BY o.cohort_definition_id, o.stratum_1, o.total, o.min_value, o.max_value, o.avg_value, o.stdev_value
;

TRUNCATE TABLE #raw_907;
DROP TABLE #raw_907;


text:
using Newtonsoft.Json;

namespace HaloOnline.Server.Core.Http.Model.Messaging
{
    public class SendResult
    {
        [JsonProperty("SendResult")]
        public ServiceResult<bool> Result { get; set; }
    }
}


text:
@interface SphericalMercatorProjection : NSObject

- (id)initWithWorldWidth:(double)worldWidth;

- (CLLocationCoordinate2D)pointToCoordinate:(GQTPoint)point;

- (GQTPoint)coordinateToPoint:(CLLocationCoordinate2D)coordinate;

@end


text:
namespace ConsoleInAndOut
{
    /// <summary>
    /// Print information on console
    /// </summary>
    using System;

    public class CompanyInfo
    {
        public static void Main()
        {
            string companyName = Console.ReadLine();
            string companyAddress = Console.ReadLine();
            string companyPhone = Console.ReadLine();
            string companyFax = Console.ReadLine();
            string companySite = Console.ReadLine();
            string managerFirstName = Console.ReadLine();
            string managerLasstName = Console.ReadLine();
            string managerAge = Console.ReadLine();
            string managerPhone = Console.ReadLine();
            if (companyFax.CompareTo(string.Empty) == 0)
            {
                companyFax = "(no fax)";
            }

            Console.WriteLine(companyName);
            Console.WriteLine("Address: {0}", companyAddress);
            Console.WriteLine("Tel. {0}", companyPhone);
            Console.WriteLine("Fax: {0}", companyFax);
            Console.WriteLine("Web site: {0}", companySite);
            Console.WriteLine("Manager: {0} {1} (age: {2}, tel. {3})", managerFirstName, managerLasstName, managerAge, managerPhone);
        }
    }
}


text:
   {{site.title}}

  {{site.description}}

    HOME

    {% for sitePage in site.pages %}
    {% if sitePage.title %}

    /{{sitePage.title}}
    {% endif %}
    {% endfor %}


text:
require 'spec_helper'

describe ScopedRolify


text:
"use strict";

$('#size').click(function () {
    var imageSize = $('#size').val();
    var state = new StateManager();
    state.setValue('imageSize', imageSize);
});

$(document).ready(function() {
    var mymap = L.map('mapid').setView([51.505, -0.09], 3);

    L.tileLayer("https://api.mapbox.com/styles/v1/mapbox/streets-v10/tiles/256/{z}/{x}/{y}?access_token="+mapboxPk, {
        attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox',
        maxZoom: 18
    }).addTo(mymap);

    /*L.tileLayer('https://d6a1v2w10ny40.cloudfront.net/v0.1/{z}/{x}/{y}.png', {
		maxZoom: 17,
		id: 'mapillary.sequences'
	}).addTo(mymap);*/

    $(".datepicker").datepicker({
      changeMonth: true,
      changeYear: true,
      dateFormat: 'yy-mm-dd',
      yearRange: '1900:nn'
    });

    var seqViewer = new SequenceViewer(mymap);
    window.seqViewer = seqViewer;

    $('#showMapSequences').click(function() {
        seqViewer.updateSequenceForMap();
    });

    $('#showMapImages').click(function() {
        seqViewer.updateImagesForMap();
    });

    $('#fitImagesToWindow').click(function() {
        seqViewer.fitImagesToWindow();
    });

    $('#showSequence').click(function (){
        var seqId = $('#sequenceID').val();
        seqViewer.showSequence(seqId);
    });

    // Invalidate map so it will not be grey when switching to the tab.
    $('#tabsSelectBy a').click(function() {
        setTimeout(function() {
            mymap.invalidateSize();
        }, 0);
    });

    var state = new StateManager();
    var method = state.getValue('method');
    if (method == 'imagesOnMap') {
        $('a[href="#tabSelectImagesOnMap"]').tab('show');
        seqViewer.updateFromMapState();
    } else if (method == 'sequencesOnMap') {
        $('a[href="#tabSelectSequencesOnMap"]').tab('show');
        seqViewer.updateFromMapState();
    } else if (state.isSequenceSelected()) {
        $('a[href="#tabSelectBySeqId"]').tab('show');
        seqViewer.updateFromSequenzeState();
    }
});

$(document).on('keydown', function (e) {
    if ((e.metaKey || e.altKey) && ( String.fromCharCode(e.which).toLowerCase() === 'n') ) {
        $('#nextButton').click();
    }
});

$(document).on('keydown', function (e) {
    if ((e.metaKey || e.altKey) && ( String.fromCharCode(e.which).toLowerCase() === 'p') ) {
        $('#prevButton').click();
    }
});

function StateManager() {
    this.parseHash();
}

StateManager.prototype.removePrefix = function(prefix) {
    var removeKeys = [];
    for (var key in this.arguments) {
        if (key.indexOf(prefix) == 0) {
            removeKeys[removeKeys.length] = key;
        }
    }

    for (var i = 0; i < removeKeys.length; i++) {
        delete this.arguments[removeKeys[i]];
    }
}

StateManager.prototype.clearNonSequenceState = function() {
    delete this.arguments['min_lat'];
    delete this.arguments['max_lat'];
    delete this.arguments['min_lon'];
    delete this.arguments['max_lon'];
    delete this.arguments['page'];
    delete this.arguments['user'];
    delete this.arguments['startDate'];
    delete this.arguments['endDate'];
    this.updateUrlHash();
}

StateManager.prototype.clearState = function() {
    this.arguments = {};
    this.updateUrlHash();
}

StateManager.prototype.clearNonMapState = function() {
    delete this.arguments['seqId'];
    this.updateUrlHash();
}

StateManager.prototype.isSequenceSelected = function() {
    return this.arguments['seqId'] !== undefined;
}

StateManager.prototype.parseHash = function() {
    this.arguments = {};
    if (window.location.hash.length <= 1) {
        return;
    }
    var parts = window.location.hash.substr(1).split('&');

    for (var i = 0; i < parts.length; i++) {
        var kv = parts[i].split('=');
        this.arguments[kv[0]] = kv[1];
    }
}

StateManager.prototype.getValue = function(key) {
    return this.arguments[key];
}

StateManager.prototype.removeValue = function(key, value) {
    delete this.arguments[key];
    this.updateUrlHash();
}

StateManager.prototype.setValue = function(key, value) {
    this.parseHash();
    this.arguments[key] = value;
    this.updateUrlHash();
}

StateManager.prototype.updateUrlHash = function() {
    var hash = '';
    for (var key in this.arguments) {
        hash += key + '=' + encodeURIComponent(this.arguments[key]) + '&';
    }
    hash = hash.substr(0, hash.length - 1);
    window.location.hash = hash;
}

function SequenceViewer(map) {
    this.map = map;
    this.pageNo = 0;
    this.min_lat = -1;
    this.max_lat = -1;
    this.min_lon = -1;
    this.max_lon = -1;
    this.state = new StateManager();
    this.imageLoadedListeners = [];
    this.unveilListeners = [];

    this.metadata = null;
    if (typeof MetaData != 'undefined') {
        this.metadata = new MetaData();
    }
}

SequenceViewer.prototype.fitImagesToWindow = function() {
    var fit = $('#fitImagesToWindow').is(':checked');

    this.state.setValue('fitImages', (fit ? "true" : "false" ));

    $(".imageList").each(function(){
        var $img = jQuery(this).find("img");
        if (fit) {
            $img.css({"width": "100%", "height": "auto"});
        } else {
            $img.css({"width": "auto", "height": "auto"});
        }
    });
}

SequenceViewer.prototype.activateUnveil = function(keys) {
    var self = this;
    $(document).ready(function() {
        $("img").unveil(500, function () {
            // When an image is unveiled (loaded when almost visible) the approzimate size will be changed to auto again.
            $(this).css({"width": "auto", "height": "auto"});
            self.imageUnveiled(this);
        });
    });
}

SequenceViewer.prototype.getImageLink = function(imageKey, imageSize) {
    // Image sizes are only given so the images are located where the probably will be.
    // The unveil plugin can then wait to load images untill they are about to be shown.

    return "
"
        + "

"
        + "
"
        + " "
        + " "
        + " "
        + "
"
        + "
"
        + "<form>"
        + "     <input type=\"hidden\" name=\"imageKey\" class=\"imageKey\" value=\""+imageKey+"\">"
        + "     <button type=\"button\" class=\"btn btn-default saveButton\">Save</button>"
        + "     <button type=\"button\" class=\"btn btn-default addButton\">Add</button>"
        + "     "
        + "</form>"
        + "
"
        + "
";
}

SequenceViewer.prototype.showImagesByKeys = function(keys) {
    var imageSize = $('#size').val();

    var items = [];
    var self = this;
    $.each(keys , function(key, val) {
        items.push(self.getImageLink(val, imageSize));
    });

    this.addItemsToImageContainer(items);
    this.activateUnveil();
}

SequenceViewer.prototype.showImages = function(images) {
    var imageSize = $('#size').val();

    var items = [];
    var self = this;
    $.each(images , function(i, img) {
        items.push(self.getImageLink(img['key'], imageSize));
    });

    this.addItemsToImageContainer(items);
    this.activateUnveil();
}

SequenceViewer.prototype.addItemsToImageContainer = function(items) {
    $('.imageList').remove();
    $( "
", {
        "class": "imageList",
        html: items.join("")
    }).appendTo("#imageContainer");
    if (this.metadata !== null) {
        this.metadata.buttonsAdded();
    }
}

SequenceViewer.prototype.showSequence = function(seqId) {
    if (seqId == "") {
        alert("You must specify a sequence ID.");
        return;
    }
    var self = this;
    $.getJSON( "https://a.mapillary.com/v2/s/"+seqId+"?client_id="+clientId, function(seq) {
        var key = seq['keys'];
        self.showImagesByKeys(key);
        self.state.clearNonSequenceState();
        self.state.setValue('seqId', seqId);
        self.imagesLoaded();
    });
}

SequenceViewer.prototype.getSelectedTabID = function() {
    return $("#tabsSelectBy li.active a").attr('href');
}

SequenceViewer.prototype.getUrlArgsForOptions = function() {
    var containerID = this.getSelectedTabID();
    var startDate = $(containerID+" .startDate").datepicker("getDate");
    var endDate = $(containerID+" .endDate").datepicker("getDate");
    var extraArgs = "";
    if (startDate !== null) {
        extraArgs += "&start_time="+startDate.getTime();
    }
    if (endDate !== null) {
        extraArgs += "&end_time="+endDate.getTime();
    }
    var user = $(containerID+" .userField").val();
    if (user !== undefined && user.trim().length > 0) {
        extraArgs += "&user="+encodeURIComponent(user);
    }
    return extraArgs;
}

SequenceViewer.prototype.setUrlArgsInState = function() {
    var containerID = this.getSelectedTabID();

    var startDate = $(containerID+" .startDate").datepicker("getDate");
    var endDate = $(containerID+" .endDate").datepicker("getDate");
    var user = $(containerID+" .userField").val();

    if (startDate !== null) {
        this.state.setValue('startDate', startDate.getTime());
    } else {
        this.state.removeValue('startDate');
    }

    if (endDate !== null) {
        this.state.setValue('endDate', endDate.getTime());
    } else {
        this.state.removeValue('endDate');
    }

    if (user !== undefined && user.trim().length > 0) {
        this.state.setValue('user', user);
    } else {
        this.state.removeValue('user');
    }
}

SequenceViewer.prototype.updateImagesForMap = function() {
    var area = this.map.getBounds();
    var sw = area.getSouthWest();
    var ne = area.getNorthEast();

    var min_lat = sw.lat;
    var max_lat = ne.lat;
    var min_lon = sw.lng;
    var max_lon = ne.lng;

    var extraArgs = this.getUrlArgsForOptions();

    var url = "https://a.mapillary.com/v2/search/im?client_id="+clientId+"&max_lat="+max_lat+"&max_lon="+max_lon+"&min_lat="+min_lat+"&min_lon="+min_lon+"&limit=500&page="+this.pageNo+""+extraArgs;

    this.state.clearState();
    this.setUrlArgsInState();
    this.state.setValue('page', this.pageNo);
    this.state.setValue('min_lat', min_lat);
    this.state.setValue('max_lat', max_lat);
    this.state.setValue('min_lon', min_lon);
    this.state.setValue('max_lon', max_lon);
    this.state.setValue('method', 'imagesOnMap');

    var self = this;
    $.getJSON(url, function(data) {
        self.showImages(data['ims']);
        self.updateNextPrev(data['more']);
        self.imagesLoaded();
    });
}

SequenceViewer.prototype.updateNextPrev = function(isMoreData) {
    $(".nextPrevBar").empty();
    var self = this;
    if (this.pageNo > 0) {
        var prev = $("<button type=\"button\" class=\"btn btn-link\">Previous</button>").click(function () {
            self.pageNo--;
            self.updateSequenceForMap();
        });
      $(".nextPrevBar").append(prev).append(" - ");
    }

    if (isMoreData === true) {
        var next = $("<button type=\"button\" class=\"btn btn-link\">Next</button>").click(function () {
            self.pageNo++;
            self.updateSequenceForMap();
        });
        $(".nextPrevBar").append(next);;
    }
}

SequenceViewer.prototype.updateSequenceForMap = function() {
    var area = this.map.getBounds();
    var sw = area.getSouthWest();
    var ne = area.getNorthEast();

    var min_lat = sw.lat;
    var max_lat = ne.lat;
    var min_lon = sw.lng;
    var max_lon = ne.lng;
    this.updateSequence(min_lat, max_lat, min_lon, max_lon);
}

SequenceViewer.prototype.updateFromMapState = function() {
    var pageNoLocal = this.state.getValue('page');
    this.pageNo = 0;
    if (pageNoLocal !== undefined) {
        this.pageNo = pageNoLocal;
    }

    var min_lat = this.state.getValue('min_lat');
    var max_lat = this.state.getValue('max_lat');
    var min_lon = this.state.getValue('min_lon');
    var max_lon = this.state.getValue('max_lon');

    var southWest = L.latLng(min_lat, min_lon);
    var northEast = L.latLng(max_lat, max_lon);
    var bounds = L.latLngBounds(southWest, northEast);
    this.map.fitBounds(bounds);

    var user = this.state.getValue('user');
    var startDate = this.state.getValue('startDate');
    var endDate = this.state.getValue('endDate');

    var containerID = this.getSelectedTabID();
    if (startDate !== undefined && startDate > 0) {
        $(containerID+" .startDate").datepicker("setDate", new Date(startDate));
    }
    if (endDate !== undefined && endDate > 0) {
        $(containerID+" .endDate").datepicker("setDate", new Date(endDate));
    }
    if (user !== undefined && user.trim().length > 0) {
        $(containerID+" .userField").val(user);
    }
}

SequenceViewer.prototype.updateFromSequenzeState = function() {
    var seqId = this.state.getValue('seqId');
    this.showSequence(seqId);
}

SequenceViewer.prototype.addImagesLoadedListener = function(toAdd) {
    this.imageLoadedListeners.push(toAdd);
}
// TODO: Remove images loaded listener
SequenceViewer.prototype.imagesLoaded = function() {
    var i;
    for (i = 0; i < this.imageLoadedListeners.length; i++) {
        this.imageLoadedListeners[i]();
    }
}

SequenceViewer.prototype.addUnveilListener = function(toAdd) {
    this.unveilListeners.push(toAdd);
}

SequenceViewer.prototype.imageUnveiled = function(image) {
    var i;
    for (i = 0; i < this.unveilListeners.length; i++) {
        this.unveilListeners[i](image);
    }
}

SequenceViewer.prototype.updateSequence = function(min_lat, max_lat, min_lon, max_lon) {
    var extraArgs = this.getUrlArgsForOptions();
    var url = "https://a.mapillary.com/v2/search/s?client_id="+clientId+"&max_lat="+max_lat+"&max_lon="+max_lon+"&min_lat="+min_lat+"&min_lon="+min_lon+"&limit=1&page="+this.pageNo+extraArgs

    this.state.clearState();
    this.setUrlArgsInState();
    this.state.setValue('page', this.pageNo);
    this.state.setValue('min_lat', min_lat);
    this.state.setValue('max_lat', max_lat);
    this.state.setValue('min_lon', min_lon);
    this.state.setValue('max_lon', max_lon);
    this.state.setValue('method', 'sequencesOnMap');

    var self = this;
    $.getJSON(url, function(data) {
        $.each(data['ss'], function(key, seq) {
           self.showImagesByKeys(seq['keys']);
        });
        self.updateNextPrev(data['more']);
        self.imagesLoaded();
    });
}


text:
import React, {Component} from 'react';
import RayTable from './../../lib/rtable';
// import RayTable from 'amos-ui/lib/rtable';
import './index.css';

const permissionRender = (text) => <input type="checkbox" className="common-checkbox" />r/w;

const firstColRender = (text) => <input type="checkbox" className="common-checkbox" />{text};

const columns = [
  {title: '模块名称', dataIndex: 'modulename', key: 'modulename', width: 200,
  render: (text) => firstColRender(text)},
  {title: '可写权限', dataIndex: 'permission', key: 'permission', width: 100,
  render: (text) => permissionRender(text),
  onCellClick: (record, e) => {console.log('Click cell', record, e.target);}},
  {title: '描述', dataIndex: 'descriptions', key: 'descriptions', width: 400}
];

const datas = [
  {
    key: 'mainpage',
    modulename: '主页',
    permission: 'ENABLED',
    children: [
      {key: 'mainpage-1', modulename: '主视图',permission: 'ENABLED',descriptions: '主视图展示'},
      {key: 'mainpage-2', modulename: '变电站详情',permission: 'ENABLED',descriptions: '显示变电站信息'}
    ]
  },
  {
    key: 'basic',
    modulename: '基础信息管理',
    permission: 'ENABLED',
    children: [
      {key: 'basic-sub', modulename: '变电站管理',permission: 'ENABLED',descriptions: '变电站信息管理',
        children: [
          {key: 'basic-sub-1', modulename: '站点信息',permission: 'ENABLED'},
          {key: 'basic-sub-2', modulename: '线路信息',permission: 'ENABLED'},
          {key: 'basic-sub-3', modulename: '电厂信息',permission: 'ENABLED'},
          {key: 'basic-sub-4', modulename: '计量点信息',permission: 'ENABLED'},
          {key: 'basic-sub-5', modulename: '计量小室信息',permission: 'ENABLED'}
        ]
      },
      {key: 'basic-dev', modulename: '设备管理',permission: 'ENABLED',descriptions: '电能表管理'},
      {key: 'basic-data', modulename: '数据通信装纸',permission: 'ENABLED',descriptions: '显示当前数据通信装置'}
    ]
  },
  {
    key: 'status',
    modulename: '状态监控',
    permission: 'ENABLED',
    children: [
      {key: 'status-1', modulename: '状态监控',permission: 'ENABLED',descriptions: '对全国上网电量,计量器具可靠性分析,损耗监控,综合误差分析进行图表显示。'}
    ]
  },
  {
    key: 'online',
    modulename: '在线监测',
    permission: 'ENABLED',
    children: [
      {key: 'online-1', modulename: '在线抄表',permission: 'ENABLED',descriptions: '显示抄表侧交流模拟量,电能量的当前和历史数据以及电能表事件信息。'},
      {key: 'online-2',modulename: '在线检测',permission: 'ENABLED',descriptions: '示线路侧二次回路当前和历史数据。'}
    ]
  },
  {
    key: 'account',
    modulename: '账号管理',
    permission: 'ENABLED',
    children: [
      {key: 'account-1', modulename: '账号管理',permission: 'ENABLED',descriptions: '对登陆用户个人信息进行维护。'}
    ]
  }
];

const onRowClick = (record, index, event) => {
  console.log(`Click nth(${index}) row of parent, record.name: ${record.name}`);
  // See https://facebook.github.io/react/docs/events.html for original click event details.
  if (event.shiftKey) {
    console.log('Shift + mouse click triggered.');
  }
};

const onRowDoubleClick = (record, index) => {
  console.log(`Double click nth(${index}) row of parent, record.name: ${record.name}`);
};

class RCTreeTable extends Component {
  constructor(props) {
    super(props);
  }

  render() {
    return (
      <RayTable
        columns={columns}
        data={datas}
        onRowClick={onRowClick}
        onRowDoubleClick={onRowDoubleClick}
      />
    );
  }
}

export default RCTreeTable;


text:
all:

clean:
	rm -rf var build
	rm -f cc/*.pyc cc/*/*.pyc
	rm -f debian/files debian/*.debhelper debian/*.log debian/*.substvars
	rm -f debian/files debian/pycompat
	rm -rf debian/cc debian/*-stampdir

deb:
	debuild -b -us -uc

lint:
	pylint -E --rcfile conf/pylint.cfg cc

test:
	python -m cc.test.__main__


text:
namespace ui {
class TouchEvent;
}

namespace ash {
class MaximizeModeController;
class MaximizeModeWindowState;

// A window manager which - when created - will force all windows into maximized
// mode. Exception are panels and windows which cannot be maximized.
// Windows which cannot be maximized / resized are centered with a layer placed
// behind the window so that no other windows are visible and/or obscured.
// With the destruction of the manager all windows will be restored to their
// original state.
class ASH_EXPORT MaximizeModeWindowManager : public aura::WindowObserver,
                                             public display::DisplayObserver,
                                             public ShellObserver,
                                             public ui::EventHandler {
 public:
  // This should only be deleted by the creator (ash::Shell).
  ~MaximizeModeWindowManager() override;

  // Returns the number of maximized & tracked windows by this manager.
  int GetNumberOfManagedWindows();

  // Adds a window which needs to be maximized. This is used by other window
  // managers for windows which needs to get tracked due to (upcoming) state
  // changes.
  // The call gets ignored if the window was already or should not be handled.
  void AddWindow(aura::Window* window);

  // Called from a window state object when it gets destroyed.
  void WindowStateDestroyed(aura::Window* window);

  // ShellObserver overrides:
  void OnOverviewModeStarting() override;
  void OnOverviewModeEnded() override;

  // Overridden from WindowObserver:
  void OnWindowDestroying(aura::Window* window) override;
  void OnWindowAdded(aura::Window* window) override;
  void OnWindowPropertyChanged(aura::Window* window,
                               const void* key,
                               intptr_t old) override;
  void OnWindowBoundsChanged(aura::Window* window,
                             const gfx::Rect& old_bounds,
                             const gfx::Rect& new_bounds) override;

  // display::DisplayObserver overrides:
  void OnDisplayAdded(const display::Display& display) override;
  void OnDisplayRemoved(const display::Display& display) override;
  void OnDisplayMetricsChanged(const display::Display& display,
                               uint32_t metrics) override;

  // ui::EventHandler override:
  void OnTouchEvent(ui::TouchEvent* event) override;

 protected:
  friend class MaximizeModeController;

  // The object should only be created by the ash::Shell.
  MaximizeModeWindowManager();

 private:
  typedef std::map<aura::Window*, MaximizeModeWindowState*> WindowToState;

  // Maximize all windows and restore their current state.
  void MaximizeAllWindows();

  // Restore all windows to their previous state.
  void RestoreAllWindows();

  // Set whether to defer bounds updates on all tracked windows. When set to
  // false bounds will be updated as they may be stale.
  void SetDeferBoundsUpdates(bool defer_bounds_updates);

  // If the given window should be handled by us, this function will maximize it
  // and add it to the list of known windows (remembering the initial show
  // state).
  // Note: If the given window cannot be handled by us the function will return
  // immediately.
  void MaximizeAndTrackWindow(aura::Window* window);

  // Remove a window from our tracking list.
  void ForgetWindow(aura::Window* window);

  // Returns true when the given window should be modified in any way by us.
  bool ShouldHandleWindow(aura::Window* window);

  // Add window creation observers to track creation of new windows.
  void AddWindowCreationObservers();

  // Remove Window creation observers.
  void RemoveWindowCreationObservers();

  // Change the internal state (e.g. observers) when the display configuration
  // changes.
  void DisplayConfigurationChanged();

  // Returns true when the |window| is a container window.
  bool IsContainerWindow(aura::Window* window);

  // Add a backdrop behind the currently active window on each desktop.
  void EnableBackdropBehindTopWindowOnEachDisplay(bool enable);

  // Every window which got touched by our window manager gets added here.
  WindowToState window_state_map_;

  // All container windows which have to be tracked.
  std::set<aura::Window*> observed_container_windows_;

  // True if all backdrops are hidden.
  bool backdrops_hidden_;

  DISALLOW_COPY_AND_ASSIGN(MaximizeModeWindowManager);
};

}  // namespace ash

#endif  // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_WINDOW_MANAGER_H_