code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
print "Hello, Comments!"; # This is a comment =pod This is a multiline comment =cut
Bigsby/langs
src/pl/comments.pl
Perl
apache-2.0
86
=pod =head1 NAME BN_CTX_new, BN_CTX_init, BN_CTX_free - allocate and free BN_CTX structures =head1 SYNOPSIS #include <openssl/bn.h> BN_CTX *BN_CTX_new(void); void BN_CTX_init(BN_CTX *c); void BN_CTX_free(BN_CTX *c); =head1 DESCRIPTION A B<BN_CTX> is a structure that holds B<BIGNUM> temporary variables used by library functions. Since dynamic memory allocation to create B<BIGNUM>s is rather expensive when used in conjunction with repeated subroutine calls, the B<BN_CTX> structure is used. BN_CTX_new() allocates and initializes a B<BN_CTX> structure. BN_CTX_init() initializes an existing uninitialized B<BN_CTX>. BN_CTX_free() frees the components of the B<BN_CTX>, and if it was created by BN_CTX_new(), also the structure itself. If L<BN_CTX_start(3)|BN_CTX_start(3)> has been used on the B<BN_CTX>, L<BN_CTX_end(3)|BN_CTX_end(3)> must be called before the B<BN_CTX> may be freed by BN_CTX_free(). =head1 RETURN VALUES BN_CTX_new() returns a pointer to the B<BN_CTX>. If the allocation fails, it returns B<NULL> and sets an error code that can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. BN_CTX_init() and BN_CTX_free() have no return values. =head1 SEE ALSO L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<BN_add(3)|BN_add(3)>, L<BN_CTX_start(3)|BN_CTX_start(3)> =head1 HISTORY BN_CTX_new() and BN_CTX_free() are available in all versions on SSLeay and OpenSSL. BN_CTX_init() was added in SSLeay 0.9.1b. =cut
caidongyun/nginx-openresty-windows
nginx/objs/lib/openssl-1.0.1g/doc/crypto/BN_CTX_new.pod
Perl
bsd-2-clause
1,511
% Frame number: 0 holdsAt( orientation( id0 )=176, 0 ). holdsAt( appearance( id0 )=appear, 0 ). % Frame number: 1 holdsAt( orientation( id0 )=178, 40 ). holdsAt( appearance( id0 )=visible, 40 ). % Frame number: 2 holdsAt( orientation( id0 )=176, 80 ). holdsAt( appearance( id0 )=visible, 80 ). % Frame number: 3 holdsAt( orientation( id0 )=176, 120 ). holdsAt( appearance( id0 )=visible, 120 ). % Frame number: 4 holdsAt( orientation( id0 )=176, 160 ). holdsAt( appearance( id0 )=visible, 160 ). % Frame number: 5 holdsAt( orientation( id0 )=176, 200 ). holdsAt( appearance( id0 )=visible, 200 ). % Frame number: 6 holdsAt( orientation( id0 )=176, 240 ). holdsAt( appearance( id0 )=visible, 240 ). % Frame number: 7 holdsAt( orientation( id0 )=176, 280 ). holdsAt( appearance( id0 )=visible, 280 ). % Frame number: 8 holdsAt( orientation( id0 )=176, 320 ). holdsAt( appearance( id0 )=visible, 320 ). % Frame number: 9 holdsAt( orientation( id0 )=176, 360 ). holdsAt( appearance( id0 )=visible, 360 ). % Frame number: 10 holdsAt( orientation( id0 )=176, 400 ). holdsAt( appearance( id0 )=visible, 400 ). % Frame number: 11 holdsAt( orientation( id0 )=170, 440 ). holdsAt( appearance( id0 )=visible, 440 ). % Frame number: 12 holdsAt( orientation( id0 )=170, 480 ). holdsAt( appearance( id0 )=visible, 480 ). % Frame number: 13 holdsAt( orientation( id0 )=170, 520 ). holdsAt( appearance( id0 )=visible, 520 ). % Frame number: 14 holdsAt( orientation( id0 )=166, 560 ). holdsAt( appearance( id0 )=visible, 560 ). % Frame number: 15 holdsAt( orientation( id0 )=161, 600 ). holdsAt( appearance( id0 )=visible, 600 ). % Frame number: 16 holdsAt( orientation( id0 )=161, 640 ). holdsAt( appearance( id0 )=visible, 640 ). % Frame number: 17 holdsAt( orientation( id0 )=161, 680 ). holdsAt( appearance( id0 )=visible, 680 ). % Frame number: 18 holdsAt( orientation( id0 )=161, 720 ). holdsAt( appearance( id0 )=visible, 720 ). % Frame number: 19 holdsAt( orientation( id0 )=149, 760 ). holdsAt( appearance( id0 )=visible, 760 ). % Frame number: 20 holdsAt( orientation( id0 )=149, 800 ). holdsAt( appearance( id0 )=visible, 800 ). % Frame number: 21 holdsAt( orientation( id0 )=149, 840 ). holdsAt( appearance( id0 )=visible, 840 ). % Frame number: 22 holdsAt( orientation( id0 )=149, 880 ). holdsAt( appearance( id0 )=visible, 880 ). % Frame number: 23 holdsAt( orientation( id0 )=149, 920 ). holdsAt( appearance( id0 )=visible, 920 ). % Frame number: 24 holdsAt( orientation( id0 )=149, 960 ). holdsAt( appearance( id0 )=visible, 960 ). % Frame number: 25 holdsAt( orientation( id0 )=149, 1000 ). holdsAt( appearance( id0 )=visible, 1000 ). % Frame number: 26 holdsAt( orientation( id0 )=147, 1040 ). holdsAt( appearance( id0 )=visible, 1040 ). % Frame number: 27 holdsAt( orientation( id0 )=147, 1080 ). holdsAt( appearance( id0 )=visible, 1080 ). % Frame number: 28 holdsAt( orientation( id0 )=147, 1120 ). holdsAt( appearance( id0 )=visible, 1120 ). % Frame number: 29 holdsAt( orientation( id0 )=147, 1160 ). holdsAt( appearance( id0 )=visible, 1160 ). % Frame number: 30 holdsAt( orientation( id0 )=147, 1200 ). holdsAt( appearance( id0 )=visible, 1200 ). % Frame number: 31 holdsAt( orientation( id0 )=147, 1240 ). holdsAt( appearance( id0 )=visible, 1240 ). % Frame number: 32 holdsAt( orientation( id0 )=147, 1280 ). holdsAt( appearance( id0 )=visible, 1280 ). % Frame number: 33 holdsAt( orientation( id0 )=147, 1320 ). holdsAt( appearance( id0 )=visible, 1320 ). % Frame number: 34 holdsAt( orientation( id0 )=147, 1360 ). holdsAt( appearance( id0 )=visible, 1360 ). % Frame number: 35 holdsAt( orientation( id0 )=147, 1400 ). holdsAt( appearance( id0 )=visible, 1400 ). % Frame number: 36 holdsAt( orientation( id0 )=147, 1440 ). holdsAt( appearance( id0 )=visible, 1440 ). % Frame number: 37 holdsAt( orientation( id0 )=147, 1480 ). holdsAt( appearance( id0 )=visible, 1480 ). % Frame number: 38 holdsAt( orientation( id0 )=147, 1520 ). holdsAt( appearance( id0 )=visible, 1520 ). % Frame number: 39 holdsAt( orientation( id0 )=147, 1560 ). holdsAt( appearance( id0 )=visible, 1560 ). % Frame number: 40 holdsAt( orientation( id0 )=147, 1600 ). holdsAt( appearance( id0 )=visible, 1600 ). % Frame number: 41 holdsAt( orientation( id0 )=147, 1640 ). holdsAt( appearance( id0 )=visible, 1640 ). % Frame number: 42 holdsAt( orientation( id0 )=147, 1680 ). holdsAt( appearance( id0 )=visible, 1680 ). % Frame number: 43 holdsAt( orientation( id0 )=147, 1720 ). holdsAt( appearance( id0 )=visible, 1720 ). % Frame number: 44 holdsAt( orientation( id0 )=147, 1760 ). holdsAt( appearance( id0 )=visible, 1760 ). % Frame number: 45 holdsAt( orientation( id0 )=147, 1800 ). holdsAt( appearance( id0 )=visible, 1800 ). % Frame number: 46 holdsAt( orientation( id0 )=147, 1840 ). holdsAt( appearance( id0 )=visible, 1840 ). % Frame number: 47 holdsAt( orientation( id0 )=147, 1880 ). holdsAt( appearance( id0 )=visible, 1880 ). % Frame number: 48 holdsAt( orientation( id0 )=147, 1920 ). holdsAt( appearance( id0 )=visible, 1920 ). % Frame number: 49 holdsAt( orientation( id0 )=147, 1960 ). holdsAt( appearance( id0 )=visible, 1960 ). % Frame number: 50 holdsAt( orientation( id0 )=147, 2000 ). holdsAt( appearance( id0 )=visible, 2000 ). % Frame number: 51 holdsAt( orientation( id0 )=147, 2040 ). holdsAt( appearance( id0 )=visible, 2040 ). % Frame number: 52 holdsAt( orientation( id0 )=147, 2080 ). holdsAt( appearance( id0 )=visible, 2080 ). % Frame number: 53 holdsAt( orientation( id0 )=147, 2120 ). holdsAt( appearance( id0 )=visible, 2120 ). % Frame number: 54 holdsAt( orientation( id0 )=147, 2160 ). holdsAt( appearance( id0 )=visible, 2160 ). % Frame number: 55 holdsAt( orientation( id0 )=147, 2200 ). holdsAt( appearance( id0 )=visible, 2200 ). % Frame number: 56 holdsAt( orientation( id0 )=147, 2240 ). holdsAt( appearance( id0 )=visible, 2240 ). % Frame number: 57 holdsAt( orientation( id0 )=147, 2280 ). holdsAt( appearance( id0 )=visible, 2280 ). % Frame number: 58 holdsAt( orientation( id0 )=147, 2320 ). holdsAt( appearance( id0 )=visible, 2320 ). % Frame number: 59 holdsAt( orientation( id0 )=147, 2360 ). holdsAt( appearance( id0 )=visible, 2360 ). % Frame number: 60 holdsAt( orientation( id0 )=147, 2400 ). holdsAt( appearance( id0 )=visible, 2400 ). % Frame number: 61 holdsAt( orientation( id0 )=147, 2440 ). holdsAt( appearance( id0 )=visible, 2440 ). % Frame number: 62 holdsAt( orientation( id0 )=147, 2480 ). holdsAt( appearance( id0 )=visible, 2480 ). % Frame number: 63 holdsAt( orientation( id0 )=147, 2520 ). holdsAt( appearance( id0 )=visible, 2520 ). % Frame number: 64 holdsAt( orientation( id0 )=147, 2560 ). holdsAt( appearance( id0 )=visible, 2560 ). % Frame number: 65 holdsAt( orientation( id0 )=147, 2600 ). holdsAt( appearance( id0 )=visible, 2600 ). % Frame number: 66 holdsAt( orientation( id0 )=143, 2640 ). holdsAt( appearance( id0 )=visible, 2640 ). % Frame number: 67 holdsAt( orientation( id0 )=143, 2680 ). holdsAt( appearance( id0 )=visible, 2680 ). % Frame number: 68 holdsAt( orientation( id0 )=143, 2720 ). holdsAt( appearance( id0 )=visible, 2720 ). % Frame number: 69 holdsAt( orientation( id0 )=143, 2760 ). holdsAt( appearance( id0 )=visible, 2760 ). % Frame number: 70 holdsAt( orientation( id0 )=143, 2800 ). holdsAt( appearance( id0 )=visible, 2800 ). % Frame number: 71 holdsAt( orientation( id0 )=143, 2840 ). holdsAt( appearance( id0 )=visible, 2840 ). % Frame number: 72 holdsAt( orientation( id0 )=143, 2880 ). holdsAt( appearance( id0 )=visible, 2880 ). % Frame number: 73 holdsAt( orientation( id0 )=143, 2920 ). holdsAt( appearance( id0 )=visible, 2920 ). % Frame number: 74 holdsAt( orientation( id0 )=143, 2960 ). holdsAt( appearance( id0 )=visible, 2960 ). % Frame number: 75 holdsAt( orientation( id0 )=143, 3000 ). holdsAt( appearance( id0 )=visible, 3000 ). % Frame number: 76 holdsAt( orientation( id0 )=143, 3040 ). holdsAt( appearance( id0 )=visible, 3040 ). % Frame number: 77 holdsAt( orientation( id0 )=150, 3080 ). holdsAt( appearance( id0 )=visible, 3080 ). % Frame number: 78 holdsAt( orientation( id0 )=150, 3120 ). holdsAt( appearance( id0 )=visible, 3120 ). % Frame number: 79 holdsAt( orientation( id0 )=160, 3160 ). holdsAt( appearance( id0 )=visible, 3160 ). % Frame number: 80 holdsAt( orientation( id0 )=160, 3200 ). holdsAt( appearance( id0 )=visible, 3200 ). % Frame number: 81 holdsAt( orientation( id0 )=154, 3240 ). holdsAt( appearance( id0 )=visible, 3240 ). % Frame number: 82 holdsAt( orientation( id0 )=154, 3280 ). holdsAt( appearance( id0 )=visible, 3280 ). % Frame number: 83 holdsAt( orientation( id0 )=154, 3320 ). holdsAt( appearance( id0 )=visible, 3320 ). % Frame number: 84 holdsAt( orientation( id0 )=154, 3360 ). holdsAt( appearance( id0 )=visible, 3360 ). % Frame number: 85 holdsAt( orientation( id0 )=154, 3400 ). holdsAt( appearance( id0 )=visible, 3400 ). % Frame number: 86 holdsAt( orientation( id0 )=167, 3440 ). holdsAt( appearance( id0 )=visible, 3440 ). % Frame number: 87 holdsAt( orientation( id0 )=175, 3480 ). holdsAt( appearance( id0 )=visible, 3480 ). % Frame number: 88 holdsAt( orientation( id0 )=175, 3520 ). holdsAt( appearance( id0 )=visible, 3520 ). % Frame number: 89 holdsAt( orientation( id0 )=175, 3560 ). holdsAt( appearance( id0 )=visible, 3560 ). % Frame number: 90 holdsAt( orientation( id0 )=175, 3600 ). holdsAt( appearance( id0 )=visible, 3600 ). % Frame number: 91 holdsAt( orientation( id0 )=175, 3640 ). holdsAt( appearance( id0 )=visible, 3640 ). % Frame number: 92 holdsAt( orientation( id0 )=175, 3680 ). holdsAt( appearance( id0 )=visible, 3680 ). % Frame number: 93 holdsAt( orientation( id0 )=8, 3720 ). holdsAt( appearance( id0 )=visible, 3720 ). % Frame number: 94 holdsAt( orientation( id0 )=8, 3760 ). holdsAt( appearance( id0 )=visible, 3760 ). % Frame number: 95 holdsAt( orientation( id0 )=8, 3800 ). holdsAt( appearance( id0 )=visible, 3800 ). % Frame number: 96 holdsAt( orientation( id0 )=8, 3840 ). holdsAt( appearance( id0 )=visible, 3840 ). % Frame number: 97 holdsAt( orientation( id0 )=8, 3880 ). holdsAt( appearance( id0 )=visible, 3880 ). % Frame number: 98 holdsAt( orientation( id0 )=8, 3920 ). holdsAt( appearance( id0 )=visible, 3920 ). % Frame number: 99 holdsAt( orientation( id0 )=8, 3960 ). holdsAt( appearance( id0 )=visible, 3960 ). % Frame number: 100 holdsAt( orientation( id0 )=8, 4000 ). holdsAt( appearance( id0 )=visible, 4000 ). % Frame number: 101 holdsAt( orientation( id0 )=8, 4040 ). holdsAt( appearance( id0 )=visible, 4040 ). % Frame number: 102 holdsAt( orientation( id0 )=8, 4080 ). holdsAt( appearance( id0 )=visible, 4080 ). % Frame number: 103 holdsAt( orientation( id0 )=8, 4120 ). holdsAt( appearance( id0 )=visible, 4120 ). % Frame number: 104 holdsAt( orientation( id0 )=8, 4160 ). holdsAt( appearance( id0 )=visible, 4160 ). % Frame number: 105 holdsAt( orientation( id0 )=8, 4200 ). holdsAt( appearance( id0 )=visible, 4200 ). % Frame number: 106 holdsAt( orientation( id0 )=8, 4240 ). holdsAt( appearance( id0 )=visible, 4240 ). % Frame number: 107 holdsAt( orientation( id0 )=8, 4280 ). holdsAt( appearance( id0 )=visible, 4280 ). % Frame number: 108 holdsAt( orientation( id0 )=1, 4320 ). holdsAt( appearance( id0 )=visible, 4320 ). % Frame number: 109 holdsAt( orientation( id0 )=174, 4360 ). holdsAt( appearance( id0 )=visible, 4360 ). % Frame number: 110 holdsAt( orientation( id0 )=174, 4400 ). holdsAt( appearance( id0 )=visible, 4400 ). % Frame number: 111 holdsAt( orientation( id0 )=174, 4440 ). holdsAt( appearance( id0 )=visible, 4440 ). % Frame number: 112 holdsAt( orientation( id0 )=174, 4480 ). holdsAt( appearance( id0 )=visible, 4480 ). % Frame number: 113 holdsAt( orientation( id0 )=174, 4520 ). holdsAt( appearance( id0 )=visible, 4520 ). % Frame number: 114 holdsAt( orientation( id0 )=12, 4560 ). holdsAt( appearance( id0 )=visible, 4560 ). % Frame number: 115 holdsAt( orientation( id0 )=12, 4600 ). holdsAt( appearance( id0 )=visible, 4600 ). % Frame number: 116 holdsAt( orientation( id0 )=12, 4640 ). holdsAt( appearance( id0 )=visible, 4640 ). % Frame number: 117 holdsAt( orientation( id0 )=12, 4680 ). holdsAt( appearance( id0 )=visible, 4680 ). % Frame number: 118 holdsAt( orientation( id0 )=12, 4720 ). holdsAt( appearance( id0 )=visible, 4720 ). % Frame number: 119 holdsAt( orientation( id0 )=12, 4760 ). holdsAt( appearance( id0 )=visible, 4760 ). % Frame number: 120 holdsAt( orientation( id0 )=12, 4800 ). holdsAt( appearance( id0 )=visible, 4800 ). % Frame number: 121 holdsAt( orientation( id0 )=12, 4840 ). holdsAt( appearance( id0 )=visible, 4840 ). % Frame number: 122 holdsAt( orientation( id0 )=12, 4880 ). holdsAt( appearance( id0 )=disappear, 4880 ). % Frame number: 147 holdsAt( orientation( id1 )=90, 5880 ). holdsAt( appearance( id1 )=appear, 5880 ). % Frame number: 148 holdsAt( orientation( id1 )=90, 5920 ). holdsAt( appearance( id1 )=visible, 5920 ). % Frame number: 149 holdsAt( orientation( id1 )=90, 5960 ). holdsAt( appearance( id1 )=visible, 5960 ). % Frame number: 150 holdsAt( orientation( id1 )=90, 6000 ). holdsAt( appearance( id1 )=visible, 6000 ). % Frame number: 151 holdsAt( orientation( id1 )=90, 6040 ). holdsAt( appearance( id1 )=visible, 6040 ). % Frame number: 152 holdsAt( orientation( id1 )=0, 6080 ). holdsAt( appearance( id1 )=visible, 6080 ). % Frame number: 153 holdsAt( orientation( id1 )=0, 6120 ). holdsAt( appearance( id1 )=visible, 6120 ). % Frame number: 154 holdsAt( orientation( id1 )=0, 6160 ). holdsAt( appearance( id1 )=visible, 6160 ). % Frame number: 155 holdsAt( orientation( id1 )=0, 6200 ). holdsAt( appearance( id1 )=visible, 6200 ). % Frame number: 156 holdsAt( orientation( id1 )=0, 6240 ). holdsAt( appearance( id1 )=visible, 6240 ). % Frame number: 157 holdsAt( orientation( id1 )=0, 6280 ). holdsAt( appearance( id1 )=visible, 6280 ). % Frame number: 158 holdsAt( orientation( id1 )=0, 6320 ). holdsAt( appearance( id1 )=visible, 6320 ). % Frame number: 159 holdsAt( orientation( id1 )=0, 6360 ). holdsAt( appearance( id1 )=visible, 6360 ). % Frame number: 160 holdsAt( orientation( id1 )=0, 6400 ). holdsAt( appearance( id1 )=visible, 6400 ). % Frame number: 161 holdsAt( orientation( id1 )=0, 6440 ). holdsAt( appearance( id1 )=visible, 6440 ). % Frame number: 162 holdsAt( orientation( id1 )=0, 6480 ). holdsAt( appearance( id1 )=visible, 6480 ). % Frame number: 163 holdsAt( orientation( id1 )=0, 6520 ). holdsAt( appearance( id1 )=visible, 6520 ). % Frame number: 164 holdsAt( orientation( id1 )=0, 6560 ). holdsAt( appearance( id1 )=visible, 6560 ). % Frame number: 165 holdsAt( orientation( id1 )=0, 6600 ). holdsAt( appearance( id1 )=visible, 6600 ). % Frame number: 166 holdsAt( orientation( id1 )=0, 6640 ). holdsAt( appearance( id1 )=visible, 6640 ). % Frame number: 167 holdsAt( orientation( id1 )=0, 6680 ). holdsAt( appearance( id1 )=visible, 6680 ). % Frame number: 168 holdsAt( orientation( id1 )=0, 6720 ). holdsAt( appearance( id1 )=visible, 6720 ). % Frame number: 169 holdsAt( orientation( id1 )=0, 6760 ). holdsAt( appearance( id1 )=visible, 6760 ). % Frame number: 170 holdsAt( orientation( id1 )=0, 6800 ). holdsAt( appearance( id1 )=visible, 6800 ). % Frame number: 171 holdsAt( orientation( id1 )=0, 6840 ). holdsAt( appearance( id1 )=visible, 6840 ). % Frame number: 172 holdsAt( orientation( id1 )=0, 6880 ). holdsAt( appearance( id1 )=visible, 6880 ). % Frame number: 173 holdsAt( orientation( id1 )=0, 6920 ). holdsAt( appearance( id1 )=visible, 6920 ). % Frame number: 174 holdsAt( orientation( id1 )=0, 6960 ). holdsAt( appearance( id1 )=visible, 6960 ). % Frame number: 175 holdsAt( orientation( id1 )=0, 7000 ). holdsAt( appearance( id1 )=visible, 7000 ). % Frame number: 176 holdsAt( orientation( id1 )=0, 7040 ). holdsAt( appearance( id1 )=visible, 7040 ). % Frame number: 177 holdsAt( orientation( id1 )=0, 7080 ). holdsAt( appearance( id1 )=visible, 7080 ). % Frame number: 178 holdsAt( orientation( id1 )=0, 7120 ). holdsAt( appearance( id1 )=visible, 7120 ). % Frame number: 179 holdsAt( orientation( id1 )=0, 7160 ). holdsAt( appearance( id1 )=visible, 7160 ). % Frame number: 180 holdsAt( orientation( id1 )=0, 7200 ). holdsAt( appearance( id1 )=visible, 7200 ). % Frame number: 181 holdsAt( orientation( id1 )=0, 7240 ). holdsAt( appearance( id1 )=visible, 7240 ). % Frame number: 182 holdsAt( orientation( id1 )=0, 7280 ). holdsAt( appearance( id1 )=visible, 7280 ). % Frame number: 183 holdsAt( orientation( id1 )=0, 7320 ). holdsAt( appearance( id1 )=visible, 7320 ). % Frame number: 184 holdsAt( orientation( id1 )=0, 7360 ). holdsAt( appearance( id1 )=visible, 7360 ). % Frame number: 185 holdsAt( orientation( id1 )=0, 7400 ). holdsAt( appearance( id1 )=visible, 7400 ). % Frame number: 186 holdsAt( orientation( id1 )=0, 7440 ). holdsAt( appearance( id1 )=visible, 7440 ). % Frame number: 187 holdsAt( orientation( id1 )=0, 7480 ). holdsAt( appearance( id1 )=visible, 7480 ). % Frame number: 188 holdsAt( orientation( id1 )=0, 7520 ). holdsAt( appearance( id1 )=visible, 7520 ). % Frame number: 189 holdsAt( orientation( id1 )=0, 7560 ). holdsAt( appearance( id1 )=visible, 7560 ). % Frame number: 190 holdsAt( orientation( id1 )=0, 7600 ). holdsAt( appearance( id1 )=visible, 7600 ). % Frame number: 191 holdsAt( orientation( id1 )=0, 7640 ). holdsAt( appearance( id1 )=visible, 7640 ). % Frame number: 192 holdsAt( orientation( id1 )=0, 7680 ). holdsAt( appearance( id1 )=visible, 7680 ). % Frame number: 193 holdsAt( orientation( id1 )=0, 7720 ). holdsAt( appearance( id1 )=visible, 7720 ). % Frame number: 194 holdsAt( orientation( id1 )=0, 7760 ). holdsAt( appearance( id1 )=visible, 7760 ). % Frame number: 195 holdsAt( orientation( id1 )=0, 7800 ). holdsAt( appearance( id1 )=visible, 7800 ). % Frame number: 196 holdsAt( orientation( id1 )=0, 7840 ). holdsAt( appearance( id1 )=visible, 7840 ). % Frame number: 197 holdsAt( orientation( id1 )=0, 7880 ). holdsAt( appearance( id1 )=visible, 7880 ). % Frame number: 198 holdsAt( orientation( id1 )=0, 7920 ). holdsAt( appearance( id1 )=visible, 7920 ). % Frame number: 199 holdsAt( orientation( id1 )=0, 7960 ). holdsAt( appearance( id1 )=visible, 7960 ). % Frame number: 200 holdsAt( orientation( id1 )=0, 8000 ). holdsAt( appearance( id1 )=visible, 8000 ). % Frame number: 201 holdsAt( orientation( id1 )=0, 8040 ). holdsAt( appearance( id1 )=visible, 8040 ). % Frame number: 202 holdsAt( orientation( id1 )=0, 8080 ). holdsAt( appearance( id1 )=disappear, 8080 ). % Frame number: 269 holdsAt( orientation( id2 )=90, 10760 ). holdsAt( appearance( id2 )=appear, 10760 ). % Frame number: 270 holdsAt( orientation( id2 )=90, 10800 ). holdsAt( appearance( id2 )=visible, 10800 ). % Frame number: 271 holdsAt( orientation( id2 )=90, 10840 ). holdsAt( appearance( id2 )=visible, 10840 ). % Frame number: 272 holdsAt( orientation( id2 )=90, 10880 ). holdsAt( appearance( id2 )=visible, 10880 ). % Frame number: 273 holdsAt( orientation( id2 )=90, 10920 ). holdsAt( appearance( id2 )=visible, 10920 ). % Frame number: 274 holdsAt( orientation( id2 )=90, 10960 ). holdsAt( appearance( id2 )=visible, 10960 ). % Frame number: 275 holdsAt( orientation( id2 )=90, 11000 ). holdsAt( appearance( id2 )=visible, 11000 ). % Frame number: 276 holdsAt( orientation( id2 )=90, 11040 ). holdsAt( appearance( id2 )=visible, 11040 ). % Frame number: 277 holdsAt( orientation( id2 )=90, 11080 ). holdsAt( appearance( id2 )=visible, 11080 ). % Frame number: 278 holdsAt( orientation( id2 )=90, 11120 ). holdsAt( appearance( id2 )=visible, 11120 ). % Frame number: 279 holdsAt( orientation( id2 )=90, 11160 ). holdsAt( appearance( id2 )=visible, 11160 ). % Frame number: 280 holdsAt( orientation( id2 )=45, 11200 ). holdsAt( appearance( id2 )=visible, 11200 ). % Frame number: 281 holdsAt( orientation( id2 )=45, 11240 ). holdsAt( appearance( id2 )=visible, 11240 ). % Frame number: 282 holdsAt( orientation( id2 )=45, 11280 ). holdsAt( appearance( id2 )=visible, 11280 ). % Frame number: 283 holdsAt( orientation( id2 )=45, 11320 ). holdsAt( appearance( id2 )=visible, 11320 ). % Frame number: 284 holdsAt( orientation( id2 )=45, 11360 ). holdsAt( appearance( id2 )=visible, 11360 ). % Frame number: 285 holdsAt( orientation( id2 )=45, 11400 ). holdsAt( appearance( id2 )=visible, 11400 ). % Frame number: 286 holdsAt( orientation( id2 )=45, 11440 ). holdsAt( appearance( id2 )=visible, 11440 ). % Frame number: 287 holdsAt( orientation( id2 )=45, 11480 ). holdsAt( appearance( id2 )=visible, 11480 ). % Frame number: 288 holdsAt( orientation( id2 )=32, 11520 ). holdsAt( appearance( id2 )=visible, 11520 ). % Frame number: 289 holdsAt( orientation( id2 )=30, 11560 ). holdsAt( appearance( id2 )=visible, 11560 ). % Frame number: 290 holdsAt( orientation( id2 )=30, 11600 ). holdsAt( appearance( id2 )=visible, 11600 ). % Frame number: 291 holdsAt( orientation( id2 )=30, 11640 ). holdsAt( appearance( id2 )=visible, 11640 ). % Frame number: 292 holdsAt( orientation( id2 )=30, 11680 ). holdsAt( appearance( id2 )=visible, 11680 ). % Frame number: 293 holdsAt( orientation( id2 )=30, 11720 ). holdsAt( appearance( id2 )=visible, 11720 ). % Frame number: 294 holdsAt( orientation( id2 )=25, 11760 ). holdsAt( appearance( id2 )=visible, 11760 ). % Frame number: 295 holdsAt( orientation( id2 )=25, 11800 ). holdsAt( appearance( id2 )=visible, 11800 ). % Frame number: 296 holdsAt( orientation( id2 )=25, 11840 ). holdsAt( appearance( id2 )=visible, 11840 ). % Frame number: 297 holdsAt( orientation( id2 )=25, 11880 ). holdsAt( appearance( id2 )=visible, 11880 ). % Frame number: 298 holdsAt( orientation( id2 )=25, 11920 ). holdsAt( appearance( id2 )=visible, 11920 ). % Frame number: 299 holdsAt( orientation( id2 )=25, 11960 ). holdsAt( appearance( id2 )=visible, 11960 ). % Frame number: 300 holdsAt( orientation( id2 )=25, 12000 ). holdsAt( appearance( id2 )=visible, 12000 ). % Frame number: 301 holdsAt( orientation( id2 )=25, 12040 ). holdsAt( appearance( id2 )=visible, 12040 ). % Frame number: 302 holdsAt( orientation( id2 )=10, 12080 ). holdsAt( appearance( id2 )=visible, 12080 ). % Frame number: 303 holdsAt( orientation( id2 )=0, 12120 ). holdsAt( appearance( id2 )=visible, 12120 ). % Frame number: 304 holdsAt( orientation( id2 )=171, 12160 ). holdsAt( appearance( id2 )=visible, 12160 ). % Frame number: 305 holdsAt( orientation( id2 )=171, 12200 ). holdsAt( appearance( id2 )=visible, 12200 ). % Frame number: 306 holdsAt( orientation( id2 )=163, 12240 ). holdsAt( appearance( id2 )=visible, 12240 ). % Frame number: 307 holdsAt( orientation( id2 )=163, 12280 ). holdsAt( appearance( id2 )=visible, 12280 ). % Frame number: 308 holdsAt( orientation( id2 )=157, 12320 ). holdsAt( appearance( id2 )=visible, 12320 ). % Frame number: 309 holdsAt( orientation( id2 )=157, 12360 ). holdsAt( appearance( id2 )=visible, 12360 ). % Frame number: 310 holdsAt( orientation( id2 )=157, 12400 ). holdsAt( appearance( id2 )=visible, 12400 ). % Frame number: 311 holdsAt( orientation( id2 )=157, 12440 ). holdsAt( appearance( id2 )=visible, 12440 ). % Frame number: 312 holdsAt( orientation( id2 )=153, 12480 ). holdsAt( appearance( id2 )=visible, 12480 ). % Frame number: 313 holdsAt( orientation( id2 )=153, 12520 ). holdsAt( appearance( id2 )=visible, 12520 ). % Frame number: 314 holdsAt( orientation( id2 )=153, 12560 ). holdsAt( appearance( id2 )=visible, 12560 ). % Frame number: 315 holdsAt( orientation( id2 )=153, 12600 ). holdsAt( appearance( id2 )=visible, 12600 ). % Frame number: 316 holdsAt( orientation( id2 )=153, 12640 ). holdsAt( appearance( id2 )=visible, 12640 ). % Frame number: 317 holdsAt( orientation( id2 )=153, 12680 ). holdsAt( appearance( id2 )=visible, 12680 ). % Frame number: 318 holdsAt( orientation( id2 )=153, 12720 ). holdsAt( appearance( id2 )=visible, 12720 ). % Frame number: 319 holdsAt( orientation( id2 )=153, 12760 ). holdsAt( appearance( id2 )=visible, 12760 ). % Frame number: 320 holdsAt( orientation( id2 )=153, 12800 ). holdsAt( appearance( id2 )=visible, 12800 ). % Frame number: 321 holdsAt( orientation( id2 )=153, 12840 ). holdsAt( appearance( id2 )=visible, 12840 ). % Frame number: 322 holdsAt( orientation( id2 )=153, 12880 ). holdsAt( appearance( id2 )=visible, 12880 ). % Frame number: 323 holdsAt( orientation( id2 )=153, 12920 ). holdsAt( appearance( id2 )=visible, 12920 ). % Frame number: 324 holdsAt( orientation( id2 )=153, 12960 ). holdsAt( appearance( id2 )=visible, 12960 ). % Frame number: 325 holdsAt( orientation( id2 )=153, 13000 ). holdsAt( appearance( id2 )=visible, 13000 ). % Frame number: 326 holdsAt( orientation( id2 )=148, 13040 ). holdsAt( appearance( id2 )=visible, 13040 ). % Frame number: 327 holdsAt( orientation( id2 )=145, 13080 ). holdsAt( appearance( id2 )=visible, 13080 ). % Frame number: 328 holdsAt( orientation( id2 )=145, 13120 ). holdsAt( appearance( id2 )=visible, 13120 ). % Frame number: 329 holdsAt( orientation( id2 )=140, 13160 ). holdsAt( appearance( id2 )=visible, 13160 ). % Frame number: 330 holdsAt( orientation( id2 )=140, 13200 ). holdsAt( appearance( id2 )=visible, 13200 ). % Frame number: 331 holdsAt( orientation( id2 )=140, 13240 ). holdsAt( appearance( id2 )=visible, 13240 ). % Frame number: 332 holdsAt( orientation( id2 )=140, 13280 ). holdsAt( appearance( id2 )=visible, 13280 ). % Frame number: 333 holdsAt( orientation( id2 )=140, 13320 ). holdsAt( appearance( id2 )=visible, 13320 ). % Frame number: 334 holdsAt( orientation( id2 )=140, 13360 ). holdsAt( appearance( id2 )=visible, 13360 ). % Frame number: 335 holdsAt( orientation( id2 )=140, 13400 ). holdsAt( appearance( id2 )=visible, 13400 ). % Frame number: 336 holdsAt( orientation( id2 )=147, 13440 ). holdsAt( appearance( id2 )=visible, 13440 ). % Frame number: 337 holdsAt( orientation( id2 )=147, 13480 ). holdsAt( appearance( id2 )=visible, 13480 ). % Frame number: 338 holdsAt( orientation( id2 )=147, 13520 ). holdsAt( appearance( id2 )=visible, 13520 ). % Frame number: 339 holdsAt( orientation( id2 )=147, 13560 ). holdsAt( appearance( id2 )=visible, 13560 ). % Frame number: 340 holdsAt( orientation( id2 )=147, 13600 ). holdsAt( appearance( id2 )=visible, 13600 ). % Frame number: 341 holdsAt( orientation( id2 )=147, 13640 ). holdsAt( appearance( id2 )=visible, 13640 ). % Frame number: 342 holdsAt( orientation( id2 )=147, 13680 ). holdsAt( appearance( id2 )=visible, 13680 ). % Frame number: 343 holdsAt( orientation( id2 )=147, 13720 ). holdsAt( appearance( id2 )=visible, 13720 ). % Frame number: 344 holdsAt( orientation( id2 )=147, 13760 ). holdsAt( appearance( id2 )=visible, 13760 ). % Frame number: 345 holdsAt( orientation( id2 )=147, 13800 ). holdsAt( appearance( id2 )=visible, 13800 ). % Frame number: 346 holdsAt( orientation( id2 )=147, 13840 ). holdsAt( appearance( id2 )=visible, 13840 ). % Frame number: 347 holdsAt( orientation( id2 )=147, 13880 ). holdsAt( appearance( id2 )=visible, 13880 ). % Frame number: 348 holdsAt( orientation( id2 )=147, 13920 ). holdsAt( appearance( id2 )=visible, 13920 ). % Frame number: 349 holdsAt( orientation( id2 )=147, 13960 ). holdsAt( appearance( id2 )=visible, 13960 ). % Frame number: 350 holdsAt( orientation( id2 )=147, 14000 ). holdsAt( appearance( id2 )=visible, 14000 ). % Frame number: 351 holdsAt( orientation( id2 )=147, 14040 ). holdsAt( appearance( id2 )=visible, 14040 ). % Frame number: 352 holdsAt( orientation( id2 )=147, 14080 ). holdsAt( appearance( id2 )=visible, 14080 ). % Frame number: 353 holdsAt( orientation( id2 )=140, 14120 ). holdsAt( appearance( id2 )=visible, 14120 ). % Frame number: 354 holdsAt( orientation( id2 )=140, 14160 ). holdsAt( appearance( id2 )=visible, 14160 ). % Frame number: 355 holdsAt( orientation( id2 )=140, 14200 ). holdsAt( appearance( id2 )=visible, 14200 ). % Frame number: 356 holdsAt( orientation( id2 )=140, 14240 ). holdsAt( appearance( id2 )=visible, 14240 ). % Frame number: 357 holdsAt( orientation( id2 )=140, 14280 ). holdsAt( appearance( id2 )=visible, 14280 ). % Frame number: 358 holdsAt( orientation( id2 )=135, 14320 ). holdsAt( appearance( id2 )=visible, 14320 ). % Frame number: 359 holdsAt( orientation( id2 )=132, 14360 ). holdsAt( appearance( id2 )=visible, 14360 ). % Frame number: 360 holdsAt( orientation( id2 )=132, 14400 ). holdsAt( appearance( id2 )=visible, 14400 ). % Frame number: 361 holdsAt( orientation( id2 )=132, 14440 ). holdsAt( appearance( id2 )=visible, 14440 ). % Frame number: 362 holdsAt( orientation( id2 )=132, 14480 ). holdsAt( appearance( id2 )=visible, 14480 ). % Frame number: 363 holdsAt( orientation( id2 )=132, 14520 ). holdsAt( appearance( id2 )=visible, 14520 ). % Frame number: 364 holdsAt( orientation( id2 )=132, 14560 ). holdsAt( appearance( id2 )=visible, 14560 ). % Frame number: 365 holdsAt( orientation( id2 )=132, 14600 ). holdsAt( appearance( id2 )=visible, 14600 ). % Frame number: 366 holdsAt( orientation( id2 )=132, 14640 ). holdsAt( appearance( id2 )=visible, 14640 ). % Frame number: 367 holdsAt( orientation( id2 )=132, 14680 ). holdsAt( appearance( id2 )=visible, 14680 ). % Frame number: 368 holdsAt( orientation( id2 )=132, 14720 ). holdsAt( appearance( id2 )=visible, 14720 ). % Frame number: 369 holdsAt( orientation( id2 )=132, 14760 ). holdsAt( appearance( id2 )=visible, 14760 ). % Frame number: 370 holdsAt( orientation( id2 )=132, 14800 ). holdsAt( appearance( id2 )=visible, 14800 ). % Frame number: 371 holdsAt( orientation( id2 )=132, 14840 ). holdsAt( appearance( id2 )=visible, 14840 ). % Frame number: 372 holdsAt( orientation( id2 )=132, 14880 ). holdsAt( appearance( id2 )=visible, 14880 ). % Frame number: 373 holdsAt( orientation( id2 )=132, 14920 ). holdsAt( appearance( id2 )=visible, 14920 ). % Frame number: 374 holdsAt( orientation( id2 )=132, 14960 ). holdsAt( appearance( id2 )=visible, 14960 ). % Frame number: 375 holdsAt( orientation( id2 )=132, 15000 ). holdsAt( appearance( id2 )=visible, 15000 ). % Frame number: 376 holdsAt( orientation( id2 )=132, 15040 ). holdsAt( appearance( id2 )=visible, 15040 ). % Frame number: 377 holdsAt( orientation( id2 )=132, 15080 ). holdsAt( appearance( id2 )=visible, 15080 ). % Frame number: 378 holdsAt( orientation( id2 )=132, 15120 ). holdsAt( appearance( id2 )=visible, 15120 ). % Frame number: 379 holdsAt( orientation( id2 )=132, 15160 ). holdsAt( appearance( id2 )=visible, 15160 ). % Frame number: 380 holdsAt( orientation( id2 )=132, 15200 ). holdsAt( appearance( id2 )=visible, 15200 ). % Frame number: 381 holdsAt( orientation( id2 )=132, 15240 ). holdsAt( appearance( id2 )=visible, 15240 ). % Frame number: 382 holdsAt( orientation( id2 )=132, 15280 ). holdsAt( appearance( id2 )=visible, 15280 ). % Frame number: 383 holdsAt( orientation( id2 )=132, 15320 ). holdsAt( appearance( id2 )=visible, 15320 ). % Frame number: 384 holdsAt( orientation( id2 )=132, 15360 ). holdsAt( appearance( id2 )=visible, 15360 ). % Frame number: 385 holdsAt( orientation( id2 )=132, 15400 ). holdsAt( appearance( id2 )=visible, 15400 ). % Frame number: 386 holdsAt( orientation( id2 )=132, 15440 ). holdsAt( appearance( id2 )=visible, 15440 ). % Frame number: 387 holdsAt( orientation( id2 )=129, 15480 ). holdsAt( appearance( id2 )=visible, 15480 ). % Frame number: 388 holdsAt( orientation( id2 )=129, 15520 ). holdsAt( appearance( id2 )=visible, 15520 ). % Frame number: 389 holdsAt( orientation( id2 )=129, 15560 ). holdsAt( appearance( id2 )=visible, 15560 ). % Frame number: 390 holdsAt( orientation( id2 )=129, 15600 ). holdsAt( appearance( id2 )=visible, 15600 ). % Frame number: 391 holdsAt( orientation( id2 )=129, 15640 ). holdsAt( appearance( id2 )=visible, 15640 ). % Frame number: 392 holdsAt( orientation( id2 )=126, 15680 ). holdsAt( appearance( id2 )=visible, 15680 ). % Frame number: 393 holdsAt( orientation( id2 )=126, 15720 ). holdsAt( appearance( id2 )=visible, 15720 ). % Frame number: 394 holdsAt( orientation( id2 )=126, 15760 ). holdsAt( appearance( id2 )=visible, 15760 ). % Frame number: 395 holdsAt( orientation( id2 )=126, 15800 ). holdsAt( appearance( id2 )=visible, 15800 ). % Frame number: 396 holdsAt( orientation( id2 )=126, 15840 ). holdsAt( appearance( id2 )=visible, 15840 ). % Frame number: 397 holdsAt( orientation( id2 )=126, 15880 ). holdsAt( appearance( id2 )=visible, 15880 ). % Frame number: 398 holdsAt( orientation( id2 )=126, 15920 ). holdsAt( appearance( id2 )=visible, 15920 ). % Frame number: 399 holdsAt( orientation( id2 )=126, 15960 ). holdsAt( appearance( id2 )=visible, 15960 ). % Frame number: 400 holdsAt( orientation( id2 )=126, 16000 ). holdsAt( appearance( id2 )=visible, 16000 ). % Frame number: 401 holdsAt( orientation( id2 )=126, 16040 ). holdsAt( appearance( id2 )=visible, 16040 ). % Frame number: 402 holdsAt( orientation( id2 )=126, 16080 ). holdsAt( appearance( id2 )=visible, 16080 ). % Frame number: 403 holdsAt( orientation( id2 )=121, 16120 ). holdsAt( appearance( id2 )=visible, 16120 ). % Frame number: 404 holdsAt( orientation( id2 )=121, 16160 ). holdsAt( appearance( id2 )=visible, 16160 ). % Frame number: 405 holdsAt( orientation( id2 )=121, 16200 ). holdsAt( appearance( id2 )=visible, 16200 ). % Frame number: 406 holdsAt( orientation( id2 )=121, 16240 ). holdsAt( appearance( id2 )=visible, 16240 ). % Frame number: 407 holdsAt( orientation( id2 )=121, 16280 ). holdsAt( appearance( id2 )=visible, 16280 ). % Frame number: 408 holdsAt( orientation( id2 )=121, 16320 ). holdsAt( appearance( id2 )=visible, 16320 ). % Frame number: 409 holdsAt( orientation( id2 )=121, 16360 ). holdsAt( appearance( id2 )=visible, 16360 ). % Frame number: 410 holdsAt( orientation( id2 )=121, 16400 ). holdsAt( appearance( id2 )=visible, 16400 ). % Frame number: 411 holdsAt( orientation( id2 )=121, 16440 ). holdsAt( appearance( id2 )=visible, 16440 ). % Frame number: 412 holdsAt( orientation( id2 )=121, 16480 ). holdsAt( appearance( id2 )=visible, 16480 ). % Frame number: 413 holdsAt( orientation( id2 )=121, 16520 ). holdsAt( appearance( id2 )=visible, 16520 ). % Frame number: 414 holdsAt( orientation( id2 )=121, 16560 ). holdsAt( appearance( id2 )=visible, 16560 ). % Frame number: 415 holdsAt( orientation( id2 )=121, 16600 ). holdsAt( appearance( id2 )=visible, 16600 ). % Frame number: 416 holdsAt( orientation( id2 )=133, 16640 ). holdsAt( appearance( id2 )=visible, 16640 ). % Frame number: 417 holdsAt( orientation( id2 )=133, 16680 ). holdsAt( appearance( id2 )=visible, 16680 ). % Frame number: 418 holdsAt( orientation( id2 )=133, 16720 ). holdsAt( appearance( id2 )=visible, 16720 ). % Frame number: 419 holdsAt( orientation( id2 )=133, 16760 ). holdsAt( appearance( id2 )=visible, 16760 ). % Frame number: 420 holdsAt( orientation( id2 )=133, 16800 ). holdsAt( appearance( id2 )=visible, 16800 ). % Frame number: 421 holdsAt( orientation( id2 )=133, 16840 ). holdsAt( appearance( id2 )=visible, 16840 ). % Frame number: 422 holdsAt( orientation( id2 )=133, 16880 ). holdsAt( appearance( id2 )=visible, 16880 ). % Frame number: 423 holdsAt( orientation( id2 )=133, 16920 ). holdsAt( appearance( id2 )=visible, 16920 ). % Frame number: 424 holdsAt( orientation( id2 )=133, 16960 ). holdsAt( appearance( id2 )=visible, 16960 ). % Frame number: 425 holdsAt( orientation( id2 )=133, 17000 ). holdsAt( appearance( id2 )=visible, 17000 ). % Frame number: 426 holdsAt( orientation( id2 )=133, 17040 ). holdsAt( appearance( id2 )=visible, 17040 ). % Frame number: 427 holdsAt( orientation( id2 )=133, 17080 ). holdsAt( appearance( id2 )=visible, 17080 ). % Frame number: 428 holdsAt( orientation( id2 )=133, 17120 ). holdsAt( appearance( id2 )=visible, 17120 ). % Frame number: 429 holdsAt( orientation( id2 )=133, 17160 ). holdsAt( appearance( id2 )=visible, 17160 ). % Frame number: 430 holdsAt( orientation( id2 )=133, 17200 ). holdsAt( appearance( id2 )=visible, 17200 ). % Frame number: 431 holdsAt( orientation( id2 )=133, 17240 ). holdsAt( appearance( id2 )=visible, 17240 ). % Frame number: 432 holdsAt( orientation( id2 )=133, 17280 ). holdsAt( appearance( id2 )=visible, 17280 ). % Frame number: 433 holdsAt( orientation( id2 )=133, 17320 ). holdsAt( appearance( id2 )=visible, 17320 ). % Frame number: 434 holdsAt( orientation( id2 )=133, 17360 ). holdsAt( appearance( id2 )=visible, 17360 ). % Frame number: 435 holdsAt( orientation( id2 )=133, 17400 ). holdsAt( appearance( id2 )=visible, 17400 ). % Frame number: 436 holdsAt( orientation( id2 )=133, 17440 ). holdsAt( appearance( id2 )=visible, 17440 ). % Frame number: 437 holdsAt( orientation( id2 )=133, 17480 ). holdsAt( appearance( id2 )=visible, 17480 ). % Frame number: 438 holdsAt( orientation( id2 )=133, 17520 ). holdsAt( appearance( id2 )=visible, 17520 ). % Frame number: 439 holdsAt( orientation( id2 )=133, 17560 ). holdsAt( appearance( id2 )=visible, 17560 ). % Frame number: 440 holdsAt( orientation( id2 )=133, 17600 ). holdsAt( appearance( id2 )=visible, 17600 ). % Frame number: 441 holdsAt( orientation( id2 )=133, 17640 ). holdsAt( appearance( id2 )=visible, 17640 ). % Frame number: 442 holdsAt( orientation( id2 )=133, 17680 ). holdsAt( appearance( id2 )=visible, 17680 ). % Frame number: 443 holdsAt( orientation( id2 )=133, 17720 ). holdsAt( appearance( id2 )=visible, 17720 ). % Frame number: 444 holdsAt( orientation( id2 )=133, 17760 ). holdsAt( appearance( id2 )=visible, 17760 ). % Frame number: 445 holdsAt( orientation( id2 )=133, 17800 ). holdsAt( appearance( id2 )=visible, 17800 ). % Frame number: 446 holdsAt( orientation( id2 )=133, 17840 ). holdsAt( appearance( id2 )=visible, 17840 ). % Frame number: 447 holdsAt( orientation( id2 )=133, 17880 ). holdsAt( appearance( id2 )=visible, 17880 ). % Frame number: 448 holdsAt( orientation( id2 )=133, 17920 ). holdsAt( appearance( id2 )=visible, 17920 ). % Frame number: 449 holdsAt( orientation( id2 )=133, 17960 ). holdsAt( appearance( id2 )=visible, 17960 ). % Frame number: 450 holdsAt( orientation( id2 )=133, 18000 ). holdsAt( appearance( id2 )=visible, 18000 ). % Frame number: 451 holdsAt( orientation( id2 )=133, 18040 ). holdsAt( appearance( id2 )=visible, 18040 ). % Frame number: 452 holdsAt( orientation( id2 )=133, 18080 ). holdsAt( appearance( id2 )=visible, 18080 ). % Frame number: 453 holdsAt( orientation( id2 )=133, 18120 ). holdsAt( appearance( id2 )=visible, 18120 ). % Frame number: 454 holdsAt( orientation( id2 )=133, 18160 ). holdsAt( appearance( id2 )=visible, 18160 ). % Frame number: 455 holdsAt( orientation( id2 )=133, 18200 ). holdsAt( appearance( id2 )=visible, 18200 ). % Frame number: 456 holdsAt( orientation( id2 )=133, 18240 ). holdsAt( appearance( id2 )=visible, 18240 ). % Frame number: 457 holdsAt( orientation( id2 )=133, 18280 ). holdsAt( appearance( id2 )=visible, 18280 ). % Frame number: 458 holdsAt( orientation( id2 )=133, 18320 ). holdsAt( appearance( id2 )=visible, 18320 ). % Frame number: 459 holdsAt( orientation( id2 )=127, 18360 ). holdsAt( appearance( id2 )=visible, 18360 ). % Frame number: 460 holdsAt( orientation( id2 )=127, 18400 ). holdsAt( appearance( id2 )=visible, 18400 ). % Frame number: 461 holdsAt( orientation( id2 )=123, 18440 ). holdsAt( appearance( id2 )=visible, 18440 ). % Frame number: 462 holdsAt( orientation( id2 )=121, 18480 ). holdsAt( appearance( id2 )=visible, 18480 ). % Frame number: 463 holdsAt( orientation( id2 )=121, 18520 ). holdsAt( appearance( id2 )=visible, 18520 ). % Frame number: 464 holdsAt( orientation( id2 )=121, 18560 ). holdsAt( appearance( id2 )=visible, 18560 ). % Frame number: 465 holdsAt( orientation( id2 )=115, 18600 ). holdsAt( appearance( id2 )=visible, 18600 ). % Frame number: 466 holdsAt( orientation( id2 )=115, 18640 ). holdsAt( appearance( id2 )=visible, 18640 ). % Frame number: 467 holdsAt( orientation( id2 )=115, 18680 ). holdsAt( appearance( id2 )=visible, 18680 ). % Frame number: 468 holdsAt( orientation( id2 )=115, 18720 ). holdsAt( appearance( id2 )=visible, 18720 ). % Frame number: 469 holdsAt( orientation( id2 )=115, 18760 ). holdsAt( appearance( id2 )=visible, 18760 ). % Frame number: 470 holdsAt( orientation( id2 )=115, 18800 ). holdsAt( appearance( id2 )=visible, 18800 ). % Frame number: 471 holdsAt( orientation( id2 )=115, 18840 ). holdsAt( appearance( id2 )=visible, 18840 ). % Frame number: 472 holdsAt( orientation( id2 )=105, 18880 ). holdsAt( appearance( id2 )=visible, 18880 ). % Frame number: 473 holdsAt( orientation( id2 )=105, 18920 ). holdsAt( appearance( id2 )=visible, 18920 ). % Frame number: 474 holdsAt( orientation( id2 )=99, 18960 ). holdsAt( appearance( id2 )=visible, 18960 ). % Frame number: 475 holdsAt( orientation( id2 )=99, 19000 ). holdsAt( appearance( id2 )=visible, 19000 ). % Frame number: 476 holdsAt( orientation( id2 )=99, 19040 ). holdsAt( appearance( id2 )=visible, 19040 ). % Frame number: 477 holdsAt( orientation( id2 )=93, 19080 ). holdsAt( appearance( id2 )=visible, 19080 ). % Frame number: 478 holdsAt( orientation( id2 )=93, 19120 ). holdsAt( appearance( id2 )=visible, 19120 ). % Frame number: 479 holdsAt( orientation( id2 )=93, 19160 ). holdsAt( appearance( id2 )=visible, 19160 ). % Frame number: 480 holdsAt( orientation( id2 )=93, 19200 ). holdsAt( appearance( id2 )=visible, 19200 ). % Frame number: 481 holdsAt( orientation( id2 )=93, 19240 ). holdsAt( appearance( id2 )=visible, 19240 ). % Frame number: 482 holdsAt( orientation( id2 )=93, 19280 ). holdsAt( appearance( id2 )=visible, 19280 ). % Frame number: 483 holdsAt( orientation( id2 )=93, 19320 ). holdsAt( appearance( id2 )=visible, 19320 ). % Frame number: 484 holdsAt( orientation( id2 )=93, 19360 ). holdsAt( appearance( id2 )=visible, 19360 ). % Frame number: 485 holdsAt( orientation( id2 )=93, 19400 ). holdsAt( appearance( id2 )=visible, 19400 ). % Frame number: 486 holdsAt( orientation( id2 )=93, 19440 ). holdsAt( appearance( id2 )=visible, 19440 ). % Frame number: 487 holdsAt( orientation( id2 )=93, 19480 ). holdsAt( appearance( id2 )=visible, 19480 ). % Frame number: 488 holdsAt( orientation( id2 )=93, 19520 ). holdsAt( appearance( id2 )=visible, 19520 ). % Frame number: 489 holdsAt( orientation( id2 )=93, 19560 ). holdsAt( appearance( id2 )=visible, 19560 ). % Frame number: 490 holdsAt( orientation( id2 )=93, 19600 ). holdsAt( appearance( id2 )=visible, 19600 ). % Frame number: 491 holdsAt( orientation( id2 )=93, 19640 ). holdsAt( appearance( id2 )=visible, 19640 ). % Frame number: 492 holdsAt( orientation( id2 )=107, 19680 ). holdsAt( appearance( id2 )=visible, 19680 ). % Frame number: 493 holdsAt( orientation( id2 )=109, 19720 ). holdsAt( appearance( id2 )=visible, 19720 ). % Frame number: 494 holdsAt( orientation( id2 )=106, 19760 ). holdsAt( appearance( id2 )=visible, 19760 ). % Frame number: 495 holdsAt( orientation( id2 )=105, 19800 ). holdsAt( appearance( id2 )=visible, 19800 ). % Frame number: 496 holdsAt( orientation( id2 )=109, 19840 ). holdsAt( appearance( id2 )=visible, 19840 ). % Frame number: 497 holdsAt( orientation( id2 )=109, 19880 ). holdsAt( appearance( id2 )=visible, 19880 ). % Frame number: 498 holdsAt( orientation( id2 )=118, 19920 ). holdsAt( appearance( id2 )=visible, 19920 ). % Frame number: 499 holdsAt( orientation( id2 )=118, 19960 ). holdsAt( appearance( id2 )=visible, 19960 ). % Frame number: 500 holdsAt( orientation( id2 )=118, 20000 ). holdsAt( appearance( id2 )=visible, 20000 ). % Frame number: 501 holdsAt( orientation( id2 )=118, 20040 ). holdsAt( appearance( id2 )=visible, 20040 ). % Frame number: 502 holdsAt( orientation( id2 )=118, 20080 ). holdsAt( appearance( id2 )=visible, 20080 ). % Frame number: 503 holdsAt( orientation( id2 )=118, 20120 ). holdsAt( appearance( id2 )=visible, 20120 ). holdsAt( orientation( id4 )=135, 20120 ). holdsAt( appearance( id4 )=appear, 20120 ). % Frame number: 504 holdsAt( orientation( id2 )=118, 20160 ). holdsAt( appearance( id2 )=visible, 20160 ). holdsAt( orientation( id4 )=135, 20160 ). holdsAt( appearance( id4 )=visible, 20160 ). % Frame number: 505 holdsAt( orientation( id2 )=126, 20200 ). holdsAt( appearance( id2 )=visible, 20200 ). holdsAt( orientation( id4 )=135, 20200 ). holdsAt( appearance( id4 )=visible, 20200 ). % Frame number: 506 holdsAt( orientation( id2 )=126, 20240 ). holdsAt( appearance( id2 )=visible, 20240 ). holdsAt( orientation( id4 )=135, 20240 ). holdsAt( appearance( id4 )=visible, 20240 ). % Frame number: 507 holdsAt( orientation( id2 )=126, 20280 ). holdsAt( appearance( id2 )=visible, 20280 ). holdsAt( orientation( id4 )=135, 20280 ). holdsAt( appearance( id4 )=visible, 20280 ). % Frame number: 508 holdsAt( orientation( id2 )=126, 20320 ). holdsAt( appearance( id2 )=visible, 20320 ). holdsAt( orientation( id4 )=135, 20320 ). holdsAt( appearance( id4 )=visible, 20320 ). % Frame number: 509 holdsAt( orientation( id2 )=132, 20360 ). holdsAt( appearance( id2 )=visible, 20360 ). holdsAt( orientation( id4 )=135, 20360 ). holdsAt( appearance( id4 )=visible, 20360 ). % Frame number: 510 holdsAt( orientation( id2 )=132, 20400 ). holdsAt( appearance( id2 )=visible, 20400 ). holdsAt( orientation( id4 )=135, 20400 ). holdsAt( appearance( id4 )=visible, 20400 ). % Frame number: 511 holdsAt( orientation( id2 )=132, 20440 ). holdsAt( appearance( id2 )=visible, 20440 ). holdsAt( orientation( id4 )=135, 20440 ). holdsAt( appearance( id4 )=visible, 20440 ). % Frame number: 512 holdsAt( orientation( id2 )=132, 20480 ). holdsAt( appearance( id2 )=visible, 20480 ). holdsAt( orientation( id4 )=135, 20480 ). holdsAt( appearance( id4 )=visible, 20480 ). % Frame number: 513 holdsAt( orientation( id2 )=132, 20520 ). holdsAt( appearance( id2 )=visible, 20520 ). holdsAt( orientation( id4 )=135, 20520 ). holdsAt( appearance( id4 )=visible, 20520 ). % Frame number: 514 holdsAt( orientation( id2 )=132, 20560 ). holdsAt( appearance( id2 )=visible, 20560 ). holdsAt( orientation( id4 )=135, 20560 ). holdsAt( appearance( id4 )=visible, 20560 ). % Frame number: 515 holdsAt( orientation( id2 )=132, 20600 ). holdsAt( appearance( id2 )=visible, 20600 ). holdsAt( orientation( id4 )=135, 20600 ). holdsAt( appearance( id4 )=visible, 20600 ). % Frame number: 516 holdsAt( orientation( id2 )=132, 20640 ). holdsAt( appearance( id2 )=visible, 20640 ). holdsAt( orientation( id4 )=135, 20640 ). holdsAt( appearance( id4 )=visible, 20640 ). % Frame number: 517 holdsAt( orientation( id2 )=132, 20680 ). holdsAt( appearance( id2 )=visible, 20680 ). holdsAt( orientation( id4 )=135, 20680 ). holdsAt( appearance( id4 )=visible, 20680 ). % Frame number: 518 holdsAt( orientation( id2 )=132, 20720 ). holdsAt( appearance( id2 )=visible, 20720 ). holdsAt( orientation( id4 )=135, 20720 ). holdsAt( appearance( id4 )=visible, 20720 ). % Frame number: 519 holdsAt( orientation( id2 )=132, 20760 ). holdsAt( appearance( id2 )=visible, 20760 ). holdsAt( orientation( id4 )=135, 20760 ). holdsAt( appearance( id4 )=visible, 20760 ). % Frame number: 520 holdsAt( orientation( id2 )=132, 20800 ). holdsAt( appearance( id2 )=visible, 20800 ). holdsAt( orientation( id4 )=135, 20800 ). holdsAt( appearance( id4 )=visible, 20800 ). % Frame number: 521 holdsAt( orientation( id2 )=132, 20840 ). holdsAt( appearance( id2 )=visible, 20840 ). holdsAt( orientation( id4 )=135, 20840 ). holdsAt( appearance( id4 )=visible, 20840 ). % Frame number: 522 holdsAt( orientation( id2 )=132, 20880 ). holdsAt( appearance( id2 )=visible, 20880 ). holdsAt( orientation( id4 )=135, 20880 ). holdsAt( appearance( id4 )=visible, 20880 ). % Frame number: 523 holdsAt( orientation( id2 )=132, 20920 ). holdsAt( appearance( id2 )=visible, 20920 ). holdsAt( orientation( id4 )=135, 20920 ). holdsAt( appearance( id4 )=visible, 20920 ). % Frame number: 524 holdsAt( orientation( id2 )=132, 20960 ). holdsAt( appearance( id2 )=visible, 20960 ). holdsAt( orientation( id4 )=135, 20960 ). holdsAt( appearance( id4 )=visible, 20960 ). % Frame number: 525 holdsAt( orientation( id2 )=132, 21000 ). holdsAt( appearance( id2 )=visible, 21000 ). holdsAt( orientation( id4 )=135, 21000 ). holdsAt( appearance( id4 )=visible, 21000 ). % Frame number: 526 holdsAt( orientation( id2 )=132, 21040 ). holdsAt( appearance( id2 )=visible, 21040 ). holdsAt( orientation( id4 )=135, 21040 ). holdsAt( appearance( id4 )=visible, 21040 ). % Frame number: 527 holdsAt( orientation( id2 )=132, 21080 ). holdsAt( appearance( id2 )=visible, 21080 ). holdsAt( orientation( id4 )=135, 21080 ). holdsAt( appearance( id4 )=visible, 21080 ). % Frame number: 528 holdsAt( orientation( id2 )=132, 21120 ). holdsAt( appearance( id2 )=visible, 21120 ). holdsAt( orientation( id4 )=135, 21120 ). holdsAt( appearance( id4 )=visible, 21120 ). % Frame number: 529 holdsAt( orientation( id2 )=132, 21160 ). holdsAt( appearance( id2 )=visible, 21160 ). holdsAt( orientation( id4 )=135, 21160 ). holdsAt( appearance( id4 )=visible, 21160 ). % Frame number: 530 holdsAt( orientation( id2 )=132, 21200 ). holdsAt( appearance( id2 )=visible, 21200 ). holdsAt( orientation( id4 )=135, 21200 ). holdsAt( appearance( id4 )=visible, 21200 ). % Frame number: 531 holdsAt( orientation( id2 )=132, 21240 ). holdsAt( appearance( id2 )=visible, 21240 ). holdsAt( orientation( id4 )=135, 21240 ). holdsAt( appearance( id4 )=visible, 21240 ). % Frame number: 532 holdsAt( orientation( id2 )=132, 21280 ). holdsAt( appearance( id2 )=visible, 21280 ). holdsAt( orientation( id4 )=135, 21280 ). holdsAt( appearance( id4 )=visible, 21280 ). % Frame number: 533 holdsAt( orientation( id2 )=132, 21320 ). holdsAt( appearance( id2 )=visible, 21320 ). holdsAt( orientation( id4 )=135, 21320 ). holdsAt( appearance( id4 )=visible, 21320 ). % Frame number: 534 holdsAt( orientation( id2 )=132, 21360 ). holdsAt( appearance( id2 )=visible, 21360 ). holdsAt( orientation( id4 )=135, 21360 ). holdsAt( appearance( id4 )=visible, 21360 ). % Frame number: 535 holdsAt( orientation( id2 )=132, 21400 ). holdsAt( appearance( id2 )=visible, 21400 ). holdsAt( orientation( id4 )=135, 21400 ). holdsAt( appearance( id4 )=visible, 21400 ). % Frame number: 536 holdsAt( orientation( id2 )=132, 21440 ). holdsAt( appearance( id2 )=visible, 21440 ). holdsAt( orientation( id4 )=135, 21440 ). holdsAt( appearance( id4 )=visible, 21440 ). % Frame number: 537 holdsAt( orientation( id2 )=132, 21480 ). holdsAt( appearance( id2 )=visible, 21480 ). holdsAt( orientation( id4 )=135, 21480 ). holdsAt( appearance( id4 )=visible, 21480 ). % Frame number: 538 holdsAt( orientation( id2 )=132, 21520 ). holdsAt( appearance( id2 )=visible, 21520 ). holdsAt( orientation( id4 )=135, 21520 ). holdsAt( appearance( id4 )=visible, 21520 ). % Frame number: 539 holdsAt( orientation( id2 )=132, 21560 ). holdsAt( appearance( id2 )=visible, 21560 ). holdsAt( orientation( id4 )=135, 21560 ). holdsAt( appearance( id4 )=visible, 21560 ). % Frame number: 540 holdsAt( orientation( id2 )=132, 21600 ). holdsAt( appearance( id2 )=visible, 21600 ). holdsAt( orientation( id4 )=135, 21600 ). holdsAt( appearance( id4 )=visible, 21600 ). % Frame number: 541 holdsAt( orientation( id2 )=132, 21640 ). holdsAt( appearance( id2 )=visible, 21640 ). holdsAt( orientation( id4 )=135, 21640 ). holdsAt( appearance( id4 )=visible, 21640 ). % Frame number: 542 holdsAt( orientation( id2 )=132, 21680 ). holdsAt( appearance( id2 )=visible, 21680 ). holdsAt( orientation( id4 )=135, 21680 ). holdsAt( appearance( id4 )=visible, 21680 ). % Frame number: 543 holdsAt( orientation( id2 )=132, 21720 ). holdsAt( appearance( id2 )=visible, 21720 ). holdsAt( orientation( id4 )=135, 21720 ). holdsAt( appearance( id4 )=visible, 21720 ). % Frame number: 544 holdsAt( orientation( id2 )=132, 21760 ). holdsAt( appearance( id2 )=visible, 21760 ). holdsAt( orientation( id4 )=135, 21760 ). holdsAt( appearance( id4 )=visible, 21760 ). % Frame number: 545 holdsAt( orientation( id2 )=132, 21800 ). holdsAt( appearance( id2 )=visible, 21800 ). holdsAt( orientation( id4 )=135, 21800 ). holdsAt( appearance( id4 )=visible, 21800 ). % Frame number: 546 holdsAt( orientation( id2 )=132, 21840 ). holdsAt( appearance( id2 )=visible, 21840 ). holdsAt( orientation( id4 )=135, 21840 ). holdsAt( appearance( id4 )=visible, 21840 ). % Frame number: 547 holdsAt( orientation( id2 )=132, 21880 ). holdsAt( appearance( id2 )=visible, 21880 ). holdsAt( orientation( id4 )=135, 21880 ). holdsAt( appearance( id4 )=visible, 21880 ). % Frame number: 548 holdsAt( orientation( id2 )=132, 21920 ). holdsAt( appearance( id2 )=visible, 21920 ). holdsAt( orientation( id4 )=135, 21920 ). holdsAt( appearance( id4 )=visible, 21920 ). % Frame number: 549 holdsAt( orientation( id2 )=132, 21960 ). holdsAt( appearance( id2 )=visible, 21960 ). holdsAt( orientation( id4 )=135, 21960 ). holdsAt( appearance( id4 )=visible, 21960 ). % Frame number: 550 holdsAt( orientation( id2 )=132, 22000 ). holdsAt( appearance( id2 )=visible, 22000 ). holdsAt( orientation( id4 )=135, 22000 ). holdsAt( appearance( id4 )=visible, 22000 ). % Frame number: 551 holdsAt( orientation( id2 )=132, 22040 ). holdsAt( appearance( id2 )=visible, 22040 ). holdsAt( orientation( id4 )=135, 22040 ). holdsAt( appearance( id4 )=visible, 22040 ). % Frame number: 552 holdsAt( orientation( id2 )=132, 22080 ). holdsAt( appearance( id2 )=visible, 22080 ). holdsAt( orientation( id4 )=135, 22080 ). holdsAt( appearance( id4 )=visible, 22080 ). % Frame number: 553 holdsAt( orientation( id2 )=132, 22120 ). holdsAt( appearance( id2 )=visible, 22120 ). holdsAt( orientation( id4 )=135, 22120 ). holdsAt( appearance( id4 )=visible, 22120 ). % Frame number: 554 holdsAt( orientation( id2 )=132, 22160 ). holdsAt( appearance( id2 )=visible, 22160 ). holdsAt( orientation( id4 )=135, 22160 ). holdsAt( appearance( id4 )=visible, 22160 ). % Frame number: 555 holdsAt( orientation( id2 )=132, 22200 ). holdsAt( appearance( id2 )=visible, 22200 ). holdsAt( orientation( id4 )=135, 22200 ). holdsAt( appearance( id4 )=visible, 22200 ). % Frame number: 556 holdsAt( orientation( id2 )=132, 22240 ). holdsAt( appearance( id2 )=visible, 22240 ). holdsAt( orientation( id4 )=135, 22240 ). holdsAt( appearance( id4 )=visible, 22240 ). % Frame number: 557 holdsAt( orientation( id2 )=132, 22280 ). holdsAt( appearance( id2 )=visible, 22280 ). holdsAt( orientation( id4 )=135, 22280 ). holdsAt( appearance( id4 )=visible, 22280 ). % Frame number: 558 holdsAt( orientation( id2 )=132, 22320 ). holdsAt( appearance( id2 )=visible, 22320 ). holdsAt( orientation( id4 )=135, 22320 ). holdsAt( appearance( id4 )=visible, 22320 ). % Frame number: 559 holdsAt( orientation( id2 )=132, 22360 ). holdsAt( appearance( id2 )=visible, 22360 ). holdsAt( orientation( id4 )=135, 22360 ). holdsAt( appearance( id4 )=visible, 22360 ). % Frame number: 560 holdsAt( orientation( id2 )=132, 22400 ). holdsAt( appearance( id2 )=visible, 22400 ). holdsAt( orientation( id4 )=135, 22400 ). holdsAt( appearance( id4 )=visible, 22400 ). % Frame number: 561 holdsAt( orientation( id2 )=132, 22440 ). holdsAt( appearance( id2 )=visible, 22440 ). holdsAt( orientation( id4 )=135, 22440 ). holdsAt( appearance( id4 )=visible, 22440 ). % Frame number: 562 holdsAt( orientation( id2 )=132, 22480 ). holdsAt( appearance( id2 )=visible, 22480 ). holdsAt( orientation( id4 )=135, 22480 ). holdsAt( appearance( id4 )=visible, 22480 ). % Frame number: 563 holdsAt( orientation( id2 )=132, 22520 ). holdsAt( appearance( id2 )=visible, 22520 ). holdsAt( orientation( id4 )=135, 22520 ). holdsAt( appearance( id4 )=visible, 22520 ). % Frame number: 564 holdsAt( orientation( id2 )=132, 22560 ). holdsAt( appearance( id2 )=visible, 22560 ). holdsAt( orientation( id4 )=135, 22560 ). holdsAt( appearance( id4 )=visible, 22560 ). % Frame number: 565 holdsAt( orientation( id2 )=132, 22600 ). holdsAt( appearance( id2 )=visible, 22600 ). holdsAt( orientation( id4 )=135, 22600 ). holdsAt( appearance( id4 )=visible, 22600 ). % Frame number: 566 holdsAt( orientation( id2 )=132, 22640 ). holdsAt( appearance( id2 )=visible, 22640 ). holdsAt( orientation( id4 )=135, 22640 ). holdsAt( appearance( id4 )=visible, 22640 ). % Frame number: 567 holdsAt( orientation( id2 )=132, 22680 ). holdsAt( appearance( id2 )=visible, 22680 ). holdsAt( orientation( id4 )=135, 22680 ). holdsAt( appearance( id4 )=visible, 22680 ). % Frame number: 568 holdsAt( orientation( id2 )=132, 22720 ). holdsAt( appearance( id2 )=visible, 22720 ). holdsAt( orientation( id4 )=135, 22720 ). holdsAt( appearance( id4 )=visible, 22720 ). % Frame number: 569 holdsAt( orientation( id2 )=132, 22760 ). holdsAt( appearance( id2 )=visible, 22760 ). holdsAt( orientation( id4 )=135, 22760 ). holdsAt( appearance( id4 )=visible, 22760 ). % Frame number: 570 holdsAt( orientation( id2 )=132, 22800 ). holdsAt( appearance( id2 )=visible, 22800 ). holdsAt( orientation( id4 )=135, 22800 ). holdsAt( appearance( id4 )=visible, 22800 ). % Frame number: 571 holdsAt( orientation( id2 )=132, 22840 ). holdsAt( appearance( id2 )=visible, 22840 ). holdsAt( orientation( id4 )=135, 22840 ). holdsAt( appearance( id4 )=visible, 22840 ). % Frame number: 572 holdsAt( orientation( id2 )=132, 22880 ). holdsAt( appearance( id2 )=visible, 22880 ). holdsAt( orientation( id4 )=135, 22880 ). holdsAt( appearance( id4 )=visible, 22880 ). % Frame number: 573 holdsAt( orientation( id2 )=132, 22920 ). holdsAt( appearance( id2 )=visible, 22920 ). holdsAt( orientation( id4 )=135, 22920 ). holdsAt( appearance( id4 )=visible, 22920 ). % Frame number: 574 holdsAt( orientation( id2 )=132, 22960 ). holdsAt( appearance( id2 )=visible, 22960 ). holdsAt( orientation( id4 )=135, 22960 ). holdsAt( appearance( id4 )=visible, 22960 ). % Frame number: 575 holdsAt( orientation( id2 )=132, 23000 ). holdsAt( appearance( id2 )=visible, 23000 ). holdsAt( orientation( id4 )=135, 23000 ). holdsAt( appearance( id4 )=visible, 23000 ). % Frame number: 576 holdsAt( orientation( id2 )=132, 23040 ). holdsAt( appearance( id2 )=visible, 23040 ). holdsAt( orientation( id4 )=135, 23040 ). holdsAt( appearance( id4 )=visible, 23040 ). % Frame number: 577 holdsAt( orientation( id2 )=132, 23080 ). holdsAt( appearance( id2 )=visible, 23080 ). holdsAt( orientation( id4 )=135, 23080 ). holdsAt( appearance( id4 )=visible, 23080 ). % Frame number: 578 holdsAt( orientation( id2 )=132, 23120 ). holdsAt( appearance( id2 )=visible, 23120 ). holdsAt( orientation( id4 )=135, 23120 ). holdsAt( appearance( id4 )=visible, 23120 ). % Frame number: 579 holdsAt( orientation( id2 )=132, 23160 ). holdsAt( appearance( id2 )=visible, 23160 ). holdsAt( orientation( id4 )=135, 23160 ). holdsAt( appearance( id4 )=visible, 23160 ). % Frame number: 580 holdsAt( orientation( id2 )=132, 23200 ). holdsAt( appearance( id2 )=visible, 23200 ). holdsAt( orientation( id4 )=135, 23200 ). holdsAt( appearance( id4 )=visible, 23200 ). % Frame number: 581 holdsAt( orientation( id2 )=132, 23240 ). holdsAt( appearance( id2 )=visible, 23240 ). holdsAt( orientation( id4 )=135, 23240 ). holdsAt( appearance( id4 )=visible, 23240 ). % Frame number: 582 holdsAt( orientation( id2 )=132, 23280 ). holdsAt( appearance( id2 )=visible, 23280 ). holdsAt( orientation( id4 )=135, 23280 ). holdsAt( appearance( id4 )=visible, 23280 ). % Frame number: 583 holdsAt( orientation( id2 )=132, 23320 ). holdsAt( appearance( id2 )=visible, 23320 ). holdsAt( orientation( id4 )=135, 23320 ). holdsAt( appearance( id4 )=visible, 23320 ). % Frame number: 584 holdsAt( orientation( id2 )=132, 23360 ). holdsAt( appearance( id2 )=visible, 23360 ). holdsAt( orientation( id4 )=135, 23360 ). holdsAt( appearance( id4 )=visible, 23360 ). % Frame number: 585 holdsAt( orientation( id2 )=132, 23400 ). holdsAt( appearance( id2 )=visible, 23400 ). holdsAt( orientation( id4 )=135, 23400 ). holdsAt( appearance( id4 )=visible, 23400 ). % Frame number: 586 holdsAt( orientation( id2 )=132, 23440 ). holdsAt( appearance( id2 )=visible, 23440 ). holdsAt( orientation( id4 )=135, 23440 ). holdsAt( appearance( id4 )=visible, 23440 ). % Frame number: 587 holdsAt( orientation( id2 )=132, 23480 ). holdsAt( appearance( id2 )=visible, 23480 ). holdsAt( orientation( id4 )=135, 23480 ). holdsAt( appearance( id4 )=visible, 23480 ). % Frame number: 588 holdsAt( orientation( id2 )=132, 23520 ). holdsAt( appearance( id2 )=visible, 23520 ). holdsAt( orientation( id4 )=135, 23520 ). holdsAt( appearance( id4 )=visible, 23520 ). % Frame number: 589 holdsAt( orientation( id2 )=132, 23560 ). holdsAt( appearance( id2 )=visible, 23560 ). holdsAt( orientation( id4 )=135, 23560 ). holdsAt( appearance( id4 )=visible, 23560 ). % Frame number: 590 holdsAt( orientation( id2 )=132, 23600 ). holdsAt( appearance( id2 )=visible, 23600 ). holdsAt( orientation( id4 )=135, 23600 ). holdsAt( appearance( id4 )=visible, 23600 ). % Frame number: 591 holdsAt( orientation( id2 )=132, 23640 ). holdsAt( appearance( id2 )=visible, 23640 ). holdsAt( orientation( id4 )=135, 23640 ). holdsAt( appearance( id4 )=visible, 23640 ). % Frame number: 592 holdsAt( orientation( id2 )=132, 23680 ). holdsAt( appearance( id2 )=visible, 23680 ). holdsAt( orientation( id4 )=135, 23680 ). holdsAt( appearance( id4 )=visible, 23680 ). % Frame number: 593 holdsAt( orientation( id2 )=132, 23720 ). holdsAt( appearance( id2 )=visible, 23720 ). holdsAt( orientation( id4 )=135, 23720 ). holdsAt( appearance( id4 )=visible, 23720 ). % Frame number: 594 holdsAt( orientation( id2 )=132, 23760 ). holdsAt( appearance( id2 )=visible, 23760 ). holdsAt( orientation( id4 )=135, 23760 ). holdsAt( appearance( id4 )=visible, 23760 ). % Frame number: 595 holdsAt( orientation( id2 )=132, 23800 ). holdsAt( appearance( id2 )=visible, 23800 ). holdsAt( orientation( id4 )=135, 23800 ). holdsAt( appearance( id4 )=visible, 23800 ). % Frame number: 596 holdsAt( orientation( id2 )=132, 23840 ). holdsAt( appearance( id2 )=visible, 23840 ). holdsAt( orientation( id4 )=135, 23840 ). holdsAt( appearance( id4 )=visible, 23840 ). % Frame number: 597 holdsAt( orientation( id2 )=132, 23880 ). holdsAt( appearance( id2 )=visible, 23880 ). holdsAt( orientation( id4 )=135, 23880 ). holdsAt( appearance( id4 )=visible, 23880 ). % Frame number: 598 holdsAt( orientation( id2 )=132, 23920 ). holdsAt( appearance( id2 )=visible, 23920 ). holdsAt( orientation( id4 )=135, 23920 ). holdsAt( appearance( id4 )=visible, 23920 ). % Frame number: 599 holdsAt( orientation( id2 )=132, 23960 ). holdsAt( appearance( id2 )=visible, 23960 ). holdsAt( orientation( id4 )=135, 23960 ). holdsAt( appearance( id4 )=visible, 23960 ). % Frame number: 600 holdsAt( orientation( id2 )=132, 24000 ). holdsAt( appearance( id2 )=visible, 24000 ). holdsAt( orientation( id4 )=135, 24000 ). holdsAt( appearance( id4 )=visible, 24000 ). % Frame number: 601 holdsAt( orientation( id2 )=132, 24040 ). holdsAt( appearance( id2 )=visible, 24040 ). holdsAt( orientation( id4 )=135, 24040 ). holdsAt( appearance( id4 )=visible, 24040 ). % Frame number: 602 holdsAt( orientation( id2 )=132, 24080 ). holdsAt( appearance( id2 )=visible, 24080 ). holdsAt( orientation( id4 )=135, 24080 ). holdsAt( appearance( id4 )=visible, 24080 ). % Frame number: 603 holdsAt( orientation( id2 )=132, 24120 ). holdsAt( appearance( id2 )=visible, 24120 ). holdsAt( orientation( id4 )=135, 24120 ). holdsAt( appearance( id4 )=visible, 24120 ). % Frame number: 604 holdsAt( orientation( id2 )=132, 24160 ). holdsAt( appearance( id2 )=visible, 24160 ). holdsAt( orientation( id4 )=135, 24160 ). holdsAt( appearance( id4 )=visible, 24160 ). % Frame number: 605 holdsAt( orientation( id2 )=132, 24200 ). holdsAt( appearance( id2 )=visible, 24200 ). holdsAt( orientation( id4 )=135, 24200 ). holdsAt( appearance( id4 )=visible, 24200 ). % Frame number: 606 holdsAt( orientation( id2 )=132, 24240 ). holdsAt( appearance( id2 )=visible, 24240 ). holdsAt( orientation( id4 )=135, 24240 ). holdsAt( appearance( id4 )=visible, 24240 ). % Frame number: 607 holdsAt( orientation( id2 )=132, 24280 ). holdsAt( appearance( id2 )=visible, 24280 ). holdsAt( orientation( id4 )=135, 24280 ). holdsAt( appearance( id4 )=visible, 24280 ). % Frame number: 608 holdsAt( orientation( id2 )=132, 24320 ). holdsAt( appearance( id2 )=visible, 24320 ). holdsAt( orientation( id4 )=135, 24320 ). holdsAt( appearance( id4 )=visible, 24320 ). % Frame number: 609 holdsAt( orientation( id2 )=132, 24360 ). holdsAt( appearance( id2 )=visible, 24360 ). holdsAt( orientation( id4 )=135, 24360 ). holdsAt( appearance( id4 )=visible, 24360 ). % Frame number: 610 holdsAt( orientation( id2 )=132, 24400 ). holdsAt( appearance( id2 )=visible, 24400 ). holdsAt( orientation( id4 )=135, 24400 ). holdsAt( appearance( id4 )=visible, 24400 ). % Frame number: 611 holdsAt( orientation( id2 )=132, 24440 ). holdsAt( appearance( id2 )=visible, 24440 ). holdsAt( orientation( id4 )=135, 24440 ). holdsAt( appearance( id4 )=visible, 24440 ). % Frame number: 612 holdsAt( orientation( id2 )=132, 24480 ). holdsAt( appearance( id2 )=visible, 24480 ). holdsAt( orientation( id4 )=135, 24480 ). holdsAt( appearance( id4 )=visible, 24480 ). % Frame number: 613 holdsAt( orientation( id2 )=132, 24520 ). holdsAt( appearance( id2 )=visible, 24520 ). holdsAt( orientation( id4 )=135, 24520 ). holdsAt( appearance( id4 )=visible, 24520 ). % Frame number: 614 holdsAt( orientation( id2 )=132, 24560 ). holdsAt( appearance( id2 )=visible, 24560 ). holdsAt( orientation( id4 )=135, 24560 ). holdsAt( appearance( id4 )=visible, 24560 ). % Frame number: 615 holdsAt( orientation( id2 )=132, 24600 ). holdsAt( appearance( id2 )=visible, 24600 ). holdsAt( orientation( id4 )=135, 24600 ). holdsAt( appearance( id4 )=visible, 24600 ). % Frame number: 616 holdsAt( orientation( id2 )=132, 24640 ). holdsAt( appearance( id2 )=visible, 24640 ). holdsAt( orientation( id4 )=135, 24640 ). holdsAt( appearance( id4 )=visible, 24640 ). % Frame number: 617 holdsAt( orientation( id2 )=132, 24680 ). holdsAt( appearance( id2 )=visible, 24680 ). holdsAt( orientation( id4 )=135, 24680 ). holdsAt( appearance( id4 )=visible, 24680 ). % Frame number: 618 holdsAt( orientation( id2 )=132, 24720 ). holdsAt( appearance( id2 )=visible, 24720 ). holdsAt( orientation( id4 )=135, 24720 ). holdsAt( appearance( id4 )=visible, 24720 ). % Frame number: 619 holdsAt( orientation( id2 )=132, 24760 ). holdsAt( appearance( id2 )=visible, 24760 ). holdsAt( orientation( id4 )=135, 24760 ). holdsAt( appearance( id4 )=visible, 24760 ). % Frame number: 620 holdsAt( orientation( id2 )=132, 24800 ). holdsAt( appearance( id2 )=visible, 24800 ). holdsAt( orientation( id4 )=135, 24800 ). holdsAt( appearance( id4 )=visible, 24800 ). % Frame number: 621 holdsAt( orientation( id2 )=132, 24840 ). holdsAt( appearance( id2 )=visible, 24840 ). holdsAt( orientation( id4 )=135, 24840 ). holdsAt( appearance( id4 )=visible, 24840 ). % Frame number: 622 holdsAt( orientation( id2 )=132, 24880 ). holdsAt( appearance( id2 )=visible, 24880 ). holdsAt( orientation( id4 )=135, 24880 ). holdsAt( appearance( id4 )=visible, 24880 ). % Frame number: 623 holdsAt( orientation( id2 )=132, 24920 ). holdsAt( appearance( id2 )=visible, 24920 ). holdsAt( orientation( id4 )=135, 24920 ). holdsAt( appearance( id4 )=visible, 24920 ). % Frame number: 624 holdsAt( orientation( id2 )=132, 24960 ). holdsAt( appearance( id2 )=visible, 24960 ). holdsAt( orientation( id4 )=135, 24960 ). holdsAt( appearance( id4 )=visible, 24960 ). % Frame number: 625 holdsAt( orientation( id2 )=132, 25000 ). holdsAt( appearance( id2 )=visible, 25000 ). holdsAt( orientation( id4 )=135, 25000 ). holdsAt( appearance( id4 )=visible, 25000 ). % Frame number: 626 holdsAt( orientation( id2 )=132, 25040 ). holdsAt( appearance( id2 )=visible, 25040 ). holdsAt( orientation( id4 )=135, 25040 ). holdsAt( appearance( id4 )=visible, 25040 ). % Frame number: 627 holdsAt( orientation( id2 )=132, 25080 ). holdsAt( appearance( id2 )=visible, 25080 ). holdsAt( orientation( id4 )=135, 25080 ). holdsAt( appearance( id4 )=visible, 25080 ). % Frame number: 628 holdsAt( orientation( id2 )=132, 25120 ). holdsAt( appearance( id2 )=visible, 25120 ). holdsAt( orientation( id4 )=135, 25120 ). holdsAt( appearance( id4 )=visible, 25120 ). % Frame number: 629 holdsAt( orientation( id2 )=132, 25160 ). holdsAt( appearance( id2 )=visible, 25160 ). holdsAt( orientation( id4 )=135, 25160 ). holdsAt( appearance( id4 )=visible, 25160 ). % Frame number: 630 holdsAt( orientation( id2 )=132, 25200 ). holdsAt( appearance( id2 )=visible, 25200 ). holdsAt( orientation( id4 )=135, 25200 ). holdsAt( appearance( id4 )=visible, 25200 ). % Frame number: 631 holdsAt( orientation( id2 )=132, 25240 ). holdsAt( appearance( id2 )=visible, 25240 ). holdsAt( orientation( id4 )=135, 25240 ). holdsAt( appearance( id4 )=visible, 25240 ). % Frame number: 632 holdsAt( orientation( id2 )=132, 25280 ). holdsAt( appearance( id2 )=visible, 25280 ). holdsAt( orientation( id4 )=135, 25280 ). holdsAt( appearance( id4 )=visible, 25280 ). % Frame number: 633 holdsAt( orientation( id2 )=132, 25320 ). holdsAt( appearance( id2 )=visible, 25320 ). holdsAt( orientation( id4 )=135, 25320 ). holdsAt( appearance( id4 )=visible, 25320 ). % Frame number: 634 holdsAt( orientation( id2 )=132, 25360 ). holdsAt( appearance( id2 )=visible, 25360 ). holdsAt( orientation( id4 )=135, 25360 ). holdsAt( appearance( id4 )=visible, 25360 ). % Frame number: 635 holdsAt( orientation( id2 )=132, 25400 ). holdsAt( appearance( id2 )=visible, 25400 ). holdsAt( orientation( id4 )=135, 25400 ). holdsAt( appearance( id4 )=visible, 25400 ). % Frame number: 636 holdsAt( orientation( id2 )=132, 25440 ). holdsAt( appearance( id2 )=visible, 25440 ). holdsAt( orientation( id4 )=135, 25440 ). holdsAt( appearance( id4 )=visible, 25440 ). % Frame number: 637 holdsAt( orientation( id2 )=132, 25480 ). holdsAt( appearance( id2 )=visible, 25480 ). holdsAt( orientation( id4 )=135, 25480 ). holdsAt( appearance( id4 )=visible, 25480 ). % Frame number: 638 holdsAt( orientation( id2 )=132, 25520 ). holdsAt( appearance( id2 )=visible, 25520 ). holdsAt( orientation( id4 )=135, 25520 ). holdsAt( appearance( id4 )=visible, 25520 ). % Frame number: 639 holdsAt( orientation( id2 )=132, 25560 ). holdsAt( appearance( id2 )=visible, 25560 ). holdsAt( orientation( id4 )=135, 25560 ). holdsAt( appearance( id4 )=visible, 25560 ). % Frame number: 640 holdsAt( orientation( id2 )=132, 25600 ). holdsAt( appearance( id2 )=visible, 25600 ). holdsAt( orientation( id4 )=135, 25600 ). holdsAt( appearance( id4 )=visible, 25600 ). % Frame number: 641 holdsAt( orientation( id2 )=132, 25640 ). holdsAt( appearance( id2 )=visible, 25640 ). holdsAt( orientation( id4 )=135, 25640 ). holdsAt( appearance( id4 )=visible, 25640 ). % Frame number: 642 holdsAt( orientation( id2 )=132, 25680 ). holdsAt( appearance( id2 )=visible, 25680 ). holdsAt( orientation( id4 )=135, 25680 ). holdsAt( appearance( id4 )=visible, 25680 ). % Frame number: 643 holdsAt( orientation( id2 )=132, 25720 ). holdsAt( appearance( id2 )=visible, 25720 ). holdsAt( orientation( id4 )=135, 25720 ). holdsAt( appearance( id4 )=visible, 25720 ). % Frame number: 644 holdsAt( orientation( id2 )=132, 25760 ). holdsAt( appearance( id2 )=visible, 25760 ). holdsAt( orientation( id4 )=135, 25760 ). holdsAt( appearance( id4 )=visible, 25760 ). % Frame number: 645 holdsAt( orientation( id2 )=132, 25800 ). holdsAt( appearance( id2 )=visible, 25800 ). holdsAt( orientation( id4 )=135, 25800 ). holdsAt( appearance( id4 )=visible, 25800 ). % Frame number: 646 holdsAt( orientation( id2 )=132, 25840 ). holdsAt( appearance( id2 )=visible, 25840 ). holdsAt( orientation( id4 )=135, 25840 ). holdsAt( appearance( id4 )=visible, 25840 ). % Frame number: 647 holdsAt( orientation( id2 )=132, 25880 ). holdsAt( appearance( id2 )=visible, 25880 ). holdsAt( orientation( id4 )=135, 25880 ). holdsAt( appearance( id4 )=visible, 25880 ). % Frame number: 648 holdsAt( orientation( id2 )=132, 25920 ). holdsAt( appearance( id2 )=visible, 25920 ). holdsAt( orientation( id4 )=135, 25920 ). holdsAt( appearance( id4 )=visible, 25920 ). % Frame number: 649 holdsAt( orientation( id2 )=132, 25960 ). holdsAt( appearance( id2 )=visible, 25960 ). holdsAt( orientation( id4 )=135, 25960 ). holdsAt( appearance( id4 )=visible, 25960 ). % Frame number: 650 holdsAt( orientation( id2 )=132, 26000 ). holdsAt( appearance( id2 )=visible, 26000 ). holdsAt( orientation( id4 )=135, 26000 ). holdsAt( appearance( id4 )=visible, 26000 ). % Frame number: 651 holdsAt( orientation( id2 )=132, 26040 ). holdsAt( appearance( id2 )=visible, 26040 ). holdsAt( orientation( id4 )=135, 26040 ). holdsAt( appearance( id4 )=visible, 26040 ). % Frame number: 652 holdsAt( orientation( id2 )=132, 26080 ). holdsAt( appearance( id2 )=visible, 26080 ). holdsAt( orientation( id4 )=135, 26080 ). holdsAt( appearance( id4 )=visible, 26080 ). % Frame number: 653 holdsAt( orientation( id2 )=132, 26120 ). holdsAt( appearance( id2 )=visible, 26120 ). holdsAt( orientation( id4 )=135, 26120 ). holdsAt( appearance( id4 )=visible, 26120 ). % Frame number: 654 holdsAt( orientation( id2 )=132, 26160 ). holdsAt( appearance( id2 )=visible, 26160 ). holdsAt( orientation( id4 )=135, 26160 ). holdsAt( appearance( id4 )=visible, 26160 ). % Frame number: 655 holdsAt( orientation( id2 )=132, 26200 ). holdsAt( appearance( id2 )=visible, 26200 ). holdsAt( orientation( id4 )=135, 26200 ). holdsAt( appearance( id4 )=visible, 26200 ). % Frame number: 656 holdsAt( orientation( id2 )=132, 26240 ). holdsAt( appearance( id2 )=visible, 26240 ). holdsAt( orientation( id4 )=135, 26240 ). holdsAt( appearance( id4 )=visible, 26240 ). % Frame number: 657 holdsAt( orientation( id2 )=132, 26280 ). holdsAt( appearance( id2 )=visible, 26280 ). holdsAt( orientation( id4 )=135, 26280 ). holdsAt( appearance( id4 )=visible, 26280 ). % Frame number: 658 holdsAt( orientation( id2 )=132, 26320 ). holdsAt( appearance( id2 )=visible, 26320 ). holdsAt( orientation( id4 )=135, 26320 ). holdsAt( appearance( id4 )=visible, 26320 ). % Frame number: 659 holdsAt( orientation( id2 )=132, 26360 ). holdsAt( appearance( id2 )=visible, 26360 ). holdsAt( orientation( id4 )=135, 26360 ). holdsAt( appearance( id4 )=visible, 26360 ). % Frame number: 660 holdsAt( orientation( id2 )=132, 26400 ). holdsAt( appearance( id2 )=visible, 26400 ). holdsAt( orientation( id4 )=135, 26400 ). holdsAt( appearance( id4 )=visible, 26400 ). % Frame number: 661 holdsAt( orientation( id2 )=132, 26440 ). holdsAt( appearance( id2 )=visible, 26440 ). holdsAt( orientation( id4 )=135, 26440 ). holdsAt( appearance( id4 )=visible, 26440 ). % Frame number: 662 holdsAt( orientation( id2 )=132, 26480 ). holdsAt( appearance( id2 )=visible, 26480 ). holdsAt( orientation( id4 )=135, 26480 ). holdsAt( appearance( id4 )=visible, 26480 ). % Frame number: 663 holdsAt( orientation( id2 )=132, 26520 ). holdsAt( appearance( id2 )=visible, 26520 ). holdsAt( orientation( id4 )=135, 26520 ). holdsAt( appearance( id4 )=visible, 26520 ). % Frame number: 664 holdsAt( orientation( id2 )=132, 26560 ). holdsAt( appearance( id2 )=visible, 26560 ). holdsAt( orientation( id4 )=135, 26560 ). holdsAt( appearance( id4 )=visible, 26560 ). % Frame number: 665 holdsAt( orientation( id2 )=132, 26600 ). holdsAt( appearance( id2 )=visible, 26600 ). holdsAt( orientation( id4 )=135, 26600 ). holdsAt( appearance( id4 )=visible, 26600 ). % Frame number: 666 holdsAt( orientation( id2 )=127, 26640 ). holdsAt( appearance( id2 )=visible, 26640 ). holdsAt( orientation( id4 )=135, 26640 ). holdsAt( appearance( id4 )=visible, 26640 ). % Frame number: 667 holdsAt( orientation( id2 )=127, 26680 ). holdsAt( appearance( id2 )=visible, 26680 ). holdsAt( orientation( id4 )=135, 26680 ). holdsAt( appearance( id4 )=visible, 26680 ). % Frame number: 668 holdsAt( orientation( id2 )=127, 26720 ). holdsAt( appearance( id2 )=visible, 26720 ). holdsAt( orientation( id4 )=135, 26720 ). holdsAt( appearance( id4 )=visible, 26720 ). % Frame number: 669 holdsAt( orientation( id2 )=127, 26760 ). holdsAt( appearance( id2 )=visible, 26760 ). holdsAt( orientation( id4 )=135, 26760 ). holdsAt( appearance( id4 )=visible, 26760 ). % Frame number: 670 holdsAt( orientation( id2 )=131, 26800 ). holdsAt( appearance( id2 )=visible, 26800 ). holdsAt( orientation( id4 )=135, 26800 ). holdsAt( appearance( id4 )=visible, 26800 ). % Frame number: 671 holdsAt( orientation( id2 )=131, 26840 ). holdsAt( appearance( id2 )=visible, 26840 ). holdsAt( orientation( id4 )=135, 26840 ). holdsAt( appearance( id4 )=visible, 26840 ). % Frame number: 672 holdsAt( orientation( id2 )=131, 26880 ). holdsAt( appearance( id2 )=visible, 26880 ). holdsAt( orientation( id4 )=135, 26880 ). holdsAt( appearance( id4 )=visible, 26880 ). % Frame number: 673 holdsAt( orientation( id2 )=131, 26920 ). holdsAt( appearance( id2 )=visible, 26920 ). holdsAt( orientation( id4 )=135, 26920 ). holdsAt( appearance( id4 )=visible, 26920 ). % Frame number: 674 holdsAt( orientation( id2 )=131, 26960 ). holdsAt( appearance( id2 )=visible, 26960 ). holdsAt( orientation( id4 )=135, 26960 ). holdsAt( appearance( id4 )=visible, 26960 ). % Frame number: 675 holdsAt( orientation( id2 )=131, 27000 ). holdsAt( appearance( id2 )=visible, 27000 ). holdsAt( orientation( id4 )=135, 27000 ). holdsAt( appearance( id4 )=visible, 27000 ). % Frame number: 676 holdsAt( orientation( id2 )=131, 27040 ). holdsAt( appearance( id2 )=visible, 27040 ). holdsAt( orientation( id4 )=135, 27040 ). holdsAt( appearance( id4 )=visible, 27040 ). % Frame number: 677 holdsAt( orientation( id2 )=131, 27080 ). holdsAt( appearance( id2 )=visible, 27080 ). holdsAt( orientation( id4 )=135, 27080 ). holdsAt( appearance( id4 )=visible, 27080 ). % Frame number: 678 holdsAt( orientation( id2 )=131, 27120 ). holdsAt( appearance( id2 )=visible, 27120 ). holdsAt( orientation( id4 )=135, 27120 ). holdsAt( appearance( id4 )=visible, 27120 ). % Frame number: 679 holdsAt( orientation( id2 )=131, 27160 ). holdsAt( appearance( id2 )=visible, 27160 ). holdsAt( orientation( id4 )=135, 27160 ). holdsAt( appearance( id4 )=visible, 27160 ). % Frame number: 680 holdsAt( orientation( id2 )=131, 27200 ). holdsAt( appearance( id2 )=visible, 27200 ). holdsAt( orientation( id4 )=135, 27200 ). holdsAt( appearance( id4 )=visible, 27200 ). % Frame number: 681 holdsAt( orientation( id2 )=131, 27240 ). holdsAt( appearance( id2 )=visible, 27240 ). holdsAt( orientation( id4 )=135, 27240 ). holdsAt( appearance( id4 )=visible, 27240 ). % Frame number: 682 holdsAt( orientation( id2 )=131, 27280 ). holdsAt( appearance( id2 )=visible, 27280 ). holdsAt( orientation( id4 )=135, 27280 ). holdsAt( appearance( id4 )=visible, 27280 ). % Frame number: 683 holdsAt( orientation( id2 )=131, 27320 ). holdsAt( appearance( id2 )=visible, 27320 ). holdsAt( orientation( id4 )=135, 27320 ). holdsAt( appearance( id4 )=visible, 27320 ). % Frame number: 684 holdsAt( orientation( id2 )=131, 27360 ). holdsAt( appearance( id2 )=visible, 27360 ). holdsAt( orientation( id4 )=135, 27360 ). holdsAt( appearance( id4 )=visible, 27360 ). % Frame number: 685 holdsAt( orientation( id2 )=131, 27400 ). holdsAt( appearance( id2 )=visible, 27400 ). holdsAt( orientation( id4 )=135, 27400 ). holdsAt( appearance( id4 )=visible, 27400 ). % Frame number: 686 holdsAt( orientation( id2 )=137, 27440 ). holdsAt( appearance( id2 )=visible, 27440 ). holdsAt( orientation( id4 )=135, 27440 ). holdsAt( appearance( id4 )=visible, 27440 ). % Frame number: 687 holdsAt( orientation( id2 )=132, 27480 ). holdsAt( appearance( id2 )=visible, 27480 ). holdsAt( orientation( id4 )=135, 27480 ). holdsAt( appearance( id4 )=visible, 27480 ). % Frame number: 688 holdsAt( orientation( id2 )=132, 27520 ). holdsAt( appearance( id2 )=visible, 27520 ). holdsAt( orientation( id4 )=135, 27520 ). holdsAt( appearance( id4 )=visible, 27520 ). % Frame number: 689 holdsAt( orientation( id2 )=132, 27560 ). holdsAt( appearance( id2 )=visible, 27560 ). holdsAt( orientation( id4 )=135, 27560 ). holdsAt( appearance( id4 )=visible, 27560 ). % Frame number: 690 holdsAt( orientation( id2 )=132, 27600 ). holdsAt( appearance( id2 )=visible, 27600 ). holdsAt( orientation( id4 )=135, 27600 ). holdsAt( appearance( id4 )=visible, 27600 ). % Frame number: 691 holdsAt( orientation( id2 )=132, 27640 ). holdsAt( appearance( id2 )=visible, 27640 ). holdsAt( orientation( id4 )=135, 27640 ). holdsAt( appearance( id4 )=visible, 27640 ). % Frame number: 692 holdsAt( orientation( id2 )=132, 27680 ). holdsAt( appearance( id2 )=visible, 27680 ). holdsAt( orientation( id4 )=135, 27680 ). holdsAt( appearance( id4 )=visible, 27680 ). % Frame number: 693 holdsAt( orientation( id2 )=126, 27720 ). holdsAt( appearance( id2 )=visible, 27720 ). holdsAt( orientation( id4 )=135, 27720 ). holdsAt( appearance( id4 )=visible, 27720 ). % Frame number: 694 holdsAt( orientation( id2 )=126, 27760 ). holdsAt( appearance( id2 )=visible, 27760 ). holdsAt( orientation( id4 )=135, 27760 ). holdsAt( appearance( id4 )=visible, 27760 ). % Frame number: 695 holdsAt( orientation( id2 )=124, 27800 ). holdsAt( appearance( id2 )=visible, 27800 ). holdsAt( orientation( id4 )=135, 27800 ). holdsAt( appearance( id4 )=visible, 27800 ). % Frame number: 696 holdsAt( orientation( id2 )=124, 27840 ). holdsAt( appearance( id2 )=visible, 27840 ). holdsAt( orientation( id4 )=135, 27840 ). holdsAt( appearance( id4 )=visible, 27840 ). % Frame number: 697 holdsAt( orientation( id2 )=124, 27880 ). holdsAt( appearance( id2 )=visible, 27880 ). holdsAt( orientation( id4 )=135, 27880 ). holdsAt( appearance( id4 )=visible, 27880 ). % Frame number: 698 holdsAt( orientation( id2 )=118, 27920 ). holdsAt( appearance( id2 )=visible, 27920 ). holdsAt( orientation( id4 )=135, 27920 ). holdsAt( appearance( id4 )=visible, 27920 ). % Frame number: 699 holdsAt( orientation( id2 )=122, 27960 ). holdsAt( appearance( id2 )=visible, 27960 ). holdsAt( orientation( id4 )=135, 27960 ). holdsAt( appearance( id4 )=visible, 27960 ). % Frame number: 700 holdsAt( orientation( id2 )=122, 28000 ). holdsAt( appearance( id2 )=visible, 28000 ). holdsAt( orientation( id4 )=135, 28000 ). holdsAt( appearance( id4 )=visible, 28000 ). % Frame number: 701 holdsAt( orientation( id2 )=122, 28040 ). holdsAt( appearance( id2 )=visible, 28040 ). holdsAt( orientation( id4 )=135, 28040 ). holdsAt( appearance( id4 )=visible, 28040 ). % Frame number: 702 holdsAt( orientation( id2 )=122, 28080 ). holdsAt( appearance( id2 )=visible, 28080 ). holdsAt( orientation( id4 )=135, 28080 ). holdsAt( appearance( id4 )=visible, 28080 ). % Frame number: 703 holdsAt( orientation( id2 )=131, 28120 ). holdsAt( appearance( id2 )=visible, 28120 ). holdsAt( orientation( id4 )=135, 28120 ). holdsAt( appearance( id4 )=visible, 28120 ). % Frame number: 704 holdsAt( orientation( id2 )=131, 28160 ). holdsAt( appearance( id2 )=visible, 28160 ). holdsAt( orientation( id4 )=135, 28160 ). holdsAt( appearance( id4 )=visible, 28160 ). % Frame number: 705 holdsAt( orientation( id2 )=131, 28200 ). holdsAt( appearance( id2 )=visible, 28200 ). holdsAt( orientation( id4 )=135, 28200 ). holdsAt( appearance( id4 )=visible, 28200 ). % Frame number: 706 holdsAt( orientation( id2 )=131, 28240 ). holdsAt( appearance( id2 )=visible, 28240 ). holdsAt( orientation( id4 )=135, 28240 ). holdsAt( appearance( id4 )=visible, 28240 ). % Frame number: 707 holdsAt( orientation( id2 )=126, 28280 ). holdsAt( appearance( id2 )=visible, 28280 ). holdsAt( orientation( id4 )=135, 28280 ). holdsAt( appearance( id4 )=visible, 28280 ). % Frame number: 708 holdsAt( orientation( id2 )=126, 28320 ). holdsAt( appearance( id2 )=visible, 28320 ). holdsAt( orientation( id4 )=135, 28320 ). holdsAt( appearance( id4 )=visible, 28320 ). % Frame number: 709 holdsAt( orientation( id2 )=126, 28360 ). holdsAt( appearance( id2 )=visible, 28360 ). holdsAt( orientation( id4 )=135, 28360 ). holdsAt( appearance( id4 )=visible, 28360 ). % Frame number: 710 holdsAt( orientation( id2 )=126, 28400 ). holdsAt( appearance( id2 )=visible, 28400 ). holdsAt( orientation( id4 )=135, 28400 ). holdsAt( appearance( id4 )=visible, 28400 ). % Frame number: 711 holdsAt( orientation( id2 )=126, 28440 ). holdsAt( appearance( id2 )=visible, 28440 ). holdsAt( orientation( id4 )=135, 28440 ). holdsAt( appearance( id4 )=visible, 28440 ). % Frame number: 712 holdsAt( orientation( id2 )=118, 28480 ). holdsAt( appearance( id2 )=visible, 28480 ). holdsAt( orientation( id4 )=135, 28480 ). holdsAt( appearance( id4 )=visible, 28480 ). % Frame number: 713 holdsAt( orientation( id2 )=121, 28520 ). holdsAt( appearance( id2 )=visible, 28520 ). holdsAt( orientation( id4 )=135, 28520 ). holdsAt( appearance( id4 )=visible, 28520 ). % Frame number: 714 holdsAt( orientation( id2 )=121, 28560 ). holdsAt( appearance( id2 )=visible, 28560 ). holdsAt( orientation( id4 )=135, 28560 ). holdsAt( appearance( id4 )=visible, 28560 ). % Frame number: 715 holdsAt( orientation( id2 )=127, 28600 ). holdsAt( appearance( id2 )=visible, 28600 ). holdsAt( orientation( id4 )=135, 28600 ). holdsAt( appearance( id4 )=visible, 28600 ). % Frame number: 716 holdsAt( orientation( id2 )=127, 28640 ). holdsAt( appearance( id2 )=visible, 28640 ). holdsAt( orientation( id4 )=135, 28640 ). holdsAt( appearance( id4 )=visible, 28640 ). % Frame number: 717 holdsAt( orientation( id2 )=127, 28680 ). holdsAt( appearance( id2 )=visible, 28680 ). holdsAt( orientation( id4 )=135, 28680 ). holdsAt( appearance( id4 )=visible, 28680 ). % Frame number: 718 holdsAt( orientation( id2 )=127, 28720 ). holdsAt( appearance( id2 )=visible, 28720 ). holdsAt( orientation( id4 )=135, 28720 ). holdsAt( appearance( id4 )=visible, 28720 ). % Frame number: 719 holdsAt( orientation( id2 )=127, 28760 ). holdsAt( appearance( id2 )=visible, 28760 ). holdsAt( orientation( id4 )=135, 28760 ). holdsAt( appearance( id4 )=visible, 28760 ). % Frame number: 720 holdsAt( orientation( id2 )=127, 28800 ). holdsAt( appearance( id2 )=visible, 28800 ). holdsAt( orientation( id4 )=135, 28800 ). holdsAt( appearance( id4 )=visible, 28800 ). % Frame number: 721 holdsAt( orientation( id2 )=127, 28840 ). holdsAt( appearance( id2 )=visible, 28840 ). holdsAt( orientation( id4 )=135, 28840 ). holdsAt( appearance( id4 )=visible, 28840 ). % Frame number: 722 holdsAt( orientation( id2 )=124, 28880 ). holdsAt( appearance( id2 )=visible, 28880 ). holdsAt( orientation( id4 )=135, 28880 ). holdsAt( appearance( id4 )=visible, 28880 ). % Frame number: 723 holdsAt( orientation( id2 )=121, 28920 ). holdsAt( appearance( id2 )=visible, 28920 ). holdsAt( orientation( id4 )=135, 28920 ). holdsAt( appearance( id4 )=visible, 28920 ). % Frame number: 724 holdsAt( orientation( id2 )=121, 28960 ). holdsAt( appearance( id2 )=visible, 28960 ). holdsAt( orientation( id4 )=135, 28960 ). holdsAt( appearance( id4 )=visible, 28960 ). % Frame number: 725 holdsAt( orientation( id2 )=116, 29000 ). holdsAt( appearance( id2 )=visible, 29000 ). holdsAt( orientation( id4 )=135, 29000 ). holdsAt( appearance( id4 )=visible, 29000 ). % Frame number: 726 holdsAt( orientation( id2 )=113, 29040 ). holdsAt( appearance( id2 )=visible, 29040 ). holdsAt( orientation( id4 )=135, 29040 ). holdsAt( appearance( id4 )=visible, 29040 ). % Frame number: 727 holdsAt( orientation( id2 )=108, 29080 ). holdsAt( appearance( id2 )=visible, 29080 ). holdsAt( orientation( id4 )=135, 29080 ). holdsAt( appearance( id4 )=visible, 29080 ). % Frame number: 728 holdsAt( orientation( id2 )=102, 29120 ). holdsAt( appearance( id2 )=visible, 29120 ). holdsAt( orientation( id4 )=135, 29120 ). holdsAt( appearance( id4 )=visible, 29120 ). % Frame number: 729 holdsAt( orientation( id2 )=104, 29160 ). holdsAt( appearance( id2 )=visible, 29160 ). holdsAt( orientation( id4 )=135, 29160 ). holdsAt( appearance( id4 )=visible, 29160 ). % Frame number: 730 holdsAt( orientation( id2 )=102, 29200 ). holdsAt( appearance( id2 )=visible, 29200 ). holdsAt( orientation( id4 )=135, 29200 ). holdsAt( appearance( id4 )=visible, 29200 ). % Frame number: 731 holdsAt( orientation( id2 )=102, 29240 ). holdsAt( appearance( id2 )=visible, 29240 ). holdsAt( orientation( id4 )=135, 29240 ). holdsAt( appearance( id4 )=visible, 29240 ). % Frame number: 732 holdsAt( orientation( id2 )=99, 29280 ). holdsAt( appearance( id2 )=visible, 29280 ). holdsAt( orientation( id4 )=135, 29280 ). holdsAt( appearance( id4 )=visible, 29280 ). % Frame number: 733 holdsAt( orientation( id2 )=101, 29320 ). holdsAt( appearance( id2 )=visible, 29320 ). holdsAt( orientation( id4 )=135, 29320 ). holdsAt( appearance( id4 )=visible, 29320 ). % Frame number: 734 holdsAt( orientation( id2 )=97, 29360 ). holdsAt( appearance( id2 )=visible, 29360 ). holdsAt( orientation( id4 )=135, 29360 ). holdsAt( appearance( id4 )=visible, 29360 ). % Frame number: 735 holdsAt( orientation( id2 )=97, 29400 ). holdsAt( appearance( id2 )=visible, 29400 ). holdsAt( orientation( id4 )=135, 29400 ). holdsAt( appearance( id4 )=visible, 29400 ). % Frame number: 736 holdsAt( orientation( id2 )=97, 29440 ). holdsAt( appearance( id2 )=visible, 29440 ). holdsAt( orientation( id4 )=135, 29440 ). holdsAt( appearance( id4 )=visible, 29440 ). % Frame number: 737 holdsAt( orientation( id2 )=97, 29480 ). holdsAt( appearance( id2 )=visible, 29480 ). holdsAt( orientation( id4 )=135, 29480 ). holdsAt( appearance( id4 )=visible, 29480 ). % Frame number: 738 holdsAt( orientation( id2 )=97, 29520 ). holdsAt( appearance( id2 )=visible, 29520 ). holdsAt( orientation( id4 )=135, 29520 ). holdsAt( appearance( id4 )=visible, 29520 ). % Frame number: 739 holdsAt( orientation( id2 )=97, 29560 ). holdsAt( appearance( id2 )=visible, 29560 ). holdsAt( orientation( id4 )=135, 29560 ). holdsAt( appearance( id4 )=visible, 29560 ). % Frame number: 740 holdsAt( orientation( id2 )=97, 29600 ). holdsAt( appearance( id2 )=visible, 29600 ). holdsAt( orientation( id4 )=135, 29600 ). holdsAt( appearance( id4 )=visible, 29600 ). % Frame number: 741 holdsAt( orientation( id2 )=97, 29640 ). holdsAt( appearance( id2 )=visible, 29640 ). holdsAt( orientation( id4 )=135, 29640 ). holdsAt( appearance( id4 )=visible, 29640 ). % Frame number: 742 holdsAt( orientation( id2 )=97, 29680 ). holdsAt( appearance( id2 )=visible, 29680 ). holdsAt( orientation( id4 )=135, 29680 ). holdsAt( appearance( id4 )=visible, 29680 ). % Frame number: 743 holdsAt( orientation( id2 )=97, 29720 ). holdsAt( appearance( id2 )=visible, 29720 ). holdsAt( orientation( id4 )=135, 29720 ). holdsAt( appearance( id4 )=visible, 29720 ). % Frame number: 744 holdsAt( orientation( id2 )=97, 29760 ). holdsAt( appearance( id2 )=visible, 29760 ). holdsAt( orientation( id4 )=135, 29760 ). holdsAt( appearance( id4 )=visible, 29760 ). % Frame number: 745 holdsAt( orientation( id2 )=97, 29800 ). holdsAt( appearance( id2 )=visible, 29800 ). holdsAt( orientation( id4 )=135, 29800 ). holdsAt( appearance( id4 )=visible, 29800 ). % Frame number: 746 holdsAt( orientation( id2 )=97, 29840 ). holdsAt( appearance( id2 )=visible, 29840 ). holdsAt( orientation( id4 )=135, 29840 ). holdsAt( appearance( id4 )=visible, 29840 ). % Frame number: 747 holdsAt( orientation( id2 )=97, 29880 ). holdsAt( appearance( id2 )=visible, 29880 ). holdsAt( orientation( id4 )=135, 29880 ). holdsAt( appearance( id4 )=visible, 29880 ). % Frame number: 748 holdsAt( orientation( id2 )=97, 29920 ). holdsAt( appearance( id2 )=visible, 29920 ). holdsAt( orientation( id4 )=135, 29920 ). holdsAt( appearance( id4 )=visible, 29920 ). % Frame number: 749 holdsAt( orientation( id2 )=97, 29960 ). holdsAt( appearance( id2 )=visible, 29960 ). holdsAt( orientation( id4 )=135, 29960 ). holdsAt( appearance( id4 )=visible, 29960 ). % Frame number: 750 holdsAt( orientation( id2 )=97, 30000 ). holdsAt( appearance( id2 )=visible, 30000 ). holdsAt( orientation( id4 )=135, 30000 ). holdsAt( appearance( id4 )=visible, 30000 ). % Frame number: 751 holdsAt( orientation( id2 )=97, 30040 ). holdsAt( appearance( id2 )=visible, 30040 ). holdsAt( orientation( id4 )=135, 30040 ). holdsAt( appearance( id4 )=visible, 30040 ). % Frame number: 752 holdsAt( orientation( id2 )=97, 30080 ). holdsAt( appearance( id2 )=visible, 30080 ). holdsAt( orientation( id4 )=135, 30080 ). holdsAt( appearance( id4 )=visible, 30080 ). % Frame number: 753 holdsAt( orientation( id2 )=97, 30120 ). holdsAt( appearance( id2 )=visible, 30120 ). holdsAt( orientation( id4 )=135, 30120 ). holdsAt( appearance( id4 )=visible, 30120 ). % Frame number: 754 holdsAt( orientation( id2 )=97, 30160 ). holdsAt( appearance( id2 )=visible, 30160 ). holdsAt( orientation( id4 )=135, 30160 ). holdsAt( appearance( id4 )=visible, 30160 ). % Frame number: 755 holdsAt( orientation( id2 )=97, 30200 ). holdsAt( appearance( id2 )=visible, 30200 ). holdsAt( orientation( id4 )=135, 30200 ). holdsAt( appearance( id4 )=visible, 30200 ). % Frame number: 756 holdsAt( orientation( id2 )=97, 30240 ). holdsAt( appearance( id2 )=visible, 30240 ). holdsAt( orientation( id4 )=135, 30240 ). holdsAt( appearance( id4 )=visible, 30240 ). % Frame number: 757 holdsAt( orientation( id2 )=97, 30280 ). holdsAt( appearance( id2 )=visible, 30280 ). holdsAt( orientation( id4 )=135, 30280 ). holdsAt( appearance( id4 )=visible, 30280 ). % Frame number: 758 holdsAt( orientation( id2 )=97, 30320 ). holdsAt( appearance( id2 )=visible, 30320 ). holdsAt( orientation( id4 )=135, 30320 ). holdsAt( appearance( id4 )=visible, 30320 ). % Frame number: 759 holdsAt( orientation( id2 )=97, 30360 ). holdsAt( appearance( id2 )=visible, 30360 ). holdsAt( orientation( id4 )=135, 30360 ). holdsAt( appearance( id4 )=visible, 30360 ). % Frame number: 760 holdsAt( orientation( id2 )=97, 30400 ). holdsAt( appearance( id2 )=visible, 30400 ). holdsAt( orientation( id4 )=135, 30400 ). holdsAt( appearance( id4 )=visible, 30400 ). % Frame number: 761 holdsAt( orientation( id2 )=97, 30440 ). holdsAt( appearance( id2 )=visible, 30440 ). holdsAt( orientation( id4 )=135, 30440 ). holdsAt( appearance( id4 )=visible, 30440 ). % Frame number: 762 holdsAt( orientation( id2 )=97, 30480 ). holdsAt( appearance( id2 )=visible, 30480 ). holdsAt( orientation( id4 )=135, 30480 ). holdsAt( appearance( id4 )=visible, 30480 ). % Frame number: 763 holdsAt( orientation( id2 )=97, 30520 ). holdsAt( appearance( id2 )=visible, 30520 ). holdsAt( orientation( id4 )=135, 30520 ). holdsAt( appearance( id4 )=visible, 30520 ). % Frame number: 764 holdsAt( orientation( id2 )=97, 30560 ). holdsAt( appearance( id2 )=visible, 30560 ). holdsAt( orientation( id4 )=135, 30560 ). holdsAt( appearance( id4 )=visible, 30560 ). % Frame number: 765 holdsAt( orientation( id2 )=97, 30600 ). holdsAt( appearance( id2 )=visible, 30600 ). holdsAt( orientation( id4 )=135, 30600 ). holdsAt( appearance( id4 )=visible, 30600 ). % Frame number: 766 holdsAt( orientation( id2 )=97, 30640 ). holdsAt( appearance( id2 )=visible, 30640 ). holdsAt( orientation( id4 )=135, 30640 ). holdsAt( appearance( id4 )=visible, 30640 ). % Frame number: 767 holdsAt( orientation( id2 )=97, 30680 ). holdsAt( appearance( id2 )=visible, 30680 ). holdsAt( orientation( id4 )=135, 30680 ). holdsAt( appearance( id4 )=visible, 30680 ). % Frame number: 768 holdsAt( orientation( id2 )=97, 30720 ). holdsAt( appearance( id2 )=visible, 30720 ). holdsAt( orientation( id4 )=135, 30720 ). holdsAt( appearance( id4 )=visible, 30720 ). % Frame number: 769 holdsAt( orientation( id2 )=97, 30760 ). holdsAt( appearance( id2 )=visible, 30760 ). holdsAt( orientation( id4 )=135, 30760 ). holdsAt( appearance( id4 )=visible, 30760 ). % Frame number: 770 holdsAt( orientation( id2 )=97, 30800 ). holdsAt( appearance( id2 )=visible, 30800 ). holdsAt( orientation( id4 )=135, 30800 ). holdsAt( appearance( id4 )=visible, 30800 ). % Frame number: 771 holdsAt( orientation( id2 )=97, 30840 ). holdsAt( appearance( id2 )=visible, 30840 ). holdsAt( orientation( id4 )=135, 30840 ). holdsAt( appearance( id4 )=visible, 30840 ). % Frame number: 772 holdsAt( orientation( id2 )=97, 30880 ). holdsAt( appearance( id2 )=visible, 30880 ). holdsAt( orientation( id4 )=135, 30880 ). holdsAt( appearance( id4 )=visible, 30880 ). % Frame number: 773 holdsAt( orientation( id2 )=97, 30920 ). holdsAt( appearance( id2 )=visible, 30920 ). holdsAt( orientation( id4 )=135, 30920 ). holdsAt( appearance( id4 )=visible, 30920 ). % Frame number: 774 holdsAt( orientation( id2 )=97, 30960 ). holdsAt( appearance( id2 )=visible, 30960 ). holdsAt( orientation( id4 )=135, 30960 ). holdsAt( appearance( id4 )=visible, 30960 ). % Frame number: 775 holdsAt( orientation( id2 )=97, 31000 ). holdsAt( appearance( id2 )=visible, 31000 ). holdsAt( orientation( id4 )=135, 31000 ). holdsAt( appearance( id4 )=visible, 31000 ). % Frame number: 776 holdsAt( orientation( id2 )=97, 31040 ). holdsAt( appearance( id2 )=visible, 31040 ). holdsAt( orientation( id4 )=135, 31040 ). holdsAt( appearance( id4 )=visible, 31040 ). % Frame number: 777 holdsAt( orientation( id2 )=97, 31080 ). holdsAt( appearance( id2 )=visible, 31080 ). holdsAt( orientation( id4 )=135, 31080 ). holdsAt( appearance( id4 )=visible, 31080 ). % Frame number: 778 holdsAt( orientation( id2 )=97, 31120 ). holdsAt( appearance( id2 )=visible, 31120 ). holdsAt( orientation( id4 )=135, 31120 ). holdsAt( appearance( id4 )=visible, 31120 ). % Frame number: 779 holdsAt( orientation( id2 )=97, 31160 ). holdsAt( appearance( id2 )=visible, 31160 ). holdsAt( orientation( id4 )=135, 31160 ). holdsAt( appearance( id4 )=visible, 31160 ). % Frame number: 780 holdsAt( orientation( id2 )=97, 31200 ). holdsAt( appearance( id2 )=visible, 31200 ). holdsAt( orientation( id4 )=135, 31200 ). holdsAt( appearance( id4 )=visible, 31200 ). % Frame number: 781 holdsAt( orientation( id2 )=97, 31240 ). holdsAt( appearance( id2 )=visible, 31240 ). holdsAt( orientation( id4 )=135, 31240 ). holdsAt( appearance( id4 )=visible, 31240 ). % Frame number: 782 holdsAt( orientation( id2 )=97, 31280 ). holdsAt( appearance( id2 )=visible, 31280 ). holdsAt( orientation( id4 )=135, 31280 ). holdsAt( appearance( id4 )=visible, 31280 ). % Frame number: 783 holdsAt( orientation( id2 )=97, 31320 ). holdsAt( appearance( id2 )=visible, 31320 ). holdsAt( orientation( id4 )=135, 31320 ). holdsAt( appearance( id4 )=visible, 31320 ). % Frame number: 784 holdsAt( orientation( id2 )=97, 31360 ). holdsAt( appearance( id2 )=visible, 31360 ). holdsAt( orientation( id4 )=135, 31360 ). holdsAt( appearance( id4 )=visible, 31360 ). % Frame number: 785 holdsAt( orientation( id2 )=97, 31400 ). holdsAt( appearance( id2 )=visible, 31400 ). holdsAt( orientation( id4 )=135, 31400 ). holdsAt( appearance( id4 )=visible, 31400 ). % Frame number: 786 holdsAt( orientation( id2 )=97, 31440 ). holdsAt( appearance( id2 )=visible, 31440 ). holdsAt( orientation( id4 )=135, 31440 ). holdsAt( appearance( id4 )=visible, 31440 ). % Frame number: 787 holdsAt( orientation( id2 )=97, 31480 ). holdsAt( appearance( id2 )=visible, 31480 ). holdsAt( orientation( id4 )=135, 31480 ). holdsAt( appearance( id4 )=visible, 31480 ). % Frame number: 788 holdsAt( orientation( id2 )=97, 31520 ). holdsAt( appearance( id2 )=visible, 31520 ). holdsAt( orientation( id4 )=135, 31520 ). holdsAt( appearance( id4 )=visible, 31520 ). % Frame number: 789 holdsAt( orientation( id2 )=97, 31560 ). holdsAt( appearance( id2 )=visible, 31560 ). holdsAt( orientation( id4 )=135, 31560 ). holdsAt( appearance( id4 )=visible, 31560 ). % Frame number: 790 holdsAt( orientation( id2 )=97, 31600 ). holdsAt( appearance( id2 )=visible, 31600 ). holdsAt( orientation( id4 )=135, 31600 ). holdsAt( appearance( id4 )=visible, 31600 ). % Frame number: 791 holdsAt( orientation( id2 )=102, 31640 ). holdsAt( appearance( id2 )=visible, 31640 ). holdsAt( orientation( id4 )=135, 31640 ). holdsAt( appearance( id4 )=visible, 31640 ). % Frame number: 792 holdsAt( orientation( id2 )=102, 31680 ). holdsAt( appearance( id2 )=visible, 31680 ). holdsAt( orientation( id4 )=135, 31680 ). holdsAt( appearance( id4 )=visible, 31680 ). % Frame number: 793 holdsAt( orientation( id2 )=102, 31720 ). holdsAt( appearance( id2 )=visible, 31720 ). holdsAt( orientation( id4 )=135, 31720 ). holdsAt( appearance( id4 )=visible, 31720 ). % Frame number: 794 holdsAt( orientation( id2 )=102, 31760 ). holdsAt( appearance( id2 )=visible, 31760 ). holdsAt( orientation( id4 )=135, 31760 ). holdsAt( appearance( id4 )=visible, 31760 ). % Frame number: 795 holdsAt( orientation( id2 )=102, 31800 ). holdsAt( appearance( id2 )=visible, 31800 ). holdsAt( orientation( id4 )=135, 31800 ). holdsAt( appearance( id4 )=visible, 31800 ). % Frame number: 796 holdsAt( orientation( id2 )=102, 31840 ). holdsAt( appearance( id2 )=visible, 31840 ). holdsAt( orientation( id4 )=135, 31840 ). holdsAt( appearance( id4 )=visible, 31840 ). % Frame number: 797 holdsAt( orientation( id2 )=102, 31880 ). holdsAt( appearance( id2 )=visible, 31880 ). holdsAt( orientation( id4 )=135, 31880 ). holdsAt( appearance( id4 )=visible, 31880 ). % Frame number: 798 holdsAt( orientation( id2 )=108, 31920 ). holdsAt( appearance( id2 )=visible, 31920 ). holdsAt( orientation( id4 )=135, 31920 ). holdsAt( appearance( id4 )=visible, 31920 ). % Frame number: 799 holdsAt( orientation( id2 )=109, 31960 ). holdsAt( appearance( id2 )=visible, 31960 ). holdsAt( orientation( id4 )=135, 31960 ). holdsAt( appearance( id4 )=visible, 31960 ). % Frame number: 800 holdsAt( orientation( id2 )=105, 32000 ). holdsAt( appearance( id2 )=visible, 32000 ). holdsAt( orientation( id4 )=135, 32000 ). holdsAt( appearance( id4 )=visible, 32000 ). % Frame number: 801 holdsAt( orientation( id2 )=105, 32040 ). holdsAt( appearance( id2 )=visible, 32040 ). holdsAt( orientation( id4 )=135, 32040 ). holdsAt( appearance( id4 )=visible, 32040 ). % Frame number: 802 holdsAt( orientation( id2 )=105, 32080 ). holdsAt( appearance( id2 )=visible, 32080 ). holdsAt( orientation( id4 )=135, 32080 ). holdsAt( appearance( id4 )=visible, 32080 ). % Frame number: 803 holdsAt( orientation( id2 )=105, 32120 ). holdsAt( appearance( id2 )=visible, 32120 ). holdsAt( orientation( id4 )=135, 32120 ). holdsAt( appearance( id4 )=visible, 32120 ). % Frame number: 804 holdsAt( orientation( id2 )=105, 32160 ). holdsAt( appearance( id2 )=visible, 32160 ). holdsAt( orientation( id4 )=135, 32160 ). holdsAt( appearance( id4 )=visible, 32160 ). % Frame number: 805 holdsAt( orientation( id2 )=105, 32200 ). holdsAt( appearance( id2 )=visible, 32200 ). holdsAt( orientation( id4 )=135, 32200 ). holdsAt( appearance( id4 )=visible, 32200 ). % Frame number: 806 holdsAt( orientation( id2 )=103, 32240 ). holdsAt( appearance( id2 )=visible, 32240 ). holdsAt( orientation( id4 )=135, 32240 ). holdsAt( appearance( id4 )=visible, 32240 ). % Frame number: 807 holdsAt( orientation( id2 )=100, 32280 ). holdsAt( appearance( id2 )=visible, 32280 ). holdsAt( orientation( id4 )=135, 32280 ). holdsAt( appearance( id4 )=visible, 32280 ). % Frame number: 808 holdsAt( orientation( id2 )=100, 32320 ). holdsAt( appearance( id2 )=visible, 32320 ). holdsAt( orientation( id4 )=135, 32320 ). holdsAt( appearance( id4 )=visible, 32320 ). % Frame number: 809 holdsAt( orientation( id2 )=97, 32360 ). holdsAt( appearance( id2 )=visible, 32360 ). holdsAt( orientation( id4 )=135, 32360 ). holdsAt( appearance( id4 )=visible, 32360 ). % Frame number: 810 holdsAt( orientation( id2 )=97, 32400 ). holdsAt( appearance( id2 )=visible, 32400 ). holdsAt( orientation( id4 )=135, 32400 ). holdsAt( appearance( id4 )=visible, 32400 ). % Frame number: 811 holdsAt( orientation( id2 )=96, 32440 ). holdsAt( appearance( id2 )=visible, 32440 ). holdsAt( orientation( id4 )=135, 32440 ). holdsAt( appearance( id4 )=visible, 32440 ). % Frame number: 812 holdsAt( orientation( id2 )=96, 32480 ). holdsAt( appearance( id2 )=visible, 32480 ). holdsAt( orientation( id4 )=135, 32480 ). holdsAt( appearance( id4 )=visible, 32480 ). % Frame number: 813 holdsAt( orientation( id2 )=96, 32520 ). holdsAt( appearance( id2 )=visible, 32520 ). holdsAt( orientation( id4 )=135, 32520 ). holdsAt( appearance( id4 )=visible, 32520 ). % Frame number: 814 holdsAt( orientation( id2 )=91, 32560 ). holdsAt( appearance( id2 )=visible, 32560 ). holdsAt( orientation( id4 )=135, 32560 ). holdsAt( appearance( id4 )=visible, 32560 ). % Frame number: 815 holdsAt( orientation( id2 )=91, 32600 ). holdsAt( appearance( id2 )=visible, 32600 ). holdsAt( orientation( id4 )=135, 32600 ). holdsAt( appearance( id4 )=visible, 32600 ). % Frame number: 816 holdsAt( orientation( id2 )=91, 32640 ). holdsAt( appearance( id2 )=visible, 32640 ). holdsAt( orientation( id4 )=135, 32640 ). holdsAt( appearance( id4 )=visible, 32640 ). % Frame number: 817 holdsAt( orientation( id2 )=89, 32680 ). holdsAt( appearance( id2 )=visible, 32680 ). holdsAt( orientation( id4 )=135, 32680 ). holdsAt( appearance( id4 )=visible, 32680 ). % Frame number: 818 holdsAt( orientation( id2 )=89, 32720 ). holdsAt( appearance( id2 )=visible, 32720 ). holdsAt( orientation( id4 )=135, 32720 ). holdsAt( appearance( id4 )=visible, 32720 ). % Frame number: 819 holdsAt( orientation( id2 )=89, 32760 ). holdsAt( appearance( id2 )=visible, 32760 ). holdsAt( orientation( id4 )=135, 32760 ). holdsAt( appearance( id4 )=visible, 32760 ). % Frame number: 820 holdsAt( orientation( id2 )=89, 32800 ). holdsAt( appearance( id2 )=visible, 32800 ). holdsAt( orientation( id4 )=135, 32800 ). holdsAt( appearance( id4 )=visible, 32800 ). % Frame number: 821 holdsAt( orientation( id2 )=89, 32840 ). holdsAt( appearance( id2 )=visible, 32840 ). holdsAt( orientation( id4 )=135, 32840 ). holdsAt( appearance( id4 )=visible, 32840 ). % Frame number: 822 holdsAt( orientation( id2 )=89, 32880 ). holdsAt( appearance( id2 )=visible, 32880 ). holdsAt( orientation( id4 )=135, 32880 ). holdsAt( appearance( id4 )=visible, 32880 ). % Frame number: 823 holdsAt( orientation( id2 )=89, 32920 ). holdsAt( appearance( id2 )=visible, 32920 ). holdsAt( orientation( id4 )=135, 32920 ). holdsAt( appearance( id4 )=visible, 32920 ). % Frame number: 824 holdsAt( orientation( id2 )=89, 32960 ). holdsAt( appearance( id2 )=visible, 32960 ). holdsAt( orientation( id4 )=135, 32960 ). holdsAt( appearance( id4 )=visible, 32960 ). % Frame number: 825 holdsAt( orientation( id2 )=89, 33000 ). holdsAt( appearance( id2 )=visible, 33000 ). holdsAt( orientation( id4 )=135, 33000 ). holdsAt( appearance( id4 )=visible, 33000 ). % Frame number: 826 holdsAt( orientation( id2 )=89, 33040 ). holdsAt( appearance( id2 )=visible, 33040 ). holdsAt( orientation( id4 )=135, 33040 ). holdsAt( appearance( id4 )=visible, 33040 ). % Frame number: 827 holdsAt( orientation( id2 )=86, 33080 ). holdsAt( appearance( id2 )=visible, 33080 ). holdsAt( orientation( id4 )=135, 33080 ). holdsAt( appearance( id4 )=visible, 33080 ). % Frame number: 828 holdsAt( orientation( id2 )=86, 33120 ). holdsAt( appearance( id2 )=visible, 33120 ). holdsAt( orientation( id4 )=135, 33120 ). holdsAt( appearance( id4 )=visible, 33120 ). % Frame number: 829 holdsAt( orientation( id2 )=85, 33160 ). holdsAt( appearance( id2 )=visible, 33160 ). holdsAt( orientation( id4 )=135, 33160 ). holdsAt( appearance( id4 )=visible, 33160 ). % Frame number: 830 holdsAt( orientation( id2 )=85, 33200 ). holdsAt( appearance( id2 )=visible, 33200 ). holdsAt( orientation( id4 )=135, 33200 ). holdsAt( appearance( id4 )=visible, 33200 ). % Frame number: 831 holdsAt( orientation( id2 )=84, 33240 ). holdsAt( appearance( id2 )=visible, 33240 ). holdsAt( orientation( id4 )=135, 33240 ). holdsAt( appearance( id4 )=visible, 33240 ). % Frame number: 832 holdsAt( orientation( id2 )=84, 33280 ). holdsAt( appearance( id2 )=visible, 33280 ). holdsAt( orientation( id4 )=135, 33280 ). holdsAt( appearance( id4 )=visible, 33280 ). % Frame number: 833 holdsAt( orientation( id2 )=84, 33320 ). holdsAt( appearance( id2 )=visible, 33320 ). holdsAt( orientation( id4 )=135, 33320 ). holdsAt( appearance( id4 )=visible, 33320 ). % Frame number: 834 holdsAt( orientation( id2 )=84, 33360 ). holdsAt( appearance( id2 )=visible, 33360 ). holdsAt( orientation( id4 )=135, 33360 ). holdsAt( appearance( id4 )=visible, 33360 ). % Frame number: 835 holdsAt( orientation( id2 )=84, 33400 ). holdsAt( appearance( id2 )=visible, 33400 ). holdsAt( orientation( id4 )=135, 33400 ). holdsAt( appearance( id4 )=visible, 33400 ). % Frame number: 836 holdsAt( orientation( id2 )=84, 33440 ). holdsAt( appearance( id2 )=visible, 33440 ). holdsAt( orientation( id4 )=135, 33440 ). holdsAt( appearance( id4 )=visible, 33440 ). % Frame number: 837 holdsAt( orientation( id2 )=84, 33480 ). holdsAt( appearance( id2 )=visible, 33480 ). holdsAt( orientation( id4 )=135, 33480 ). holdsAt( appearance( id4 )=visible, 33480 ). % Frame number: 838 holdsAt( orientation( id2 )=84, 33520 ). holdsAt( appearance( id2 )=visible, 33520 ). holdsAt( orientation( id4 )=135, 33520 ). holdsAt( appearance( id4 )=visible, 33520 ). % Frame number: 839 holdsAt( orientation( id2 )=84, 33560 ). holdsAt( appearance( id2 )=visible, 33560 ). holdsAt( orientation( id4 )=135, 33560 ). holdsAt( appearance( id4 )=visible, 33560 ). % Frame number: 840 holdsAt( orientation( id2 )=84, 33600 ). holdsAt( appearance( id2 )=visible, 33600 ). holdsAt( orientation( id4 )=135, 33600 ). holdsAt( appearance( id4 )=visible, 33600 ). % Frame number: 841 holdsAt( orientation( id2 )=84, 33640 ). holdsAt( appearance( id2 )=visible, 33640 ). holdsAt( orientation( id4 )=135, 33640 ). holdsAt( appearance( id4 )=visible, 33640 ). % Frame number: 842 holdsAt( orientation( id2 )=84, 33680 ). holdsAt( appearance( id2 )=visible, 33680 ). holdsAt( orientation( id4 )=135, 33680 ). holdsAt( appearance( id4 )=visible, 33680 ). % Frame number: 843 holdsAt( orientation( id2 )=84, 33720 ). holdsAt( appearance( id2 )=visible, 33720 ). holdsAt( orientation( id4 )=135, 33720 ). holdsAt( appearance( id4 )=visible, 33720 ). % Frame number: 844 holdsAt( orientation( id2 )=84, 33760 ). holdsAt( appearance( id2 )=visible, 33760 ). holdsAt( orientation( id4 )=135, 33760 ). holdsAt( appearance( id4 )=visible, 33760 ). % Frame number: 845 holdsAt( orientation( id2 )=84, 33800 ). holdsAt( appearance( id2 )=visible, 33800 ). holdsAt( orientation( id4 )=135, 33800 ). holdsAt( appearance( id4 )=visible, 33800 ). % Frame number: 846 holdsAt( orientation( id2 )=84, 33840 ). holdsAt( appearance( id2 )=visible, 33840 ). holdsAt( orientation( id4 )=135, 33840 ). holdsAt( appearance( id4 )=visible, 33840 ). % Frame number: 847 holdsAt( orientation( id2 )=84, 33880 ). holdsAt( appearance( id2 )=visible, 33880 ). holdsAt( orientation( id4 )=135, 33880 ). holdsAt( appearance( id4 )=visible, 33880 ). % Frame number: 848 holdsAt( orientation( id2 )=84, 33920 ). holdsAt( appearance( id2 )=visible, 33920 ). holdsAt( orientation( id4 )=135, 33920 ). holdsAt( appearance( id4 )=visible, 33920 ). % Frame number: 849 holdsAt( orientation( id2 )=84, 33960 ). holdsAt( appearance( id2 )=visible, 33960 ). holdsAt( orientation( id4 )=135, 33960 ). holdsAt( appearance( id4 )=visible, 33960 ). % Frame number: 850 holdsAt( orientation( id2 )=84, 34000 ). holdsAt( appearance( id2 )=visible, 34000 ). holdsAt( orientation( id4 )=135, 34000 ). holdsAt( appearance( id4 )=visible, 34000 ). % Frame number: 851 holdsAt( orientation( id2 )=84, 34040 ). holdsAt( appearance( id2 )=visible, 34040 ). holdsAt( orientation( id4 )=135, 34040 ). holdsAt( appearance( id4 )=visible, 34040 ). % Frame number: 852 holdsAt( orientation( id2 )=84, 34080 ). holdsAt( appearance( id2 )=visible, 34080 ). holdsAt( orientation( id4 )=135, 34080 ). holdsAt( appearance( id4 )=visible, 34080 ). % Frame number: 853 holdsAt( orientation( id2 )=84, 34120 ). holdsAt( appearance( id2 )=visible, 34120 ). holdsAt( orientation( id4 )=135, 34120 ). holdsAt( appearance( id4 )=visible, 34120 ). % Frame number: 854 holdsAt( orientation( id2 )=84, 34160 ). holdsAt( appearance( id2 )=visible, 34160 ). holdsAt( orientation( id4 )=135, 34160 ). holdsAt( appearance( id4 )=visible, 34160 ). % Frame number: 855 holdsAt( orientation( id2 )=84, 34200 ). holdsAt( appearance( id2 )=visible, 34200 ). holdsAt( orientation( id4 )=135, 34200 ). holdsAt( appearance( id4 )=visible, 34200 ). % Frame number: 856 holdsAt( orientation( id2 )=84, 34240 ). holdsAt( appearance( id2 )=visible, 34240 ). holdsAt( orientation( id4 )=135, 34240 ). holdsAt( appearance( id4 )=visible, 34240 ). % Frame number: 857 holdsAt( orientation( id2 )=84, 34280 ). holdsAt( appearance( id2 )=visible, 34280 ). holdsAt( orientation( id4 )=135, 34280 ). holdsAt( appearance( id4 )=visible, 34280 ). % Frame number: 858 holdsAt( orientation( id2 )=84, 34320 ). holdsAt( appearance( id2 )=visible, 34320 ). holdsAt( orientation( id4 )=135, 34320 ). holdsAt( appearance( id4 )=visible, 34320 ). % Frame number: 859 holdsAt( orientation( id2 )=84, 34360 ). holdsAt( appearance( id2 )=visible, 34360 ). holdsAt( orientation( id4 )=135, 34360 ). holdsAt( appearance( id4 )=visible, 34360 ). % Frame number: 860 holdsAt( orientation( id2 )=84, 34400 ). holdsAt( appearance( id2 )=visible, 34400 ). holdsAt( orientation( id4 )=135, 34400 ). holdsAt( appearance( id4 )=visible, 34400 ). % Frame number: 861 holdsAt( orientation( id2 )=84, 34440 ). holdsAt( appearance( id2 )=visible, 34440 ). holdsAt( orientation( id4 )=135, 34440 ). holdsAt( appearance( id4 )=visible, 34440 ). % Frame number: 862 holdsAt( orientation( id2 )=84, 34480 ). holdsAt( appearance( id2 )=visible, 34480 ). holdsAt( orientation( id4 )=135, 34480 ). holdsAt( appearance( id4 )=visible, 34480 ). % Frame number: 863 holdsAt( orientation( id2 )=87, 34520 ). holdsAt( appearance( id2 )=visible, 34520 ). holdsAt( orientation( id4 )=135, 34520 ). holdsAt( appearance( id4 )=visible, 34520 ). % Frame number: 864 holdsAt( orientation( id2 )=89, 34560 ). holdsAt( appearance( id2 )=visible, 34560 ). holdsAt( orientation( id4 )=135, 34560 ). holdsAt( appearance( id4 )=visible, 34560 ). % Frame number: 865 holdsAt( orientation( id2 )=92, 34600 ). holdsAt( appearance( id2 )=visible, 34600 ). holdsAt( orientation( id4 )=135, 34600 ). holdsAt( appearance( id4 )=visible, 34600 ). % Frame number: 866 holdsAt( orientation( id2 )=93, 34640 ). holdsAt( appearance( id2 )=visible, 34640 ). holdsAt( orientation( id4 )=135, 34640 ). holdsAt( appearance( id4 )=visible, 34640 ). % Frame number: 867 holdsAt( orientation( id2 )=100, 34680 ). holdsAt( appearance( id2 )=visible, 34680 ). holdsAt( orientation( id4 )=135, 34680 ). holdsAt( appearance( id4 )=visible, 34680 ). % Frame number: 868 holdsAt( orientation( id2 )=100, 34720 ). holdsAt( appearance( id2 )=visible, 34720 ). holdsAt( orientation( id4 )=135, 34720 ). holdsAt( appearance( id4 )=visible, 34720 ). % Frame number: 869 holdsAt( orientation( id2 )=109, 34760 ). holdsAt( appearance( id2 )=visible, 34760 ). holdsAt( orientation( id4 )=135, 34760 ). holdsAt( appearance( id4 )=visible, 34760 ). % Frame number: 870 holdsAt( orientation( id2 )=109, 34800 ). holdsAt( appearance( id2 )=visible, 34800 ). holdsAt( orientation( id4 )=135, 34800 ). holdsAt( appearance( id4 )=visible, 34800 ). % Frame number: 871 holdsAt( orientation( id2 )=116, 34840 ). holdsAt( appearance( id2 )=visible, 34840 ). holdsAt( orientation( id4 )=135, 34840 ). holdsAt( appearance( id4 )=visible, 34840 ). % Frame number: 872 holdsAt( orientation( id2 )=116, 34880 ). holdsAt( appearance( id2 )=visible, 34880 ). holdsAt( orientation( id4 )=135, 34880 ). holdsAt( appearance( id4 )=visible, 34880 ). % Frame number: 873 holdsAt( orientation( id2 )=123, 34920 ). holdsAt( appearance( id2 )=visible, 34920 ). holdsAt( orientation( id4 )=135, 34920 ). holdsAt( appearance( id4 )=visible, 34920 ). % Frame number: 874 holdsAt( orientation( id2 )=123, 34960 ). holdsAt( appearance( id2 )=visible, 34960 ). holdsAt( orientation( id4 )=135, 34960 ). holdsAt( appearance( id4 )=visible, 34960 ). % Frame number: 875 holdsAt( orientation( id2 )=128, 35000 ). holdsAt( appearance( id2 )=visible, 35000 ). holdsAt( orientation( id4 )=135, 35000 ). holdsAt( appearance( id4 )=visible, 35000 ). % Frame number: 876 holdsAt( orientation( id2 )=128, 35040 ). holdsAt( appearance( id2 )=visible, 35040 ). holdsAt( orientation( id4 )=135, 35040 ). holdsAt( appearance( id4 )=visible, 35040 ). % Frame number: 877 holdsAt( orientation( id2 )=128, 35080 ). holdsAt( appearance( id2 )=visible, 35080 ). holdsAt( orientation( id4 )=135, 35080 ). holdsAt( appearance( id4 )=visible, 35080 ). % Frame number: 878 holdsAt( orientation( id2 )=128, 35120 ). holdsAt( appearance( id2 )=visible, 35120 ). holdsAt( orientation( id4 )=135, 35120 ). holdsAt( appearance( id4 )=visible, 35120 ). % Frame number: 879 holdsAt( orientation( id2 )=135, 35160 ). holdsAt( appearance( id2 )=visible, 35160 ). holdsAt( orientation( id4 )=135, 35160 ). holdsAt( appearance( id4 )=visible, 35160 ). % Frame number: 880 holdsAt( orientation( id2 )=124, 35200 ). holdsAt( appearance( id2 )=visible, 35200 ). holdsAt( orientation( id4 )=135, 35200 ). holdsAt( appearance( id4 )=visible, 35200 ). % Frame number: 881 holdsAt( orientation( id2 )=124, 35240 ). holdsAt( appearance( id2 )=visible, 35240 ). holdsAt( orientation( id4 )=135, 35240 ). holdsAt( appearance( id4 )=visible, 35240 ). % Frame number: 882 holdsAt( orientation( id2 )=124, 35280 ). holdsAt( appearance( id2 )=visible, 35280 ). holdsAt( orientation( id4 )=135, 35280 ). holdsAt( appearance( id4 )=visible, 35280 ). % Frame number: 883 holdsAt( orientation( id2 )=118, 35320 ). holdsAt( appearance( id2 )=visible, 35320 ). holdsAt( orientation( id4 )=135, 35320 ). holdsAt( appearance( id4 )=visible, 35320 ). % Frame number: 884 holdsAt( orientation( id2 )=127, 35360 ). holdsAt( appearance( id2 )=visible, 35360 ). holdsAt( orientation( id4 )=135, 35360 ). holdsAt( appearance( id4 )=visible, 35360 ). % Frame number: 885 holdsAt( orientation( id2 )=127, 35400 ). holdsAt( appearance( id2 )=visible, 35400 ). holdsAt( orientation( id4 )=135, 35400 ). holdsAt( appearance( id4 )=visible, 35400 ). % Frame number: 886 holdsAt( orientation( id2 )=134, 35440 ). holdsAt( appearance( id2 )=visible, 35440 ). holdsAt( orientation( id4 )=135, 35440 ). holdsAt( appearance( id4 )=visible, 35440 ). % Frame number: 887 holdsAt( orientation( id2 )=134, 35480 ). holdsAt( appearance( id2 )=visible, 35480 ). holdsAt( orientation( id4 )=135, 35480 ). holdsAt( appearance( id4 )=visible, 35480 ). % Frame number: 888 holdsAt( orientation( id2 )=141, 35520 ). holdsAt( appearance( id2 )=visible, 35520 ). holdsAt( orientation( id4 )=135, 35520 ). holdsAt( appearance( id4 )=visible, 35520 ). % Frame number: 889 holdsAt( orientation( id2 )=141, 35560 ). holdsAt( appearance( id2 )=visible, 35560 ). holdsAt( orientation( id4 )=135, 35560 ). holdsAt( appearance( id4 )=visible, 35560 ). % Frame number: 890 holdsAt( orientation( id2 )=146, 35600 ). holdsAt( appearance( id2 )=visible, 35600 ). holdsAt( orientation( id4 )=135, 35600 ). holdsAt( appearance( id4 )=visible, 35600 ). % Frame number: 891 holdsAt( orientation( id2 )=146, 35640 ). holdsAt( appearance( id2 )=visible, 35640 ). holdsAt( orientation( id4 )=135, 35640 ). holdsAt( appearance( id4 )=visible, 35640 ). % Frame number: 892 holdsAt( orientation( id2 )=146, 35680 ). holdsAt( appearance( id2 )=visible, 35680 ). holdsAt( orientation( id4 )=135, 35680 ). holdsAt( appearance( id4 )=visible, 35680 ). % Frame number: 893 holdsAt( orientation( id2 )=146, 35720 ). holdsAt( appearance( id2 )=visible, 35720 ). holdsAt( orientation( id4 )=135, 35720 ). holdsAt( appearance( id4 )=visible, 35720 ). % Frame number: 894 holdsAt( orientation( id2 )=142, 35760 ). holdsAt( appearance( id2 )=visible, 35760 ). holdsAt( orientation( id4 )=135, 35760 ). holdsAt( appearance( id4 )=visible, 35760 ). % Frame number: 895 holdsAt( orientation( id2 )=136, 35800 ). holdsAt( appearance( id2 )=visible, 35800 ). holdsAt( orientation( id4 )=135, 35800 ). holdsAt( appearance( id4 )=visible, 35800 ). % Frame number: 896 holdsAt( orientation( id2 )=136, 35840 ). holdsAt( appearance( id2 )=visible, 35840 ). holdsAt( orientation( id4 )=135, 35840 ). holdsAt( appearance( id4 )=visible, 35840 ). % Frame number: 897 holdsAt( orientation( id2 )=136, 35880 ). holdsAt( appearance( id2 )=visible, 35880 ). holdsAt( orientation( id4 )=135, 35880 ). holdsAt( appearance( id4 )=visible, 35880 ). % Frame number: 898 holdsAt( orientation( id2 )=136, 35920 ). holdsAt( appearance( id2 )=visible, 35920 ). holdsAt( orientation( id4 )=135, 35920 ). holdsAt( appearance( id4 )=visible, 35920 ). % Frame number: 899 holdsAt( orientation( id2 )=143, 35960 ). holdsAt( appearance( id2 )=visible, 35960 ). holdsAt( orientation( id4 )=135, 35960 ). holdsAt( appearance( id4 )=visible, 35960 ). % Frame number: 900 holdsAt( orientation( id2 )=143, 36000 ). holdsAt( appearance( id2 )=visible, 36000 ). holdsAt( orientation( id4 )=135, 36000 ). holdsAt( appearance( id4 )=visible, 36000 ). % Frame number: 901 holdsAt( orientation( id2 )=143, 36040 ). holdsAt( appearance( id2 )=visible, 36040 ). holdsAt( orientation( id4 )=135, 36040 ). holdsAt( appearance( id4 )=visible, 36040 ). % Frame number: 902 holdsAt( orientation( id2 )=143, 36080 ). holdsAt( appearance( id2 )=visible, 36080 ). holdsAt( orientation( id4 )=135, 36080 ). holdsAt( appearance( id4 )=visible, 36080 ). % Frame number: 903 holdsAt( orientation( id2 )=143, 36120 ). holdsAt( appearance( id2 )=visible, 36120 ). holdsAt( orientation( id4 )=135, 36120 ). holdsAt( appearance( id4 )=visible, 36120 ). % Frame number: 904 holdsAt( orientation( id2 )=143, 36160 ). holdsAt( appearance( id2 )=visible, 36160 ). holdsAt( orientation( id4 )=135, 36160 ). holdsAt( appearance( id4 )=visible, 36160 ). % Frame number: 905 holdsAt( orientation( id2 )=143, 36200 ). holdsAt( appearance( id2 )=visible, 36200 ). holdsAt( orientation( id4 )=135, 36200 ). holdsAt( appearance( id4 )=visible, 36200 ). % Frame number: 906 holdsAt( orientation( id2 )=137, 36240 ). holdsAt( appearance( id2 )=visible, 36240 ). holdsAt( orientation( id4 )=135, 36240 ). holdsAt( appearance( id4 )=visible, 36240 ). % Frame number: 907 holdsAt( orientation( id2 )=137, 36280 ). holdsAt( appearance( id2 )=visible, 36280 ). holdsAt( orientation( id4 )=135, 36280 ). holdsAt( appearance( id4 )=visible, 36280 ). % Frame number: 908 holdsAt( orientation( id2 )=131, 36320 ). holdsAt( appearance( id2 )=visible, 36320 ). holdsAt( orientation( id4 )=135, 36320 ). holdsAt( appearance( id4 )=visible, 36320 ). % Frame number: 909 holdsAt( orientation( id2 )=126, 36360 ). holdsAt( appearance( id2 )=visible, 36360 ). holdsAt( orientation( id4 )=135, 36360 ). holdsAt( appearance( id4 )=visible, 36360 ). % Frame number: 910 holdsAt( orientation( id2 )=125, 36400 ). holdsAt( appearance( id2 )=visible, 36400 ). holdsAt( orientation( id4 )=135, 36400 ). holdsAt( appearance( id4 )=visible, 36400 ). % Frame number: 911 holdsAt( orientation( id2 )=125, 36440 ). holdsAt( appearance( id2 )=visible, 36440 ). holdsAt( orientation( id4 )=135, 36440 ). holdsAt( appearance( id4 )=visible, 36440 ). % Frame number: 912 holdsAt( orientation( id2 )=130, 36480 ). holdsAt( appearance( id2 )=visible, 36480 ). holdsAt( orientation( id4 )=135, 36480 ). holdsAt( appearance( id4 )=visible, 36480 ). % Frame number: 913 holdsAt( orientation( id2 )=130, 36520 ). holdsAt( appearance( id2 )=visible, 36520 ). holdsAt( orientation( id4 )=135, 36520 ). holdsAt( appearance( id4 )=visible, 36520 ). % Frame number: 914 holdsAt( orientation( id2 )=130, 36560 ). holdsAt( appearance( id2 )=visible, 36560 ). holdsAt( orientation( id4 )=135, 36560 ). holdsAt( appearance( id4 )=visible, 36560 ). % Frame number: 915 holdsAt( orientation( id2 )=130, 36600 ). holdsAt( appearance( id2 )=visible, 36600 ). holdsAt( orientation( id4 )=135, 36600 ). holdsAt( appearance( id4 )=visible, 36600 ). % Frame number: 916 holdsAt( orientation( id2 )=130, 36640 ). holdsAt( appearance( id2 )=visible, 36640 ). holdsAt( orientation( id4 )=135, 36640 ). holdsAt( appearance( id4 )=visible, 36640 ). % Frame number: 917 holdsAt( orientation( id2 )=134, 36680 ). holdsAt( appearance( id2 )=visible, 36680 ). holdsAt( orientation( id4 )=135, 36680 ). holdsAt( appearance( id4 )=visible, 36680 ). % Frame number: 918 holdsAt( orientation( id2 )=134, 36720 ). holdsAt( appearance( id2 )=visible, 36720 ). holdsAt( orientation( id4 )=135, 36720 ). holdsAt( appearance( id4 )=visible, 36720 ). % Frame number: 919 holdsAt( orientation( id2 )=137, 36760 ). holdsAt( appearance( id2 )=visible, 36760 ). holdsAt( orientation( id4 )=135, 36760 ). holdsAt( appearance( id4 )=visible, 36760 ). % Frame number: 920 holdsAt( orientation( id2 )=137, 36800 ). holdsAt( appearance( id2 )=visible, 36800 ). holdsAt( orientation( id4 )=135, 36800 ). holdsAt( appearance( id4 )=visible, 36800 ). % Frame number: 921 holdsAt( orientation( id2 )=137, 36840 ). holdsAt( appearance( id2 )=visible, 36840 ). holdsAt( orientation( id4 )=135, 36840 ). holdsAt( appearance( id4 )=visible, 36840 ). % Frame number: 922 holdsAt( orientation( id2 )=137, 36880 ). holdsAt( appearance( id2 )=visible, 36880 ). holdsAt( orientation( id4 )=135, 36880 ). holdsAt( appearance( id4 )=visible, 36880 ). % Frame number: 923 holdsAt( orientation( id2 )=137, 36920 ). holdsAt( appearance( id2 )=visible, 36920 ). holdsAt( orientation( id4 )=135, 36920 ). holdsAt( appearance( id4 )=visible, 36920 ). % Frame number: 924 holdsAt( orientation( id2 )=135, 36960 ). holdsAt( appearance( id2 )=visible, 36960 ). holdsAt( orientation( id4 )=135, 36960 ). holdsAt( appearance( id4 )=visible, 36960 ). % Frame number: 925 holdsAt( orientation( id2 )=135, 37000 ). holdsAt( appearance( id2 )=visible, 37000 ). holdsAt( orientation( id4 )=135, 37000 ). holdsAt( appearance( id4 )=visible, 37000 ). % Frame number: 926 holdsAt( orientation( id2 )=131, 37040 ). holdsAt( appearance( id2 )=visible, 37040 ). holdsAt( orientation( id4 )=135, 37040 ). holdsAt( appearance( id4 )=visible, 37040 ). % Frame number: 927 holdsAt( orientation( id2 )=131, 37080 ). holdsAt( appearance( id2 )=visible, 37080 ). holdsAt( orientation( id4 )=135, 37080 ). holdsAt( appearance( id4 )=visible, 37080 ). % Frame number: 928 holdsAt( orientation( id2 )=131, 37120 ). holdsAt( appearance( id2 )=visible, 37120 ). holdsAt( orientation( id4 )=135, 37120 ). holdsAt( appearance( id4 )=visible, 37120 ). % Frame number: 929 holdsAt( orientation( id2 )=131, 37160 ). holdsAt( appearance( id2 )=visible, 37160 ). holdsAt( orientation( id4 )=135, 37160 ). holdsAt( appearance( id4 )=visible, 37160 ). % Frame number: 930 holdsAt( orientation( id2 )=131, 37200 ). holdsAt( appearance( id2 )=visible, 37200 ). holdsAt( orientation( id4 )=135, 37200 ). holdsAt( appearance( id4 )=visible, 37200 ). % Frame number: 931 holdsAt( orientation( id2 )=131, 37240 ). holdsAt( appearance( id2 )=visible, 37240 ). holdsAt( orientation( id4 )=135, 37240 ). holdsAt( appearance( id4 )=visible, 37240 ). % Frame number: 932 holdsAt( orientation( id2 )=125, 37280 ). holdsAt( appearance( id2 )=visible, 37280 ). holdsAt( orientation( id4 )=135, 37280 ). holdsAt( appearance( id4 )=visible, 37280 ). % Frame number: 933 holdsAt( orientation( id2 )=125, 37320 ). holdsAt( appearance( id2 )=visible, 37320 ). holdsAt( orientation( id4 )=135, 37320 ). holdsAt( appearance( id4 )=visible, 37320 ). % Frame number: 934 holdsAt( orientation( id2 )=124, 37360 ). holdsAt( appearance( id2 )=visible, 37360 ). holdsAt( orientation( id4 )=135, 37360 ). holdsAt( appearance( id4 )=visible, 37360 ). % Frame number: 935 holdsAt( orientation( id2 )=124, 37400 ). holdsAt( appearance( id2 )=visible, 37400 ). holdsAt( orientation( id4 )=135, 37400 ). holdsAt( appearance( id4 )=visible, 37400 ). % Frame number: 936 holdsAt( orientation( id2 )=126, 37440 ). holdsAt( appearance( id2 )=visible, 37440 ). holdsAt( orientation( id4 )=135, 37440 ). holdsAt( appearance( id4 )=visible, 37440 ). % Frame number: 937 holdsAt( orientation( id2 )=126, 37480 ). holdsAt( appearance( id2 )=visible, 37480 ). holdsAt( orientation( id4 )=135, 37480 ). holdsAt( appearance( id4 )=visible, 37480 ). % Frame number: 938 holdsAt( orientation( id2 )=126, 37520 ). holdsAt( appearance( id2 )=visible, 37520 ). holdsAt( orientation( id4 )=135, 37520 ). holdsAt( appearance( id4 )=visible, 37520 ). % Frame number: 939 holdsAt( orientation( id2 )=126, 37560 ). holdsAt( appearance( id2 )=visible, 37560 ). holdsAt( orientation( id4 )=135, 37560 ). holdsAt( appearance( id4 )=visible, 37560 ). % Frame number: 940 holdsAt( orientation( id2 )=126, 37600 ). holdsAt( appearance( id2 )=visible, 37600 ). holdsAt( orientation( id4 )=135, 37600 ). holdsAt( appearance( id4 )=visible, 37600 ). % Frame number: 941 holdsAt( orientation( id2 )=126, 37640 ). holdsAt( appearance( id2 )=visible, 37640 ). holdsAt( orientation( id4 )=135, 37640 ). holdsAt( appearance( id4 )=visible, 37640 ). % Frame number: 942 holdsAt( orientation( id2 )=126, 37680 ). holdsAt( appearance( id2 )=visible, 37680 ). holdsAt( orientation( id4 )=135, 37680 ). holdsAt( appearance( id4 )=visible, 37680 ). % Frame number: 943 holdsAt( orientation( id2 )=126, 37720 ). holdsAt( appearance( id2 )=visible, 37720 ). holdsAt( orientation( id4 )=135, 37720 ). holdsAt( appearance( id4 )=visible, 37720 ). % Frame number: 944 holdsAt( orientation( id2 )=126, 37760 ). holdsAt( appearance( id2 )=visible, 37760 ). holdsAt( orientation( id4 )=135, 37760 ). holdsAt( appearance( id4 )=visible, 37760 ). % Frame number: 945 holdsAt( orientation( id2 )=126, 37800 ). holdsAt( appearance( id2 )=visible, 37800 ). holdsAt( orientation( id4 )=135, 37800 ). holdsAt( appearance( id4 )=visible, 37800 ). % Frame number: 946 holdsAt( orientation( id2 )=126, 37840 ). holdsAt( appearance( id2 )=visible, 37840 ). holdsAt( orientation( id4 )=135, 37840 ). holdsAt( appearance( id4 )=visible, 37840 ). % Frame number: 947 holdsAt( orientation( id2 )=126, 37880 ). holdsAt( appearance( id2 )=visible, 37880 ). holdsAt( orientation( id4 )=135, 37880 ). holdsAt( appearance( id4 )=visible, 37880 ). % Frame number: 948 holdsAt( orientation( id2 )=126, 37920 ). holdsAt( appearance( id2 )=visible, 37920 ). holdsAt( orientation( id4 )=135, 37920 ). holdsAt( appearance( id4 )=visible, 37920 ). % Frame number: 949 holdsAt( orientation( id2 )=126, 37960 ). holdsAt( appearance( id2 )=visible, 37960 ). holdsAt( orientation( id4 )=135, 37960 ). holdsAt( appearance( id4 )=visible, 37960 ). % Frame number: 950 holdsAt( orientation( id2 )=126, 38000 ). holdsAt( appearance( id2 )=visible, 38000 ). holdsAt( orientation( id4 )=135, 38000 ). holdsAt( appearance( id4 )=visible, 38000 ). % Frame number: 951 holdsAt( orientation( id2 )=126, 38040 ). holdsAt( appearance( id2 )=visible, 38040 ). holdsAt( orientation( id4 )=135, 38040 ). holdsAt( appearance( id4 )=visible, 38040 ). % Frame number: 952 holdsAt( orientation( id2 )=126, 38080 ). holdsAt( appearance( id2 )=visible, 38080 ). holdsAt( orientation( id4 )=135, 38080 ). holdsAt( appearance( id4 )=visible, 38080 ). % Frame number: 953 holdsAt( orientation( id2 )=131, 38120 ). holdsAt( appearance( id2 )=visible, 38120 ). holdsAt( orientation( id4 )=135, 38120 ). holdsAt( appearance( id4 )=visible, 38120 ). % Frame number: 954 holdsAt( orientation( id2 )=131, 38160 ). holdsAt( appearance( id2 )=visible, 38160 ). holdsAt( orientation( id4 )=135, 38160 ). holdsAt( appearance( id4 )=visible, 38160 ). % Frame number: 955 holdsAt( orientation( id2 )=131, 38200 ). holdsAt( appearance( id2 )=visible, 38200 ). holdsAt( orientation( id4 )=135, 38200 ). holdsAt( appearance( id4 )=visible, 38200 ). % Frame number: 956 holdsAt( orientation( id2 )=131, 38240 ). holdsAt( appearance( id2 )=visible, 38240 ). holdsAt( orientation( id4 )=135, 38240 ). holdsAt( appearance( id4 )=visible, 38240 ). % Frame number: 957 holdsAt( orientation( id2 )=131, 38280 ). holdsAt( appearance( id2 )=visible, 38280 ). holdsAt( orientation( id4 )=135, 38280 ). holdsAt( appearance( id4 )=visible, 38280 ). % Frame number: 958 holdsAt( orientation( id2 )=131, 38320 ). holdsAt( appearance( id2 )=visible, 38320 ). holdsAt( orientation( id4 )=135, 38320 ). holdsAt( appearance( id4 )=visible, 38320 ). % Frame number: 959 holdsAt( orientation( id2 )=122, 38360 ). holdsAt( appearance( id2 )=visible, 38360 ). holdsAt( orientation( id4 )=135, 38360 ). holdsAt( appearance( id4 )=visible, 38360 ). % Frame number: 960 holdsAt( orientation( id2 )=122, 38400 ). holdsAt( appearance( id2 )=visible, 38400 ). holdsAt( orientation( id4 )=135, 38400 ). holdsAt( appearance( id4 )=visible, 38400 ). % Frame number: 961 holdsAt( orientation( id2 )=122, 38440 ). holdsAt( appearance( id2 )=visible, 38440 ). holdsAt( orientation( id4 )=135, 38440 ). holdsAt( appearance( id4 )=visible, 38440 ). % Frame number: 962 holdsAt( orientation( id2 )=122, 38480 ). holdsAt( appearance( id2 )=visible, 38480 ). holdsAt( orientation( id4 )=135, 38480 ). holdsAt( appearance( id4 )=visible, 38480 ). % Frame number: 963 holdsAt( orientation( id2 )=118, 38520 ). holdsAt( appearance( id2 )=visible, 38520 ). holdsAt( orientation( id4 )=135, 38520 ). holdsAt( appearance( id4 )=visible, 38520 ). % Frame number: 964 holdsAt( orientation( id2 )=118, 38560 ). holdsAt( appearance( id2 )=visible, 38560 ). holdsAt( orientation( id4 )=135, 38560 ). holdsAt( appearance( id4 )=visible, 38560 ). % Frame number: 965 holdsAt( orientation( id2 )=118, 38600 ). holdsAt( appearance( id2 )=visible, 38600 ). holdsAt( orientation( id4 )=135, 38600 ). holdsAt( appearance( id4 )=visible, 38600 ). % Frame number: 966 holdsAt( orientation( id2 )=114, 38640 ). holdsAt( appearance( id2 )=visible, 38640 ). holdsAt( orientation( id4 )=135, 38640 ). holdsAt( appearance( id4 )=visible, 38640 ). % Frame number: 967 holdsAt( orientation( id2 )=114, 38680 ). holdsAt( appearance( id2 )=visible, 38680 ). holdsAt( orientation( id4 )=135, 38680 ). holdsAt( appearance( id4 )=visible, 38680 ). % Frame number: 968 holdsAt( orientation( id2 )=121, 38720 ). holdsAt( appearance( id2 )=visible, 38720 ). holdsAt( orientation( id4 )=135, 38720 ). holdsAt( appearance( id4 )=visible, 38720 ). % Frame number: 969 holdsAt( orientation( id2 )=121, 38760 ). holdsAt( appearance( id2 )=visible, 38760 ). holdsAt( orientation( id4 )=135, 38760 ). holdsAt( appearance( id4 )=visible, 38760 ). % Frame number: 970 holdsAt( orientation( id2 )=121, 38800 ). holdsAt( appearance( id2 )=visible, 38800 ). holdsAt( orientation( id4 )=135, 38800 ). holdsAt( appearance( id4 )=visible, 38800 ). % Frame number: 971 holdsAt( orientation( id2 )=121, 38840 ). holdsAt( appearance( id2 )=visible, 38840 ). holdsAt( orientation( id4 )=135, 38840 ). holdsAt( appearance( id4 )=visible, 38840 ). % Frame number: 972 holdsAt( orientation( id2 )=121, 38880 ). holdsAt( appearance( id2 )=visible, 38880 ). holdsAt( orientation( id4 )=135, 38880 ). holdsAt( appearance( id4 )=visible, 38880 ). % Frame number: 973 holdsAt( orientation( id2 )=121, 38920 ). holdsAt( appearance( id2 )=visible, 38920 ). holdsAt( orientation( id4 )=135, 38920 ). holdsAt( appearance( id4 )=visible, 38920 ). % Frame number: 974 holdsAt( orientation( id2 )=121, 38960 ). holdsAt( appearance( id2 )=visible, 38960 ). holdsAt( orientation( id4 )=135, 38960 ). holdsAt( appearance( id4 )=visible, 38960 ). % Frame number: 975 holdsAt( orientation( id2 )=121, 39000 ). holdsAt( appearance( id2 )=visible, 39000 ). holdsAt( orientation( id4 )=135, 39000 ). holdsAt( appearance( id4 )=visible, 39000 ). % Frame number: 976 holdsAt( orientation( id2 )=121, 39040 ). holdsAt( appearance( id2 )=visible, 39040 ). holdsAt( orientation( id4 )=135, 39040 ). holdsAt( appearance( id4 )=visible, 39040 ). % Frame number: 977 holdsAt( orientation( id2 )=128, 39080 ). holdsAt( appearance( id2 )=visible, 39080 ). holdsAt( orientation( id4 )=135, 39080 ). holdsAt( appearance( id4 )=visible, 39080 ). % Frame number: 978 holdsAt( orientation( id2 )=128, 39120 ). holdsAt( appearance( id2 )=visible, 39120 ). holdsAt( orientation( id4 )=135, 39120 ). holdsAt( appearance( id4 )=visible, 39120 ). % Frame number: 979 holdsAt( orientation( id2 )=128, 39160 ). holdsAt( appearance( id2 )=visible, 39160 ). holdsAt( orientation( id4 )=135, 39160 ). holdsAt( appearance( id4 )=visible, 39160 ). % Frame number: 980 holdsAt( orientation( id2 )=128, 39200 ). holdsAt( appearance( id2 )=visible, 39200 ). holdsAt( orientation( id4 )=135, 39200 ). holdsAt( appearance( id4 )=visible, 39200 ). % Frame number: 981 holdsAt( orientation( id2 )=128, 39240 ). holdsAt( appearance( id2 )=visible, 39240 ). holdsAt( orientation( id4 )=135, 39240 ). holdsAt( appearance( id4 )=visible, 39240 ). % Frame number: 982 holdsAt( orientation( id2 )=128, 39280 ). holdsAt( appearance( id2 )=visible, 39280 ). holdsAt( orientation( id4 )=135, 39280 ). holdsAt( appearance( id4 )=visible, 39280 ). % Frame number: 983 holdsAt( orientation( id2 )=128, 39320 ). holdsAt( appearance( id2 )=visible, 39320 ). holdsAt( orientation( id4 )=135, 39320 ). holdsAt( appearance( id4 )=visible, 39320 ). % Frame number: 984 holdsAt( orientation( id2 )=121, 39360 ). holdsAt( appearance( id2 )=visible, 39360 ). holdsAt( orientation( id4 )=135, 39360 ). holdsAt( appearance( id4 )=visible, 39360 ). % Frame number: 985 holdsAt( orientation( id2 )=123, 39400 ). holdsAt( appearance( id2 )=visible, 39400 ). holdsAt( orientation( id4 )=135, 39400 ). holdsAt( appearance( id4 )=visible, 39400 ). % Frame number: 986 holdsAt( orientation( id2 )=119, 39440 ). holdsAt( appearance( id2 )=visible, 39440 ). holdsAt( orientation( id4 )=135, 39440 ). holdsAt( appearance( id4 )=visible, 39440 ). % Frame number: 987 holdsAt( orientation( id2 )=119, 39480 ). holdsAt( appearance( id2 )=visible, 39480 ). holdsAt( orientation( id4 )=135, 39480 ). holdsAt( appearance( id4 )=visible, 39480 ). % Frame number: 988 holdsAt( orientation( id2 )=115, 39520 ). holdsAt( appearance( id2 )=visible, 39520 ). holdsAt( orientation( id4 )=135, 39520 ). holdsAt( appearance( id4 )=visible, 39520 ). % Frame number: 989 holdsAt( orientation( id2 )=111, 39560 ). holdsAt( appearance( id2 )=visible, 39560 ). holdsAt( orientation( id4 )=135, 39560 ). holdsAt( appearance( id4 )=visible, 39560 ). % Frame number: 990 holdsAt( orientation( id2 )=105, 39600 ). holdsAt( appearance( id2 )=visible, 39600 ). holdsAt( orientation( id4 )=135, 39600 ). holdsAt( appearance( id4 )=visible, 39600 ). % Frame number: 991 holdsAt( orientation( id2 )=102, 39640 ). holdsAt( appearance( id2 )=visible, 39640 ). holdsAt( orientation( id4 )=135, 39640 ). holdsAt( appearance( id4 )=visible, 39640 ). % Frame number: 992 holdsAt( orientation( id2 )=96, 39680 ). holdsAt( appearance( id2 )=visible, 39680 ). holdsAt( orientation( id4 )=135, 39680 ). holdsAt( appearance( id4 )=visible, 39680 ). % Frame number: 993 holdsAt( orientation( id2 )=102, 39720 ). holdsAt( appearance( id2 )=visible, 39720 ). holdsAt( orientation( id4 )=135, 39720 ). holdsAt( appearance( id4 )=visible, 39720 ). % Frame number: 994 holdsAt( orientation( id2 )=92, 39760 ). holdsAt( appearance( id2 )=visible, 39760 ). holdsAt( orientation( id4 )=135, 39760 ). holdsAt( appearance( id4 )=visible, 39760 ). % Frame number: 995 holdsAt( orientation( id2 )=92, 39800 ). holdsAt( appearance( id2 )=visible, 39800 ). holdsAt( orientation( id4 )=135, 39800 ). holdsAt( appearance( id4 )=visible, 39800 ). % Frame number: 996 holdsAt( orientation( id2 )=92, 39840 ). holdsAt( appearance( id2 )=visible, 39840 ). holdsAt( orientation( id4 )=135, 39840 ). holdsAt( appearance( id4 )=visible, 39840 ). % Frame number: 997 holdsAt( orientation( id2 )=92, 39880 ). holdsAt( appearance( id2 )=visible, 39880 ). holdsAt( orientation( id4 )=135, 39880 ). holdsAt( appearance( id4 )=visible, 39880 ). % Frame number: 998 holdsAt( orientation( id2 )=92, 39920 ). holdsAt( appearance( id2 )=visible, 39920 ). holdsAt( orientation( id4 )=135, 39920 ). holdsAt( appearance( id4 )=visible, 39920 ). % Frame number: 999 holdsAt( orientation( id2 )=92, 39960 ). holdsAt( appearance( id2 )=visible, 39960 ). holdsAt( orientation( id4 )=135, 39960 ). holdsAt( appearance( id4 )=visible, 39960 ). % Frame number: 1000 holdsAt( orientation( id2 )=92, 40000 ). holdsAt( appearance( id2 )=visible, 40000 ). holdsAt( orientation( id4 )=135, 40000 ). holdsAt( appearance( id4 )=visible, 40000 ). % Frame number: 1001 holdsAt( orientation( id2 )=92, 40040 ). holdsAt( appearance( id2 )=visible, 40040 ). holdsAt( orientation( id4 )=135, 40040 ). holdsAt( appearance( id4 )=visible, 40040 ). % Frame number: 1002 holdsAt( orientation( id2 )=95, 40080 ). holdsAt( appearance( id2 )=visible, 40080 ). holdsAt( orientation( id4 )=135, 40080 ). holdsAt( appearance( id4 )=visible, 40080 ). % Frame number: 1003 holdsAt( orientation( id2 )=97, 40120 ). holdsAt( appearance( id2 )=visible, 40120 ). holdsAt( orientation( id4 )=135, 40120 ). holdsAt( appearance( id4 )=visible, 40120 ). % Frame number: 1004 holdsAt( orientation( id2 )=102, 40160 ). holdsAt( appearance( id2 )=visible, 40160 ). holdsAt( orientation( id4 )=135, 40160 ). holdsAt( appearance( id4 )=visible, 40160 ). % Frame number: 1005 holdsAt( orientation( id2 )=105, 40200 ). holdsAt( appearance( id2 )=visible, 40200 ). holdsAt( orientation( id4 )=135, 40200 ). holdsAt( appearance( id4 )=visible, 40200 ). % Frame number: 1006 holdsAt( orientation( id2 )=105, 40240 ). holdsAt( appearance( id2 )=visible, 40240 ). holdsAt( orientation( id4 )=135, 40240 ). holdsAt( appearance( id4 )=visible, 40240 ). % Frame number: 1007 holdsAt( orientation( id2 )=106, 40280 ). holdsAt( appearance( id2 )=visible, 40280 ). holdsAt( orientation( id4 )=135, 40280 ). holdsAt( appearance( id4 )=visible, 40280 ). % Frame number: 1008 holdsAt( orientation( id2 )=106, 40320 ). holdsAt( appearance( id2 )=visible, 40320 ). holdsAt( orientation( id4 )=135, 40320 ). holdsAt( appearance( id4 )=visible, 40320 ). % Frame number: 1009 holdsAt( orientation( id2 )=107, 40360 ). holdsAt( appearance( id2 )=visible, 40360 ). holdsAt( orientation( id4 )=135, 40360 ). holdsAt( appearance( id4 )=visible, 40360 ). % Frame number: 1010 holdsAt( orientation( id2 )=107, 40400 ). holdsAt( appearance( id2 )=visible, 40400 ). holdsAt( orientation( id4 )=135, 40400 ). holdsAt( appearance( id4 )=visible, 40400 ). % Frame number: 1011 holdsAt( orientation( id2 )=107, 40440 ). holdsAt( appearance( id2 )=visible, 40440 ). holdsAt( orientation( id4 )=135, 40440 ). holdsAt( appearance( id4 )=visible, 40440 ). % Frame number: 1012 holdsAt( orientation( id2 )=112, 40480 ). holdsAt( appearance( id2 )=visible, 40480 ). holdsAt( orientation( id4 )=135, 40480 ). holdsAt( appearance( id4 )=visible, 40480 ). % Frame number: 1013 holdsAt( orientation( id2 )=112, 40520 ). holdsAt( appearance( id2 )=visible, 40520 ). holdsAt( orientation( id4 )=135, 40520 ). holdsAt( appearance( id4 )=visible, 40520 ). % Frame number: 1014 holdsAt( orientation( id2 )=119, 40560 ). holdsAt( appearance( id2 )=visible, 40560 ). holdsAt( orientation( id4 )=135, 40560 ). holdsAt( appearance( id4 )=visible, 40560 ). % Frame number: 1015 holdsAt( orientation( id2 )=119, 40600 ). holdsAt( appearance( id2 )=visible, 40600 ). holdsAt( orientation( id4 )=135, 40600 ). holdsAt( appearance( id4 )=disappear, 40600 ). % Frame number: 1016 holdsAt( orientation( id2 )=122, 40640 ). holdsAt( appearance( id2 )=visible, 40640 ). % Frame number: 1017 holdsAt( orientation( id2 )=125, 40680 ). holdsAt( appearance( id2 )=visible, 40680 ). % Frame number: 1018 holdsAt( orientation( id2 )=125, 40720 ). holdsAt( appearance( id2 )=visible, 40720 ). % Frame number: 1019 holdsAt( orientation( id2 )=125, 40760 ). holdsAt( appearance( id2 )=visible, 40760 ). % Frame number: 1020 holdsAt( orientation( id2 )=131, 40800 ). holdsAt( appearance( id2 )=visible, 40800 ). % Frame number: 1021 holdsAt( orientation( id2 )=131, 40840 ). holdsAt( appearance( id2 )=visible, 40840 ). % Frame number: 1022 holdsAt( orientation( id2 )=131, 40880 ). holdsAt( appearance( id2 )=visible, 40880 ). % Frame number: 1023 holdsAt( orientation( id2 )=131, 40920 ). holdsAt( appearance( id2 )=visible, 40920 ). % Frame number: 1024 holdsAt( orientation( id2 )=131, 40960 ). holdsAt( appearance( id2 )=visible, 40960 ). % Frame number: 1025 holdsAt( orientation( id2 )=137, 41000 ). holdsAt( appearance( id2 )=visible, 41000 ). % Frame number: 1026 holdsAt( orientation( id2 )=137, 41040 ). holdsAt( appearance( id2 )=visible, 41040 ). % Frame number: 1027 holdsAt( orientation( id2 )=137, 41080 ). holdsAt( appearance( id2 )=visible, 41080 ). % Frame number: 1028 holdsAt( orientation( id2 )=132, 41120 ). holdsAt( appearance( id2 )=visible, 41120 ). % Frame number: 1029 holdsAt( orientation( id2 )=132, 41160 ). holdsAt( appearance( id2 )=visible, 41160 ). % Frame number: 1030 holdsAt( orientation( id2 )=126, 41200 ). holdsAt( appearance( id2 )=visible, 41200 ). % Frame number: 1031 holdsAt( orientation( id2 )=126, 41240 ). holdsAt( appearance( id2 )=visible, 41240 ). % Frame number: 1032 holdsAt( orientation( id2 )=126, 41280 ). holdsAt( appearance( id2 )=visible, 41280 ). % Frame number: 1033 holdsAt( orientation( id2 )=126, 41320 ). holdsAt( appearance( id2 )=visible, 41320 ). % Frame number: 1034 holdsAt( orientation( id2 )=129, 41360 ). holdsAt( appearance( id2 )=visible, 41360 ). % Frame number: 1035 holdsAt( orientation( id2 )=128, 41400 ). holdsAt( appearance( id2 )=visible, 41400 ). % Frame number: 1036 holdsAt( orientation( id2 )=129, 41440 ). holdsAt( appearance( id2 )=visible, 41440 ). % Frame number: 1037 holdsAt( orientation( id2 )=131, 41480 ). holdsAt( appearance( id2 )=visible, 41480 ). % Frame number: 1038 holdsAt( orientation( id2 )=130, 41520 ). holdsAt( appearance( id2 )=visible, 41520 ). % Frame number: 1039 holdsAt( orientation( id2 )=131, 41560 ). holdsAt( appearance( id2 )=visible, 41560 ). % Frame number: 1040 holdsAt( orientation( id2 )=131, 41600 ). holdsAt( appearance( id2 )=visible, 41600 ). % Frame number: 1041 holdsAt( orientation( id2 )=132, 41640 ). holdsAt( appearance( id2 )=visible, 41640 ). % Frame number: 1042 holdsAt( orientation( id2 )=132, 41680 ). holdsAt( appearance( id2 )=visible, 41680 ). % Frame number: 1043 holdsAt( orientation( id2 )=132, 41720 ). holdsAt( appearance( id2 )=visible, 41720 ). % Frame number: 1044 holdsAt( orientation( id2 )=128, 41760 ). holdsAt( appearance( id2 )=visible, 41760 ). % Frame number: 1045 holdsAt( orientation( id2 )=128, 41800 ). holdsAt( appearance( id2 )=visible, 41800 ). % Frame number: 1046 holdsAt( orientation( id2 )=126, 41840 ). holdsAt( appearance( id2 )=visible, 41840 ). % Frame number: 1047 holdsAt( orientation( id2 )=127, 41880 ). holdsAt( appearance( id2 )=visible, 41880 ). % Frame number: 1048 holdsAt( orientation( id2 )=126, 41920 ). holdsAt( appearance( id2 )=visible, 41920 ). % Frame number: 1049 holdsAt( orientation( id2 )=127, 41960 ). holdsAt( appearance( id2 )=visible, 41960 ). % Frame number: 1050 holdsAt( orientation( id2 )=128, 42000 ). holdsAt( appearance( id2 )=visible, 42000 ). % Frame number: 1051 holdsAt( orientation( id2 )=128, 42040 ). holdsAt( appearance( id2 )=visible, 42040 ). % Frame number: 1052 holdsAt( orientation( id2 )=131, 42080 ). holdsAt( appearance( id2 )=visible, 42080 ). % Frame number: 1053 holdsAt( orientation( id2 )=132, 42120 ). holdsAt( appearance( id2 )=visible, 42120 ). % Frame number: 1054 holdsAt( orientation( id2 )=132, 42160 ). holdsAt( appearance( id2 )=visible, 42160 ). % Frame number: 1055 holdsAt( orientation( id2 )=132, 42200 ). holdsAt( appearance( id2 )=visible, 42200 ). % Frame number: 1056 holdsAt( orientation( id2 )=132, 42240 ). holdsAt( appearance( id2 )=visible, 42240 ). % Frame number: 1057 holdsAt( orientation( id2 )=132, 42280 ). holdsAt( appearance( id2 )=visible, 42280 ). % Frame number: 1058 holdsAt( orientation( id2 )=132, 42320 ). holdsAt( appearance( id2 )=visible, 42320 ). % Frame number: 1059 holdsAt( orientation( id2 )=132, 42360 ). holdsAt( appearance( id2 )=visible, 42360 ). % Frame number: 1060 holdsAt( orientation( id2 )=132, 42400 ). holdsAt( appearance( id2 )=visible, 42400 ). % Frame number: 1061 holdsAt( orientation( id2 )=132, 42440 ). holdsAt( appearance( id2 )=visible, 42440 ). % Frame number: 1062 holdsAt( orientation( id2 )=132, 42480 ). holdsAt( appearance( id2 )=visible, 42480 ). % Frame number: 1063 holdsAt( orientation( id2 )=132, 42520 ). holdsAt( appearance( id2 )=visible, 42520 ). % Frame number: 1064 holdsAt( orientation( id2 )=132, 42560 ). holdsAt( appearance( id2 )=visible, 42560 ). % Frame number: 1065 holdsAt( orientation( id2 )=132, 42600 ). holdsAt( appearance( id2 )=visible, 42600 ). % Frame number: 1066 holdsAt( orientation( id2 )=132, 42640 ). holdsAt( appearance( id2 )=visible, 42640 ). % Frame number: 1067 holdsAt( orientation( id2 )=136, 42680 ). holdsAt( appearance( id2 )=visible, 42680 ). % Frame number: 1068 holdsAt( orientation( id2 )=138, 42720 ). holdsAt( appearance( id2 )=visible, 42720 ). % Frame number: 1069 holdsAt( orientation( id2 )=143, 42760 ). holdsAt( appearance( id2 )=visible, 42760 ). % Frame number: 1070 holdsAt( orientation( id2 )=143, 42800 ). holdsAt( appearance( id2 )=visible, 42800 ). % Frame number: 1071 holdsAt( orientation( id2 )=138, 42840 ). holdsAt( appearance( id2 )=visible, 42840 ). % Frame number: 1072 holdsAt( orientation( id2 )=138, 42880 ). holdsAt( appearance( id2 )=visible, 42880 ). % Frame number: 1073 holdsAt( orientation( id2 )=138, 42920 ). holdsAt( appearance( id2 )=visible, 42920 ). % Frame number: 1074 holdsAt( orientation( id2 )=134, 42960 ). holdsAt( appearance( id2 )=visible, 42960 ). % Frame number: 1075 holdsAt( orientation( id2 )=136, 43000 ). holdsAt( appearance( id2 )=visible, 43000 ). % Frame number: 1076 holdsAt( orientation( id2 )=137, 43040 ). holdsAt( appearance( id2 )=visible, 43040 ). % Frame number: 1077 holdsAt( orientation( id2 )=137, 43080 ). holdsAt( appearance( id2 )=visible, 43080 ). % Frame number: 1078 holdsAt( orientation( id2 )=140, 43120 ). holdsAt( appearance( id2 )=visible, 43120 ). % Frame number: 1079 holdsAt( orientation( id2 )=143, 43160 ). holdsAt( appearance( id2 )=visible, 43160 ). % Frame number: 1080 holdsAt( orientation( id2 )=143, 43200 ). holdsAt( appearance( id2 )=visible, 43200 ). % Frame number: 1081 holdsAt( orientation( id2 )=143, 43240 ). holdsAt( appearance( id2 )=visible, 43240 ). % Frame number: 1082 holdsAt( orientation( id2 )=143, 43280 ). holdsAt( appearance( id2 )=visible, 43280 ). % Frame number: 1083 holdsAt( orientation( id2 )=143, 43320 ). holdsAt( appearance( id2 )=visible, 43320 ). % Frame number: 1084 holdsAt( orientation( id2 )=143, 43360 ). holdsAt( appearance( id2 )=visible, 43360 ). % Frame number: 1085 holdsAt( orientation( id2 )=140, 43400 ). holdsAt( appearance( id2 )=visible, 43400 ). % Frame number: 1086 holdsAt( orientation( id2 )=136, 43440 ). holdsAt( appearance( id2 )=visible, 43440 ). % Frame number: 1087 holdsAt( orientation( id2 )=137, 43480 ). holdsAt( appearance( id2 )=visible, 43480 ). % Frame number: 1088 holdsAt( orientation( id2 )=138, 43520 ). holdsAt( appearance( id2 )=visible, 43520 ). % Frame number: 1089 holdsAt( orientation( id2 )=138, 43560 ). holdsAt( appearance( id2 )=visible, 43560 ). % Frame number: 1090 holdsAt( orientation( id2 )=140, 43600 ). holdsAt( appearance( id2 )=visible, 43600 ). % Frame number: 1091 holdsAt( orientation( id2 )=143, 43640 ). holdsAt( appearance( id2 )=visible, 43640 ). % Frame number: 1092 holdsAt( orientation( id2 )=146, 43680 ). holdsAt( appearance( id2 )=visible, 43680 ). % Frame number: 1093 holdsAt( orientation( id2 )=151, 43720 ). holdsAt( appearance( id2 )=visible, 43720 ). % Frame number: 1094 holdsAt( orientation( id2 )=151, 43760 ). holdsAt( appearance( id2 )=visible, 43760 ). % Frame number: 1095 holdsAt( orientation( id2 )=157, 43800 ). holdsAt( appearance( id2 )=visible, 43800 ). % Frame number: 1096 holdsAt( orientation( id2 )=161, 43840 ). holdsAt( appearance( id2 )=visible, 43840 ). % Frame number: 1097 holdsAt( orientation( id2 )=161, 43880 ). holdsAt( appearance( id2 )=visible, 43880 ). % Frame number: 1098 holdsAt( orientation( id2 )=161, 43920 ). holdsAt( appearance( id2 )=visible, 43920 ). % Frame number: 1099 holdsAt( orientation( id2 )=157, 43960 ). holdsAt( appearance( id2 )=visible, 43960 ). % Frame number: 1100 holdsAt( orientation( id2 )=151, 44000 ). holdsAt( appearance( id2 )=visible, 44000 ). % Frame number: 1101 holdsAt( orientation( id2 )=151, 44040 ). holdsAt( appearance( id2 )=visible, 44040 ). % Frame number: 1102 holdsAt( orientation( id2 )=151, 44080 ). holdsAt( appearance( id2 )=visible, 44080 ). % Frame number: 1103 holdsAt( orientation( id2 )=156, 44120 ). holdsAt( appearance( id2 )=visible, 44120 ). % Frame number: 1104 holdsAt( orientation( id2 )=159, 44160 ). holdsAt( appearance( id2 )=visible, 44160 ). % Frame number: 1105 holdsAt( orientation( id2 )=162, 44200 ). holdsAt( appearance( id2 )=visible, 44200 ). % Frame number: 1106 holdsAt( orientation( id2 )=165, 44240 ). holdsAt( appearance( id2 )=visible, 44240 ). % Frame number: 1107 holdsAt( orientation( id2 )=171, 44280 ). holdsAt( appearance( id2 )=visible, 44280 ). % Frame number: 1108 holdsAt( orientation( id2 )=175, 44320 ). holdsAt( appearance( id2 )=visible, 44320 ). % Frame number: 1109 holdsAt( orientation( id2 )=177, 44360 ). holdsAt( appearance( id2 )=visible, 44360 ). % Frame number: 1110 holdsAt( orientation( id2 )=177, 44400 ). holdsAt( appearance( id2 )=visible, 44400 ). % Frame number: 1111 holdsAt( orientation( id2 )=177, 44440 ). holdsAt( appearance( id2 )=visible, 44440 ). % Frame number: 1112 holdsAt( orientation( id2 )=177, 44480 ). holdsAt( appearance( id2 )=visible, 44480 ). % Frame number: 1113 holdsAt( orientation( id2 )=177, 44520 ). holdsAt( appearance( id2 )=visible, 44520 ). % Frame number: 1114 holdsAt( orientation( id2 )=177, 44560 ). holdsAt( appearance( id2 )=visible, 44560 ). % Frame number: 1115 holdsAt( orientation( id2 )=177, 44600 ). holdsAt( appearance( id2 )=visible, 44600 ). % Frame number: 1116 holdsAt( orientation( id2 )=2, 44640 ). holdsAt( appearance( id2 )=visible, 44640 ). % Frame number: 1117 holdsAt( orientation( id2 )=13, 44680 ). holdsAt( appearance( id2 )=visible, 44680 ). % Frame number: 1118 holdsAt( orientation( id2 )=23, 44720 ). holdsAt( appearance( id2 )=visible, 44720 ). % Frame number: 1119 holdsAt( orientation( id2 )=31, 44760 ). holdsAt( appearance( id2 )=visible, 44760 ). % Frame number: 1120 holdsAt( orientation( id2 )=35, 44800 ). holdsAt( appearance( id2 )=visible, 44800 ). % Frame number: 1121 holdsAt( orientation( id2 )=35, 44840 ). holdsAt( appearance( id2 )=visible, 44840 ). % Frame number: 1122 holdsAt( orientation( id2 )=35, 44880 ). holdsAt( appearance( id2 )=visible, 44880 ). % Frame number: 1123 holdsAt( orientation( id2 )=35, 44920 ). holdsAt( appearance( id2 )=visible, 44920 ). % Frame number: 1124 holdsAt( orientation( id2 )=35, 44960 ). holdsAt( appearance( id2 )=visible, 44960 ). % Frame number: 1125 holdsAt( orientation( id2 )=35, 45000 ). holdsAt( appearance( id2 )=visible, 45000 ). % Frame number: 1126 holdsAt( orientation( id2 )=35, 45040 ). holdsAt( appearance( id2 )=visible, 45040 ). % Frame number: 1127 holdsAt( orientation( id2 )=35, 45080 ). holdsAt( appearance( id2 )=visible, 45080 ). % Frame number: 1128 holdsAt( orientation( id2 )=35, 45120 ). holdsAt( appearance( id2 )=visible, 45120 ). % Frame number: 1129 holdsAt( orientation( id2 )=35, 45160 ). holdsAt( appearance( id2 )=visible, 45160 ). % Frame number: 1130 holdsAt( orientation( id2 )=40, 45200 ). holdsAt( appearance( id2 )=visible, 45200 ). % Frame number: 1131 holdsAt( orientation( id2 )=48, 45240 ). holdsAt( appearance( id2 )=visible, 45240 ). % Frame number: 1132 holdsAt( orientation( id2 )=53, 45280 ). holdsAt( appearance( id2 )=visible, 45280 ). % Frame number: 1133 holdsAt( orientation( id2 )=53, 45320 ). holdsAt( appearance( id2 )=visible, 45320 ). % Frame number: 1134 holdsAt( orientation( id2 )=53, 45360 ). holdsAt( appearance( id2 )=visible, 45360 ). % Frame number: 1135 holdsAt( orientation( id2 )=53, 45400 ). holdsAt( appearance( id2 )=visible, 45400 ). % Frame number: 1136 holdsAt( orientation( id2 )=53, 45440 ). holdsAt( appearance( id2 )=visible, 45440 ). % Frame number: 1137 holdsAt( orientation( id2 )=53, 45480 ). holdsAt( appearance( id2 )=visible, 45480 ). % Frame number: 1138 holdsAt( orientation( id2 )=53, 45520 ). holdsAt( appearance( id2 )=visible, 45520 ). % Frame number: 1139 holdsAt( orientation( id2 )=53, 45560 ). holdsAt( appearance( id2 )=visible, 45560 ). % Frame number: 1140 holdsAt( orientation( id2 )=53, 45600 ). holdsAt( appearance( id2 )=visible, 45600 ). % Frame number: 1141 holdsAt( orientation( id2 )=53, 45640 ). holdsAt( appearance( id2 )=visible, 45640 ). % Frame number: 1142 holdsAt( orientation( id2 )=53, 45680 ). holdsAt( appearance( id2 )=visible, 45680 ). % Frame number: 1143 holdsAt( orientation( id2 )=53, 45720 ). holdsAt( appearance( id2 )=visible, 45720 ). % Frame number: 1144 holdsAt( orientation( id2 )=53, 45760 ). holdsAt( appearance( id2 )=visible, 45760 ). % Frame number: 1145 holdsAt( orientation( id2 )=53, 45800 ). holdsAt( appearance( id2 )=visible, 45800 ). % Frame number: 1146 holdsAt( orientation( id2 )=53, 45840 ). holdsAt( appearance( id2 )=visible, 45840 ). % Frame number: 1147 holdsAt( orientation( id2 )=53, 45880 ). holdsAt( appearance( id2 )=visible, 45880 ). % Frame number: 1148 holdsAt( orientation( id2 )=53, 45920 ). holdsAt( appearance( id2 )=visible, 45920 ). % Frame number: 1149 holdsAt( orientation( id2 )=53, 45960 ). holdsAt( appearance( id2 )=visible, 45960 ). % Frame number: 1150 holdsAt( orientation( id2 )=53, 46000 ). holdsAt( appearance( id2 )=visible, 46000 ). % Frame number: 1151 holdsAt( orientation( id2 )=53, 46040 ). holdsAt( appearance( id2 )=disappear, 46040 ).
JasonFil/Prob-EC
dataset/smooth-noise/18-LeftBag_PickedUp/lbpugtAppearenceIndv.pl
Perl
bsd-3-clause
161,743
=pod =head1 NAME UI_METHOD, UI_create_method, UI_destroy_method, UI_method_set_opener, UI_method_set_writer, UI_method_set_flusher, UI_method_set_reader, UI_method_set_closer, UI_method_set_data_duplicator, UI_method_set_prompt_constructor, UI_method_set_ex_data, UI_method_get_opener, UI_method_get_writer, UI_method_get_flusher, UI_method_get_reader, UI_method_get_closer, UI_method_get_data_duplicator, UI_method_get_data_destructor, UI_method_get_prompt_constructor, UI_method_get_ex_data - user interface method creation and destruction =head1 SYNOPSIS #include <openssl/ui.h> typedef struct ui_method_st UI_METHOD; UI_METHOD *UI_create_method(const char *name); void UI_destroy_method(UI_METHOD *ui_method); int UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui)); int UI_method_set_writer(UI_METHOD *method, int (*writer) (UI *ui, UI_STRING *uis)); int UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui)); int UI_method_set_reader(UI_METHOD *method, int (*reader) (UI *ui, UI_STRING *uis)); int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui)); int UI_method_set_data_duplicator(UI_METHOD *method, void *(*duplicator) (UI *ui, void *ui_data), void (*destructor)(UI *ui, void *ui_data)); int UI_method_set_prompt_constructor(UI_METHOD *method, char *(*prompt_constructor) (UI *ui, const char *object_desc, const char *object_name)); int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data); int (*UI_method_get_opener(const UI_METHOD *method)) (UI *); int (*UI_method_get_writer(const UI_METHOD *method)) (UI *, UI_STRING *); int (*UI_method_get_flusher(const UI_METHOD *method)) (UI *); int (*UI_method_get_reader(const UI_METHOD *method)) (UI *, UI_STRING *); int (*UI_method_get_closer(const UI_METHOD *method)) (UI *); char *(*UI_method_get_prompt_constructor(const UI_METHOD *method)) (UI *, const char *, const char *); void *(*UI_method_get_data_duplicator(const UI_METHOD *method)) (UI *, void *); void (*UI_method_get_data_destructor(const UI_METHOD *method)) (UI *, void *); const void *UI_method_get_ex_data(const UI_METHOD *method, int idx); =head1 DESCRIPTION A method contains a few functions that implement the low-level of the User Interface. These functions are: =over 4 =item an opener This function takes a reference to a UI and starts a session, for example by opening a channel to a tty, or by creating a dialog box. =item a writer This function takes a reference to a UI and a UI String, and writes the string where appropriate, maybe to the tty, maybe added as a field label in a dialog box. Note that this gets fed all strings associated with a UI, one after the other, so care must be taken which ones it actually uses. =item a flusher This function takes a reference to a UI, and flushes everything that has been output so far. For example, if the method builds up a dialog box, this can be used to actually display it and accepting input ended with a pressed button. =item a reader This function takes a reference to a UI and a UI string and reads off the given prompt, maybe from the tty, maybe from a field in a dialog box. Note that this gets fed all strings associated with a UI, one after the other, so care must be taken which ones it actually uses. =item a closer This function takes a reference to a UI, and closes the session, maybe by closing the channel to the tty, maybe by destroying a dialog box. =back All of these functions are expected to return 0 on error, 1 on success, or -1 on out-off-band events, for example if some prompting has been cancelled (by pressing Ctrl-C, for example). Only the flusher or the reader are expected to return -1. If returned by another of the functions, it's treated as if 0 was returned. Regarding the writer and the reader, don't assume the former should only write and don't assume the latter should only read. This depends on the needs of the method. For example, a typical tty reader wouldn't write the prompts in the write, but would rather do so in the reader, because of the sequential nature of prompting on a tty. This is how the UI_OpenSSL() method does it. In contrast, a method that builds up a dialog box would add all prompt text in the writer, have all input read in the flusher and store the results in some temporary buffer, and finally have the reader just fetch those results. The central function that uses these method functions is UI_process(), and it does it in five steps: =over 4 =item 1. Open the session using the opener function if that one's defined. If an error occurs, jump to 5. =item 2. For every UI String associated with the UI, call the writer function if that one's defined. If an error occurs, jump to 5. =item 3. Flush everything using the flusher function if that one's defined. If an error occurs, jump to 5. =item 4. For every UI String associated with the UI, call the reader function if that one's defined. If an error occurs, jump to 5. =item 5. Close the session using the closer function if that one's defined. =back UI_create_method() creates a new UI method with a given B<name>. UI_destroy_method() destroys the given UI method B<ui_method>. UI_method_set_opener(), UI_method_set_writer(), UI_method_set_flusher(), UI_method_set_reader() and UI_method_set_closer() set the five main method function to the given function pointer. UI_method_set_data_duplicator() sets the user data duplicator and destructor. See L<UI_dup_user_data(3)>. UI_method_set_prompt_constructor() sets the prompt constructor. See L<UI_construct_prompt(3)>. UI_method_set_ex_data() sets application specific data with a given EX_DATA index. See L<CRYPTO_get_ex_new_index(3)> for general information on how to get that index. UI_method_get_opener(), UI_method_get_writer(), UI_method_get_flusher(), UI_method_get_reader(), UI_method_get_closer(), UI_method_get_data_duplicator(), UI_method_get_data_destructor() and UI_method_get_prompt_constructor() return the different method functions. UI_method_get_ex_data() returns the application data previously stored with UI_method_set_ex_data(). =head1 RETURN VALUES UI_create_method() returns a UI_METHOD pointer on success, NULL on error. UI_method_set_opener(), UI_method_set_writer(), UI_method_set_flusher(), UI_method_set_reader(), UI_method_set_closer(), UI_method_set_data_duplicator() and UI_method_set_prompt_constructor() return 0 on success, -1 if the given B<method> is NULL. UI_method_set_ex_data() returns 1 on success and 0 on error (because CRYPTO_set_ex_data() does so). UI_method_get_opener(), UI_method_get_writer(), UI_method_get_flusher(), UI_method_get_reader(), UI_method_get_closer(), UI_method_get_data_duplicator(), UI_method_get_data_destructor() and UI_method_get_prompt_constructor() return the requested function pointer if it's set in the method, otherwise NULL. UI_method_get_ex_data() returns a pointer to the application specific data associated with the method. =head1 SEE ALSO L<UI(3)>, L<CRYPTO_get_ex_data(3)>, L<UI_STRING(3)> =head1 HISTORY The UI_method_set_data_duplicator(), UI_method_get_data_duplicator() and UI_method_get_data_destructor() functions were added in OpenSSL 1.1.1. =head1 COPYRIGHT Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L<https://www.openssl.org/source/license.html>. =cut
jens-maus/amissl
openssl/doc/man3/UI_create_method.pod
Perl
bsd-3-clause
7,974
#!/usr/bin/perl -w # # snp_view.pl # # Copyright 2008 Simon Gladman <gla048@localhost.localdomain> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. # # A script to take a single contig AFG file and a position in that # contig and show the reads aligned with the consensus sequence # centred on that position. It outputs a text file called "snp_view.txt" # # Usage: ./snp_view.pl <afg file> <position> # # Where: <afg file> is a single contig AFG file extracted from the # velvet_assy.afg file (produced by Velvet) using asmbly_splitter.pl # <position> is the position in the contig about which the view # will be centred. The position must be >= a full read length from # start of the contig and must be <= a full read length from # the end of the contig. # # Other parameters: # $readlength: by changing the size of this parameter, it changes # the width of the view. Note that the minimum value is the read length. # # $outfile: set this parameter to whatever output filename you want. # # Modified by Daniel Zerbino (Aug 28 2009) to display reverse strand reads in the # snp_view_reads file and to better handle the display of snps near the end of contigs use strict; use List::Util qw[min max]; my $outfile = "snp_view.txt"; my $readlength = 50; my $usage = "snp_view.pl\nCopyright 2008 Simon Gladman - CSIRO\nUsage: $0 <single_contig_afg_file> <integer_position_in_contig>\n"; my $afg_file = $ARGV[0]; my $posn = $ARGV[1]; unless($afg_file) { die $usage; } unless($posn) {die $usage; } my $low = $posn - $readlength; my $high = $posn + $readlength; my $con; my $seq = ""; my $incontig = 0; my %offs; my %seqs; my %revs; my $off; my $src; unless(open IN, $afg_file){die "No such $afg_file\n$!\n";} unless(open OUT, ">$outfile"){die "No such $afg_file\n";} unless(open OUT2, ">snp_view_ref.fa"){die "Couldn't open fasta outfile\n";} unless(open OUT3, ">snp_view_reads.fa"){die "Couldn't open reads fasta file\n";} while(<IN>){ if(/{CTG/){ $con = <IN>; chomp($con); $con =~ s/^iid://; $incontig = 1; } if(/^seq/ && $incontig){ while(<IN>){ chomp; if(/\./){ last; } else { $seq .= $_; } } } if(/{TLE/){ $_ = <IN>; chomp; my @temp = split /:/, $_; $src = $temp[1]; $_ = <IN>; chomp; @temp = split /:/, $_; $off = $temp[1]; if($off >= $low && $off <= $posn){ #we want this one.. #print "$low, $off, $high\n"; $offs{$src} = $off; } $_ = <IN>; chomp; if(/clr:[0-9]+,0/){ $revs{$src} = "r"; } if(/clr:0,[0-9]+/){ $revs{$src} = "f"; } } } print OUT "Contig $con, position of X below is: $posn\n"; my $wantSeqStart = max($low, 0); my $wantSeqFinish = min($high, length $seq); my $wantSeq = substr($seq, $wantSeqStart, $wantSeqFinish - $wantSeqStart); print OUT "Position:\t\t$low"; my $num_spaces = 2 * $readlength - length($low) -1; for(my $i = 0; $i < $num_spaces; $i ++){ if($i == $readlength-length($low)){ print OUT "X"; } else { print OUT " "; } } print OUT "$high\n"; print OUT "Read #\t\tdir\t"; if ($low < 0) { for(my $i = 0; $i > $low; $i--){ print OUT "."; } } print OUT "$wantSeq\n"; print OUT2 ">Reference\n"; print OUT2 "$wantSeq\n"; close IN; unless(open IN, $afg_file){die "No such $afg_file\n$!\n";} while(<IN>){ if(/{RED/){ $_ = <IN>; chomp; my @temp = split /:/, $_; if(defined $offs{$temp[1]}){ $_ = <IN>; $_ = <IN>; $_ = <IN>; chomp; $seqs{$temp[1]} = $_; } } if(/{CTG/){ last; } } foreach my $key (sort { $offs{$a} <=> $offs{$b} } keys %offs){ my $dots = $offs{$key} - $low; print OUT "$key\t"; if($key < 10000000){ print OUT "\t";} print OUT $revs{$key} ."\t"; for(my $i = 0; $i < $dots; $i ++){ print OUT "."; } if($revs{$key} eq "f"){ print OUT $seqs{$key} . "\n"; print OUT3 ">$key\n"; print OUT3 $seqs{$key} . "\n"; } else { my $rev = reverse($seqs{$key}); $rev =~ tr /ATCG/TAGC/; print OUT "$rev\n"; print OUT3 ">$key\n"; print OUT3 $seqs{$key} . "\n"; } }
reiverjohn/biobench2
velvet/contrib/afg_handling/snp_view.pl
Perl
apache-2.0
4,994
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. package AI::MXNet::NDArray::Sparse; use strict; use warnings; use AI::MXNet::Base; use AI::MXNet::Function::Parameters; use Mouse; extends 'AI::MXNet::NDArray'; =head1 NAME AI::MXNet::NDArray::Sparse - Sparse NDArray API of MXNet =cut =head1 DESCRIPTION The base class of an NDArray stored in a sparse storage format. See AI::MXNet::NDArray::CSR and AI::MXNet::NDArray::RowSparse for more details. =cut method _new_alloc_handle( Stype $stype, Shape $shape, AI::MXNet::Context $ctx, Bool $delay_alloc, Dtype $dtype, AuxTypes $aux_types, Maybe[ArrayRef[Shape]] $aux_shapes= ) { confess("only int64 is supported for aux types") if (grep { $_ ne 'int64' } @$aux_types); my $aux_type_ids = [map { DTYPE_STR_TO_MX->{$_} } @$aux_types]; $aux_shapes //= [map { [0] } @$aux_types]; my $aux_shape_lens = [map { scalar(@$_) } @$aux_shapes]; @$aux_shapes = map { @$_ } @$aux_shapes; my $num_aux = @{ $aux_types }; my $handle = check_call( AI::MXNetCAPI::NDArrayCreateSparseEx( STORAGE_TYPE_STR_TO_ID->{$stype}, $shape, scalar(@$shape), $ctx->device_type_id, $ctx->device_id, $delay_alloc, DTYPE_STR_TO_MX->{$dtype}, scalar(@$aux_types), $aux_type_ids, $aux_shape_lens, $aux_shapes ) ); } method _class_name() { my $class = ref $self || $self; $class; } sub not_implemented { confess "Not implemented" } use overload '""' => sub { my $self = shift; my $shape_info = join('x', @{ $self->shape }); sprintf("\n<%s, %s @%s>", $self->_class_name, $shape_info, $self->context); }, '+' => \&add, '-' => \&subtract, '*' => \&multiply, '/' => \&divide, '+=' => \&not_implemented, '-=' => \&not_implemented, '*=' => \&not_implemented, '/=' => \&not_implemented; method add(AI::MXNet::NDArray|Num $other, $reverse=) { if(blessed $other and join(',', @{ $self->shape }) eq join(',', @{ $other->shape })) { return AI::MXNet::NDArray::_ufunc_helper( $self, $other, qw/elemwise_add _plus_scalar/ ); } else { return AI::MXNet::NDArray::_ufunc_helper( $self, $other, qw/broadcast_add _plus_scalar/ ); } } method subtract(AI::MXNet::NDArray|Num $other, $reverse=) { if(blessed $other and join(',', @{ $self->shape }) eq join(',', @{ $other->shape })) { return AI::MXNet::NDArray::_ufunc_helper( $self, $other, qw/elemwise_sub _minus_scalar _rminus_scalar/, $reverse ); } else { return AI::MXNet::NDArray::_ufunc_helper( $self, $other, qw/broadcast_sub _minus_scalar _rminus_scalar/, $reverse ); } } method multiply(AI::MXNet::NDArray|Num $other, $reverse=) { if(blessed $other and join(',', @{ $self->shape }) eq join(',', @{ $other->shape })) { return AI::MXNet::NDArray::_ufunc_helper( $self, $other, qw/elemwise_mul _mul_scalar/, ); } else { return AI::MXNet::NDArray::_ufunc_helper( $self, $other, qw/broadcast_mul _mul_scalar/, ); } } method divide(AI::MXNet::NDArray|Num $other, $reverse=) { if(blessed $other and join(',', @{ $self->shape }) eq join(',', @{ $other->shape })) { return AI::MXNet::NDArray::_ufunc_helper( $self, $other, qw/elemwise_div _div_scalar _rdiv_scalar/, $reverse ); } else { return AI::MXNet::NDArray::_ufunc_helper( $self, $other, qw/broadcast_div _div_scalar _rdiv_scalar/, $reverse ); } } { no warnings 'redefine'; *_sync_copyfrom = *_at = *_slice = *reshape = *size = \&not_implemented; } method _aux_type(Int $i) { return DTYPE_MX_TO_STR->{ check_call( AI::MXNetCAPI::NDArrayGetAuxType( $self->handle, $i ) ) } } method _num_aux() { return scalar(@{ STORAGE_AUX_TYPES->{ $self->stype } }); } method _aux_types() { [map { $self->_aux_type($_) } 0..$self->_num_aux-1]; } =head2 aspdl Return a dense PDL object with value copied from this array =cut method aspdl() { return $self->tostype('default')->aspdl; } =head2 astype Returns a copy of the array after casting to a specified type. Parameters ---------- dtype : Dtype The type of the returned array. Examples -------- >>> $x = mx->nd->sparse->zeros('row_sparse', [2,3], dtype=>'float32') >>> $y = $x->astype('int32') >>> $y->dtype <type 'int32'> =cut method astype(Dtype $dtype) { my $res = $self->zeros( $self->stype, $self->shape, ctx => $self->context, dtype => $dtype ); $self->copyto($res); return $res; } =head2 copyto Copies the value of this array to another array. Parameters ---------- other : NDArray or NDArray::CSR or NDArray::RowSparse or Context The destination array or context. Returns ------- NDArray or CSRNDArray::CSR or NDArray::RowSparse The copied array. =cut method copyto(AI::MXNet::NDArray|AI::MXNet::Context $other) { if($other->isa('AI::MXNet::NDArray')) { if($self->handle eq $other->handle) { Carp::cluck('You are attempting to copy an array to itself'); return; } else { return __PACKAGE__->_copyto($self, out => $other); } } elsif($other->isa('AI::MXNet::Context')) { my $hret = __PACKAGE__->_ndarray_cls( __PACKAGE__->_new_alloc_handle( $self->stype, $self->shape, $other, 1, $self->dtype, $self->_aux_types ) ); return __PACKAGE__->_copyto($self, out=>$hret) } } =head2 check_format Check whether the NDArray format is valid. Parameters ---------- full_check : bool, optional If `True`, rigorous check, O(N) operations. Otherwise basic check, O(1) operations (default True). =cut method check_format(Bool $full_check=1) { scalar(check_call(AI::MXNetCAPI::NDArraySyncCheckFormat($self->handle, $full_check))); } =head2 _data A deep copy NDArray of the data array associated with the BaseSparseNDArray. This function blocks. Do not use it in performance critical code. =cut method _data() { $self->wait_to_read; my $handle = check_call(AI::MXNetCAPI::NDArrayGetDataNDArray($self->handle)); return AI::MXNet::NDArray->new(handle => $handle); } =head2 _aux_data Get a deep copy NDArray of the i-th aux data array associated with the AI::MXNet::NDArray::Sparse This function blocks. Do not use it in performance critical code. =cut method _aux_data(Int $i) { $self->wait_to_read; my $handle = check_call(AI::MXNetCAPI::NDArrayGetAuxNDArray($self->handle, $i)); return AI::MXNet::NDArray->new(handle => $handle); } package AI::MXNet::NDArray::CSR; use AI::MXNet::Base; use Mouse; extends 'AI::MXNet::NDArray::Sparse'; =head1 NAME AI::MXNet::NDArray::CSR - A sparse representation of 2D NDArray in the Compressed Sparse Row format. =cut =head1 DESCRIPTION A AI::MXNet::NDArray::CSR represents an AI::MXNet::NDArray as three separate arrays: `data`, `indptr` and `indices`. It uses the CSR representation where the column indices for row i are stored in ``indices[indptr[i]:indptr[i+1]]`` and their corresponding values are stored in ``data[indptr[i]:indptr[i+1]]``. The column indices for a given row are expected to be sorted in ascending order. Duplicate column entries for the same row are not allowed. Example ------- >>> $a = mx->nd->array([[0, 1, 0], [2, 0, 0], [0, 0, 0], [0, 0, 3]]); >>> $a = $a->tostype('csr'); >>> $a->data->aspdl; [ 1 2 3] >>> $a->indices->aspdl [1 0 2] >>> $a->indptr->aspdl [0 1 2 2 3] See Also -------- csr_matrix: Several ways to construct a CSRNDArray =cut # def __reduce__(self): # return CSRNDArray, (None,), super(CSRNDArray, self).__getstate__() use overload '+=' => sub { ($_[0] + $_[1])->copyto($_[0]) }, '-=' => sub { ($_[0] - $_[1])->copyto($_[0]) }, '*=' => sub { ($_[0] * $_[1])->copyto($_[0]) }, '/=' => sub { ($_[0] / $_[1])->copyto($_[0]) }; =head2 slice Returns a newly created array based on the indexing key. Parameters ---------- key : int or array ref Indexing key. Examples -------- >>> $indptr = [0, 2, 3, 6]; >>> $indices = [0, 2, 2, 0, 1, 2]; >>> $data = [1, 2, 3, 4, 5, 6]; >>> $a = mx->nd->sparse->csr_matrix([$data, $indices, $indptr], shape=>[3, 3]) >>> $a->aspdl [[ 1 0 2] [ 0 0 3] [ 4 5 6]] >>> $a->slice([1,2])->aspdl [[ 0 0 3]] >>> $a->slice(1)->aspdl [[ 0 0 3]] >>> $a->[-1]->aspdl [[ 4 5 6]] =cut method slice(Slice|InternalSlice @slices) { if(grep { /^begin|end|slice$/ } @slices) { return $self->SUPER::slice(@slices); } my $slice = $slices[0]; my ($begin, $end); if(not ref $slice) { if($slice < 0) { $begin = $self->shape->[0] + $slice; } else { $begin = $slice; } $end = $begin; } else { ($begin, $end) = @{ $slice }; $end //= $self->shape->[0] - 1; if($begin < 0) { $begin += $self->shape->[0]; } if($end < 0) { $end += $self->shape->[0]; } } return $self->SUPER::slice(begin => $begin, end => $end + 1); } =head2 set Set self to value. Also usable as overloaded .= Parameters ---------- value : AI::MXNet::NDArray or AI::MXNet::NDArray::CSR or PDL/PDL::CCS::Nd/perl array ref in PDL constructor format The value to set. Examples -------- >>> $src = mx->nd->sparse->zeros('csr', [3,3]) >>> $src->aspdl [[ 0 0 0] [ 0 0 0] [ 0 0 0]] >>> # AI::MXNet::NDArray::CSR with same storage type >>> $x = mx->nd->ones('row_sparse', [3,3])->tostype('csr') >>> $x .= $src >>> $x->aspdl [[ 1 1 1] [ 1 1 1] [ 1 1 1]] >>> # assign NDArray to AI::MXNet::NDArray::CSR >>> $x .= mx->nd->ones([3,3]) * 2 >>> $x->aspdl [[ 2 2 2] [ 2 2 2] [ 2 2 2]] =cut method set(AcceptableInput $other, $reverse=) { confess('Failed to assign to a readonly CSR') unless $self->writable; if($other->isa('AI::MXNet::NDArray')) { if($self->handle ne $other->handle) { $other->copyto($self); } } else { my $tmp = __PACKAGE__->array($other, ((not ref $other) ? ( pdl => $self->aspdl) : ())); $tmp->copyto($self); } } use overload '.=' => \&set; =head2 indices A deep copy NDArray of the indices array of the AI::MXNet::NDArray::CSR. This generates a deep copy of the column indices of the current `csr` matrix. Returns ------- NDArray This AI::MXNet::NDArray::CSR indices array. =cut method indices() { return $self->_aux_data(1); } =head2 indptr A deep copy NDArray of the inptr array of the AI::MXNet::NDArray::CSR. This generates a deep copy of the indptr of the current `csr` matrix. Returns ------- NDArray This AI::MXNet::NDArray::CSR indptr array. =cut method indptr() { return $self->_aux_data(0); } =head2 data A deep copy NDArray of the data array of the AI::MXNet::NDArray::CSR. This generates a deep copy of the data of the current `csr` matrix. Returns ------- NDArray This AI::MXNet::NDArray::CSR data array. =cut method data() { return $self->_data; } =head2 tostype Return a copy of the array with chosen storage type. Returns ------- NDArray or AI::MXNet::NDArray::CSR A copy of the array with the chosen storage stype =cut method tostype(Stype $stype) { if($stype eq 'row_sparse') { confess("cast_storage from csr to row_sparse is not supported"); } return $self->cast_storage(stype => $stype); } =head2 copyto Copies the value of this array to another array. If $other is a AI::MXNet::NDArray or AI::MXNet::NDArray::CSR object, then $other->shape and $self->shape should be the same. This function copies the value from $self to $other. If $other is a context, a new AI::MXNet::NDArray::CSR will be first created on the target context, and the value of $self is copied. Parameters ---------- $other : AI::MXNet::NDArray or AI::MXNet::NDArray::CSR or AI::MXNet::Context The destination array or context. Returns ------- AI::MXNet::NDArray or AI::MXNet::NDArray::CSR =cut method copyto(AI::MXNet::Context|AI::MXNet::NDArray $other) { if($other->isa('AI::MXNet::Context')) { return $self->SUPER::copyto($other); } else { my $stype = $other->stype; if($stype eq 'default' or $stype eq 'csr') { return return $self->SUPER::copyto($other); } else { confess("copyto does not support destination NDArray stype $stype"); } } } =head2 Returns a PDL::CCS::Nd object with value copied from this array =cut method aspdlccs() { return ascsr($self->data->aspdl, $self->indptr->aspdl, $self->indices->aspdl, $self->shape); } package AI::MXNet::NDArray::RowSparse; use Mouse; extends 'AI::MXNet::NDArray::Sparse'; =head1 NAME AI::MXNet::NDArray::RowSparse - A sparse representation of a set of NDArray row slices at given indices. =cut =head1 DESCRIPTION A AI::MXNet::NDArray::RowSparse represents a multidimensional NDArray using two separate arrays: `data` and `indices`. The number of dimensions has to be at least 2. - data: an NDArray of any dtype with shape [D0, D1, ..., Dn]. - indices: a 1-D int64 NDArray with shape [D0] with values sorted in ascending order. The `indices` stores the indices of the row slices with non-zeros, while the values are stored in `data`. The corresponding NDArray ``dense`` represented by AI::MXNet::NDArray::RowSparse ``rsp`` has ``dense[rsp.indices[i], :, :, :, ...] = rsp.data[i, :, :, :, ...]`` >>> $dense->aspdl [[ 1 2 3 ] [ 0 0 0 ] [ 4 0 5 ] [ 0 0 0 ] [ 0 0 0 ]] >>> $rsp = $dense->tostype('row_sparse'); >>> $rsp->indices->aspdl [ 0 2 ] >>> $rsp->data->aspdl [[ 1 2 3 ] [ 4 0 5 ]] A AI::MXNet::NDArray::RowSparse is typically used to represent non-zero row slices of a large NDArray of shape [LARGE0, D1, .. , Dn] where LARGE0 >> D0 and most row slices are zeros. AI::MXNet::NDArray::RowSparse is used principally in the definition of gradients for operations that have sparse gradients (e.g. sparse dot and sparse embedding). See Also -------- row_sparse_array: Several ways to construct a AI::MXNet::NDArray::RowSparse =cut use overload '+=' => sub { ($_[0] + $_[1])->copyto($_[0]) }, '-=' => sub { ($_[0] - $_[1])->copyto($_[0]) }, '*=' => sub { ($_[0] * $_[1])->copyto($_[0]) }, '/=' => sub { ($_[0] / $_[1])->copyto($_[0]) }; method slice(@args) { confess("not implemented") } =head2 set Set self to value. Also usable as overloaded .= Parameters ---------- value : AI::MXNet::NDArray or AI::MXNet::NDArray::CSR or PDL/PDL::CCS::Nd/perl array ref in PDL constructor format The value to set. Examples -------- >>> $src = mx->nd->sparse->zeros('raw_sparse', [3,3]) >>> $src->aspdl [[ 0 0 0] [ 0 0 0] [ 0 0 0]] >>> # AI::MXNet::NDArray::RowSparse with same storage type >>> $x = mx->nd->ones('row_sparse', [3,3]) >>> $src .= $x >>> $src->aspdl [[ 1 1 1] [ 1 1 1] [ 1 1 1]] >>> # assign NDArray to AI::MXNet::NDArray::RowSparse >>> $x .= mx->nd->ones([3,3]) * 2 >>> $x->aspdl [[ 2 2 2] [ 2 2 2] [ 2 2 2]] =cut method set(AcceptableInput $other, $reverse=) { confess('Failed to assign to a readonly RowSparse') unless $self->writable; if($other->isa('AI::MXNet::NDArray')) { if($self->handle ne $other->handle) { $other->copyto($self); } } else { my $tmp = __PACKAGE__->array($other, ((not ref $other) ? ( pdl => $self->aspdl) : ())); $tmp->copyto($self); } } use overload '.=' => \&set; =head2 data A deep copy NDArray of the data array of the AI::MXNet::NDArray::RowSparse. This generates a deep copy of the data of the current `row_sparse` matrix. Returns ------- NDArray This AI::MXNet::NDArray::RowSparse data array. =cut method data() { return $self->_data; } =head2 indices A deep copy NDArray of the indices array of the AI::MXNet::NDArray::RowSparse. This generates a deep copy of the column indices of the current `row_sparse` matrix. Returns ------- NDArray This AI::MXNet::NDArray::RowSparse indices array. =cut method indices() { return $self->_aux_data(0); } =head2 data A deep copy NDArray of the data array of the AI::MXNet::NDArray::RowSparse. This generates a deep copy of the data of the current `row_sparse` matrix. Returns ------- NDArray This AI::MXNet::NDArray::RowSparse data array. =cut =head2 tostype Return a copy of the array with chosen storage type. Returns ------- NDArray or RowSparseNDArray A copy of the array with the chosen storage stype =cut method tostype(Stype $stype) { if($stype eq 'csr') { confess("cast_storage from row_sparse to csr is not supported"); } return $self->cast_storage(stype => $stype); } =head2 copyto Copies the value of this array to another array. If $other is a AI::MXNet::NDArray or AI::MXNet::NDArray::RawSparse object, then $other->shape and $self->shape should be the same. This function copies the value from $self to $other. If $other is a context, a new AI::MXNet::NDArray::RawSparse will be first created on the target context, and the value of $self is copied. Parameters ---------- $other : AI::MXNet::NDArray or AI::MXNet::NDArray::RawSparse or AI::MXNet::Context The destination array or context. Returns ------- AI::MXNet::NDArray or AI::MXNet::NDArray::RawSparse =cut method copyto(AI::MXNet::Context|AI::MXNet::NDArray $other) { if($other->isa('AI::MXNet::Context')) { return $self->SUPER::copyto($other); } else { my $stype = $other->stype; if($stype eq 'default' or $stype eq 'row_sparse') { return return $self->SUPER::copyto($other); } else { confess("copyto does not support destination NDArray stype $stype"); } } } package AI::MXNet::NDArray::Sparse; # Prepare `source_array` so that it can be used to construct NDArray. # `source_array` is converted to a `pdl` if it's neither an `NDArray` # nor a `pdl`. method _prepare_src_array($source_array, Dtype $dtype) { my $pdl_type = PDL::Type->new(DTYPE_MX_TO_PDL->{ $dtype }); if(not blessed($source_array)) { $source_array = eval { pdl($pdl_type, $source_array); }; confess($@) if $@; } elsif($source_array->isa('AI::MXNet::NDArray')) { return $source_array; } $source_array = pdl($pdl_type, [@{ $source_array->unpdl } ? $source_array->unpdl->[0] : 0 ]) unless @{ $source_array->shape->unpdl }; return $source_array; } # Prepare the value of dtype if `dtype` is undef. If `src_array` is an NDArray, PDL # or PDL::CCS::Ne, return src_array->dtype. float32 is returned otherwise. method _prepare_default_dtype($src_array, $dtype) { if(not defined $dtype) { if(blessed $src_array) { $dtype = $src_array->dtype; } else { $dtype = 'float32'; } } return $dtype; } use Data::Dumper; method _check_shape($s1, $s2) { my ($ps1, $ps2) = map { (blessed($_) and $_->isa('AI::MXNet:NDArray')) ? pdl($_->shape) : blessed($_) ? $_ : pdl($_) } ($s1, $s2); return 1 unless defined $s2; ($ps1 == $ps2)->all or confess("Shape mismatch detected. " . Dumper(blessed ($s1) ? $s1->undpl : $s1 ) . " v.s. " . Dumper(blessed ($s2) ? $s2 : $s2)); } method coo_matrix(@args) { my ($data, $row, $col, $shape) = map { blessed $_ ? $_ : pdl($_) } @args; my @which; my $i = 0; my $j = 0; for (my $i = 0; $i < $row->nelem; $i++) { push @which, [$row->at($i), $col->at($i)]; } return PDL::CCS::Nd->newFromWhich( pdl(\@which), $data, pdims => $shape )->xchg(0, 1); } =head2 csr_matrix Creates a AI::MXNet::NDArray::CSR, an 2D array with compressed sparse row (CSR) format. The AI::MXNet::NDArray::CSR can be instantiated in several ways: - csr_matrix($arg1, Maybe[AI::MXNet::Context] :$ctx=, Maybe[Shape] :$shape, Maybe [Dtype] :$dtype=) $ctx, $shape, $dtype are optional $arg1 can be given in following variants - to construct a AI::MXNet::NDArray::CSR with a dense 2D array $arg1 - $arg1 is in AI::MXNet::NDArray::array input format - to construct a AI::MXNet::NDArray::CSR with a sparse 2D array $arg1 $arg1 is AI::MXNet::NDArray::CSR or PDL::CCS::Nd - A sparse matrix. PDL::CCS::Nd is expected to be converted internally into CSR format AI::MXNet injects 'tocsr' method into PDL and PDL::CCS::Nd modules for this purpose. - to construct an empty AI::MXNet::NDArray::CSR with shape $arg1 = [$M, $N] - $M - Number of rows in the matrix - $N - Number of columns in the matrix - to construct a AI::MXNet::NDArray::CSR based on the definition of compressed sparse row format using three separate arrays, where the column indices for row i are stored in ``indices[indptr[i]:indptr[i+1]]`` and their corresponding values are stored in ``data[indptr[i]:indptr[i+1]]``. The column indices for a given row are expected to be **sorted in ascending order.** Duplicate column entries for the same row are not allowed. In this case $arg1 = [$data, $indices, $indptr] $data, $indices, $indptr must be given in the AI::MXNet::NDArray::array input format - $data - holds all the non-zero entries of the matrix in row-major order. - $indices - stores the column index for each non-zero element in $data. stores the column index for each non-zero element in $data. - $indptr - stores the offset into $data of the first non-zero element number of each row of the matrix. to construct a AI::MXNet::NDArray::CSR based on the COOrdinate format using three seperate arrays, where ``row[i]`` is the row index of the element, ``col[i]`` is the column index of the element and ``data[i]`` is the data corresponding to the element. All the missing elements in the input are taken to be zeroes. In this case $arg1 = [$data, [$row, $col]] $data, $row, $col must be given in the AI::MXNet::NDArray::array input format $data - holds all the non-zero entries of the matrix in COO format. $row - stores the row index for each non zero element in $data. - **col** (*array_like*) - An object exposing the array interface, which $col - stores the col index for each non zero element in $data. Returns ------- AI::MXNet::NDArray::CSR A AI::MXNet::NDArray::CSR with the 'csr' storage representation. Example ------- >>> $a = mx->nd->sparse->csr_matrix([[1, 2, 3], [1, 0, 2], [0, 1, 2, 2, 3]], shape => [4, 3]) >>> $a->aspdl [[ 0 1 0] [ 2 0 0] [ 0 0 0] [ 0 0 3]] See Also -------- CSRNDArray : MXNet NDArray in compressed sparse row format. =cut method csr_matrix( $arg1, Maybe[Shape|PDL] :$shape=, Maybe[AI::MXNet::Context] :$ctx=AI::MXNet::Context->current_ctx, Maybe[Dtype] :$dtype= ) { if(not defined $arg1) { return __PACKAGE__->empty('csr', $shape, ctx => $ctx, (defined $dtype ? (dtype => $dtype) : ())); } # construct a csr matrix from (M, N) or (data, indices, indptr) if(ref $arg1 eq 'ARRAY') { my $arg_len = @{ $arg1 }; if($arg_len == 2) { # construct a sparse csr matrix from # scipy coo matrix if input format is coo if(ref $arg1->[1] eq 'ARRAY' and @{ $arg1->[1] } == 2) { my $coo = __PACKAGE__->coo_matrix($arg1->[0], @{ $arg1->[1] }, $shape); __PACKAGE__->_check_shape($coo->shape, $shape); return __PACKAGE__->array($coo, ctx => $ctx, dtype => $dtype); } else { # empty matrix with shape __PACKAGE__->_check_shape($arg1, $shape); return __PACKAGE__->empty('csr', $arg1, ctx=>$ctx, dtype=>$dtype); } } elsif($arg_len == 3) { # data, indices, indptr return __PACKAGE__->_csr_matrix_from_definition( @{ $arg1 }, shape => $shape, ctx => $ctx, dtype => $dtype ); } else { confess("Unexpected length of input array: " . Dumper($arg1)); } } else { # construct a csr matrix from a sparse / dense one if(blessed $arg1 and ($arg1->isa('AI::MXNet::NDArray::CSR') or $arg1->isa('PDL::CCS::Nd'))) { # construct a csr matrix from scipy or CSRNDArray __PACKAGE__->_check_shape($arg1->shape, $shape); return __PACKAGE__->array($arg1, ctx => $ctx, dtype => $dtype); } elsif(blessed $arg1 and $arg1->isa('AI::MXNet::NDArray::RowSparse')) { confess("Unexpected input type: AI::MXNet::NDArray::RowSparse"); } else { # construct a csr matrix from a dense one # prepare default ctx and dtype since mx.nd.array doesn't use default values # based on source_array $dtype = __PACKAGE__->_prepare_default_dtype($arg1, $dtype); # create dns array with provided dtype. ctx is not passed since copy across # ctx requires dtype to be the same my $dns = __PACKAGE__->array($arg1, dtype=>$dtype); if(defined $ctx and $dns->context ne $ctx) { $dns = $dns->as_in_context($ctx); } __PACKAGE__->_check_shape($dns->shape, $shape); return $dns->tostype('csr'); } } } # Create a AI::MXNet::NDarray::CSR based on data, indices and indptr method _csr_matrix_from_definition( $data, $indices, $indptr, Maybe[Shape|PDL] :$shape=, AI::MXNet::Context :$ctx=AI::MXNet::Context->current_ctx, Maybe[Dtype] :$dtype=, Maybe[Dtype] :$indices_type=STORAGE_AUX_TYPES->{'csr'}[0], Maybe[Dtype] :$indptr_type=STORAGE_AUX_TYPES->{'csr'}[1] ) { $dtype = __PACKAGE__->_prepare_default_dtype($data, $dtype); # prepare src array and types $data = __PACKAGE__->_prepare_src_array($data, $dtype); $indptr = __PACKAGE__->_prepare_src_array($indptr, $indptr_type); $indices = __PACKAGE__->_prepare_src_array($indices, $indices_type); if(not (blessed $data and $data->isa('AI::MXNet::NDArray'))) { $data = __PACKAGE__->array($data, ctx => $ctx, dtype => $dtype); } if(not (blessed $indptr and $indptr->isa('AI::MXNet::NDArray'))) { $indptr = __PACKAGE__->array($indptr, ctx => $ctx, dtype => $indptr_type); } if(not (blessed $indices and $indices->isa('AI::MXNet::NDArray'))) { $indices = __PACKAGE__->array($indices, ctx => $ctx, dtype => $indices_type); } if(not defined $shape) { if($indices->shape->[0] == 0) { confess('invalid shape'); } $shape = [@{ $indptr } - 1, $indices->max->asscalar + 1]; } elsif(blessed $shape) { $shape = $shape->unpdl; } # verify shapes my $aux_shapes = [$indptr->shape, $indices->shape]; if($data->ndim != 1 or $indptr->ndim != 1 or $indices->ndim != 1 or $indptr->shape->[0] == 0 or @{ $shape } != 2) { confess('invalid shape'); } my $hdl = __PACKAGE__->_new_alloc_handle( 'csr', $shape, $ctx, 0, $dtype, [$indptr_type, $indices_type], $aux_shapes ); my $result = AI::MXNet::NDArray::CSR->new(handle => $hdl); check_call(AI::MXNetCAPI::NDArraySyncCopyFromNDArray($result->handle, $data->handle, -1)); check_call(AI::MXNetCAPI::NDArraySyncCopyFromNDArray($result->handle, $indptr->handle, 0)); check_call(AI::MXNetCAPI::NDArraySyncCopyFromNDArray($result->handle, $indices->handle, 1)); return $result; } =head2 row_sparse_array Creates a AI::MXNet::NDArray::RowSparse, a multidimensional row sparse array with a set of tensor slices at given indices. The AI::MXNet::NDArray::RowSparse can be instantiated in several ways: - row_sparse_array($arg1, Maybe[AI::MXNet::Context] :$ctx=, Maybe[Shape] :$shape, Maybe [Dtype] :$dtype=) $ctx, $shape, $dtype are optional $arg1 can be given in following variants - to construct a AI::MXNet::NDArray::RowSparse with a dense array $arg1 - $arg1 is in AI::MXNet::NDArray::array input format - to construct a AI::MXNet::NDArray::RowSparse with a sparse array $arg1 $arg1 is AI::MXNet::NDArray::RowSparse - to construct an empty AI::MXNet::NDArray::RowSparse with shape $arg1 = [$D1, $D1, ...$DN] - to construct a RowSparseNDArray based on the definition of row sparse format using two separate arrays, where the $indices stores the indices of the row slices with non-zeros, while the values are stored in $data. The corresponding NDArray dense represented by RowSparse rsp has dense[rsp.indices[i], :, :, :, ...] = rsp.data[i, :, :, :, ...] The row indices for are expected to be **sorted in ascending order. $arg1 = [$data, $indices] $data, $indices must be given in the AI::MXNet::NDArray::array input format Returns ------- AI::MXNet::NDArray::RowSparse A AI::MXNet::NDArray::RowSparse with the 'row_sparse' storage representation. Example ------- >>> $a = mx->nd->sparse->row_sparse_array([[[1, 2], [3, 4]], [1, 4]], shape=>[6, 2]) >>> $a->aspdl [[ 0 0] [ 1 2] [ 0 0] [ 0 0] [ 3 4] [ 0 0]] =cut method row_sparse_array( $arg1, Maybe[Shape] :$shape=, Maybe[AI::MXNet::Context] :$ctx=AI::MXNet::Context->current_ctx, Maybe[Dtype] :$dtype= ) { if(not defined $arg1) { return __PACKAGE__->empty('row_sparse', $shape, ctx => $ctx, (defined $dtype ? (dtype => $dtype) : ())); } # construct a row sparse array from (D0, D1 ..) or (data, indices) if(ref $arg1 eq 'ARRAY') { my $arg_len = @{ $arg1 }; if($arg_len < 2) { confess("Unexpected length of input array: $arg_len "); } elsif($arg_len > 2) { # empty ndarray with shape __PACKAGE__->_check_shape($arg1, $shape); return __PACKAGE__->empty('row_sparse', $arg1, ctx => $ctx, dtype => $dtype); } else { # len(arg1) = 2, is either shape or (data, indices) if(not ref $arg1->[0] and not ref $arg1->[1]) { # empty ndarray with shape __PACKAGE__->_check_shape($arg1, $shape); return __PACKAGE__->empty('row_sparse', $arg1, ctx => $ctx, dtype => $dtype); } else { # data, indices, indptr return __PACKAGE__->_row_sparse_ndarray_from_definition( @{ $arg1 }, shape => $shape, ctx => $ctx, dtype => $dtype ); } } } else { # construct a row sparse ndarray from a dense / sparse array if(blessed $arg1 and $arg1->isa('AI::MXNet::NDArray::RowSparse')) { # construct a row sparse ndarray from RowSparseNDArray __PACKAGE__->_check_shape($arg1->shape, $shape); return __PACKAGE__->array($arg1, ctx => $ctx, dtype => $dtype); } elsif(blessed $arg1 and $arg1->isa('AI::MXNet::NDArray::CSR')) { confess("Unexpected input type: AI::MXNet::NDArray::CSR"); } else { # construct a csr matrix from a dense one # prepare default dtype since mx.nd.array doesn't use default values # based on source_array $dtype = __PACKAGE__->_prepare_default_dtype($arg1, $dtype); # create dns array with provided dtype. ctx is not passed since copy across # ctx requires dtype to be the same my $dns = __PACKAGE__->array($arg1, dtype => $dtype); if(defined $ctx and $dns->context ne $ctx) { $dns = $dns->as_in_context($ctx); } __PACKAGE__->_check_shape($dns->shape, $shape); return $dns->tostype('row_sparse'); } } } # Create a AI::MXNet::NDArray::RowSparse based on data and indices method _row_sparse_ndarray_from_definition( $data, $indices, Maybe[Shape] :$shape=, AI::MXNet::Context :$ctx=AI::MXNet::Context->current_ctx, Maybe[Dtype] :$dtype=, Maybe[Dtype] :$indices_type=STORAGE_AUX_TYPES->{'row_sparse'}[0] ) { $dtype = __PACKAGE__->_prepare_default_dtype($data, $dtype); # prepare src array and types $data = __PACKAGE__->_prepare_src_array($data, $dtype); $indices = __PACKAGE__->_prepare_src_array($indices, $indices_type); if(not (blessed $data and $data->isa('AI::MXNet::NDArray'))) { $data = __PACKAGE__->array($data, ctx => $ctx, dtype => $dtype); } if(not (blessed $indices and $indices->isa('AI::MXNet::NDArray'))) { $indices = __PACKAGE__->array($indices, ctx => $ctx, dtype => $indices_type); } if(not defined $shape) { my $num_indices = $indices->shape->[0]; if($num_indices == 0) { confess('invalid shape'); } my $dim0 = $indices->at($num_indices - 1)->asscalar + 1; $shape = [$dim0, @{ $data->shape } [1..@{ $data->shape } - 1]]; } # verify shapes if($data->ndim != @{ $shape } or $indices->ndim != 1 or product(@{ $shape } [1..@{ $shape } - 1]) == 0) { confess("invalid shape"); } my $handle = __PACKAGE__->_new_alloc_handle( 'row_sparse', $shape, $ctx, 0, $dtype, [$indices_type], [$indices->shape] ); my $result = AI::MXNet::NDArray::RowSparse->new(handle => $handle); check_call(AI::MXNetCAPI::NDArraySyncCopyFromNDArray($result->handle, $data->handle, -1)); check_call(AI::MXNetCAPI::NDArraySyncCopyFromNDArray($result->handle, $indices->handle, 0)); return $result } =head2 zeros Return a new array of given shape and type, filled with zeros. Parameters ---------- $stype: string The storage type of the empty array, such as 'row_sparse', 'csr', etc shape : int or array ref of int The shape of the empty array :$ctx : AI::MXNet::Context, optional An optional device context (default is the current default context) :$dtype : Dtype, optional An optional value type (default is `float32`) Returns ------- AI::MXNet::NDArray::RowSparse or AI::MXNet::NDArray::CSR A created array Examples -------- >>> mx->nd->sparse->zeros('csr', [1,2]) <AI::MXNet::NDArray::CSR 1x2 @cpu(0)> >>> mx->nd->sparse->zeros('row_sparse', [1,2], ctx=>mx->cpu(), dtype=>'float16')->aspdl [[ 0 0]] =cut method zeros( Stype $stype, Shape $shape, AI::MXNet::Context :$ctx=AI::MXNet::Context->current_ctx, Maybe[Dtype] :$dtype='float32', Maybe[AI::MXNet::NDArray] :$out=, Maybe[Str] :$name=, Maybe[Str] :$__layout__= ) { if($stype eq 'default') { return AI::MXNet::NDArray->zeros( $shape, ctx => $ctx, dtype => $dtype, out => $out, name => $name, __layout__ => $__layout__ ); } my $aux_types; if($stype eq 'row_sparse' or $stype or 'csr') { $aux_types = STORAGE_AUX_TYPES->{ $stype }; } else { confess("unknown storage type: $stype"); } $out //= __PACKAGE__->_ndarray_cls( __PACKAGE__->_new_alloc_handle( $stype, $shape, $ctx, 1, $dtype, $aux_types) ); return __PACKAGE__->_zeros( shape => $shape, ctx => $ctx, dtype => $dtype, out => $out, ($__layout__ ? (__layout__ => $__layout__) : ()) ); } =head2 empty Returns a new array of given shape and type, without initializing entries. Parameters ---------- stype: string The storage type of the empty array, such as 'row_sparse', 'csr', etc shape : int or array ref of int The shape of the empty array. ctx : Context, optional An optional device context (default is the current default context). dtype : Dtype, optional An optional value type (default is `float32`). Returns ------- AI::MXNet::NDArray::CSR or AI::MXNet::NDArray::RowSparse A created array. =cut method empty( Stype $stype, Shape $shape, Maybe[AI::MXNet::Context] :$ctx=AI::MXNet::Context->current_ctx, Maybe[Dtype] :$dtype='float32' ) { assert(defined $stype); return __PACKAGE__->zeros($stype, $shape, ctx => $ctx, dtype => $dtype); } =head2 array Creates a sparse array from any object exposing the array interface. Parameters ---------- $source_array : AI::MXNet::NDArray::RowSparse, AI::MXNet::NDArray::CSR or PDL::CCS::Nd The source sparse array :$ctx : Context, optional The default context is $source_array->context if $source_array is an NDArray. The current default context otherwise. :$dtype : Dtype, optional The data type of the output array. The default dtype is $source_array->dtype if $source_array is an AI::MXNet::NDArray, PDL or PDL::CCS::Nd 'float32' otherwise. Returns ------- AI::MXNet::NDArray::RowSparse or AI::MXNet::NDArray::CSR An array with the same contents as the $source_array. Examples -------- >>> use PDL; use PDL::CCS::Nd >>> $csr = zeros([100, 2])->tocsr >>> mx->nd->sparse->array($csr) <AI::MXNet::NDArray::CSR 2x100 @cpu(0)> >>> mx->nd->sparse->array(mx->nd->sparse->zeros('csr', [3, 2])) <AI::MXNet::NDArray::CSR 3x2 @cpu(0)> >>> mx->nd->sparse->array(mx->nd->sparse->zeros('row_sparse', [3, 2])) <AI::MXNet::NDArray::RowSparse 3x2 @cpu(0)> =cut method array( AcceptableInput $source_array, Maybe[AI::MXNet::Context] :$ctx=AI::MXNet::Context->current_ctx, Maybe[Dtype] :$dtype='float32', Maybe[PDL] :$pdl= ) { if(not blessed $source_array or $source_array->isa('PDL') or ($source_array->isa('AI::MXNet::NDArray') and $source_array->stype eq 'default')) { if(not ref $source_array) { $pdl .= $source_array; $source_array = $pdl; } return __PACKAGE__->SUPER::array($source_array, ctx => $ctx, dtype => $dtype); } if($source_array->isa('AI::MXNet::NDArray')) { assert( ($source_array->stype ne 'default'), "Please use tostype to create AI::MXNet::NDarray::RowSparse or AI::MXNet::NDarray::CSR from an AI::MXNet::NDarray" ); # prepare dtype and ctx based on source_array, if not provided $dtype = __PACKAGE__->_prepare_default_dtype($source_array, $dtype); # if both dtype and ctx are different from source_array, we cannot copy directly my $arr; if($source_array->dtype ne $dtype and $source_array->context ne $ctx) { $arr = __PACKAGE__->empty($source_array->stype, $source_array->shape, dtype => $dtype); $arr .= $source_array; $arr = $arr->as_in_context($ctx); } else { $arr = __PACKAGE__->empty($source_array->stype, $source_array->shape, dtype => $dtype, ctx => $ctx); $arr .= $source_array; } return $arr; } elsif($source_array->isa('PDL::CCS::Nd')) { $dtype = __PACKAGE__->_prepare_default_dtype($source_array, $dtype); return __PACKAGE__->csr_matrix( [$source_array->data, $source_array->indices, $source_array->indptr], shape => $source_array->shape , dtype => $dtype, ctx => $ctx ); } } sub AUTOLOAD { my $sub = $AI::MXNet::NDArray::Sparse::AUTOLOAD; $sub =~ s/.*:://; $sub = "_sparse_$sub"; shift; return AI::MXNet::NDArray->$sub(@_); } 1;
indhub/mxnet
perl-package/AI-MXNet/lib/AI/MXNet/NDArray/Sparse.pm
Perl
apache-2.0
43,808
# tunnel-lib.pl # Common functions for the HTTP-tunnel module use strict; use warnings; BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); sub fix_end_url { my ($url) = @_; if ($url =~ m/^(http|https):\/\/(\S+)$/ ) { my $schema = $1."://"; my $host = $2; # check: http://aa.com # check: http://aa.com/bb.html # check: http://aa.com/bb/cc.html my $host_test = $2; $host_test =~ s/\/?[^\/]*\/*$//; if ( $host_test eq '' ) { $url = "$schema$host/"; } return $url; } return 0; } 1;
BangL/webmin
tunnel/tunnel-lib.pl
Perl
bsd-3-clause
601
package sandhi; use Exporter (); @ISA = qw(Exporter); @EXPORT = qw(sandhi sandhioptions); # sandhi.pm # implementation of 'sandhi' routine from SandhiGen.pp (PMS 2000/10/14) # This is derived from sandhi-inc/sandhi.pl, by directly including all the # 'plinc' files. # Perl implementation Feb 9, 2009 ejf # April 22, 2009 ejf : split string into Sanskrit/non-Sanskrit before sandhi #PMS 1999/9 added to procedure visarga prep the words: punaH, $mAtaH, $kOsalyAmAtaH #PMS 2000/9/4 changed procedure torli to insert $sktnasalization before $sktl rather than $sktanunasika after it. #PMS 2000/9/4 added line to procedure ahan to restrict it to compounds. Did not insert "elsif ( ($Pada2 in $Linend) ) {" to assume that clause-final ahan is not the noun. #PMS 2000/9/4 added ahaH to visargaprep procedure. #PMS 2000/10/14 disabled removal of space after upasargas ($Removed "or Upasarga") and close sandhi option for upasargas. #ejf: open question: How to handle return; # REPLACE exit($sandhi); #require "./sanskrit01.plinc"; # sanskrit01.plinc, from TransliterateAll.pp # perl stub that defines the '$skt*' constants #{The Sanskrit sounds represented in $the font Sanskrit01} $skta = 'a'; $sktaa = 'A'; $skti = 'i'; $sktii = 'I'; $sktu = 'u'; $sktuu = 'U'; $sktri = 'f'; $sktrii = 'F'; $sktlri = 'x'; $sktlrii = 'X'; $skte = 'e'; $sktai = 'E'; $skto = 'o'; $sktau = 'O'; $sktvisarga = 'H'; $sktjihvamuliya = '»'; #{opt k} $sktupadhmaniya = '¹'; #{opt p} $sktanusvara = 'M'; $sktanunasika = 'µ'; #{opt m. It should follow the sound it nasalizes} $sktnasalization = '~'; #{shift `. It precedes the sound it nazalizes} $sktavagraha = "'"; # changed from''''; $sktroot = '§'; #{opt v} $sktudatta = '«'; #{opt e space. It precedes the sound it accents} $sktsvarita = '^'; #{opt i space. It precedes the sound it accents} $sktudattaa = ''; $sktudattai = ''; $sktudattau = ''; $sktudattae = ''; $sktudattao = ''; $sktudattaaa = '§'; $sktudattaii = 'ª'; $sktudattauu = '²'; $sktudattaai = ''; $sktudattaau = '®'; $sktsvaritaa = ' '; $sktsvaritai = ''; $sktsvaritau = ''; $sktsvaritae = ''; $sktsvaritao = ''; $sktsvaritaaa = '¥'; $sktsvaritaii = '«'; $sktsvaritauu = '³'; $sktsvaritaai = '¦'; $sktsvaritaau = '¯'; $sktk = 'k'; $sktkh = 'K'; $sktg = 'g'; $sktgh = 'G'; $sktkn = 'N'; $sktc = 'c'; $sktch = 'C'; $sktj = 'j'; $sktjh = 'J'; $sktcn = 'Y'; $sktretrot = 'w'; $sktretroth = 'W'; $sktretrod = 'q'; $sktretrodh = 'Q'; $sktretron = 'R'; $sktt = 't'; $sktth = 'T'; $sktd = 'd'; $sktdh = 'D'; $sktn = 'n'; $sktp = 'p'; $sktph = 'P'; $sktb = 'b'; $sktbh = 'B'; $sktm = 'm'; $skty = 'y'; $sktr = 'r'; $sktl = 'l'; $sktv = 'v'; $sktsch = 'S'; $sktsh = 'z'; $skts = 's'; $skth = 'h'; #require "./neutralchar.plinc"; # neutralchar.plinc, from TransliterateAll.pp # perl stub defines constants for certain characters. # {Neutral characters} $return = "\r"; $newline = "\n"; $tab = "\t"; $space = ' '; $hyphen = '-'; $comma = ','; $semicolon = ';'; $colon = ':'; $period = '.'; $star = '*'; $slash = '/'; $openparen = '('; $closeparen = ')'; # ejf added $true = 1; $false = 0; #require "./cantapadary.plinc"; # cantapadary.plinc # from sandhiPrepLists in SandhiPrep.pp $cantamax = 27; #const @CAntaPadary; # type = $array[1..cantamax] of string[10]; $CAntaPadary[1] = 'aqac'; $CAntaPadary[2] = 'Awac'; $CAntaPadary[3] = 'Alac'; $CAntaPadary[4] = 'ec'; $CAntaPadary[5] = 'Ac'; $CAntaPadary[6] = 'ic'; $CAntaPadary[7] = 'ilac'; $CAntaPadary[8] = 'izRuc'; $CAntaPadary[9] = 'Irac'; $CAntaPadary[10] = 'ktic'; $CAntaPadary[11] = 'KizRuc'; $CAntaPadary[12] = 'Wac'; $CAntaPadary[13] = 'Rac'; $CAntaPadary[14] = 'tfc'; $CAntaPadary[15] = 'daGnac'; $CAntaPadary[16] = 'dvayasac'; $CAntaPadary[17] = 'dvyac'; $CAntaPadary[18] = 'nAwac'; $CAntaPadary[19] = 'biqac'; $CAntaPadary[20] = 'birIsac'; $CAntaPadary[21] = 'mAtrac'; $CAntaPadary[22] = 'yAc'; $CAntaPadary[23] = 'vuc'; $CAntaPadary[24] = 'vfc'; $CAntaPadary[25] = 'SaNkawac'; $CAntaPadary[26] = 'SAlac'; $CAntaPadary[27] = 'zWac'; #require "./pradi.plinc"; # pradi.plinc # from SandhiGen.pp (routine gana) $pradimax = 20; #const @Pradi; # type = $array[1..pradimax] of string[5]; $Pradi[1] = 'pra'; $Pradi[2] = 'parA'; $Pradi[3] = 'apa'; $Pradi[4] = 'sam'; $Pradi[5] = 'anu'; $Pradi[6] = 'ava'; $Pradi[7] = 'nis'; $Pradi[8] = 'dus'; $Pradi[9] = 'vi'; $Pradi[10] = 'A'; $Pradi[11] = 'ni'; $Pradi[12] = 'aDi'; $Pradi[13] = 'api'; $Pradi[14] = 'ati'; $Pradi[15] = 'su'; $Pradi[16] = 'ud'; $Pradi[17] = 'aBi'; $Pradi[18] = 'prati'; $Pradi[19] = 'pari'; $Pradi[20] = 'upa'; #require "./sets.plinc"; # sets.plinc # from SandhiGen.pp # Also, contains routine diff_string used in defining the 'extra' sets # defined at bottom of file. ##require "./neutralchar.plinc"; ##require "./sanskrit01.plinc"; sub diff_string { # assumes two arguments, which are scalar strings. # returns a string which contains all characters of the # first string which are NOT characters of the second string. my ($x,$y)=@_; my $ans=''; my @a = split('',$x); my $c; foreach(@a) { $c = $_; if (!($y =~ /$c/)) { $ans .= $c; } } return $ans; } #PMS load the sets: $ru = 's'; #const # In Perl, these are just strings, got by concatenating other strings. $Avarna = $skta . $sktaa; $Ivarna = $skti . $sktii; $Uvarna = $sktu . $sktuu; $Rvarna = $sktri . $sktrii; $Lvarna = $sktlri . $sktlrii; $Ku = $sktk . $sktkh . $sktg . $sktgh . $sktkn; $Cu = $sktc . $sktch . $sktj . $sktjh . $sktcn; $Retrotu = $sktretrot . $sktretroth . $sktretrod . $sktretrodh . $sktretron; $Tu = $sktt . $sktth . $sktd . $sktdh . $sktn; $Pu = $sktp . $sktph . $sktb . $sktbh . $sktm; $An = $Avarna . $Ivarna . $Uvarna; $Ak = $Avarna . $Ivarna . $Uvarna . $Rvarna . $Lvarna; $Ik = $Ivarna . $Uvarna . $Rvarna . $Lvarna; $Uk = $Uvarna . $Rvarna . $Lvarna; $Ekn = $skte . $skto; $Ec = $skte . $skto . $sktai . $sktau; #PMS dipthongs $Aic = $sktai . $sktau; $Ac = $Ak . $Ec; $Ic = diff_string($Ac,$Avarna); $At = $Ac . $skth . $skty . $sktv . $sktr; $Yan = $skty . $sktv . $sktr . $sktl; #PMS semivowels $An2 = $Ac . $skth . $Yan; #PMS vowels, $h and semivowels $In2 = diff_string($An2,$Avarna); $Yam = $skty . $sktv . $sktr . $sktl . $sktcn . $sktm . $sktkn . $sktretron . $sktn; #PMS semivowels and nasals $Am = $Ac . $skth . $Yam; #PMS vowels, $semivowels, nasals and h $KNam = $sktkn . $sktretron . $sktn; $Yacn = $Yam . $sktjh . $sktbh; $Jhash = $sktjh . $sktbh . $sktgh . $sktretrodh . $sktdh; #PMS voiced aspirated stops $Bhash = $sktbh . $sktgh . $sktretrodh . $sktdh; #PMS voiced aspirated stops other than jh $Jasch = $sktj . $sktb . $sktg . $sktretrod . $sktd; #PMS unvoiced unaspirated stops $Basch = $sktb . $sktg . $sktretrod . $sktd; #PMS unvoiced unaspirated stops other than j $Jhasch = $sktjh . $sktbh . $sktgh . $sktretrodh . $sktdh . $sktj . $sktb . $sktg . $sktretrod . $sktd; #PMS voiced stops $Hasch = $skth . $Yam . $Jhasch; #PMS voiced consonants $Vasch = diff_string($Hasch,$skth . $skty); #PMS voiced consonants other than h and y $Asch = $Ac . $Hasch; #PMS voiced sounds $Chav = $sktch . $sktretroth . $sktth . $sktc . $sktretrot . $sktt; $Khay = $sktkh . $sktph . $sktch . $sktretroth . $sktth . $sktc . $sktretrot . $sktt . $sktk . $sktp; #PMS unvoiced stops $Jhay = $Jhasch . $Khay; #PMS non-nasal stops both voiced and unvoiced $Yay = $Yam . $Jhay; #PMS semivowels and stops $May = $sktm . $sktkn . $sktretron . $sktn . $Jhay; #PMS stops other than palatal n $Cay = $sktc . $sktretrot . $sktt . $sktk . $sktp; $Khar = $sktkh . $sktph . $sktch . $sktretroth . $sktth . $sktc . $sktretrot . $sktt . $sktk . $sktp . $sktsch . $sktsh . $skts; #PMS unvoiced sounds $Car = $sktc . $sktretrot . $sktt . $sktk . $sktp . $sktsch . $sktsh . $skts; $Schar = $sktsch . $sktsh . $skts; #PMS unvoiced sylibants $Jhar = $Jhay . $Schar; #PMS non-nasal stops and unvoiced silibants $Yar = $Yam . $Jhay . $Schar; #PMS semivowels, $stops and unvoiced silibants (consonants other than h) $Schal = $sktsch . $sktsh . $skts . $skth; $Jhal = $Jhay . $Schal; #PMS non-nasal stops and silibants $Hal = $skty . $sktv . $sktr . $sktl . $sktcn . $sktm . $sktkn . $sktretron . $sktn . $sktjh . $sktbh . $sktgh . $sktretrodh . $sktdh . $sktj . $sktb . $sktg . $sktretrod . $sktd . $sktkh . $sktph . $sktch . $sktretroth . $sktth . $sktc . $sktretrot . $sktt . $sktk . $sktp . $sktsch . $sktsh . $skts . $skth; $Ral = diff_string($Hal,$skty . $sktv); #PMS consonants other than y and v $Val = diff_string($Hal, $skty); #PMS consonants other than y $Al = $Ac . $Hal; #PMS all independent sounds $Guna = $skta . $skte . $skto; $Vrddhi = $sktaa . $sktai . $sktau; $Sounds = $Al . $sktvisarga . $sktanusvara; $Linend = $space . $comma . $semicolon . $colon . $period; #----- ejf set constants # These are sets that were referenced by inline Pascal # set construction operators. In conversion to Perl, # it was convenient to construct these initialially and # given then new names. $Rvarna_and_Lvarna = $Rvarna . $Lvarna; $Jhal_not_ru = diff_string($Jhal,$ru); $Hasch_and_skta = $Hasch . $skta; $sktr_and_ru = $sktr . $ru; $Khar_and_linend = $Khar . $Linend; $Ku_and_Pu_and_Schar = $Ku . $Pu . $Schar; $Ku_and_Pu = $Ku . $Pu; $Tu_and_skts = $Tu . $skts; $Cu_and_sktsch = $Cu . $sktsch; $Retrotu_sktsh = $Retrotu . $sktsh; $Yay_not_Yan = diff_string($Yay,$Yan); $sktn_and_sktsh_and_skts = $sktn . $sktsh . $skts; $Hal_and_ru = $Hal . $ru; $Al_and_Linend = $Al . $Linend; #require "./Soundary.plinc"; # Soundary.plinc. # Global constants related to Soundary # from SandhiGen.pp #require "./sanskrit01.plinc"; #PMS load the array Soundary $maxyatna = 11; #const $maxsthana = 5; #const @Soundary; # type = $array[1..maxsthana, 1..maxyatna] of char; # first coord of Soundary $ikanthya = 1; #const $italavya = 2; #const $imurdhanya = 3; #const $idantya = 4; #const $iosthya = 5; #const # second coord of Soundary $ihrasva = 1; #const $idirgha = 2; #const $iguna = 3; #const $ivrddhi = 4; #const $isparsa1 = 5; #const $isparsa2 = 6; #const $isparsa3 = 7; #const $isparsa4 = 8; #const $isparsa5 = 9; #const $iantahstha = 10; #const $iusmana = 11; #const $Soundary[$ikanthya][$ihrasva] = $skta; $Soundary[$ikanthya][$idirgha] = $sktaa; $Soundary[$ikanthya][$iguna] = $skta; $Soundary[$ikanthya][$ivrddhi] = $sktaa; $Soundary[$ikanthya][$isparsa1] = $sktk; $Soundary[$ikanthya][$isparsa2] = $sktkh; $Soundary[$ikanthya][$isparsa3] = $sktg; $Soundary[$ikanthya][$isparsa4] = $sktgh; $Soundary[$ikanthya][$isparsa5] = $sktkn; $Soundary[$ikanthya][$iantahstha] = $skth; $Soundary[$ikanthya][$iusmana] = $sktjihvamuliya; $Soundary[$italavya][$ihrasva] = $skti; $Soundary[$italavya][$idirgha] = $sktii; $Soundary[$italavya][$iguna] = $skte; $Soundary[$italavya][$ivrddhi] = $sktai; $Soundary[$italavya][$isparsa1] = $sktc; $Soundary[$italavya][$isparsa2] = $sktch; $Soundary[$italavya][$isparsa3] = $sktj; $Soundary[$italavya][$isparsa4] = $sktjh; $Soundary[$italavya][$isparsa5] = $sktcn; $Soundary[$italavya][$iantahstha] = $skty; $Soundary[$italavya][$iusmana] = $sktsch; $Soundary[$imurdhanya][$ihrasva] = $sktri; $Soundary[$imurdhanya][$idirgha] = $sktrii; $Soundary[$imurdhanya][$iguna] = $skta; $Soundary[$imurdhanya][$ivrddhi] = $sktaa; $Soundary[$imurdhanya][$isparsa1] = $sktretrot; $Soundary[$imurdhanya][$isparsa2] = $sktretroth; $Soundary[$imurdhanya][$isparsa3] = $sktretrod; $Soundary[$imurdhanya][$isparsa4] = $sktretrodh; $Soundary[$imurdhanya][$isparsa5] = $sktretron; $Soundary[$imurdhanya][$iantahstha] = $sktr; $Soundary[$imurdhanya][$iusmana] = $sktsh; $Soundary[$idantya][$ihrasva] = $sktlri; $Soundary[$idantya][$idirgha] = $sktlrii; $Soundary[$idantya][$iguna] = $skta; $Soundary[$idantya][$ivrddhi] = $sktaa; $Soundary[$idantya][$isparsa1] = $sktt; $Soundary[$idantya][$isparsa2] = $sktth; $Soundary[$idantya][$isparsa3] = $sktd; $Soundary[$idantya][$isparsa4] = $sktdh; $Soundary[$idantya][$isparsa5] = $sktn; $Soundary[$idantya][$iantahstha] = $sktl; $Soundary[$idantya][$iusmana] = $skts; $Soundary[$iosthya][$ihrasva] = $sktu; $Soundary[$iosthya][$idirgha] = $sktuu; $Soundary[$iosthya][$iguna] = $skto; $Soundary[$iosthya][$ivrddhi] = $sktau; $Soundary[$iosthya][$isparsa1] = $sktp; $Soundary[$iosthya][$isparsa2] = $sktph; $Soundary[$iosthya][$isparsa3] = $sktb; $Soundary[$iosthya][$isparsa4] = $sktbh; $Soundary[$iosthya][$isparsa5] = $sktm; $Soundary[$iosthya][$iantahstha] = $sktv; $Soundary[$iosthya][$iusmana] = $sktupadhmaniya; #----- constants global to sandhi.pl my $linmax = 1000; #const my $pratipadmax = 20; #PMS Maximum length assumed for lexical items #----- informational Pascal declarations # $lenrange = 1..linmax; # $lenrange0 = 0..linmax; # $lenrangeE = -1..linmax; # $linetype = $array[$lenrange] of char; # $stringrange = 1..255; #----- variables global to sandhi.pl my @Linary; # type = $linetype; my ($Isthana1,$Isthana2,$Iyatna1,$Iyatna2); my $iapi = 13; #PMS api usually is not an upasarga so check it separately #const # $padatype = $string[$pratipadmax]; # pratipadmax defined in sub sandhi in my $PurvaPada; # type = $padatype; my $Pada1; # type = $padatype; my $NxtPada1; # type = $padatype; my $Pada2; # type = $padatype; my $Upasarga; # type = $boolean; #PMS for sandhiPrep my $NoStoh; # type = $boolean; #PMS for sandhiPrep my $NoKNam; # type = $boolean; #PMS for sandhiPrep my $Exception; # type = $boolean; #PMS for sandhiPrep my $Pronoun; # type = $boolean; #PMS for sandhiPrep my $EkahPurvaParayoh; # type = $boolean; #PMS my $Error; my $IEnd; # type = $lenrange0; ##my $Inextsp; # type = $lenrangeE; ##my $IPrev; # type = $lenrangeE; ##my $Inext; # type = $lenrangeE; ##my $IPrevSpace; # type = $lenrangeE; my $Index; # type = $lenrangeE; #my $I; # type = $lenrangeE; my $Found; # type = $boolean; my $NoSpace; # type = $boolean; my $Dhralopa; # type = $boolean; my $OtherCloseSandhi; # type = $boolean; my $Pragrhya; # type = $boolean; my $Uttarapada; # type = $boolean; my $NxtUttarapada; # type = $boolean; my $FldChr; # globals set in sandhioptions routine my $Despace; # type = $boolean; #PMS Despace set in sandhioptions my $External; # type = $boolean; #PMS Sandhi Options my $Compound; # type = $boolean; #PMS Sandhi Options my $Chandas; # type = $boolean; #PMS Sandhi Options my $CloseUpasargaSandhi; # type = $boolean; #PMS Sandhi Options my $TukPadantat; # type = $boolean; #PMS Sandhi Options my $ScharSchari; # type = $boolean; #PMS Sandhi Options my $XkXpKupvoh; # type = $boolean; #PMS Sandhi Options my $ChAti; # type = $boolean; #PMS Sandhi Options my $ParaSavarna; # type = $boolean; #PMS Sandhi Options my $Anunasika; # type = $boolean; #PMS Sandhi Options my $Padbound; # type = $char; # ejf constants my $dbg = $false; #$true; #$false; #----------------- ejf helper routines sub set_memberP { # boolean function implements the Pascal $c in $set dialect. # $c is a char ,implemented as a string of length 1 # $set is a 'set of char', implemented as a string. my ($c,$set)=@_; ($set =~ /$c/) ? $true : $false; } sub arr_str { my @a = @_; my $s = join('',@a); my $s1 = str_trim($s); return $s1; } sub str_trim { # trim whitespace from start and end of s1. my ($s1) = @_; $s1 =~ s/^\s+//; $s1 =~ s/\s+$//; return $s1; } sub chk_point { my ($s) = @_; if($dbg) {print "($s): " . (arr_str(@Linary)) . "\n";} } #-----------------sandhioptions routine from SandhiGen.pp sub sandhioptions { # sets $Error. 0 = ok. 4 = error with $compound_ans, # my ($compound_ans,$vedic_ans,$closeSandhi_ans,$despace_ans) = @_; # $compound_ans should be 'C' for sandhi at compounds, 'E' for External # $vedic_ans should be 'Y' or 'N'. # $closeSandhi_ans should be N,Y,S # $despace_ans should be Y,N. default is my $Answer; my $Error = 0; my $Yes; my $No; $Yes = 'Yy'; $No = 'Nn'; $Answer = ''; # initialize external flags to false. $Despace = $false; $External = $false; $Compound = $false; $Chandas = $false; $CloseUpasargaSandhi = $false; $TukPadantat = $false; #PMS 6.1.76. padAntAdvA (dIrghAt 75, che 73, tuk 71) $ScharSchari = $false; #PMS 8.3.36. vA Sari $XkXpKupvoh = $false; #PMS 8.3.37. kupvoH XkXpau ca. $ChAti = $false; #PMS 8.4.63. SaS cho 'wi. (jhayaH 62, anyatarasyAm 62) $ParaSavarna = $false; #PMS 8.4.59. vA padAntasya (anusvArasya yayi parasavarRaH 58). $Anunasika = $false; #PMS 8.4.45. yaro 'nunAsike 'nunAsiko vA. (padAnta 42) # hideall(); # showtext(); # Process $compound_ans # print "Do you want to do sandhi within compounds (at hyphens)\n"; # print "or external (at spaces)?\n"; # print " C/c for compound\n"; # print " E/e for external\n"; # print " Any other character to quit: "; # readln($Answer); $Answer = uc($compound_ans); if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq 'C') { $Compound = $true; $Padbound = $hyphen; } elsif ($Answer eq 'E') { $External = $true; $Padbound = $space; } else { #PMS neither so quit $Error = 4; return($Error); # REPLACE exit($sandhioptions); } #--process $vedic_ans # print "Is this a Vedic text ($chandas)?\n"; # print "Default no: "; # readln($Answer); $Answer = uc($vedic_ans); if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq 'Y') { $Chandas = $true; } if ($dbg) { print "Compound = $Compound, External = $External, Padbound = $Padbound\n"; print "Chandas = $Chandas\n"; } #-- closeSandhi_ans # print "Do you want to exercise close sandhi options?\n"; # print ""N" or "n" to decline\n"; # print ""Y" or "y" to accept\n"; # print ""S" or "s" to follow standard editorial practice\n"; # print "Any other character to select options individually: "; # readln($Answer); $Answer = $closeSandhi_ans; if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq "Y") { $TukPadantat = $true; #PMS 6.1.76. padAntAdvA (dIrghAt 75, che 73, tuk 71) $ScharSchari = $true; #PMS 8.3.36. vA Sari $XkXpKupvoh = $true; #PMS 8.3.37. kupvoH XkXpau ca. $ChAti = $true; #PMS 8.4.63. SaS cho 'Ti. (jhayaH 62, anyatarasyAm 62) $ParaSavarna = $true; #PMS 8.4.59. vA padAntasya (anusvArasya yayi parasavarRaH 58). $Anunasika = $true; #PMS 8.4.45. yaro 'nunAsike 'nunAsiko vA. ($padAnta 42) }elsif ($Answer eq "N") { #PMS No close sandhi, $logicals remain $false # } elsif ($Answer eq "S") { # ejf change #PMS Standard editorial practice # print " Current version does not allow to select options individually\n"; # print " Assuming 'Decline'\n"; } elsif ($Answer eq "S") { # not executed. ejf change. #------------- if ( $Compound ) { #PMS Close sandhi within compounds $TukPadantat = $true; #PMS 6.1.76. padAntAdvA (dIrghAt 75, che 73, tuk 71) $ScharSchari = $true; #PMS 8.3.36. vA Sari #PMS technically, 8.3.37 should also apply but it is never seen $ChAti = $true; #PMS 8.4.63. SaS cho 'wi. (jhayaH 62, anyatarasyAm 62) $ParaSavarna = $true; #PMS 8.4.59. vA padAntasya (anusvArasya yayi parasavarRaH 58). $Anunasika = $true; #PMS 8.4.45. yaro 'nunAsike 'nunAsiko vA. (padAnta 42) #PMS display standard editorial practice for compound sandhi if ($dbg) { print "The optional sandhi in the following sutras will apply:\n"; print "TukPadantat = $TukPadantat, ScharSchari = $ScharSchari\n"; print "ChAti = $ChAti, ParaSavarna = $ParaSavarna, Anunasika = $Anunasika\n"; } if ( $TukPadantat and $false ) { print " 6.1.76. padAntAdvA ($dIrghAt 75, che 73, tuk 71).\n"; } if ( $ScharSchari and $false ) { print " 8.3.36. vA Sari.\n"; } if ( $XkXpKupvoh and $false ) { print " 8.3.37. kupvoH XkXpau ca.\n"; } if ( $ChAti and $false ) { print " 8.4.63. SaS cho 'wi. (jhayaH 62, anyatarasyAm 62 ) . \n"; } if ( $ParaSavarna and $false ) { print " 8.4.59. vA padAntasya (anusvArasya yayi parasavarRaH 58).\n"; } if ( $Anunasika and $false ) { print " 8.4.45. yaro 'nunAsike 'nunAsiko vA. (padAnta 42)\n"; } } #PMS Close sandhi within compounds else { #PMS External: 8.4.63 and 8.4.45 $ChAti = $true; #PMS 8.4.63. SaS cho 'Ti. (jhayaH 62, anyatarasyAm 62) $Anunasika = $true; #PMS 8.4.45. yaro 'nunAsike 'nunAsiko vA. (padAnta 42) if ($dbg) { print "The optional sandhi in the following sutras will apply:\n"; print " 8.4.45. yaro 'nunAsike 'nunAsiko vA. (padAnta 42)\n"; print " 8.4.63. SaS cho 'wi. (jhayaH 62, anyatarasyAm 62 ) . \n"; #PMS disabled Close sandhi between upasargas and their following verb forms #PMS CloseUpasargaSandhi = $true; #PMS print "Close sandhi will be observed between upasargas and their following verb forms\n"; #PMS print "After the upasarga 'sam',\n"; #PMS print " 8.4.59. vA padAntasya (anusvArasya yayi parasavarRaH 58).\n"; } } #PMS External. End of standard editorial practice }else { #PMS peruse options print "Choose sandhi options ('Y' or 'y' to accept):\n"; print "6.1.76. padAntAdvA (dIrghAt 75, che 73, tuk 71).\n"; print " Pada final long vowel augmented with c before ch ? "; # readln($Answer); if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq "Y") { $TukPadantat = $true; } print "8.3.36. vA Sari.\n"; print " S, z or s before palatal, retroflex or dental stop respectively? "; # readln($Answer); if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq "Y") { $ScharSchari = $true; } print "8.3.37. kupvoH XkXpau ca.\n"; print " jihvamuliya, upadhmaniya before gutteral or labial stop respectively? "; # readln($Answer); if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq "Y") { $XkXpKupvoh = $true; } print "8.4.63. SaS cho 'wi . (jhayaH 62, anyatarasyAm 62\n"; print " ch after stops ? "; # readln($Answer); if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq "Y") { $ChAti = $true; } print "8.4.59. vA padAntasya (anusvArasya yayi parasavarRaH 58).\n"; print " AnusvAra stop homogenous with following stop? "; # readln($Answer); if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq "Y") { $ParaSavarna = $true; } print "8.4.45. yaro 'nunAsike 'nunAsiko vA. (padAnta 42)\n"; print "(At present the program does not handle nasalized semivowels)\n"; print "(which, $though rarely found in editions, go with this sandhi.)\n"; print " Stops corresponding nasal before a nasal? "; # readln($Answer); if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq "Y") { $Anunasika = $true; } if ( (not $ParaSavarna) or (not $Anunasika) ) { print " Do you want to observe close sandhi after upasargas ? "; # readln($Answer); if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq "Y") { $CloseUpasargaSandhi = $true; } } print "The optional sandhi in the following sutras will apply:\n"; if ( $TukPadantat ) { print " 6.1.76. padAntAdvA ($dIrghAt 75, che 73, tuk 71).\n"; } if ( $ScharSchari ) { print " 8.3.36. vA Sari.\n"; } if ( $XkXpKupvoh ) { print " 8.3.37. kupvoH XkXpau ca.\n"; } if ( $ChAti ) { print " 8.4.63. SaS cho 'wi. (jhayaH 62, anyatarasyAm 62 ) . \n"; } if ( $ParaSavarna ) { print " 8.4.59. vA padAntasya ($anusvArasya yayi parasavarRaH 58).\n"; } if ( $Anunasika ) { print " 8.4.45. yaro 'nunAsike 'nunAsiko vA. (padAnta 42)\n"; } if ( $CloseUpasargaSandhi ) { #PMS close upasarga sandhi print "Close sandhi will be observed after upasargas\n"; if ( not $ParaSavarna ) { print "After the upasarga 'sam',\n"; print " 8.4.59. vA padAntasya (anusvArasya yayi parasavarRaH 58).\n"; } if ( not $Anunasika ) { print "After the upasarga 'ud',\n"; print " 8.4.45. yaro 'nunAsike 'nunAsiko vA. (padAnta 42)\n"; } } #PMS close upasarga sandhi } #PMS peruse options #PMS Choose spacing options if ( $Compound ) { # print "Hyphens will be deleted between compound elements.\n"; }elsif ( $External ) { #PMS spaceoptions # print "Spaces will be deleted where a single vowel replaces final and initial vowels.\n"; # print "Do you wish to eliminate spaces between prefixes and verbs\n"; # print "and between final consonants and a following sound?\n"; # print "Y/y (yes) to delete spaces, any other character to keep."; # readln($Answer); $Answer = $despace_ans; # $Answer = 'Y'; #force despacing if ( $Answer eq '' ) { $Answer = '?'; } if ($Answer eq "Y") { $Despace = $true; } } #PMS spaceoptions return ($Error); } #PMS sandhioptions #-----------------subroutines from ChararayRoutines.pp # In Pascal, these are always called with the array Linary as a # variable parameter. This causes two difficulties in Perl, # related to how Perl handles arguments passed to procedures. # 1. When the procedure has multiple arguments, and Linary is not # the last one, special coding is required to pull out the arguments # after the array. # 2. Several of these array routines modify Linary. But Perl copies # the array before passing it, so the caller routine does not # see the modifications to Linary. # I solve these technical problems by removing Linary from the argument # list. Thus, the routines are acting on the global array variable # @Linary, which is what is desired. I also change the coding of the # routines to use Linary rather than Charary. # sub lengthary { #{no arguments} #{returns an integer value in $the range 0..linmax = $the position of the last character which is not a space in $a character array} #{if the array is all space characters it returns zero} my $I; for ($I = $linmax; 1<=$I;$I--) { if ( $Linary[$I] ne ' ' ) { return $I; } } return 0; } sub nxtposary { #function nxtposary ($chtr: char; fldch: char; $istart: lenrange): lenrangeE; #{passed a character, $a character array[1..linmax], $an integer 1..linmax} #{returns the position of the first occurrence of the character in $the array beginning with $Linary[$Index]} #{returns zero if the character is not found; returns -1 if $istart is out of bounds} my ($chtr,$fldch,$istart) = @_; my $I; # type = $integer; my $IEnd; # type = $lenrange0; if ( ($istart < 1) or ($istart > $linmax) ) { return(-1); } $IEnd = lengthary(); for ($I = $istart; $I<=$IEnd;$I++){ if ( ($Linary[$I] eq $chtr) or ($Linary[$I] eq $fldch) ) { return($I); } } return(0); } sub lastposary { #function lastposary ($chtr: char; $istart: lenrange): lenrangeE; #{passed a character, $a character array[1..linmax], $an integer 1..linmax} #{returns the position of the first previous occurrence of the character found searching backwards from $Linary[$Index]} #{returns zero if the character is not found; returns -1 if $istart is greater than the size of the array} my ($chtr,$istart) = @_; my $I; if ( ($istart < 1) or ($istart > $linmax) ) { return(-1); } for ($I = $istart; 1<=$I; $I--) { if ( $Linary[$I] eq $chtr ) { return($I); } } return(0); } sub insertary { # ($chtr: char; $index: lenrange); #{passed an actual character value,and an actual value $index of an integer in $the range 1..linmax} #{returns the array with the character inserted at position $index and the rest of the array moved over} #{If $index indexes a position after the last non-space, the character is inserted just after the last non-space character} #{It is an error if there is no space in $Linary[$linmax]} # ejf: The global variable $NoSpace is also adjusted, as well as @Linary my ($chtr,$index) = @_; my $I; # type = $integer; my $Ipt; # type = $lenrange; my $IEnd; # type = $lenrange0; $NoSpace = $false; $IEnd = lengthary(); if ( $IEnd eq $linmax ) { $NoSpace = $true; return; } $Ipt = $index; if ( $Ipt < 1 ) { $Ipt = 1; } if ( $Ipt > $IEnd ) { $Ipt = $IEnd + 1; } for ($I = $IEnd; $Ipt <= $I; $I--) { $Linary[$I + 1] = $Linary[$I]; } $Linary[$Ipt] = $chtr; # print "insertary: $chtr,$index " . (arr_str(@arr)) . " => " . (arr_str(@Linary)) . "\n"; } sub deletary { # ($index: lenrange); #{modifies @Linary with the character at position $index deleted and the rest of the array moved in} #{If $index indexes a position after the last non-space, no character is deleted} my ($index) = @_; my $I; # type = $integer; my $IEnd; # type = $lenrange0; $IEnd = lengthary(); my @arr = @Linary; if ( ($index >= 1) and ($index <= $IEnd) ) { for ($I = $index; $I < $IEnd; $I++) { $Linary[$I] = $Linary[$I + 1]; } $Linary[$IEnd] = ' '; } # print "deletary: $index " . (arr_str(@arr)) . " => " . (arr_str(@Linary)) . "\n"; } sub substrary { #{integer values $index1 and $index2} #{returns a string consisting of ($index1-index2)+1 characters beginning at $index1, a substring of the character array,@Linary} # may return an empty string. my ($index1,$index2) = @_; my $I; my $IEnd; my $Tempstr; # type = $string[255]; $Tempstr = ''; $IEnd = lengthary(); # ejf added some other condition checking if ( ($index1 < 1) or ($index1 > $index2) or ($index2 > $IEnd) ) { return($Tempstr); } # In Perl, this condition not needed, but, leave it for now. if ( (($index2 - $index1) + 1) <= $pratipadmax ) { for ($I = $index1; $I <= $index2; $I++) { $Tempstr = $Tempstr . $Linary[$I]; # concat } } return($Tempstr); } # #-----------------subroutines from sandhi #--- in Pascal, these were defined within sandhi routine. sub identify { my $aksara = shift; # a string with one character #{Searches the sound array Soundary for the character passed in $aksara.} #{Returns its position in the index variables Isthana and Iyatna.} #{If not found Isthana and $Iyatna =0.} my ($I1,$I2); for ($I1=1;$I1 <= $maxsthana; $I1++) { for ($I2=1;$I2 <= $maxyatna; $I2++) { if ( $aksara eq $Soundary[$I1][$I2] ) { if ($dbg) {print "identify: $aksara, $I1, $I2\n";} return ($I1,$I2); } } } if ($dbg) {print "identify not found: '$aksara'\n";} return (0,0); } sub rlvarnayormithahsavarnyam { #{1.1.9 vt. fkAra kArayoH savarRavidhiH} if ( (set_memberP($Linary[$Index - 1],$Rvarna_and_Lvarna)) and (set_memberP($Linary[$Index + 1],$Rvarna_and_Lvarna)) ) { $Linary[$Index - 1] = $sktri; $Linary[$Index + 1] = $sktri; $Isthana1 = $imurdhanya; $Isthana2 = $imurdhanya; } chk_point('rlvarnayormithahsavarnyam'); } #{rlvarnayormithahsavarnyam} sub akahsavarnedirghah { ; #{6.1.101. akaH savafRe dIrghaH} $Linary[$Index - 1] = $Soundary[$Isthana1][$idirgha]; deletary($Index + 1); #{6.1.84. ekaH pUrvaparayoH} $EkahPurvaParayoh = $true; chk_point('akahsavarnedirghah'); } #{akahsavarnedirghah} sub vrddhireci { #{6.1.88. vfddhir eci} $Linary[$Index - 1] = $Soundary[$Isthana2][$ivrddhi]; deletary($Index + 1); #{6.1.84. ekaH pUrvaparayoH} $EkahPurvaParayoh = $true; chk_point('vrddhireci'); } #{vrddhireci} sub adgunah { #{6..1.87. Ad guRaH} $Linary[$Index - 1] = $Soundary[$Isthana2][$iguna]; #begin case: case $Isthana2 of if (($Isthana2 eq $italavya) or ($Isthana2 eq $iosthya)) { deletary($Index + 1); #{6.1.84. ekaH pUrvaparayoH} }elsif ($Isthana2 eq $imurdhanya) { # imurdhanya: $Linary[$Index + 1] = $sktr; #{1.1.51. uraR raparaH} }elsif ($Isthana2 eq $idantya) { # idantya: $Linary[$Index + 1] = $sktl; } $EkahPurvaParayoh = $true; chk_point('adgunah'); } #{adgunah} sub ikoyanaci { #{6.1.77. iko yaR aci} $Linary[$Index - 1] = $Soundary[$Isthana1][$iantahstha]; chk_point('ikoyanaci'); } #{ikoyanaci} sub enahpadantadati { #{6.1.109. eNaH padAntAd ati} $Linary[$Index + 1] = $sktavagraha; chk_point('enahpadantadati'); } #{enahpadantadati} sub ecoyavayavah { #{6.1.109. eNaH padAntAd ati} #begin case: case $Linary[$Index - 1] of if ($Linary[$Index - 1] eq $skte) { $Linary[$Index - 1] = $skta; insertary($skty, $Index); }elsif ($Linary[$Index - 1] eq $skto) { $Linary[$Index - 1] = $skta; insertary($sktv, $Index); }elsif ($Linary[$Index - 1] eq $sktai) { $Linary[$Index - 1] = $sktaa; insertary($skty, $Index); }elsif ($Linary[$Index - 1] eq $sktau) { $Linary[$Index - 1] = $sktaa; insertary($sktv, $Index); } if ( $NoSpace ) { $Error = 2; return; # REPLACE exit($sandhi); } $Index = $Index + 1; chk_point('ecoyavayavah'); } #{ecoyavayavah} sub acsandhi { rlvarnayormithahsavarnyam(); my $cprev=$Linary[$Index - 1]; my $cnext=$Linary[$Index + 1]; if ( set_memberP($Linary[$Index - 1],$Ak) ) { if ( (set_memberP($Linary[$Index + 1],$Ak)) and ($Isthana1 eq $Isthana2) ) { # print "$cprev in $Ak, and $cnext in $Ak, and $Isthana1 = $Isthana2\n"; akahsavarnedirghah(); #{6.1.101. akaH savafRe dIrghaH} }elsif ( set_memberP($Linary[$Index - 1],$Avarna) ) { #PMS: and $Linary[$Index+1] not in $Avarna if ( set_memberP($Linary[$Index + 1],$Ec) ) { vrddhireci(); #PMS: 6.1.88 vfddhir eci }else { #PMS: Linary[$Index+1] in $Ik adgunah(); #PMS: 6.1.87 Ad guRaH } }else { #PMS: Linary[$Index-1] in $Ik and not savarna with $Linary[$Index+1] ikoyanaci(); #PMS: 6.1.77. iko yaR aci } }else { #PMS: Linary[$Index-1] in $Ec if ( (set_memberP($Linary[$Index - 1],$Ekn)) and ($Linary[$Index + 1] eq $skta) ) { enahpadantadati(); #PMS: 6.1.109. eNaH padAntAd ati }else { #PMS: set_memberP($Linary[$Index-1],$Ec) and set_memberP($Linary[$Index+1],$Ic) ecoyavayavah(); #PMS: 6.1.78. eco 'yavAyAvaH } } chk_point('acsandhi'); } #{acsandhi} sub visargaprep { my $L = length($Pada1); if ( ($Pada1 eq 'ahaH') or ($Pada1 eq 'svaH') or ($Pada1 eq 'antaH') or ($Pada1 eq 'prAtaH') or ($Pada1 eq 'punaH') or ($Pada1 eq 'mAtaH') or ($Pada1 eq 'kOsalyAmAtaH') or ($Pada1 eq 'sanutaH') or ($Pada1 eq 'catuH') or ($Pada1 eq 'prAduH') ) { $Linary[$Index - 1] = $sktr; substr($Pada1,$L-1,$L) = $sktr; } else { $Linary[$Index - 1] = $skts; if ( $Pada1 ne '' ) { substr($Pada1,$L-1,$L) = $skts; } } chk_point('visargaprep'); } sub checa { #PMS: 6.1.73. che ca ($tuk 71) if ($false) { # debug print "chk checa: Index = $Index, c+1 = " . $Linary[$Index + 1] . "\n"; print "Iyatna1 = $Iyatna1, ihrasva = $ihrasva, NoSpace = $NoSpace\n"; } if ($false) { my $dbg1 = $dbg; $dbg = $true; chk_point('checa (before)'); } if ( ($Linary[$Index + 1] eq $sktch) and ($Iyatna1 eq $ihrasva) ) { insertary($sktt, $Index); if ( $NoSpace ) { $Error = 2; return; # REPLACE exit($sandhi); } $Index = $Index + 1; } if ($false) { chk_point('checa (after)'); $dbg = $dbg1; } chk_point('checa'); } #PMS: checa sub anmanosca { #PMS: 6.1.74. ANmANoSca ($che 73, $tuk 71) #PMS: you'll have to add the condition that these are AN and mAN when that info is available if ( ($Linary[$Index + 1] eq $sktch) and (($Pada1 eq 'A') or ($Pada1 eq 'mA')) ) { insertary($sktt, $Index); if ( $NoSpace ) { $Error = 2; return; # REPLACE exit($sandhi); } $Index = $Index + 1; } chk_point('anmanosca'); } #PMS: anmanosca sub padantadva { #PMS: 6.1.76. padAntAdvA ($dIrghAt 75, $che 73, $tuk 71) ($Isthana1,$Iyatna1) = identify($Linary[$Index - 1]); #PMS: don't want to do it if anmanosca just applied if ( ($Linary[$Index + 1] eq $sktch) and ($Iyatna1 eq $idirgha) ) { insertary($sktt, $Index); if ( $NoSpace ) { $Error = 2; return; # REPLACE exit($sandhi); } $Index = $Index + 1; } chk_point('padantadva'); } #PMS: padantadva sub etattadohsulopo { #PMS: 6.1.132. etattadoH sulopo 'kor anaYsamAse hali if ( (($Pada1 eq 'sas') or ($Pada1 eq 'ezas')) and (set_memberP($Linary[$Index + 1],$Hal)) ) { deletary($Index - 1); $Index = $Index - 1; } chk_point('etattadohsulopo'); } #PMS: etattadohsulopo sub jhalamjasonte { #PMS: 8.2.39. jhalAM jaSo 'nte ($Isthana1,$Iyatna1) = identify($Linary[$Index - 1]); if ($false) { #debug print "chk: jhalamjasonte\n"; print "'" . $Linary[$Index - 1] . " => $Isthana1,$Iyatna1\n"; print "Jhal_not_ru = $Jhal_not_ru\n"; print "isparsa3 = $isparsa3\n"; my $dbg1 = $dbg; $dbg = $true; chk_point('jhalamjasonte: before'); } if ( set_memberP($Linary[$Index - 1],$Jhal_not_ru) ) { #PMS: because $ru =skts; I could choose another character $Linary[$Index - 1] = $Soundary[$Isthana1][$isparsa3]; } #PMS: jhalamjasonte if ($false) { chk_point('jhalamjasonte: after'); $dbg =$dbg1; } chk_point('jhalamjasonte'); } sub sasajusoruh { #PMS: 8.2.66. sasajuzo ruH #PMS: exception to 8.2.39 so must apply before it if ( $Index > 5 ) { if (substrary($Index - 5, $Index - 1) eq 'sajuz') { $Linary[$Index - 1] = $ru; } } if ( $Linary[$Index - 1] eq $skts ) { $Linary[$Index - 1] = $ru; } chk_point('sasajusoruh'); } #PMS: sasajusoruh sub ahan { #PMS: 8.2.68. ahan if ( $Compound ) { if ($Pada1 eq 'ahan') { if ( ($Pada2 eq 'rUpa') or ($Pada2 eq 'rAtri') or ($Pada2 eq 'rAtra') or ($Pada2 eq 'rAtre') or ($Pada2 eq 'rAtrARAm') or ($Pada2 eq 'raTantara') ) { $Linary[$Index - 1] = $ru #PMS: vArttika, $but had to add rAtra 21045, $rAtre 24028, $rAtrARAm 33137 #PMS: if ahan is termed pada and Pada2 in $Sup, $so that $Linary[$Index+1]=sktbh or $skts, $ditto }else { $Linary[$Index - 1] = $sktr; #PMS: 8.2.69. ro 'supi } } } chk_point('ahan'); } #PMS: ahan sub amnarudharavar { #PMS: 8.2.70. amnarUdharavarityubhayathA chandasi if ( $chandas ) { if ( ($Pada1 eq 'amnas') or ($Pada1 eq 'UDas') or ($Pada1 eq 'avas') ) { $Linary[$index - 1] = $sktr; #PMS: actually you get it both ways in $chandas, $ru too } } chk_point('amnarudharavar'); } sub atororhasica { #PMS: 6.1.13. ato ror aplutad aplute. 6.1.14. haSi ca if ( $Index > 2 ) { if ( ($Linary[$Index - 2] eq $skta) and ($Linary[$Index - 1] eq $ru) ) { if (set_memberP($Linary[$Index + 1],$Hasch_and_skta)) { $Linary[$Index - 2] = $skto; #PMS: Linary[$Index-1=sktu; adguna deletary($Index - 1); $Index = $Index - 1; } } } chk_point('atororhasica'); } #PMS: atororhasica sub naschavyaprasan { #PMS: 8.3.7. naS chavy apraSAn if ( ($Linary[$Index - 1] eq $sktn) and (set_memberP($Linary[$Index + 1],$Chav)) and ($Pada1 ne 'praSAn') ) { $Linary[$Index - 1] = $ru; insertary($sktanusvara, $Index - 1); #PMS: 8.3.4. anunAsikAt paro 'nusvAraH if ( $NoSpace ) { $Error = 2; return; # REPLACE exit($sandhi); } $Index = $Index + 1; } chk_point('naschavyaprasan'); } #PMS: naschavyaprasan sub rori { # ($var Dhralopa: boolean); This variable assumed global #PMS: 8.3.14. ro ri $Dhralopa = $false; if ( (set_memberP($Linary[$Index - 1],$sktr_and_ru)) and ($Linary[$Index + 1] eq $sktr) ) { deletary($Index - 1); $Index = $Index - 1; $Dhralopa = $true; } chk_point('rori'); } #PMS: rori sub dhralope { #PMS: 6.3.111. qhralope pUrvasya dIrgho 'RaH if ( $Dhralopa ) { ($Isthana1,$Iyatna1) = identify($Linary[$Index - 1]); if ( (set_memberP($Linary[$Index - 1],$An)) and ($Iyatna1 eq $ihrasva) ) { $Linary[$Index - 1] = $Soundary[$Isthana1][$idirgha]; } } chk_point('dhralope'); } #PMS: dhralope sub bhobhago { #PMS: 8.3.17. bhobhagoaghoapUrvasya yo 'Si if ($false) { print "bhobhago: Index = $Index, Asch = $Asch, Pada1 = $Pada1, Avarna = $Avarna, ru = $ru\n"; my ($c,$c1); $c = $Linary[$Index + 1]; print "next char = '$c'\n"; $c = $Linary[$Index - 1]; $c1 = $Linary[$Index - 2]; print "prev two chars = '$c1', '$c'\n"; } if ( (set_memberP($Linary[$Index + 1],$Asch)) and ($Index > 2) ) { if ( ($Pada1 eq 'bhos') or ($Pada1 eq 'bhagos') or ($Pada1 eq 'aghos') or ((set_memberP($Linary[$Index - 2],$Avarna)) and ($Linary[$Index - 1] eq $ru)) ) { $Linary[$Index - 1] = $skty; } } chk_point('bhobhago'); } #PMS: bhobhago sub kharavasanayor { #PMS: 8.3.15. kharavasAnayor visarjanIyaH if ( set_memberP($Linary[$Index - 1],$sktr_and_ru) ) { if ( set_memberP($Linary[$Index + 1],$Khar_and_linend) ) { $Linary[$Index - 1] = $sktvisarga; }else { $Linary[$Index - 1] = $sktr; } } chk_point('kharavasanayor'); } #PMS: kharavasanayor sub lopahsakalyasya { #PMS: 8.3.19. lopaH SAkalyasya if ( (set_memberP($Linary[$Index + 1],$Asch)) and ($Index > 2) ) { if ( (set_memberP($Linary[$Index - 2],$Avarna)) and ($Linary[$Index - 1] eq $skty) ) { deletary($Index - 1); $Index = $Index - 1; } } chk_point('lopahsakalyasya'); } #PMS: lopahsakalyasya sub otogargyasya { #PMS: 8.3.20. oto gArgyasya if ( set_memberP($Linary[$Index + 1],$Asch) ) { if ( (($Pada1 eq 'bhos') or ($Pada1 eq 'bhagos') or ($Pada1 eq 'aghos')) ) { deletary($Index - 1); $Index = $Index - 1; } } chk_point('otogargyasya'); } #PMS: oto gargyasya sub monusvarah { #PMS: 8.3.23. mo 'nusvAraH if ( ($Linary[$Index - 1] eq $sktm) and (set_memberP($Linary[$Index + 1],$Hal)) ) { $Linary[$Index - 1] = $sktanusvara; } chk_point('monusvarah'); } #PMS: monusvarah sub namohrasvad { #PMS: 8.3.32. Namo hrasvAd aci NamuR nityam my $Sthana; # type = $sthanatype; my $Yatna; # type = $yatnatype; if ( ($Index > 2) ) { ($Sthana,$Yatna) = identify($Linary[$Index - 2]); if ( ($Yatna eq $ihrasva) and (set_memberP($Linary[$Index - 1],$KNam)) and (set_memberP($Linary[$Index + 1],$Ac)) ) { insertary($Soundary[$Isthana1][$isparsa5], $Index); if ( $NoSpace ) { $Error = 2; return; # REPLACE exit($sandhi); } $Index = $Index + 1; } } chk_point('namohrasvad'); } #PMS: namohrasvad sub visarjaniyasyasah { #PMS: 8.3.34. visarjanIyasya saH my $Apavada; # type = $boolean; if ( ($Linary[$Index - 1] eq $sktvisarga) and (set_memberP($Linary[$Index + 1],$Khar)) ) { $Apavada = $false; if ( ($Index + 2) < $linmax ) { if ( set_memberP($Linary[$Index + 2],$Schar) ) { $Apavada = $true; #PMS: 8.3.35. Sarpare visarjanIyaH. } } if ( set_memberP($Linary[$Index + 1],$Ku_and_Pu_and_Schar) ) { $Apavada = $true; #PMS: 8.3.36. vA Sari. 8.3.37. kupvoH XkXpau ca. } if ( not ($Apavada) ) { $Linary[$Index - 1] = $skts; } } chk_point('visarjaniyasyasah'); } #PMS: visarjaniyasyasah sub vasari { #PMS: 8.3.36. vA Sari if ( ($Linary[$Index - 1] eq $sktvisarga) and (set_memberP($Linary[$Index + 1],$Schar)) ) { $Linary[$Index - 1] = $skts; } chk_point('vasari'); } #PMS: vasari sub kupvohXkXpau { #PMS: 8.3.37. kupvoH XkXpau ca ($khari 15). #PMS: 8.3.41, 8.3.45 and 8.3.46 are apavAdas of this so must precede it. my $Apavada; # type = $boolean; #PMS: by 8.3.15, $kharavasAnayorvisarjanIyaH, $visarga occurs before avasAna too. but Xk and Xp don't. if ( ($Linary[$Index - 1] eq $sktvisarga) and (set_memberP($Linary[$Index + 1],$Khar)) ) { #PMS: Hence, $khari is understood here too $Apavada = $false; if ( ($Index + 2 < $linmax) ) { if ( set_memberP($Linary[$Index + 2],$Schar) ) { $Apavada = $true; #PMS: 8.3.35. Sarpare visarjanIyaH. } } if ($dbg) {print "in kupvohXkXpau, Apavada = $Apavada\n";} if ( not ($Apavada) ) { if ( set_memberP($Linary[$Index + 1],$Ku) ) { $Linary[$Index - 1] = $sktjihvamuliya; }elsif ( set_memberP($Linary[$Index + 1],$Pu) ) { $Linary[$Index - 1] = $sktupadhmaniya; } } } chk_point('kupvohXkXpau'); } #PMS: kupvohXkXpau sub idudupadhasya { #PMS: 8.3.41. idudupadhasya cApratyayasya ($kupvoH 37, $iRaH zaH 39 #PMS: exception to 8.3.36. kupvoH XkaXpau ca, $which is an exception to 8.3.34. visarjanIyasya saH, #PMS: so should accompany procedure visarjaniyasyasah. Must follow 8.3.15. kharavasAnayor visarjanIyaH if ( ($Linary[$Index - 1] eq $sktvisarga) and (set_memberP($Linary[$Index + 1],$Ku_and_Pu)) ) { if ( ($Pada1 eq 'nis') or ($Pada1 eq 'dus') or ($Pada1 eq 'bahis') or ($Pada1 eq 'Avis') or ($Pada1 eq 'catur') or ($Pada1 eq 'prAdur') ) { $Linary[$Index - 1] = $sktsh; #PMS: bahis, $Avis =exception to 8.3.46 } } chk_point('idudupadhasya'); } sub nityamsamase { #PMS: 8.3.45. nityamsamAse 'nutarapadasthasya if ( $Compound ) { if ( ($Linary[$Index - 1] eq $sktvisarga) and (set_memberP($Linary[$Index + 1],$Ku_and_Pu)) and ($Index > 2) ) { if ( (($Linary[$Index - 2] eq $skti) or ($Linary[$Index - 2] eq $sktu)) and (not $Uttarapada) ) { #PMS: Pada1­u.p. $Linary[$Index - 1] = $sktsh; } } } chk_point('nityamsamase'); } #PMS: nityamsamase sub atahkrkamikamsa { #PMS: 8.3.46. ataH kfkamikaMsakumbhapAtrakuSAkarRIzvanavyayasya ($samAse 45) if ( $Compound ) { if ( ($Linary[$Index - 1] eq $sktvisarga) and (set_memberP($Linary[$Index + 1],$Ku_and_Pu)) and ($Index > 2) ) { if ( ($Linary[$Index - 2] eq $skta) ) { if ( ($Pada2 eq 'kAra') or ($Pada2 eq 'kAma') or ($Pada2 eq 'kaMsa') or ($Pada2 eq 'kumBa') or ($Pada2 eq 'kumBI') or ($Pada2 eq 'pAtra') or ($Pada2 eq 'kuSA') or ($Pada2 eq 'karRI') ) { if ( not (($Pada1 eq 'svar') or ($Pada1 eq 'antar') or ($Pada1 eq 'prAtar') or ($Pada1 eq 'punar') or ($Pada1 eq 'sanutar') or ($Pada1 eq 'hyas') or ($Pada1 eq 'Svas') or ($Pada1 eq 'avas') or ($Pada1 eq 'aDas')) and (not $Uttarapada) ) { #PMS: miTas, $namas, (tiraskAra by 8.3.42. avaskara, namaskAra?) krtvasuc, suc, i.e. not avyaya $Linary[$Index - 1] = $skts; } } } } } chk_point('atahkrkamikamsa'); } #PMS: atahkrkamikamsa sub stohscunascuh { #PMS: 8.4.40. stoH ScunA ScuH my $Isthana; # type = $sthanatype; my $Iyatna; # type = $yatnatype; if ( (set_memberP($Linary[$Index - 1],$Tu_and_skts)) and (set_memberP($Linary[$Index + 1],$Cu_and_sktsch)) ) { ($Isthana1,$Iyatna1) = identify($Linary[$Index - 1]); $Linary[$Index - 1] = $Soundary[$italavya][$Iyatna1]; }elsif ( (set_memberP($Linary[$Index - 1],$Cu_and_sktsch)) and ($Linary[$Index + 1] eq $skts) ) { $Linary[$Index + 1] = $sktsch; if ( ($Index + 2 < $linmax) ) { if ($Linary[$Index + 2] eq $skts) { $Linary[$Index + 1] = $sktsch; } } }elsif ( (set_memberP($Linary[$Index - 1],$Cu)) and (set_memberP($Linary[$Index + 1],$Tu)) ) { #PMS: 8.4.44. SAt. ($na, $toH) ($Isthana2,$Iyatna2) = identify($Linary[$Index + 1]); $Linary[$Index + 1] = $Soundary[$italavya][$Iyatna2]; if ( ($Index + 2 < $linmax) ) { if (set_memberP($Linary[$Index + 2],$Tu_and_skts)) { ($Isthana,$Iyatna) = identify($Linary[$Index + 2]); $Linary[$Index + 2] = $Soundary[$italavya][$Iyatna]; } } } chk_point('stohscunascuh'); } #PMS: stohscunascuh sub stunastuh { #PMS: 8.4.41. zwunA zwuH my $Isthana; # type = $sthanatype; my $Iyatna; # type = $yatnatype; if ( ( ($Linary[$Index - 1] eq $sktsh) and (set_memberP($Linary[$Index + 1],$Tu_and_skts)) ) or (set_memberP($Linary[$Index - 1],$Retrotu) and ($Pada2 eq 'nAm')) ) { #PMS: 8.4.42. na padAntAwworanAm ($Isthana2,$Iyatna2) = identify($Linary[$Index + 1]); $Linary[$Index + 1] = $Soundary[$imurdhanya][$Iyatna2]; if ( ($Index + 2 < $linmax) ) { if (set_memberP($Linary[$Index + 2],$Tu_and_skts)) { ($Isthana,$Iyatna) = identify($Linary[$Index + 2]); $Linary[$Index + 2] = $Soundary[$imurdhanya][$Iyatna]; } } }elsif ( (set_memberP($Linary[$Index - 1],$Tu) and (set_memberP($Linary[$Index + 1],$Retrotu)) ) or (($Linary[$Index - 1] eq $skts) and (set_memberP($Linary[$Index + 1],$Retrotu_sktsh))) ) { #PMS: 8.4.43. toH zi. ($na) ($Isthana1,$Iyatna1) = identify($Linary[$Index - 1]); $Linary[$Index - 1] = $Soundary[$imurdhanya][$Iyatna1]; } chk_point('stunastuh'); } #PMS: stunastuh sub anusvarasya { #PMS: 8.4.59. vA padAntasya ($anusvArasya yayi parasavarRaH 58). #PMS: don't exercise the option for semivowels ($yan) just now if ( ($Linary[$Index - 1] eq $sktanusvara) and (set_memberP($Linary[$Index + 1],$Yay_not_Yan)) ) { ($Isthana2,$Iyatna2) = identify($Linary[$Index + 1]); $Linary[$Index - 1] = $Soundary[$Isthana2][$isparsa5]; } chk_point('anusvarasya'); } #PMS: anusvarasya sub torli { #PMS: 8.4.60. tor li if ( (set_memberP($Linary[$Index - 1],$Tu)) and ($Linary[$Index + 1] eq $sktl) ) { ($Isthana1,$Iyatna1) = identify($Linary[$Index - 1]); $Linary[$Index - 1] = $sktl; if ( $Iyatna1 eq $isparsa5 ) { insertary($sktnasalization, $Index - 1); if ( $NoSpace ) { $Error = 2; return; # REPLACE exit($sandhi); } $Index = $Index + 1; } } chk_point('torli'); } #PMS: torli sub jhayoho { #PMS: 8.4.62. jhayo ho 'nyatarasyAm if ( (set_memberP($Linary[$Index - 1],$Jhay)) and ($Linary[$Index + 1] eq $skth) ) { ($Isthana1,$Iyatna1) = identify($Linary[$Index - 1]); $Linary[$Index + 1] = $Soundary[$Isthana1][$isparsa4]; } chk_point('jhayoho'); } #PMS: jhayoho sub saschoti { #PMS: 8.4.63. SaS cho 'wi. (jhayaH 62, anyatarasyAm 62) if ($false) { my ($cp,$c1,$c,$c2); $cp = $Linary[$Index - 1]; $c1 = $Linary[$Index + 1]; $c2 = $Linary[$Index + 2]; print "saschoti: chars = '$cp', '$c1', '$c2'\n"; print "Jhay = $Jhay, sktsch = '$sktsch', At = '$At': sktch = '$sktch'\n"; } if ( (set_memberP($Linary[$Index - 1],$Jhay)) and (($Index + 2) < $linmax) ) { if ( ($Linary[$Index + 1] eq $sktsch) and (set_memberP($Linary[$Index + 2],$At)) ) { #PMS: vt. chatvamamIti vaktavyam: Am instead of At. tacchlokena, $tacchmaSruRA $Linary[$Index + 1] = $sktch; } } chk_point('saschoti'); } #PMS: saschoti sub yaronunasike { #PMS: 8.4.45. yaro 'nunAsike 'nunAsiko vA. (padAnta 42) ($Isthana2,$Iyatna2) = identify($Linary[$Index + 1]); #PMS: if ( set_memberP($Linary[$Index - 1],$Yar) and ($Index + 2 < $linmax) then #PMS: if ($Iyatna2 eq $isparsa5) or ($Linary[$Index + 2] eq $sktanunasika) ) { #PMS: we wont exercise the nasalized option for the semivowels y, $v and l; just for the stops if ( (set_memberP($Linary[$Index - 1],$Jhay)) and ($Iyatna2 eq $isparsa5) ) { ($Isthana1,$Iyatna1) = identify($Linary[$Index - 1]); $Linary[$Index - 1] = $Soundary[$Isthana1][$isparsa5]; } chk_point('yaronunasike'); } #PMS: yaronunasike sub kharica { #PMS: 8.4.55. khari ca. ($jhalAm 53, $car 54) #PMS: there is no final 'h' after jhalAm jaSo 'nte, $but there is $skts by 8.3.34 visarjanIyasya saH #PMS: and $sktsch and $sktsh by 8.4.40-41 stoH ScunA scuH, $zwunA zwuH so must exclude Sar if ( set_memberP($Linary[$Index - 1],$Jhay) ) { #PMS: jhay=jhal-Sar ($Isthana1,$Iyatna1) = identify($Linary[$Index - 1]); if ( set_memberP($Linary[$Index + 1],$Khar_and_linend) ) { #PMS: 8.4.56. vavasane $Linary[$Index - 1] = $Soundary[$Isthana1][$isparsa1]; } } chk_point('kharica'); } #PMS: kharica sub idudeddvivacanampragrhyam { #PMS: 1.1.11. IdUdeddvivacanam pragfhyam $Pragrhya = $false; my $c = $Linary[$Index - 1]; if ( $External ) { if($c eq $sktii) { if ( ($Pada1 eq 'amI') or ($Pada1 eq 'aDiparI') or ($Pada1 eq 'aBipratI') or ($Pada1 eq 'manasI') ) { $Pragrhya = $true; } }elsif ($c eq $sktuu) { if ( ($Pada1 eq 'amU') ) { #PMS: 1.1.12. adaso mAt $Pragrhya = $true; } }elsif ($c eq $skte) { if ( ($Pada1 eq 'SAlInakOpIne') or ($Pada1 eq 'uBe') ) { $Pragrhya = $true; } }elsif ($c eq $skto) { if ( ($Pada1 eq 'Aho') or ($Pada1 eq 'utAho') ) { #PMS: 1.1.15. ot $Pragrhya = $true; } }else { } #PMS: case } chk_point('idudeddvivacanampragrhyam'); } #PMS: pragrhya #-------------------------sandhiPrep routine from SandhiPrepGen.pp sub sandhiPrep { # procedure sandhiPrep (var Linary: linetype; var Index: lenrangeE; var PurvaPada, Pada1, Pada2: padatype; var NoStoh, NoKNam, Exception, Pronoun, CloseSandhi: boolean); # ejf: all the argument list variables (Linary .. CloseSandhi) are global variables. my $L; # type = $lenrange0; my $IPada; # type = $lenrangeE; my $NoPrep; # type = $boolean; # my $NoSpace; # type = $boolean; global $NoStoh = $false; $NoKNam = $false; $NoPrep = $false; $Exception = $false; $Pronoun = $true; #PMS: saú is usually the pronoun tad $OtherCloseSandhi = $false; $L = length($Pada1); if ($L <= 1) { return; } my $c = substr($Pada1,$L-1,$L); # last character of $Pada1. if (0 eq 1) {print STDOUT " in sandhiPrep, c = $c, Pada1 ='$Pada1'\n";} if ($c eq $sktkn) { # RiN change made 20090801, PMS. if ($Pada1 eq 'RiN') { $Exception = $true; } }elsif ($c eq $sktc) { for ($IPada = 1; $IPada <= $cantamax;$IPada++) { if ( $Pada1 eq $CAntaPadary[$IPada] ) { $NoPrep = $true; $NoStoh = $true; $IPada = $cantamax; # leave loop } } }elsif ($c eq $sktj) { if ( ($Pada1 eq 'tij') ) { $Exception = $true; }elsif ( ($Pada1 eq 'tuj') ) { $NoPrep = $true; } }elsif ($c eq $sktcn) { if ( ($Pada1 eq 'aY') or ($Pada1 eq 'alaNkfY') or ($Pada1 eq 'nirAkfY') or ($Pada1 eq 'naY') or ($Pada1 eq 'wIwaY') or ($Pada1 eq 'WaY') ) { $NoStoh = $true; } }elsif ($c eq $sktretron) { if ( ($Pada1 eq 'aR') or ($Pada1 eq 'uR') or ($Pada1 eq 'yaR') ) { $Exception = $true; } }elsif ($c eq $sktdh) { if ( ($Pada1 eq 'aD') or ($Pada1 eq 'ruD') ) { $Exception = $true; } }elsif ($c eq $sktn) { if ( ($Pada1 eq 'Wan') or ($Pada1 eq 'tran') or ($Pada1 eq 'dozan') or ($Pada1 eq 'yakan') or ($Pada1 eq 'yUzan') or ($Pada1 eq 'Sakan') or ($Pada1 eq 'zWan') or ($Pada1 eq 'han') ) { $NoPrep = $true; }elsif ( ($Pada1 eq 'Ayan') or ($Pada1 eq 'Gan') ) { $NoPrep = $true; $NoKNam = $true; }elsif ( ($Pada1 eq 'ktin') or ($Pada1 eq 'kvin') or ($Pada1 eq 'min') or ($Pada1 eq 'vin') ) { $NoPrep = $true; }elsif ( ($Pada1 eq 'an') or ($Pada1 eq 'in') or ($Pada1 eq 'kan') or ($Pada1 eq 'kaDyEn') or ($Pada1 eq 'qvun') or ($Pada1 eq 'tan') or ($Pada1 eq 'dAn') or ($Pada1 eq 'man') or ($Pada1 eq 'vun') ) { $Exception = $true; }elsif ( $Pada1 eq 'tumun' ) { $NoStoh = $true; } }elsif ($c eq $sktm) { if ( ($Pada1 eq 'am') or ($Pada1 eq 'Am') or ($Pada1 eq 'num') ) { $Exception = $true; }elsif ( $Compound ) { if ( (($Pada1 eq 'puram') and ($Pada2 eq 'dArO')) ) { #PMS: purandrau $OtherCloseSandhi = $true; } } }elsif ($c eq $skty) { if ( ($Pada1 eq 'ay') or ($Pada1 eq 'Ay') ) { $Exception = $true; } }elsif ($c eq $sktr) { if ( ($Pada1 eq 'car') or ($Pada1 eq 'kur') or ($Pada1 eq 'Sar') ) { $Exception = $true; } }elsif ($c eq $sktsch) { if ( ($Pada1 eq 'eS') or ($Pada1 eq 'KaS') or ($Pada1 eq 'jaS') or ($Pada1 eq 'niS') ) { $Exception = $true; } }elsif ($c eq $sktsh) { if ( ($Pada1 eq 'Jaz') or ($Pada1 eq 'Baz') ) { $Exception = $true; } }elsif ($c eq $skts) { if ( ($Pada1 eq 'as') or ($Pada1 eq 'atus') or ($Pada1 eq 'aTus') or ($Pada1 eq 'is') or ($Pada1 eq 'us') or ($Pada1 eq 'os') or ($Pada1 eq 'kas') or ($Pada1 eq 'kAs') or ($Pada1 eq 'Nas') or ($Pada1 eq 'tas') or ($Pada1 eq 'tAs') or ($Pada1 eq 'TAs') or ($Pada1 eq 'Bis') or ($Pada1 eq 'Byas') ) { $Exception = $true; } }else { } #PMS: case if ( $Compound ) { #PMS: normal stem changes if ( (not $Exception) and (not $NoPrep) ) { $c = $Linary[$Index - 1]; if ($c eq $sktc) { if ( $Pada1 eq 'aYc' ) { #PMS: aYc $Linary[$Index - 1] = $sktk; #PMS: ak deletary($Index - 2); $Index = $Index - 1; } else { $Linary[$Index - 1] = $sktk; } }elsif ($c eq $sktch) { $Linary[$Index - 1] = $sktk; }elsif ($c eq $sktj ) { if ( ($Pada1 eq 'rAj') ) { $Linary[$Index - 1] = $sktretrot; }else { $Linary[$Index - 1] = $sktk; } }elsif ($c eq $sktjh) { $Linary[$Index - 1] = $sktk; }elsif ($c eq $sktn) { if ( $Index > 2 ) { if ( ($Linary[$Index - 2] eq $skta) or ($Linary[$Index - 2] eq $skti) ) { #PMS: an-/in- if ( (($Pada1 eq 'ahan') and ($PurvaPada ne 'eka')) ) { # noop }else { #PMS: normal 'an-'/'in-' deletary($Index - 1); $Index = $Index - 1; } } #PMS: an-/in- } }elsif ($c eq $sktr) { if ( ($Pada1 eq 'pur') or ($Pada1 eq 'Dur') ) { $Linary[$Index - 2] = $sktuu; } }elsif ($c eq $sktsch) { if ( $Pada1 eq 'viS' ) { $Linary[$Index - 1] = $sktretrot; }else { $Linary[$Index - 1] = $sktk; } }elsif ($c eq $sktsh) { if ( $Pada1 eq 'daDfz' ) { $Linary[$Index - 1] = $sktk; } }elsif ($c eq $skts) { if ( ($Pada1 eq 'ASis') ) { $Linary[$Index - 2] = $sktii #PMS: 82104 }elsif ( $Pada1 eq 'pums' ) { #PMS: 'pum' deletary($Index - 1); $Index = $Index - 1; } #PMS: 'pum' }else { #PMS: no preparation necessary, $normal sandhi will follow } #PMS: case $statement } #PMS: astadhyayiSandhiPrep } #PMS: sandhiprep } # ---------------- sandhi routine from SandhiGen.pp sub sandhi { # ejf. Accept string argument, to which sandhi is to be applied. # return a string argument as the answer # return a blank string if there is an error # print an informative message if there is an error. my ($s) = @_; my ($whitebeg,$whiteend,$x,$y); my @split = sandhiSplit($s); my $n = $#split; my $ans=$whitebeg; my $i = 0; while ($i < $n) { # print $j," ", $split[$i]," \"",$split[$i+1],"\"\n"; $x = $split[$i+1]; if ($x =~ /^(\s+)(.*)$/) { $whitebeg=$1; $x = $2; }else { $whitebeg=''; } if ($x =~ /(.*?)(\s+)$/) { $whiteend=$2; $x = $1; }else { $whiteend=''; } if ($split[$i] eq 's') { $y = sandhi1($x); }else { $y = $x; } $y = $whitebeg . $y . $whiteend; $ans .= $y; $i += 2; } # $ans .= $whiteend; return $ans; } sub sandhiSplit { # Apr 21, 2009 # from a given input string, generate an array, # The even elements (0,2,4...) have value # 's' if the next array element is a string of Sanskrit characters # 'o' if the next array element is a string of non-Sanskrit characters my $x = shift; my @a; my $na=0; my $INITIAL = 0; my $SKT = 1; my $OTHER = 2; my $state = $INITIAL; my $more = 1; my $y=""; # Only non-alphabetic chars are - and space and apostrophe and '|' # my $sanskrit = "[- 'aAiIuUfFxXeEoOMHkKgGNcCjJYwWqQRtTdDnpPbBmyrlvSzshL|]"; # 20090801, '#' is a sandhi-blocking character. my $sanskrit = "[- 'aAiIuUfFxXeEoOMHkKgGNcCjJYwWqQRtTdDnpPbBmyrlvSzshL|#]"; while ($more) { if ($state eq $INITIAL) { $y = ""; if ($x =~ /\G($sanskrit)/gc) { $state = $SKT; $y = $&; next; }elsif ($x =~ /\G./gc) { $state = $OTHER; $y = $&; $next; }else { # no chars left goto DONE; } }elsif ($state eq $SKT) { if ($x =~ /\G($sanskrit)/gc) { $y .= $&; next; }else { $a[$na]='s'; $na++; $a[$na]=$y; $na++; $state = $INITIAL; $next; } }else { # $state = $OTHER if ($x =~ /\G($sanskrit)/gc) { $a[$na]='o'; $na++; $a[$na]=$y; $na++; $state = $SKT; $y=$&; $next; }elsif ($x =~ /\G./gc) { $y .= $&; next; }else { goto DONE; } } } DONE: if ($y ne '') { if ($state eq $SKT) { $a[$na]='s'; $na++; $a[$na]=$y; }elsif ($state eq $OTHER) { $a[$na]='o'; $na++; $a[$na]=$y; }else { # should not occur } } return @a; } sub sandhi1 { # ejf. Accept string argument, to which sandhi is to be applied. # return a string argument as the answer # return a blank string if there is an error # print an informative message if there is an error. my ($s) = @_; my $s1 = str_trim($s); if (($s eq 'dbg') or ($s eq 'off')) { if (not $dbg) { print "Turning on debug. To turn off, enter 'off'\n"; $dbg = $true; }else { print "Turning off debug. To turn on, enter 'dbg'\n"; $dbg = $false; } return; } # $s1 = ' ' . $s1 . ' '; # change of 20090801, PMS,ejf $s1 = ' ' . $s1 . ' '; # $s1 = ' . ' . $s1 . ' '; @Linary = split('',$s1); # this is what sandhimain modifies. if (0 eq 1) {print STDOUT "Linary = '",join(',',@Linary),"'\n";} $linmax = length($s1) - 1; # print "linmax = $linmax\n"; chk_point('calling sandhimain'); # return; $Error = 0; sandhimain(); if ($Error ne 0) { print "sandhi error($Error): $s\n"; return ''; }else { my $ans = join('',@Linary); $ans = str_trim($ans); return($ans); } } sub sandhimain { # ejf: following variables declared with 'var' in # procedure sandhi; in SandhiGen.pp. Pascal compiler probably # gives all these a default value at each call of sandhi(); # So, I will do the same here. # Isthana1, Isthana2: sthanatype; # Iyatna1, Iyatna2: yatnatype; # IEnd: lenrange0; # Inext, Inextsp, IPrev, IPrevSpace, Index, I: lenrangeE; # Found, NoSpace, Dhralopa: boolean; # OtherCloseSandhi, Pragrhya, Uttarapada, NxtUttarapada: boolean; $Isthana1 = 0; $Isthana2 = 0; $Iyatna1 = 0; $Iyatna2 = 0; $IEnd = 0; $Index = 0; $Found = $false; $NoSpace = $false; $Dhralopa = $false; $OtherCloseSandhi = $false; $Pragrhya = $false; $Uttarapada = $false; $NxtUttarapada = $false; # - these appear to be used only with the body of Sandhi. # so declare with 'my' my $Inext = 0; my $Inextsp = 0; my $IPrev = 0; my $IPrevSpace = 0; my $I = 0; $PurvaPada = ''; $Pada1 = ''; $Pada2 = ''; $Index = nxtposary($Padbound, $FldChr, 2); #PMS: the first character in $Linary should not be a word boundary $Upasarga = $false; # ejf. if (0 eq 1) {print STDOUT "Index = $Index, Padbound = $Padbound, FldChr=$FldChr\n";} while ($Index > 0) { #PMS: while a padbound character is found $EkahPurvaParayoh = $false; #PMS: PurvaPada, $Pada1, $Pada2 $Uttarapada = $false; if ( $NxtUttarapada ) { $Uttarapada = $true; #PMS: Pada1 is an uttarapada } $NxtUttarapada = $false; #PMS: first $Pada1 in $Linary $PurvaPada = $Pada1; if (0 eq 1) { print STDOUT "PurvaPada = $PurvaPada, Pada1 = $Pada1, NxtPada1 = $NxtPada1, Pada2 = $Pada2, Uttarapada = $Uttarapada, NxtUttarapada = $NxtUttarapada,Compound = $Compound, External = $External , IPrev = $IPrev, Index = $Index \n"; } if ( $IPrev eq 0 ) { #PMS: first $Pada1 in $Linary if ( $Compound ) { $IPrev = lastposary($space, $Index - 1); } $Pada1 = substrary($IPrev + 1, $Index - 1); }elsif ( $External ) { #PMS: we been through here before so $Pada1 = $Pada2; }else { #PMS: padbound=hyphen $Pada1 = $NxtPada1; } if (0 eq 1) { print STDOUT "NOW Pada1 = $Pada1\n"; } $Inext = nxtposary($Padbound, $FldChr, $Index + 1); if (0 eq 1) {print "Inext = $Inext\n";} if ( $Inext eq 0 ) { #PMS: not found so last word $Inext = lengthary() + 1; } if (0 eq 1) { print STDOUT "PurvaPada = $PurvaPada, Pada1 = $Pada1, NxtPada1 = $NxtPada1, Pada2 = $Pada2, Uttarapada = $Uttarapada, NxtUttarapada = $NxtUttarapada,Compound = $Compound, External = $External , IPrev = $IPrev, Index = $Index \n, FldChr = $FldChr, Inextsp = $Inextsp, "; } if ( $External ) { $Pada2 = substrary($Index + 1, $Inext - 1); }else { #PMS: for compound, $Pada2, $NxtPada1 $Inextsp = nxtposary($space, $FldChr, $Index + 1); if ( ($Inextsp > 0) and ($Inextsp < $Inext) ) { $Pada2 = substrary($Index + 1, $Inextsp - 1); }else { $Pada2 = substrary($Index + 1, $Inext - 1); } #PMS: now the next $Pada1 when $padbound =hyphen $IPrevSpace = lastposary($space, $Inext - 1); if (0 eq 1) {print STDOUT "IPrevSpace = $IPrevSpace\n";} if ( $IPrevSpace > $Index ) { $NxtPada1 = substrary($IPrevSpace + 1, $Inext - 1); # corrected }else { $NxtPada1 = $Pada2; $NxtUttarapada = $true; } } #PMS: Pada2, $NxtPada1 hyphen if (0 eq 1) { print STDOUT "PurvaPada = $PurvaPada, Pada1 = $Pada1, NxtPada1 = $NxtPada1, Pada2 = $Pada2, Uttarapada = $Uttarapada, NxtUttarapada = $NxtUttarapada \n"; } #PMS: end of PurvaPada, $Pada1, $Pada2 #PMS: determine whether $Pada1 is an upasarga $Upasarga = $false; if ( $External and ($Pada1 eq 'ut') ) { $Pada1 = 'ud'; } if ( $Pada1 eq 'api' ) { #PMS: more likely karmapravacanIya than upasarga }else { for ($I = 1; $I <= $pradimax;$I++) { if ( $Pada1 eq $Pradi[$I] ) { $Upasarga = $true; $I = $pradimax; #to leave loop } } } #PMS: stem final sound changes for compound sandhi and some special sandhi for grammatical technical terms # ejf: args are globals: ($Linary, $Index, $PurvaPada, $Pada1, $Pada2, $NoStoh, $NoKNam, $Exception, $Pronoun, $OtherCloseSandhi) # ejf note: OtherCloseSandhi. This was called 'CloseSandhi' in # sandhiPrep; I changed name in routine to OtherCloseSandhi. if (0 eq 1) {print STDOUT "calling sandhiPrep: Exception=$Exception, Pada1 = $Pada1\n";} sandhiPrep(); if (0 eq 1) { print STDOUT "Back from sandhiPrep: NoStoh = $NoStoh, NoKNam = $NoKNam, Exception = $Exception, Pronoun = $Pronoun, OtherCloseSandhi = $OtherCloseSandhi \n"; } if ( $Exception ) { goto label7000; #PMS: skip sandhi } if ( $Upasarga and $CloseUpasargaSandhi ) { $OtherCloseSandhi = $true; #PMS: initialized in $sandhiPrep } #PMS: sandhi subroutines: within compound and following an upasarga closer sandhi is observed when an option is allowed #PMS: otherwise (between syntactic units) looser sandhi is observed idudeddvivacanampragrhyam(); #PMS: kosher exceptions to sandhi if ( $Pragrhya ) { goto label7000; #PMS: skip sandhi } if ( ($Linary[$Index - 1] eq $sktvisarga) ) { visargaprep(); } ($Isthana1,$Iyatna1) = identify($Linary[$Index - 1]); ($Isthana2,$Iyatna2) = identify($Linary[$Index + 1]); #PMS: must precede 8.4.40. stoH ScunA ScuH checa(); #PMS: 6.1.73. che ca anmanosca(); #PMS: 6.1.74. ANmANoSca (che 73, tuk 71) if ( ($TukPadantat) ) { padantadva(); #PMS: 6.1.76. padAntAdvA (dIrghAt 75, che 73, tuk 71) } #PMS: must precede vowel sandhi if ( set_memberP($Linary[$Index - 1],$sktn_and_sktsh_and_skts) ) { if ( $Pronoun ) { etattadohsulopo(); #PMS: 6.1.132. etattadoH sulopo 'kor anaYsamAse hali } amnarudharavar(); #PMS: 8.2.70. amnarUdharavarityubhayathA chandasi sasajusoruh(); #PMS: 8.2.66. sasajuzo ruH if ( not $NoStoh ) { #PMS: exception in 63110 ahan(); #PMS: 8.2.68. ahan } atororhasica(); #PMS: 6.1.13. ato ror aplutad aplute. 6.1.14. haSi ca. Must precede 6.1.109. eNaH padAntAd ati } if ( set_memberP($Linary[$Index - 1],$Ac) and set_memberP($Linary[$Index + 1],$Ac) ) { acsandhi(); } elsif ( (set_memberP($Linary[$Index - 1],$Hal_and_ru)) and (set_memberP($Linary[$Index + 1],$Al_and_Linend)) ) { jhalamjasonte(); #PMS: 8.2.39. jhalAM jaSo 'nte naschavyaprasan(); #PMS: 8.3.7. naS chavy apraSAn rori(); #PMS: 8.3.14. ro ri ejf: $Dhralopa is global dhralope(); #PMS: 6.3.111. qhralope pUrvasya dIrgho 'RaH bhobhago(); #PMS: 8.3.17. bhobhagoaghoapUrvasya yo 'Si kharavasanayor(); #PMS: 8.3.15. kharavasAnayor visarjanIyaH otogargyasya(); #PMS: 8.3.20. oto gArgyasya. This cannot precede vowel sandhi monusvarah(); #PMS: 8.3.23. mo 'nusvAraH if ( not $NoKNam ) { namohrasvad(); #PMS: 8.3.32. Namo hrasvAd aci NamuR nityam } visarjaniyasyasah(); #PMS: 8.3.34. visarjanIyasya saH if ( $ScharSchari ) { vasari(); #PMS: 8.3.36. vA Sari } #PMS: 8.3.41, 8.3.45 and 8.3.46 are apavAdas of 8.3.37 so they must precede it idudupadhasya(); #PMS: 8.3.41. idudupadhasya cApratyayasya (kupvoH 37, iRaH zaH 39) nityamsamase(); #PMS: 8.3 .45. nitya samAse 'nutarapadasthasya atahkrkamikamsa(); #PMS: 8.3.46. ataH kfkamikaMsakumbhapAtrakuSAkarRIzvanavyayasya if ( $XkXpKupvoh ) { kupvohXkXpau(); #PMS: 8.3.37. kupvoH XkXpau ca (khari 15). } if ( not $NoStoh ) { stohscunascuh(); #PMS: 8.4.40. stoH ScunA ScuH stunastuh(); #PMS: 8.4.41. zwunA zwuH } torli(); #PMS: 8.4.60. tor li if ( $ChAti ) { saschoti(); #PMS: 8.4.63. SaS cho 'wi. (jhayaH 62, anyatarasyAm 62) } jhayoho(); #PMS: 8.4.62. jhayo ho 'nyatarasyAm kharica(); #PMS: 8.4.55. khari ca if ( $ParaSavarna or $OtherCloseSandhi ) { anusvarasya(); #PMS: 8.4.59. vA padAntasya (anusvArasya yayi parasavarRaH 58). } } if ( (set_memberP($Linary[$Index - 1],$Hal)) and (set_memberP($Linary[$Index + 1],$Al)) ) { #PMS: must follow vowel sandhi lopahsakalyasya(); #PMS: 8.3.19. lopaH SAkalyasya. Must follow 6.1.78. eco 'yavAyAvaH #PMS: If made to include semivowels, 8.4.45 must follow 8.3.19-20. In present form it needn't. if ( $Anunasika or $OtherCloseSandhi ) { yaronunasike(); #PMS: 8.4.45. yaro 'nunAsike 'nunAsiko vA. (padAnta 42) } } label7000: chk_point('label7000a'); if ($dbg) {print "Index = $Index\n";}; #PMS: get rid of the space between words if ( $EkahPurvaParayoh ) { #PMS: EkahPurvaParayoh set in $acsandhi in $subroutines: akahsavarnedirghah, $adgunah, $vrddhireci #PMS: do the same steps if two padbounds in $a row because last sandhi eliminated single char word deletary($Index); $Index = $Index - 1; #PMS: the search for the next padbound begins at $Index+1 }elsif ( ($Index > 1) and $Despace ) { if ( set_memberP($Linary[$Index - 1],$Hal) ) { #PMS: Removed "or Upasarga" deletary($Index); } } if ( $Linary[$Index] eq $hyphen ) { deletary($Index); $Index = $Index - 1; } $IPrev = $Index; $Index = nxtposary($Padbound, $FldChr, $Index + 1); #PMS: find the next pada boundary chk_point('label7000b'); if ($dbg) {print "Index = $Index\n";}; } #PMS: conclude while loop when padbound character is not found ($Index=0) } #PMS: sandhimain 1; #
funderburkjim/ScharfSandhi
perl/sandhi.pm
Perl
mit
70,319
package VS::RuleEngine::Loader::XML; use strict; use warnings; use Carp qw(croak); use Scalar::Util qw(blessed); use XML::LibXML; use VS::RuleEngine::Engine; use VS::RuleEngine::Util qw(is_existing_package); use Object::Tiny qw(_ruleset); our $VERSION = "0.05"; sub _new { my ($pkg) = @_; my $self = bless { _ruleset => {}, }, $pkg; return $self; } sub load_file { my ($self, $path) = @_; my $parser = XML::LibXML->new(); my $doc = $parser->parse_file($path); my $engine = $self->_process_document($doc); return $engine; } sub load_string { my ($self, $xml) = @_; my $parser = XML::LibXML->new(); my $doc = $parser->parse_string($xml); my $engine = $self->_process_document($doc); return $engine; } { my %Node_Handler = ( action => "_process_action", defaults => "_process_defaults", input => "_process_input", output => "_process_output", posthook => "_process_posthook", prehook => "_process_prehook", rule => "_process_rule", ruleset => "_process_ruleset", run => "_process_run", ); sub _process_document { my ($self, $doc) = @_; $self = __PACKAGE__->_new() unless blessed $self; # Clear rulesets $self->{_ruleset} = {}; my $root = $doc->documentElement(); croak ("Expected root node 'engine' but found '", $root->nodeName, "'") if $root->nodeName ne "engine"; my $engine_class = "VS::RuleEngine::Engine"; if ($root->hasAttribute("instanceOf")) { my $class = $root->getAttribute("instanceOf"); if (!is_existing_package($class)) { eval "require ${class};"; croak $@ if $@; } $engine_class = $class; } my $engine = $engine_class->new(); # Iterate over child nodes for my $child ($root->childNodes) { # Skip stuff that's not elements next unless $child->isa("XML::LibXML::Element"); my $name = $child->nodeName; my $handler = $Node_Handler{$name}; croak "Don't know how to handle '${name}'" if !$handler; $self->$handler($child, $engine); } return $engine; } } sub _process_action { my ($self, $action, $engine) = @_; my ($name, $class, $defaults, @args) = $self->_process_std_element($action); $engine->add_action($name => $class, $defaults, @args); }; sub _process_input { my ($self, $input, $engine) = @_; my ($name, $class, $defaults, @args) = $self->_process_std_element($input); $engine->add_input($name => $class, $defaults, @args); }; sub _process_output { my ($self, $output, $engine) = @_; my ($name, $class, $defaults, @args) = $self->_process_std_element($output); $engine->add_output($name => $class, $defaults, @args); }; sub _process_prehook { my ($self, $hook, $engine) = @_; my ($name, $class, $defaults, @args) = $self->_process_std_element($hook); $engine->add_hook($name => $class, $defaults, @args); $engine->add_pre_hook($name); }; sub _process_posthook { my ($self, $hook, $engine) = @_; my ($name, $class, $defaults, @args) = $self->_process_std_element($hook); $engine->add_hook($name => $class, $defaults, @args); $engine->add_post_hook($name); }; sub _process_rule { my ($self, $rule, $engine) = @_; my ($name, $class, $defaults, @args) = $self->_process_std_element($rule); $engine->add_rule($name => $class, $defaults, @args); }; sub _process_defaults { my ($self, $defaults, $engine) = @_; my $name = $defaults->getAttribute("name"); my @args; for my $arg ($defaults->childNodes) { next unless $arg->isa("XML::LibXML::Element"); my $name = $arg->nodeName; my $value = $arg->hasChildNodes ? $arg->textContent : undef; push @args, $name => $value; } my $data = { @args }; $engine->add_defaults($name, $data); } sub _process_ruleset { my ($self, $ruleset, $engine) = @_; my $name = $ruleset->getAttribute("name"); croak "Ruleset '${name}' is already defined" if exists $self->_ruleset->{$name}; # This does not apply to all rules in the engine # but rather to the ones we've added so far when # parsing my @rules; if ($ruleset->hasAttribute("rulesMatchingName")) { my $s = $ruleset->getAttribute("rulesMatchingName"); my $re = qr/$s/; my @matching_rules = sort grep { $_ =~ $re } $engine->rules; push @rules, @matching_rules; } if ($ruleset->hasAttribute("rulesOfClass")) { my $c = $ruleset->getAttribute("rulesOfClass"); my @matching_rules = sort grep { my $rule = $engine->_get_rule($_); UNIVERSAL::isa($rule->_pkg, $c) } $engine->rules; push @rules, @matching_rules; } push @rules, $self->_process_rules($ruleset, $engine); @rules = sort keys %{+{ map { $_ => 1 } @rules }}; $self->_ruleset->{$name} = \@rules; } sub _process_run { my ($self, $run, $engine) = @_; croak "Missing attribute 'action' for element 'run'" unless $run->hasAttribute("action"); my $action = $run->getAttribute("action"); croak "No action named '${action}' exists" unless $engine->has_action($action); my @rules = $self->_process_rules($run, $engine); for my $rule (@rules) { $engine->add_rule_action($rule => $action); } } sub _process_std_element { my ($self, $element) = @_; if (!$element->hasAttribute("name")) { croak $element->nodeName, " is missing mandatory attribute 'name'"; } my $name = $element->getAttribute("name"); if (!$element->hasAttribute("instanceOf")) { croak $element->nodeName, " is missing mandatory attribute 'instanceOf'"; } my $class = $element->getAttribute("instanceOf"); my $defaults = $element->getAttribute("defaults"); $defaults = "" if !defined $defaults; $defaults = [split/,\s*|\s+/, $defaults]; my @args = $self->_process_args($element, $class); return ($name, $class, $defaults, @args); } sub _process_rules { my ($self, $element, $engine) = @_; my @rules; for my $rule ($element->childNodes) { next unless $rule->isa("XML::LibXML::Element"); my $name = $rule->textContent; my $type = $rule->nodeName; ($name) = $name =~ /^\s*(.*?)\s*$/; croak "Empty '${type}' name" if $name eq ''; if ($type eq 'rule') { croak "No rule named '${name}' exists" unless $engine->has_rule($name); push @rules, $name; } elsif ($type eq 'ruleset') { croak "No ruleset named '${name}' exists" if !exists $self->_ruleset->{$name}; push @rules, @{$self->_ruleset->{$name}}; } else { croak "Expected rule or ruleset element but got '${type}'"; } } @rules = sort keys %{+{ map { $_ => 1 } @rules }}; return @rules; } sub _process_args { my ($self, $element, $class) = @_; if (!is_existing_package($class)) { eval "require ${class};"; croak $@ if $@; } if ($class->can("process_xml_loader_args")) { return $class->process_xml_loader_args($element); } my @args; for my $arg ($element->childNodes) { next unless $arg->isa("XML::LibXML::Element"); my $name = $arg->nodeName; my $value = $arg->hasChildNodes ? $arg->textContent : undef; push @args, $name => $value; } return @args; } 1; __END__ =head1 NAME VS::RuleEngine::Loader::XML - Load VS::RuleEngine engine declarations in XML =head1 SYNOPSIS use VS::RuleEngine::Loader::XML; my $engine = VS::RuleEngine::Loader::XML->load_file("my_engine.xml"); $engine->run(); my $other_engine = VS::RuleEngine::Loader::XML->load_string($xml); $other_engine->run(); =head1 DESCRIPTION This module provides a mean to load VS::RuleEngine engine declarations from XML. =head1 INTERFACE =head2 CLASS METHODS =over 4 =item load_file ( PATH ) Loads the engine declaration from I<PATH>. =item load_string ( XML ) Loads the engine declaration from I<XML>. =back =head1 XML Document structure The document root element must be B<< <engine> >>. Valid children are: =over =item * B<< <action> >> - Declares an action. =item * B<< <defaults> >> - Defines a default argument set =item * B<< <input> >> - Declares an input. =item * B<< <output> >> - Declares an output. =item * B<< <rule> >> - Declares a rule. =item * B<< <ruleset> >> - Groups a set of rules under a common name. =item * B<< <run> >> - Connects a set of rules to an action. =back =head2 Action, Input, Output and Rule elements The elements B<< <action> >>, B<< <input> >>, B<< <output> >> and B<< <rule> >> all have the following mandatory attributes: =over 4 =item name The name of the entity to define in the engine. =item instanceOf The class that implements the entity and that'll be instansiated when the engine is runned. =item defaults The default arguments to the entity as defined by a previously declared B<< <defaults> >>. Separate multiple defaults with comma and/or whitespace. =back If the class defined by I<instanceOf> implements the method C<process_xml_loader_args> it will be called as a class method with the C<XML::LibXML::Element>-element as only argument. This method must return a list of arguments that will be passed to the constructor for the class when the entity is instansiated. If no C<process_xml_loader_args> method is available the loader will interpret all children as a hash where the elements name is the key and its text content its value. If a child is an empty element, that is has no children (as in C<< <foo/> >>) its value will be undef. This hash will be passed to the constructor as a hash reference. =head2 Defaults By using the tag B<< <defaults> >> t is possible to declare common arguments that can be reused by multiple entities. Its children will be interpreted as key/value pairs. The required attribute 'name' defines the name for the defaults. =head2 Rulesets By using the tag B<< <ruleset> >> it is possible to give a set of rules a shared name that can later be used when binding together rules and actions. The attribute I<name> is always expected and is used to give the ruleset its name which can be referenced later on by other rulesets or ruleE<lt>-E<gt>action mappings. To specify what rules to include it expects B<< <rule>name of rule</rule >> and/or B<< <ruleset>name of ruleset</ruleset> >> elements as children. Any other element will result in an error. In addition to specifying specific rules or contens of other rulesets it is also possible to include the rules that matches the criteria specified by the attributes: =over 4 =item rulesMatchingName Include all rules that matches the name by the given Perl5 regular expression. =item rulesOfClass Include all rules which inherits from the given class. =back Note, if both attributes above are present it does not create a ruleset with the rule that matches both (i.e a union). =head2 Connecting rules and actions To connect an action to a rule use the B<< <run> >> element. It expects the attribute I<action> which must be the name of an already defined action. Which rules to invoke the action on is specified with children of type B<< <rule>name of rule</rule >> and/or B<< <ruleset>name of ruleset</ruleset> >>. Any other element will result in an error. =head1 SEE ALSO L<VS::RuleEngine> =head1 BUGS AND LIMITATIONS Please report any bugs or feature requests to C<bug-vs-ruleengine-loader-xml@rt.cpan.org>, or through the web interface at L<http://rt.cpan.org>. =head1 AUTHOR Claes Jakobsson C<< <claesjac@cpan.org> >> =head1 LICENCE AND COPYRIGHT Copyright (c) 2007 - 2008, Versed Solutions C<< <info@versed.se> >>. All rights reserved. This software is released under the MIT license cited below. =head2 The "MIT" License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. =cut
gitpan/VS-RuleEngine-Loader-XML
lib/VS/RuleEngine/Loader/XML.pm
Perl
mit
13,434
#!/usr/bin/perl use strict; use warnings; use File::Spec (); use File::Temp '&tempfile'; use File::Copy '&move'; { my ( $path, $version ) = @ARGV; chomp $path; chomp $version; exit 1 unless $path and $version; exit 2 unless $version > 0; my @list = &get_files( $path ); while( defined( my $file = shift @list ) ) { &change_version_for_file( $file, $version ); } } exit 0; sub change_version_for_file { my ( $file, $version ) = @_; if( open( my $rfh, '<', $file ) ) { binmode( $rfh, ':utf8' ); my ( $wfh, $new_file ) = &tempfile(); while( defined( my $line = readline( $rfh ) ) ) { $line =~ s/^(our\s+\$VERSION\s+\=\s+).+?(\;\s+\#\#\s+VERSION)/$1$version$2/; print $wfh $line; } close( $rfh ); close( $wfh ); &move( $new_file, $file ); } return; } sub get_files { my $path = shift; my @out = (); if( opendir( my $dh, $path ) ) { my @list = readdir( $dh ); closedir( $dh ); while( defined( my $node = shift @list ) ) { chomp $node; next if substr( $node, 0, 1 ) eq '.'; my $new_path = File::Spec -> catfile( $path, $node ); if( -d $new_path ) { push @out, &get_files( $new_path ); } elsif( -f $new_path ) { next if substr( $node, -3, 3 ) ne '.pm'; push @out, $new_path; } } } return @out; }
kainwinterheart/salvation-macroprocessor
set_version.pl
Perl
mit
1,306
%Example 1 (3 copies). 12046 new rule occurrences covered. Corpus coverage: 5/3242 (0.15%) sent('what is the carbon dioxide level and temperature at crew hatch'). %Example 2 (1 copies). 2219 new rule occurrences covered. Corpus coverage: 44/3242 (1.36%) sent('measure temperature and carbon dioxide at storage according to the p s a sensors'). %Example 3 (538 copies). 1743 new rule occurrences covered. Corpus coverage: 582/3242 (17.95%) sent(yes). %Example 4 (15 copies). 974 new rule occurrences covered. Corpus coverage: 699/3242 (21.56%) sent('what was the temperature at the access ladder at fifteen oh two according to the fixed sensors'). %Example 5 (1 copies). 906 new rule occurrences covered. Corpus coverage: 756/3242 (23.32%) sent('go to the storage lockers and measure the carbon dioxide level'). %Example 6 (1 copies). 738 new rule occurrences covered. Corpus coverage: 1163/3242 (35.87%) sent('okay turn on the fan at the crew hatch'). %Example 7 (14 copies). 666 new rule occurrences covered. Corpus coverage: 1325/3242 (40.87%) sent('close all three doors'). %Example 8 (1 copies). 585 new rule occurrences covered. Corpus coverage: 1377/3242 (42.47%) sent('ten minutes'). %Example 9 (7 copies). 426 new rule occurrences covered. Corpus coverage: 1530/3242 (47.19%) sent('move to lower deck'). %Example 10 (1 copies). 323 new rule occurrences covered. Corpus coverage: 1725/3242 (53.21%) sent('measure temperature and carbon dioxide at mid deck flight deck pilots seat and commanders seat'). %Example 11 (1 copies). 284 new rule occurrences covered. Corpus coverage: 1813/3242 (55.92%) sent('is radiation at crew hatch increasing'). %Example 12 (1 copies). 207 new rule occurrences covered. Corpus coverage: 1841/3242 (56.79%) sent('do it for all three decks'). %Example 13 (1 copies). 187 new rule occurrences covered. Corpus coverage: 1946/3242 (60.02%) sent('and according to the p s a'). %Example 14 (1 copies). 142 new rule occurrences covered. Corpus coverage: 2027/3242 (62.52%) sent('measure the carbon dioxide and temperature here'). %Example 15 (1 copies). 141 new rule occurrences covered. Corpus coverage: 2092/3242 (64.53%) sent('is carbon dioxide level decreasing at storage'). %Example 16 (1 copies). 99 new rule occurrences covered. Corpus coverage: 2140/3242 (66.01%) sent('what was the temperature at fifteen oh six in the storage locker'). %Example 17 (15 copies). 86 new rule occurrences covered. Corpus coverage: 2181/3242 (67.27%) sent('switch it off'). %Example 18 (83 copies). 83 new rule occurrences covered. Corpus coverage: 2264/3242 (69.83%) sent(stop). %Example 19 (1 copies). 79 new rule occurrences covered. Corpus coverage: 2281/3242 (70.36%) sent('what was it one minute ago'). %Example 20 (2 copies). 73 new rule occurrences covered. Corpus coverage: 2335/3242 (72.02%) sent('open the door'). %Example 21 (72 copies). 72 new rule occurrences covered. Corpus coverage: 2407/3242 (74.24%) sent(yeah). %Example 22 (1 copies). 65 new rule occurrences covered. Corpus coverage: 2420/3242 (74.65%) sent('is the fan switched on'). %Example 23 (1 copies). 57 new rule occurrences covered. Corpus coverage: 2474/3242 (76.31%) sent('what \'s the pressure'). %Example 24 (1 copies). 57 new rule occurrences covered. Corpus coverage: 2516/3242 (77.61%) sent('check c o two with p s a sensor'). %Example 25 (1 copies). 45 new rule occurrences covered. Corpus coverage: 2527/3242 (77.95%) sent('two thirty'). %Example 26 (1 copies). 44 new rule occurrences covered. Corpus coverage: 2568/3242 (79.21%) sent('turn on all the fans'). %Example 27 (2 copies). 39 new rule occurrences covered. Corpus coverage: 2607/3242 (80.41%) sent('how about the temperature'). %Example 28 (1 copies). 35 new rule occurrences covered. Corpus coverage: 2636/3242 (81.31%) sent('what is the carbon dioxide and temperature in sleep according to the fixed sensors'). %Example 29 (1 copies). 33 new rule occurrences covered. Corpus coverage: 2665/3242 (82.20%) sent('do the same for the other two decks'). %Example 30 (1 copies). 32 new rule occurrences covered. Corpus coverage: 2688/3242 (82.91%) sent('what is the carbon dioxide level here according to the fixed sensor and the p s a'). %Example 31 (1 copies). 30 new rule occurrences covered. Corpus coverage: 2710/3242 (83.59%) sent('what are the temperature and carbon dioxide levels at the storage locker'). %Example 32 (27 copies). 27 new rule occurrences covered. Corpus coverage: 2737/3242 (84.42%) sent(whatever). %Example 33 (2 copies). 27 new rule occurrences covered. Corpus coverage: 2764/3242 (85.26%) sent('measure the radiation and close the crew hatch'). %Example 34 (27 copies). 27 new rule occurrences covered. Corpus coverage: 2791/3242 (86.09%) sent(continue). %Example 35 (1 copies). 24 new rule occurrences covered. Corpus coverage: 2813/3242 (86.77%) sent('what was the temperature at the crew hatch at fifteen oh five'). %Example 36 (1 copies). 23 new rule occurrences covered. Corpus coverage: 2836/3242 (87.48%) sent('what is carbon dioxide level and temperature at storage lockers'). %Example 37 (1 copies). 23 new rule occurrences covered. Corpus coverage: 2842/3242 (87.66%) sent('measure again'). %Example 38 (21 copies). 21 new rule occurrences covered. Corpus coverage: 2863/3242 (88.31%) sent(sure). %Example 39 (18 copies). 18 new rule occurrences covered. Corpus coverage: 2881/3242 (88.86%) sent(no). %Example 40 (9 copies). 16 new rule occurrences covered. Corpus coverage: 2897/3242 (89.36%) sent('what is the carbon dioxide level at the current location'). %Example 41 (1 copies). 15 new rule occurrences covered. Corpus coverage: 2906/3242 (89.64%) sent('now do the same measurements at the storage lockers'). %Example 42 (14 copies). 14 new rule occurrences covered. Corpus coverage: 2920/3242 (90.07%) sent('do that again'). %Example 43 (2 copies). 12 new rule occurrences covered. Corpus coverage: 2932/3242 (90.44%) sent('go to the storage lockers and open them'). %Example 44 (12 copies). 12 new rule occurrences covered. Corpus coverage: 2944/3242 (90.81%) sent(affirmative). %Example 45 (1 copies). 11 new rule occurrences covered. Corpus coverage: 2955/3242 (91.15%) sent('what is the temperature at the sleep stations'). %Example 46 (1 copies). 11 new rule occurrences covered. Corpus coverage: 2965/3242 (91.46%) sent('what about the c oh two'). %Example 47 (10 copies). 10 new rule occurrences covered. Corpus coverage: 2975/3242 (91.76%) sent('that \'s right'). %Example 48 (1 copies). 10 new rule occurrences covered. Corpus coverage: 2978/3242 (91.86%) sent('can you repeat that'). %Example 49 (2 copies). 8 new rule occurrences covered. Corpus coverage: 2984/3242 (92.04%) sent('is the temperature stable at the access ladder'). %Example 50 (1 copies). 7 new rule occurrences covered. Corpus coverage: 2989/3242 (92.20%) sent('check both at flight deck'). %Example 51 (1 copies). 6 new rule occurrences covered. Corpus coverage: 2991/3242 (92.26%) sent('which doors are closed'). %Example 52 (1 copies). 6 new rule occurrences covered. Corpus coverage: 2996/3242 (92.41%) sent('what was the temperature at the storage locker at fifteen hundred six'). %Example 53 (2 copies). 6 new rule occurrences covered. Corpus coverage: 2998/3242 (92.47%) sent('what is the temperature where you are'). %Example 54 (1 copies). 5 new rule occurrences covered. Corpus coverage: 3003/3242 (92.63%) sent('what is temperature and carbon dioxide level at mid deck and lower deck'). %Example 55 (1 copies). 5 new rule occurrences covered. Corpus coverage: 3006/3242 (92.72%) sent('measure the carbon dioxide level and then the temperature at the lower deck mid deck and then the flight deck'). %Example 56 (2 copies). 4 new rule occurrences covered. Corpus coverage: 3010/3242 (92.84%) sent('what was the temperature five minutes ago'). %Example 57 (1 copies). 4 new rule occurrences covered. Corpus coverage: 3014/3242 (92.97%) sent('turn the fan off at the access ladder'). %Example 58 (1 copies). 4 new rule occurrences covered. Corpus coverage: 3018/3242 (93.09%) sent('is the temperature rising'). %Example 59 (3 copies). 4 new rule occurrences covered. Corpus coverage: 3022/3242 (93.21%) sent('is the fan on'). %Example 60 (3 copies). 3 new rule occurrences covered. Corpus coverage: 3025/3242 (93.31%) sent('what is the temperature and the carbon dioxide level here'). %Example 61 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3028/3242 (93.40%) sent('twenty two thirty'). %Example 62 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3031/3242 (93.49%) sent('twenty three thirty'). %Example 63 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3034/3242 (93.58%) sent('twenty thirty'). %Example 64 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3037/3242 (93.68%) sent('twenty one thirty'). %Example 65 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3040/3242 (93.77%) sent('twelve thirty'). %Example 66 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3043/3242 (93.86%) sent('thirteen thirty'). %Example 67 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3046/3242 (93.95%) sent('ten sixteen'). %Example 68 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3049/3242 (94.05%) sent('ten seventeen'). %Example 69 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3052/3242 (94.14%) sent('ten nineteen'). %Example 70 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3055/3242 (94.23%) sent('ten fourteen'). %Example 71 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3058/3242 (94.32%) sent('ten eleven'). %Example 72 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3061/3242 (94.42%) sent('ten eighteen'). %Example 73 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3064/3242 (94.51%) sent('move to storage area'). %Example 74 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3067/3242 (94.60%) sent('measure the temperature carbon dioxide and radiation'). %Example 75 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3070/3242 (94.69%) sent('measure the temperature at the pilots seat and at the commanders seat'). %Example 76 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3073/3242 (94.79%) sent('measure the temperature at the flight deck access ladder according to the p s a'). %Example 77 (1 copies). 3 new rule occurrences covered. Corpus coverage: 3076/3242 (94.88%) sent('is the hatch closed'). %Example 78 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3078/3242 (94.94%) sent('what is the temperature and the carbon dioxide level here according to the p s a sensor'). %Example 79 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3080/3242 (95.00%) sent('what is the temperature and the carbon dioxide at the pilots seat according to the fixed sensors'). %Example 80 (2 copies). 2 new rule occurrences covered. Corpus coverage: 3082/3242 (95.06%) sent('what is the carbon dioxide level there'). %Example 81 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3084/3242 (95.13%) sent('twenty six minutes'). %Example 82 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3086/3242 (95.19%) sent('twenty seven minutes'). %Example 83 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3088/3242 (95.25%) sent('twenty nine minutes'). %Example 84 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3090/3242 (95.31%) sent('twenty four minutes'). %Example 85 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3092/3242 (95.37%) sent('twenty five minutes'). %Example 86 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3094/3242 (95.43%) sent('twenty eight minutes'). %Example 87 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3096/3242 (95.50%) sent('thirty two minutes'). %Example 88 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3098/3242 (95.56%) sent('thirty three minutes'). %Example 89 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3100/3242 (95.62%) sent('thirty six minutes'). %Example 90 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3102/3242 (95.68%) sent('thirty seven minutes'). %Example 91 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3104/3242 (95.74%) sent('thirty one minutes'). %Example 92 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3106/3242 (95.81%) sent('thirty nine minutes'). %Example 93 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3108/3242 (95.87%) sent('thirty four minutes'). %Example 94 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3110/3242 (95.93%) sent('thirty five minutes'). %Example 95 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3112/3242 (95.99%) sent('thirty eight minutes'). %Example 96 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3114/3242 (96.05%) sent('ten oh three'). %Example 97 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3116/3242 (96.11%) sent('ten oh seven'). %Example 98 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3118/3242 (96.18%) sent('ten oh one'). %Example 99 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3120/3242 (96.24%) sent('ten oh nine'). %Example 100 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3122/3242 (96.30%) sent('ten oh four'). %Example 101 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3124/3242 (96.36%) sent('ten oh eight'). %Example 102 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3126/3242 (96.42%) sent('ten forty two'). %Example 103 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3128/3242 (96.48%) sent('ten forty three'). %Example 104 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3130/3242 (96.55%) sent('ten forty six'). %Example 105 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3132/3242 (96.61%) sent('ten forty seven'). %Example 106 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3134/3242 (96.67%) sent('ten forty one'). %Example 107 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3136/3242 (96.73%) sent('ten forty nine'). %Example 108 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3138/3242 (96.79%) sent('ten forty four'). %Example 109 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3140/3242 (96.85%) sent('ten forty five'). %Example 110 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3142/3242 (96.92%) sent('ten forty eight'). %Example 111 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3144/3242 (96.98%) sent('ten forty'). %Example 112 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3146/3242 (97.04%) sent('ten fifty two'). %Example 113 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3148/3242 (97.10%) sent('ten fifty three'). %Example 114 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3150/3242 (97.16%) sent('ten fifty six'). %Example 115 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3152/3242 (97.22%) sent('ten fifty seven'). %Example 116 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3154/3242 (97.29%) sent('ten fifty one'). %Example 117 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3156/3242 (97.35%) sent('ten fifty nine'). %Example 118 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3158/3242 (97.41%) sent('ten fifty four'). %Example 119 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3160/3242 (97.47%) sent('ten fifty five'). %Example 120 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3162/3242 (97.53%) sent('ten fifty eight'). %Example 121 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3164/3242 (97.59%) sent('ten fifty'). %Example 122 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3166/3242 (97.66%) sent('seven thirty'). %Example 123 (2 copies). 2 new rule occurrences covered. Corpus coverage: 3168/3242 (97.72%) sent('repeat for all three decks'). %Example 124 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3170/3242 (97.78%) sent('nine thirty'). %Example 125 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3172/3242 (97.84%) sent('move to sleep station'). %Example 126 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3174/3242 (97.90%) sent('measure the temperature for the two seats'). %Example 127 (2 copies). 2 new rule occurrences covered. Corpus coverage: 3176/3242 (97.96%) sent('measure the temperature at crew hatch access ladder storage storage lockers and lower deck'). %Example 128 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3178/3242 (98.03%) sent('measure the carbon dioxide and the temperature at storage storage lockers and lower deck'). %Example 129 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3179/3242 (98.06%) sent('measure everything'). %Example 130 (2 copies). 2 new rule occurrences covered. Corpus coverage: 3181/3242 (98.12%) sent('go to storage lockers and measure'). %Example 131 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3183/3242 (98.18%) sent('four thirty'). %Example 132 (1 copies). 2 new rule occurrences covered. Corpus coverage: 3185/3242 (98.24%) sent('eight thirty'). %Example 133 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3186/3242 (98.27%) sent('what was the temperature at the storage lockers at fifteen zero six'). %Example 134 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3187/3242 (98.30%) sent('what was the temperature at the commanders seat one minute ago'). %Example 135 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3188/3242 (98.33%) sent('what was the temperature at fifteen hundred'). %Example 136 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3189/3242 (98.37%) sent('what is the temperature at the access hatch'). %Example 137 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3190/3242 (98.40%) sent('what is the temperature and carbon dioxide level here according to the fixed sensors'). %Example 138 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3191/3242 (98.43%) sent('what is the carbon dioxide level at this'). %Example 139 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3192/3242 (98.46%) sent('what is the c o two reading'). %Example 140 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3193/3242 (98.49%) sent('what are the temperature and carbon dioxide level at the commanders seat'). %Example 141 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3194/3242 (98.52%) sent('sixty two minutes'). %Example 142 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3195/3242 (98.55%) sent('sixty three minutes'). %Example 143 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3196/3242 (98.58%) sent('sixty six minutes'). %Example 144 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3197/3242 (98.61%) sent('sixty seven minutes'). %Example 145 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3198/3242 (98.64%) sent('sixty one minutes'). %Example 146 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3199/3242 (98.67%) sent('sixty nine minutes'). %Example 147 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3200/3242 (98.70%) sent('sixty minutes'). %Example 148 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3201/3242 (98.74%) sent('sixty four minutes'). %Example 149 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3202/3242 (98.77%) sent('sixty five minutes'). %Example 150 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3203/3242 (98.80%) sent('sixty eight minutes'). %Example 151 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3204/3242 (98.83%) sent('seventy two minutes'). %Example 152 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3205/3242 (98.86%) sent('seventy three minutes'). %Example 153 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3206/3242 (98.89%) sent('seventy six minutes'). %Example 154 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3207/3242 (98.92%) sent('seventy seven minutes'). %Example 155 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3208/3242 (98.95%) sent('seventy one minutes'). %Example 156 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3209/3242 (98.98%) sent('seventy nine minutes'). %Example 157 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3210/3242 (99.01%) sent('seventy minutes'). %Example 158 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3211/3242 (99.04%) sent('seventy four minutes'). %Example 159 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3212/3242 (99.07%) sent('seventy five minutes'). %Example 160 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3213/3242 (99.11%) sent('seventy eight minutes'). %Example 161 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3214/3242 (99.14%) sent('open the pod bay doors'). %Example 162 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3215/3242 (99.17%) sent('one hundred minutes'). %Example 163 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3216/3242 (99.20%) sent('oh oh thirty'). %Example 164 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3217/3242 (99.23%) sent('ninety two minutes'). %Example 165 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3218/3242 (99.26%) sent('ninety three minutes'). %Example 166 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3219/3242 (99.29%) sent('ninety six minutes'). %Example 167 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3220/3242 (99.32%) sent('ninety seven minutes'). %Example 168 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3221/3242 (99.35%) sent('ninety one minutes'). %Example 169 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3222/3242 (99.38%) sent('ninety nine minutes'). %Example 170 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3223/3242 (99.41%) sent('ninety minutes'). %Example 171 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3224/3242 (99.44%) sent('ninety four minutes'). %Example 172 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3225/3242 (99.48%) sent('ninety five minutes'). %Example 173 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3226/3242 (99.51%) sent('ninety eight minutes'). %Example 174 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3227/3242 (99.54%) sent('measure the temperature at the flight deck the mid deck and the lower deck'). %Example 175 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3228/3242 (99.57%) sent('measure the temperature and carbon dioxide level at storage and crew hatch and lower deck'). %Example 176 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3229/3242 (99.60%) sent('measure the temperature and carbon dioxide and radiation'). %Example 177 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3230/3242 (99.63%) sent('is the fan at crew hatch turned on'). %Example 178 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3231/3242 (99.66%) sent('is the crew hatch open'). %Example 179 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3232/3242 (99.69%) sent('eighty two minutes'). %Example 180 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3233/3242 (99.72%) sent('eighty three minutes'). %Example 181 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3234/3242 (99.75%) sent('eighty six minutes'). %Example 182 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3235/3242 (99.78%) sent('eighty seven minutes'). %Example 183 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3236/3242 (99.81%) sent('eighty one minutes'). %Example 184 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3237/3242 (99.85%) sent('eighty nine minutes'). %Example 185 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3238/3242 (99.88%) sent('eighty minutes'). %Example 186 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3239/3242 (99.91%) sent('eighty four minutes'). %Example 187 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3240/3242 (99.94%) sent('eighty five minutes'). %Example 188 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3241/3242 (99.97%) sent('eighty eight minutes'). %Example 189 (1 copies). 1 new rule occurrences covered. Corpus coverage: 3242/3242 (100.00%) sent('do the same thing at the storage lockers').
TeamSPoon/logicmoo_workspace
packs_sys/logicmoo_nlu/ext/regulus/Examples/PSA/corpora/psa_rationalised_corpus.pl
Perl
mit
24,975
package LogReporter::Filter::Date; use Moose::Role; use namespace::autoclean; #extends 'LogReporter::Filter'; requires 'filter'; 1;
imMute/LogReporter
lib/LogReporter/Filter/Date.pm
Perl
mit
134
:-include(adventure). %room connections are symmetric connection(X,Y):-door(X,Y). connection(X,Y):-door(Y,X). %Write only the first name or description found write_name(Object):-name(Object,N),write(N),!. write_short(Object):-short_desc(Object,Desc),write(Desc),!. write_long(Object):-long_desc(Object,Desc),write(Desc),!. %List out all child objects of a location (may be a room or a container list_things(Place):-location(X,Place),tab(2),write_name(X),write(" -"),tab(1),write_short(X),nl,fail. list_things(_). %List out all child objects of inventory list_inventory(Thing):-has(Thing),tab(2),write_name(Thing),write(" -"),tab(1),write_short(Thing),nl,fail. list_inventory(_). %List out all connections of a room list_connections(Place):-connection(X,Place),tab(2),write_name(X),write(" -"),tab(1),write_short(X),nl,fail. list_connections(_). %Unchecked (always successful) version of look action look(Place):-room(Place),write_name(Place),write(" :"),nl,write_long(Place),nl, write('You see: '),nl,list_things(Place),write('You can go to: '),nl,list_connections(Place),!. look(Container):-container(Container),write_name(Container),write(" :"),nl,write_short(Container),nl,write("It seems there may be something inside."),!. look(Thing):-write_name(Thing),write(" :"),nl,write_short(Thing),!. %Look with no arguments means look here. look:-here(Place),look(Place). %Recursively determine if a thing is in a location is_here(Thing,Location):-location(Thing,Container),is_here(Container, Location). is_here(Thing,Location):-Thing == Location,!. %Checked version of look action c_look(Thing):-here(X),is_here(Thing,X),look(Thing),!. c_look(Place):-here(Place),look(Place),!. c_look(Inv_item):-has(Inv_item),look(Inv_item),!. c_look(Container):-container(Container),location(Container,X),here(X),look(Container),!. %Unchecked version of move action teleport(Place):-retract(here(_)),assert(here(Place)),!. %Checked version of move action move(Place):-here(Current),connection(Current,Place),teleport(Place),!. %Completely unchecked Take summon(Thing):-assert(has(Thing)),retract(location(Thing,_)). %Unchecked Take take(Thing):-not(heavy(Thing)),assert(has(Thing)),retract(location(Thing,_)),!,nl,write("You obtained: "),write(Thing),write("."),!. %Checked Take c_take(Thing):-not(heavy(Thing)),here(X),is_here(Thing,X),take(Thing),!. c_take(Thing, Container):-location(Thing,Container),here(X),is_here(Container,X),take(Thing),!. c_take(Thing, Container):-has(Container),take(Thing),!. %Unchecked Put: put the thing in the room you're in. place(Thing):-has(Thing),retract(has(Thing)),here(Place),assert(location(Thing,Place)). place(Thing,Location):-retract(has(Thing)),assert(location(Thing,Location)). %Checked put: if in player's location, put thing c_place(Thing,Location):-here(Location),place(Thing,Location),!. c_place(Thing,Container):-container(Container),has(Container),place(Thing,Container),!. c_place(Thing,Container):-container(Container),here(X),is_here(Container,X),place(Thing,Container),!. %Unchecked (always successful) version of study action study(Place):-room(Place),look(Place),!. study(Container):-container(Container),write_name(Container),write(" :"),nl,write_long(Container),nl,list_things(Container),!. study(Thing):-write_name(Thing),write(" :"),nl,write_long(Thing),!. %Checked version of study action c_study(Item):-here(X),is_here(Item,X),study(Item),!. c_study(Item):-has(Item),study(Item),!. %Inventory inventory:-list_inventory(_),!. %allows prefix notation so 'look bedroom.' is the same as 'look(bedroom).' :-op(40,fx,look). :-op(45,fx,study).
davidbrowning/4700
cs4700/projects/prolog/adventure/week2.pl
Perl
mit
3,602
#!/usr/bin/perl # robust_good_groups.pl # finds all groups of Bb, Bvv and Bo that are consistently identified across IVs use strict; use warnings; my $groups_in = "groups_1.5_GoodGroups.txt"; my $test1_in = "groups_0.5.txt"; my $test2_in = "groups_5.0.txt"; my $groups_out = "RobustGroups_4tax.txt"; my $ingroups; my $test; my $outgroups; my $contig; my @array; my @bombina_core; my @outputarray; my @testgroup; my $target; my $i; my $j; open ($ingroups, "< $groups_in") or die "Can't find $groups_in.\n"; open ($outgroups, "> $groups_out") or die "Can't create $groups_out.\n"; $i = 0; while (my $line = <$ingroups>) { chomp ($line); @array = split(" ",$line); while (@array) { $contig = shift (@array); # the list of regexes in the following line must match the analogous list further down in test_if_robust() push (@bombina_core, $contig) unless ($contig =~ m/Xtr/ || $contig =~ m/G_/); push (@outputarray, $contig) unless ($contig =~ m/G_/); } @bombina_core = sort {$a cmp $b} @bombina_core; if (@bombina_core == 0) { print "for group $i the core array is empty\n"; die; } my $drop = 0; $drop = test_if_robust ($test1_in); $drop = test_if_robust ($test2_in); if (!($drop)) { foreach $contig (@outputarray) { print $outgroups "$contig "; } print $outgroups "\n"; } $i++; if ($i % 10 == 0) { print "$i\t"; } @bombina_core = (); @outputarray = (); } close ($ingroups); close ($outgroups); sub test_if_robust { my @newarray = (); my @testarray; my $nomatch = 0; my $infilename = $_[0]; open ($test, "< $infilename") or die "Can't open $infilename.\n"; while (my $testline = <$test>) { chomp ($testline); if ($testline =~ m/\Q$bombina_core[0]\E/) { @newarray = split (" ",$testline); last; } } close ($test); if (@newarray == 0) { $nomatch = 1 } else { while (@newarray) { my $ct = shift (@newarray); push (@testarray, $ct) unless ($ct =~ m/Xtr/ || $ct =~ m/G_/); } if (@bombina_core != @testarray) { $nomatch = 1 } else { @testarray = sort {$a cmp $b} @testarray; for (my $j=0;$j < @bombina_core; $j++) { if (!($bombina_core[$j] eq $testarray[$j])) { $nomatch = 1; last; } } } } @testarray = (); return $nomatch; }
beanurn/orthoset
robust_good_groups.pl
Perl
mit
2,248
=head1 LICENSE Copyright (c) 1999-2011 The European Bioinformatics Institute and Genome Research Limited. All rights reserved. This software is distributed under a modified Apache license. For license details, please see http://www.ensembl.org/info/about/code_licence.html =head1 CONTACT Please email comments or questions to the public Ensembl developers list at <dev@ensembl.org>. Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>. =cut # # Ensembl module for Bio::EnsEMBL::Variation::DBSQL::VariationAdaptor # # Copyright (c) 2004 Ensembl # # You may distribute this module under the same terms as perl itself # # =head1 NAME Bio::EnsEMBL::Variation::DBSQL::VariationAdaptor =head1 SYNOPSIS $reg = 'Bio::EnsEMBL::Registry'; $reg->load_registry_from_db(-host => 'ensembldb.ensembl.org',-user => 'anonymous'); $va = $reg->get_adaptor("human","variation","variation"); $pa = $reg->get_adaptor("human","variation","population"); $va = $db->get_VariationAdaptor(); $pa = $db->get_PopulationAdaptor(); # Get a Variation by its internal identifier $var = $va->fetch_by_dbID(145); # fetch a variation by its name $var = $va->fetch_by_name('rs100'); # check if the variation is failed and if so, get the failed description if ($var->is_failed()) { $desc = $var->failed_description(); } # fetch all variations from a population $pop = $pa->fetch_by_name('PACIFIC'); @vars = {$va->fetch_all_by_Population($pop)}; # Modify the include_failed_variations flag in DBAdaptor to also return variations that have been flagged as failed $va->db->include_failed_variations(1); # Fetch all variations from a population, including variations flagged as failed @vars = {$va->fetch_all_by_Population($pop)}; =head1 DESCRIPTION This adaptor provides database connectivity for Variation objects. Variations (SNPs, etc.) may be retrieved from the Ensembl variation database by several means using this module. =head1 METHODS =cut use strict; use warnings; package Bio::EnsEMBL::Variation::DBSQL::VariationAdaptor; use Bio::EnsEMBL::Variation::DBSQL::BaseAdaptor; use Bio::EnsEMBL::Utils::Exception qw(throw warning); use Bio::EnsEMBL::Utils::Scalar qw(assert_ref check_ref wrap_array); use Bio::EnsEMBL::Variation::Variation; use Bio::EnsEMBL::Variation::Allele; use Bio::EnsEMBL::Utils::Iterator; use DBI qw(:sql_types); our @ISA = ('Bio::EnsEMBL::Variation::DBSQL::BaseAdaptor'); my $DEFAULT_ITERATOR_CACHE_SIZE = 10000; =head2 fetch_all Description: Returns a listref of all germline variations Returntype : listref of Variations Status : At risk =cut sub fetch_all { my $self = shift; my $constraint = 'v.somatic = 0'; return $self->generic_fetch($constraint); } =head2 fetch_all_somatic Description: Returns a listref of all somatic variations Returntype : listref of Variations Status : At risk =cut sub fetch_all_somatic { my $self = shift; my $constraint = 'v.somatic = 1'; return $self->generic_fetch($constraint); } =head2 fetch_Iterator Arg [1] : int $cache_size (optional) Example : $var_iterator = $var_adaptor->fetch_Iterator; Description: returns an iterator over all germline variations in the database Returntype : Bio::EnsEMBL::Utils::Iterator Exceptions : none Caller : general Status : Experimental =cut sub fetch_Iterator { my ($self, $cache_size) = @_; return $self->_generic_fetch_Iterator($cache_size, 'v.somatic = 0'); } =head2 fetch_Iterator_somatic Arg [1] : int $cache_size (optional) Example : $var_iterator = $var_adaptor->fetch_Iterator; Description: returns an iterator over all somatic variations in the database Returntype : Bio::EnsEMBL::Utils::Iterator Exceptions : none Caller : general Status : Experimental =cut sub fetch_Iterator_somatic { my ($self, $cache_size) = @_; return $self->_generic_fetch_Iterator($cache_size, 'v.somatic = 1'); } sub _generic_fetch_Iterator { my ($self, $cache_size, $constraint) = @_; my $full_constraint = $constraint ? $constraint.' AND '.$self->db->_exclude_failed_variations_constraint : $self->db->_exclude_failed_variations_constraint; # prepare and execute a query to fetch all dbIDs my $sth = $self->prepare(qq{ SELECT v.variation_id FROM (variation v, source s) LEFT JOIN failed_variation fv on v.variation_id = fv.variation_id WHERE v.source_id = s.source_id AND $full_constraint }); $sth->execute; my $var_id; $sth->bind_columns(\$var_id); # we probably can't fit all of these into memory at once though, # so create an iterator that fetches $cache_size dbIDs from the # statement handle at a time and then fetches these objects, # storing them in a cache. We then return variation objects # from this cache one by one, before filling it again if # necessary $cache_size ||= $DEFAULT_ITERATOR_CACHE_SIZE; my @cache; my $items_to_fetch = 1; return Bio::EnsEMBL::Utils::Iterator->new(sub{ if (@cache == 0 && $items_to_fetch) { # our cache is empty, and there are still items to fetch, so # fetch the next chunk of dbIDs and create objects from them my @dbIDs; my $item_count = 0; while( $sth->fetch ) { push @dbIDs, $var_id; if (++$item_count == $cache_size) { # we have fetched a cache's worth of dbIDs, so flag that # there are still items to fetch and last out of the loop $items_to_fetch = 1; last; } # if this is the last row, this flag will be 0 outside the loop $items_to_fetch = 0; } $sth->finish unless $items_to_fetch; @cache = @{ $self->fetch_all_by_dbID_list(\@dbIDs) } if @dbIDs; } return shift @cache; }); } =head2 fetch_by_dbID Arg [1] : int $dbID Example : $var = $var_adaptor->fetch_by_dbID(5526); Description: Retrieves a Variation object via its internal identifier. If no such variation exists undef is returned. Returntype : Bio::EnsEMBL::Variation::Variation Exceptions : throw if dbID arg is not defined Caller : general, IndividualAdaptor Status : Stable =cut sub fetch_by_dbID { my $self = shift; my $dbID = shift; # This method uses the flanking_sequence table $self->{'_check_flanking'} = 1; # Now, it should be fine to just use the superclass method my $result = $self->SUPER::fetch_by_dbID($dbID); # Unset the flanking flag delete($self->{'_check_flanking'}); return $result; } sub _columns { my $self = shift; my @cols = ( "v.variation_id", "v.name AS v_name", "v.validation_status AS v_validation_status", "v.class_attrib_id AS v_class_attrib_id", "s1.name AS v_source_name", "s1.description AS v_source_description", "s1.url AS v_source_url", "s1.type AS v_source_type", "v.somatic AS v_somatic", "v.ancestral_allele AS v_ancestral_allele", "vs.moltype AS vs_moltype", "vs.name AS vs_name", "s2.name AS vs_source_name" ); if ($self->{'_check_flanking'}) { push(@cols,qq{(fs.up_seq is not null OR fs.down_seq is not null) AS fs_flank_flag}); } else { push(@cols,qq{0 AS fs_flank_flag}); } return @cols; } sub _tables { my $self = shift; my @tables = ( ['variation', 'v'], ['source', 's1'], ['variation_synonym', 'vs'], ['source', 's2'] ); # If we are constraining on sample_id, add the allele table push(@tables,['allele', 'a']) if ($self->{'_constrain_sample'}); # Add the flanking_sequence table if we are checking that push(@tables,['flanking_sequence', 'fs']) if ($self->{'_check_flanking'}); # Add the failed_variation table if we are filtering on those push(@tables,['failed_variation', 'fv']) unless ($self->db->include_failed_variations()); return @tables; } sub _left_join { my $self = shift; my @left_join = ( ['variation_synonym', 'v.variation_id = vs.variation_id'], ['source s2', 'vs.source_id = s2.source_id'] ); # If we are checking flanking_sequences, left join to that table push(@left_join,['flanking_sequence', 'v.variation_id = fs.variation_id']) if ($self->{'_check_flanking'}); # If we are filtering on failed variations, left join push(@left_join,['failed_variation', 'v.variation_id = fv.variation_id']) unless ($self->db->include_failed_variations()); return @left_join; } sub _default_where_clause { my $self = shift; my $constraint = qq{ s1.source_id = v.source_id }; # If we are constraining on sample_id, we should have a constraint on the allele tables as well $constraint .= qq{ AND a.variation_id = v.variation_id } if ($self->{'_constrain_sample'}); return $constraint; } =head2 fetch_by_name Arg [1] : string $name Arg [2] : string $source (optional) Example : $var = $var_adaptor->fetch_by_name('rs1453'); Description: Retrieves a variation object via its name Returntype : Bio::EnsEMBL::Variation::Variation Exceptions : throw if name argument is not defined Caller : general Status : Stable =cut sub fetch_by_name { my $self = shift; my $name = shift; my $source = shift; throw('name argument expected') if(!defined($name)); # This method will need to left join to the flanking sequence table so set that flag $self->{'_check_flanking'} = 1; # Add a constraint on the name my $constraint = qq{v.name = ?}; # If a source is given, add a constraint on the source $constraint .= qq{ AND s1.name = ?} if ( defined $source ); # Bind the parameters $self->bind_param_generic_fetch($name,SQL_VARCHAR); $self->bind_param_generic_fetch($source,SQL_VARCHAR) if ( defined $source ); # Get the results from generic fetch method my $result = $self->generic_fetch($constraint); # Unset the check flanking flag again delete($self->{'_check_flanking'}); # We need to check the synonym table in case the name was not found in the variation table unless (scalar(@{$result})) { # Call the fetch by synonym method $result = wrap_array($self->fetch_by_synonym($name,$source)); } # If we still can't find any result and the name looks like an ssId, try fetching by subsnp_id instead unless (scalar(@{$result}) || $name !~ m/^ss\d+$/) { $result = wrap_array($self->fetch_by_subsnp_id($name)); } # Return the result return undef unless (scalar(@{$result})); return $result->[0]; } # Internal method for getting the internal dbIDs for a list of names. Will also query the variation_synonym and allele (for subsnp_ids) tables sub _name_to_dbID { my $self = shift; my $name_list = shift; my $synonym = shift; my $subsnp = shift; $name_list = wrap_array($name_list); throw ("A list of names is required") unless (scalar(@{$name_list})); # Use a hash to store the name to dbID mapping my %dbIDs; # Determine which columns we are returning my $cols = ($synonym && $subsnp ? "CONCAT('ss',v.subsnp_id) AS name, v.variation_id" : "v.name, v.variation_id"); # Determine which table we are querying my $table = ($synonym ? ($subsnp ? 'allele' : 'variation_synonym') : 'variation'); # Statement to get the dbIDs from variation or variation_synonym my $stmt = qq{ SELECT $cols FROM $table v WHERE }; my $sth; # Work on batches of $batch_size; my $batch_size = 200; # Make a local copy of the list to work on my $local_list = [@{$name_list}]; while (scalar(@{$local_list})) { # Get the next batch and construct the constraint my @names = splice(@{$local_list},0,$batch_size); my $constraint = "('" . join("','",@names) . "')"; $constraint = ($synonym && $subsnp ? "v.subsnp_id" : "v.name") . qq{ IN $constraint}; # Prepare a statement $sth = $self->prepare($stmt . qq{ $constraint }); $sth->execute(); # Fetch the results and populate the hash my ($name,$dbID); $sth->bind_columns(\$name,\$dbID); while ($sth->fetch()) { $dbIDs{$name} = $dbID; } } # If we are querying variation and have unmapped names, also query variation_synonym and allele if (!$synonym || !$subsnp) { # Get the unmapped names my @unmapped = grep {!exists($dbIDs{$_})} @{$name_list}; # If we are going to query for subsnp_ids, get the names that look like ssIds and strip the ss prefix if ($synonym) { @unmapped = grep {$_ =~ s/^ss(\d+)$/$1/} @unmapped; } # Get the dbID mapping from the synonym table and add them to the hash if there are unmapped if (scalar(@unmapped)) { my $names = $self->_name_to_dbID(\@unmapped,1,$synonym); map {$dbIDs{$_} = $names->{$_}} keys(%{$names}); } } # Return a hashref with the name -> dbID mapping return \%dbIDs; } sub fetch_by_synonym { my $self = shift; my $name = shift; my $source = shift; # Do a query to get the current variation for the synonym and call a fetch method on this variation my $constraint = qq{vs.name = ?}; $constraint .= qq{ AND s.name = ?} if (defined($source)); # This statement will only return 1 row which is consistent with the behaviour of fetch_by_name. # However, the synonym name is only guaranteed to be unique in combination with the source my $stmt = qq{ SELECT vs.variation_id FROM variation_synonym vs JOIN source s ON ( s.source_id = vs.source_id ) WHERE $constraint LIMIT 1 }; my $sth = $self->prepare($stmt); $sth->bind_param(1,$name,SQL_VARCHAR); $sth->bind_param(2,$source,SQL_VARCHAR) if (defined($source)); $sth->execute(); # Bind the results my $dbID; $sth->bind_columns(\$dbID); # Fetch the results $sth->fetch(); # Return undef in case no data could be found return undef unless (defined($dbID)); # Call the fetch_by_name method using the updated name for the synonym return $self->fetch_by_dbID($dbID); } =head2 fetch_by_subsnp_id Arg [1] : string $subsnp_id Example : $var = $var_adaptor->fetch_by_subsnp_id('ss123'); Description: Retrieves a variation object via a component subsnp ID Returntype : Bio::EnsEMBL::Variation::Variation Exceptions : throw if name argument is not defined Caller : general Status : Stable =cut sub fetch_by_subsnp_id { my $self = shift; my $name = shift; throw('name argument expected') if(!defined($name)); # Strip away any ss prefix $name =~ s/^ss//gi; # This method will need to left join to the flanking sequence table so set that flag $self->{'_check_flanking'} = 1; # Add a constraint on the subsnp_id my $constraint = qq{a.subsnp_id = ?}; # Bind the parameters $self->bind_param_generic_fetch($name,SQL_INTEGER); # Get the results from generic fetch method my $result = $self->generic_fetch($constraint); # Unset the check flanking flag again delete($self->{'_check_flanking'}); # Return the result return undef unless (scalar(@{$result})); return $result->[0]; } =head2 fetch_all_by_source Arg [1] : string $source_name Arg [2] : int $primary Example : $var = $var_adaptor->fetch_all_by_source(); Description: Retrieves all Variation objects associated with a source. By default ($primary=0) returns variations that have the source or variation_synonym that have the source. If primary set to 1, it returns only variations where the primary name is associated with the source Returntype : listref of Bio::EnsEMBL::Variation::Variation Exceptions : thrown if source_name not provided Caller : general Status : Stable =cut sub fetch_all_by_source { my $self = shift; my $source_name = shift; my $primary = shift; throw('name argument expected') unless (defined($source_name)); # By default, returns ALL variation and variation_synonyms where source = $name $primary ||= 0; # Add the constraint on the source name. If primary is true, only the variation source will be queried, otherwise the variation_synonym source will be as well my $constraint = qq{s1.name = ?}; $constraint = qq{($constraint OR s2.name = ?)} unless ($primary); # If necessary, add the constraint for filtering failed variations $constraint .= qq{ AND } . $self->db->_exclude_failed_variations_constraint(); # Bind the source name parameter $self->bind_param_generic_fetch($source_name,SQL_VARCHAR); $self->bind_param_generic_fetch($source_name,SQL_VARCHAR); # Execute the superclass generic fetch return $self->generic_fetch($constraint); } =head2 fetch_all_by_source_type Arg [1] : string $source_type Arg [2] : int $primary Example : $var = $var_adaptor->fetch_all_by_source_type('chip'); Description: Retrieves all Variation objects associated with a type of source. By default ($primary=0) returns variations that have the source or variation_synonym that have the source. If primary set to 1, it returns only variations where the primary name is associated with the source Returntype : listref of Bio::EnsEMBL::Variation::Variation Exceptions : thrown if source_type not provided Caller : general Status : At risk =cut sub fetch_all_by_source_type { my $self = shift; my $source_type = shift; my $primary = shift; throw('name argument expected') unless (defined($source_type)); # Get the source names that match the type my $stmt = qq{ SELECT name FROM source WHERE type = ? }; my $sth = $self->prepare($stmt); $sth->bind_param(1,$source_type,SQL_VARCHAR); $sth->execute(); # Fetch the results from one source at a time. This should probably be implemented in a more efficient manner. my $name; $sth->bind_columns(\$name); # Store in a hash to avoid duplicates my %out; while ($sth->fetch()) { my $result = $self->fetch_all_by_source($name,$primary); next unless (scalar(@{$result})); # Add the fetched results to the total hash map {$out{$_->dbID()} = $_} @{$result}; } # Return the reference to the list of variations return [values(%out)]; } =head2 fetch_all_by_dbID_list Arg [1] : reference to list of ints $list Example : @vars = @{$va->fetch_all_by_dbID_list([124, 56, 90])}; Description: Retrieves a set of variations via their internal identifiers. This is faster than repeatedly calling fetch_by_dbID if there are a large number of variations to retrieve Returntype : reference to list of Bio::EnsEMBL::Variation::Variation objects Exceptions : throw on bad argument Caller : general, IndividualGenotypeAdaptor, PopulationGenotypeAdaptor Status : At Risk =cut sub fetch_all_by_dbID_list { my $self = shift; my $list = shift; # Get an Iterator for the list my $iterator = $self->fetch_Iterator_by_dbID_list($list); # Get an arrayref representing the contents of the Iterator my $result = $iterator->to_arrayref(); return $result; } =head2 fetch_Iterator_by_dbID_list Arg [1] : reference to list of ints $list Example : $variation_iterator = $va->fetch_Iterator_by_dbID_list([124, 56, 90]); Description: Retrieves an iterator over a set of variations via their internal identifiers. Returntype : Bio::EnsEMBL::Utils::Iterator Exceptions : throw on bad argument Caller : general Status : Experimental =cut sub fetch_Iterator_by_dbID_list { my ($self, $dbid_list, $cache_size) = @_; unless ((defined $dbid_list) && (ref $dbid_list eq 'ARRAY')) { throw("list reference argument is required"); } $cache_size ||= $DEFAULT_ITERATOR_CACHE_SIZE; # create an iterator that fetches variations in blocks of # $cache_size and returns them in turn my @object_cache; return Bio::EnsEMBL::Utils::Iterator->new(sub { if (@object_cache == 0 && @$dbid_list > 0 ) { my @dbids = splice @$dbid_list, 0, $cache_size; # Create a constraint on the dbIDs my $id_str = "(" . join(",",@dbids) . ")"; my $constraint = qq{v.variation_id IN $id_str}; @object_cache = @{ $self->generic_fetch($constraint) }; } return shift @object_cache; } ); } =head2 fetch_all_by_name_list Arg [1] : reference to list of names $list Example : @vars = @{$va->fetch_all_by_name_list(["rs3", "rs1333049"])}; Description: Retrieves a set of variations via their names. This is faster than repeatedly calling fetch_by_name if there are a large number of variations to retrieve Returntype : reference to list of Bio::EnsEMBL::Variation::Variation objects Exceptions : throw on bad argument Caller : general Status : At Risk =cut sub fetch_all_by_name_list { my $self = shift; my $list = shift; # Get a list of dbIDs for the names my $dbIDs = $self->_name_to_dbID($list); # Then fetch the variations by dbID list instead my @dbID_list = values(%{$dbIDs}); return $self->fetch_all_by_dbID_list(\@dbID_list); } =head2 get_all_sources Args : none Example : $sources = $va->get_all_sources(); Description : Retrieves from the database all sources in the Source table ReturnType : array ref of string Exceptions : none Caller : web Status : At Risk =cut sub get_all_sources{ my $self = shift; my @sources; my $source_name; my $sth = $self->prepare(qq{SELECT name from source }); $sth->execute(); $sth->bind_columns(\$source_name); while ($sth->fetch()){ push @sources, $source_name } $sth->finish(); return \@sources; } =head2 get_default_source Args : none Example : $default_source = $va->get_default_source(); Description : Retrieves from the database the default source used for display purposes ReturnType : string Exceptions : none Caller : web Status : At Risk =cut sub get_default_source{ my $self = shift; my $source_name; my $sth = $self->prepare(qq{SELECT meta_value from meta where meta_key = ? }); $sth->bind_param(1,'source.default_source',SQL_VARCHAR); $sth->execute(); $sth->bind_columns(\$source_name); $sth->fetch(); $sth->finish(); return $source_name; } =head2 get_source_version Arg[1] : string $name Example : $version = $va->get_source_version('dbSNP'); Description : Retrieves from the database the version for the source given as an argument ReturnType : int Exceptions : none Caller : general Status : At Risk =cut sub get_source_version{ my $self = shift; my $name = shift; my $version; my $sth = $self->prepare(qq{SELECT version from source where name = ? }); $sth->bind_param(1,$name,SQL_VARCHAR); $sth->execute(); $sth->bind_columns(\$version); $sth->fetch(); $sth->finish(); return $version; } =head2 get_flanking_sequence Arg[1] : int $variationID Example : $flankinq_sequence = $va->get_flanking_sequence('652'); Description : Retrieves from the database the appropriate flanking sequence (five,three) for the variation. If the flanking sequence is not in the Flankinq_sequence table, access the core database with the coordinates ReturnType : reference to a list containing (three_flank,five_flank) Exceptions : throw when not possible to obtain sequence Caller : general, Variation Status : Stable =cut sub get_flanking_sequence{ my $self = shift; my $variationID = shift; my $flanking_sequence; #reference to an array for the three_prime and five_prime seqs my ($seq_region_id, $seq_region_strand, $up_seq, $down_seq, $up_seq_region_start, $up_seq_region_end, $down_seq_region_start, $down_seq_region_end); my $sth = $self->prepare(qq{ SELECT seq_region_id, seq_region_strand, up_seq, down_seq, up_seq_region_start, up_seq_region_end, down_seq_region_start, down_seq_region_end FROM flanking_sequence WHERE variation_id = ? }); $sth->bind_param(1,$variationID,SQL_INTEGER); $sth->execute(); #retrieve the flank from the variation database $sth->bind_columns(\($seq_region_id, $seq_region_strand, $up_seq, $down_seq, $up_seq_region_start, $up_seq_region_end, $down_seq_region_start, $down_seq_region_end)); $sth->fetch(); $sth->finish(); if (!defined $down_seq){ if( $seq_region_id){ $down_seq = $self->_get_flank_from_core($seq_region_id, $down_seq_region_start, $down_seq_region_end, $seq_region_strand); } else { warn( "*****[ERROR]: No seq_region_id for SNP with dbID: $variationID. ". "Cannot retrieve flanking region******\n" ); } } if (!defined $up_seq){ if( $seq_region_id){ $up_seq = $self->_get_flank_from_core($seq_region_id, $up_seq_region_start, $up_seq_region_end, $seq_region_strand); } else { warn( "*****[ERROR]: No seq_region_id for SNP with dbID: $variationID. ". "Cannot retrieve flanking region******\n" ); } } push @{$flanking_sequence},$down_seq,$up_seq; #add to the array the 3 and 5 prime sequences return $flanking_sequence; } =head2 fetch_all_by_Population Arg [1] : Bio::EnsEMBL::Variation::Population Arg [2] : $minimum_frequency (optional) Example : $pop = $pop_adaptor->fetch_by_dbID(1345); @vars = @{$va_adaptor->fetch_all_by_Population($pop)}; Description: Retrieves all variations which are stored for a specified population. If $minimum_frequency is supplied, only variations with a minor allele frequency (MAF) greater than $minimum_frequency will be returned. Returntype : listref of Bio::EnsEMBL::Variation::Variation Exceptions : throw on incorrect argument Caller : general Status : At Risk =cut sub fetch_all_by_Population { my $self = shift; my $pop = shift; my $freq = shift; assert_ref($pop,'Bio::EnsEMBL::Variation::Population'); if(!defined($pop->dbID())) { warning("Cannot retrieve genotypes for population without set dbID"); return []; } # Constraint the query using the sample_id for the population my $constraint = qq{a.sample_id = ?}; # adjust frequency if given a percentage if (defined($freq)) { $freq /= 100 if $freq > 1; $constraint .= qq{ AND (IF(a.frequency > 0.5, 1-a.frequency, a.frequency) > ?) }; } # Add the constraint for failed variations $constraint .= " AND " . $self->db->_exclude_failed_variations_constraint(); # Bind the parameters $self->bind_param_generic_fetch($pop->dbID(),SQL_INTEGER); $self->bind_param_generic_fetch($freq,SQL_DOUBLE) if (defined($freq)); # Set the flag to indicate that we are constraining on population and should not left join to allele $self->{'_constrain_sample'} = 1; # Execute the generic fetch my $result = $self->generic_fetch($constraint); # Unset the flag delete($self->{'_constrain_sample'}); return $result; } =head2 fetch_all_by_VariationSet Arg [1] : Bio::EnsEMBL::Variation::VariationSet Example : @vars = @{$va_adaptor->fetch_all_by_VariationSet($vs)}; Description: Retrieves all variations which are present in a specified variation set and its subsets. Returntype : listref of Bio::EnsEMBL::Variation::Variation Exceptions : throw on incorrect argument Caller : general Status : At Risk =cut sub fetch_all_by_VariationSet { my $self = shift; return $self->_generic_fetch_by_VariationSet(0, @_); } =head2 fetch_Iterator_by_VariationSet Arg [1] : Bio::EnsEMBL::Variation::VariationSet Example : $var_iterator = $va_adaptor->fetch_Iterator_by_VariationSet($vs); Description: Retrieves an iterator for all variations which are present in a specified variation set and its subsets. Returntype : Bio::EnsEMBL::Utils::Iterator object Exceptions : throw on incorrect argument Caller : general Status : Experimental =cut sub fetch_Iterator_by_VariationSet { my $self = shift; my $set = shift; my $cache_size = shift || $DEFAULT_ITERATOR_CACHE_SIZE; # First, get ids for all subsets, my @var_set_ids = ($set->dbID); map {push(@var_set_ids,$_->dbID())} @{$set->adaptor->fetch_all_by_super_VariationSet($set)}; my $var_set_id = join(",",@var_set_ids); # Prepare a query for getting the span of variation_ids my $stmt = qq{ FROM variation_set_variation vsv LEFT JOIN failed_variation fv ON ( fv.variation_id = vsv.variation_id ) WHERE vsv.variation_set_id IN ($var_set_id) }; # Add the constraint for failed variations my $constraint = " AND " . $self->db->_exclude_failed_variations_constraint(); my $sth = $self->prepare(qq{SELECT MIN(vsv.variation_id), MAX(vsv.variation_id) $stmt $constraint}); $sth->execute(); my ($min_variation_id,$max_variation_id); $sth->bind_columns(\$min_variation_id,\$max_variation_id); $sth->fetch(); $max_variation_id ||= 0; $min_variation_id ||= 1; # Prepare a statement for getting the ids in a range $sth = $self->prepare(qq{SELECT vsv.variation_id $stmt AND vsv.variation_id BETWEEN ? AND ? $constraint}); # Internally, we keep an Iterator that works on the dbID span we're at my $iterator; return Bio::EnsEMBL::Utils::Iterator->new(sub { # If the iterator is empty, get a new chunk of dbIDs, unless we've fetched all dbIDs unless (defined($iterator) && $iterator->has_next() && $min_variation_id <= $max_variation_id) { # Get the next chunk of dbIDs $sth->execute($min_variation_id,$min_variation_id+$cache_size); $min_variation_id += ($cache_size + 1); # Use a hash to keep track of the seen dbIDs my %seen; # Loop over the dbIDs and avoid duplicates my $dbID; my @dbIDs; $sth->bind_columns(\$dbID); while ($sth->fetch()) { push (@dbIDs,$dbID) unless ($seen{$dbID}++); } # Get a new Iterator based on the new dbID span $iterator = $self->fetch_Iterator_by_dbID_list(\@dbIDs); } return $iterator->next(); }); } sub _generic_fetch_by_VariationSet { my $self = shift; my $want_iterator = shift; my $set = shift; assert_ref($set,'Bio::EnsEMBL::Variation::VariationSet'); if(!defined($set->dbID())) { warning("Cannot retrieve variations for variation set without a dbID"); return []; } # Get the unique dbIDs for all variations in this set and all of its subsets my $dbid_list = $self->_fetch_all_dbIDs_by_VariationSet($set); my $num_vars = @$dbid_list; if ($num_vars > 100_000 && !$want_iterator) { warn "This set contains a large number ($num_vars) of variations, these may not fit". "into memory at once, considering using fetch_Iterator_by_VariationSet instead"; } # Use the dbIDs to get all variations and return them return $want_iterator ? $self->fetch_Iterator_by_dbID_list($dbid_list) : $self->fetch_all_by_dbID_list($dbid_list); } sub _fetch_all_dbIDs_by_VariationSet { my $self = shift; my $set = shift; # First, get ids for all subsets, my @var_set_ids = ($set->dbID); foreach my $var_set (@{$set->adaptor->fetch_all_by_super_VariationSet($set)}) { push @var_set_ids, $var_set->dbID; } my $set_str = "(" . join(",",@var_set_ids) .")"; # Add the constraint for failed variations my $constraint = " AND " . $self->db->_exclude_failed_variations_constraint(); # Then get the dbIDs for all these sets my $stmt = qq{ SELECT DISTINCT vsv.variation_id FROM variation_set_variation vsv LEFT JOIN failed_variation fv ON ( fv.variation_id = vsv.variation_id ) WHERE vsv.variation_set_id in $set_str $constraint }; my $sth = $self->prepare($stmt); $sth->execute(); my @result; my $dbID; $sth->bind_columns(\$dbID); while ($sth->fetch()) { push @result, $dbID; } return \@result; } =head2 is_failed Description : DEPRECATED. The appropriate subroutine on the Variation/Allele object should be used instead. Exceptions : Thrown on invocation. Status : DEPRECATED =cut sub is_failed { my $self = shift; throw("The is_failed subroutine in VariationAdaptor is deprecated. Use the appropriate subroutine on the Variation/Allele object instead"); } =head2 has_failed_subsnps Description : DEPRECATED. Use has_failed_alleles on the Variation object instead. Exceptions : Thrown on invocation. Status : DEPRECATED =cut sub has_failed_subsnps { my $self = shift; throw("The has_failed_subsnps subroutine in VariationAdaptor is deprecated. Use has_failed_alleles on the Variation object instead"); } =head2 get_all_failed_descriptions Arg[1] : Bio::EnsEMBL::Variation::Variation $variation The variation object to get the failed descriptions for Example : my $failed_descriptions = $adaptor->get_all_failed_descriptions($var); if (scalar(@{$failed_descriptions})) { print "The variation '" . $var->name() . "' has been flagged as failed because '" . join("' and '",@{$failed_descriptions}) . "'\n"; } Description : Gets the unique descriptions for the reasons why the supplied variation has failed. ReturnType : reference to a list of strings Exceptions : none Caller : general Status : At Risk =cut sub get_all_failed_descriptions { my $self = shift; my $variation = shift; # Call the internal get method without any constraints my $description = $self->_internal_get_failed_descriptions($variation) || []; return $description; } =head2 get_failed_description Description : DEPRECATED. The appropriate subroutine on the Variation/Allele object should be used instead. Exceptions : Thrown on invocation. Status : DEPRECATED =cut sub get_failed_description { my $self = shift; throw("The get_failed_description subroutine in VariationAdaptor is deprecated. Use the appropriate subroutine on the Variation/Allele object instead"); } # API-internal method for getting failed descriptions for a variation sub _internal_get_failed_descriptions { my $self = shift; my $variation = shift; my $constraint = shift; # Assert that the object passed is a Variation assert_ref($variation,'Bio::EnsEMBL::Variation::Variation'); my $stmt = qq{ SELECT DISTINCT fd.description FROM failed_variation fv JOIN failed_description fd ON ( fd.failed_description_id = fv.failed_description_id ) WHERE fv.variation_id = ? }; $stmt .= qq{ AND $constraint } if (defined($constraint)); my $sth = $self->prepare($stmt); $sth->execute($variation->dbID()); return [map {$_->[0]} @{$sth->fetchall_arrayref([0])}]; } sub _get_flank_from_core{ my $self = shift; my $seq_region_id = shift; my $seq_region_start = shift; my $seq_region_end = shift; my $seq_region_strand = shift; my $flanking_sequence; if (defined $self->db()->dnadb()){ my $slice_adaptor = $self->db()->dnadb()->get_SliceAdaptor(); my $slice = $slice_adaptor->fetch_by_seq_region_id($seq_region_id); if (!$slice){ throw("Not possible to obtain slice for seq_region_id \"$seq_region_id\"\n"); } my $flank = $slice->subseq($seq_region_start,$seq_region_end,$seq_region_strand); return $slice->subseq($seq_region_start,$seq_region_end,$seq_region_strand); } return ''; } sub _objs_from_sth { my ($self, $sth) = @_; my %row; # Create the row hash using column names as keys $sth->bind_columns( \( @row{ @{$sth->{NAME_lc} } } )); while ($sth->fetch) { # we don't actually store the returned object because # the _obj_from_row method stores them in a temporary # hash _temp_objs in $self $self->_obj_from_row(\%row); } # Get the created objects from the temporary hash my @objs = values %{ $self->{_temp_objs} }; delete $self->{_temp_objs}; # If the flag for attaching allele objects was set, trigger loading of them by calling the getter method on the variation object if ($self->{_load_alleles}) { map {$_->get_all_Alleles()} @objs; } # Return the created objects return \@objs; } sub _obj_from_row { my ($self, $row) = @_; return undef unless $row->{variation_id}; # If the variation for this variation_id hasn't already been created, do that my $obj = $self->{_temp_objs}{$row->{variation_id}}; unless (defined($obj)) { # Get the validation status my @states; if (defined($row->{v_validation_status})) { @states = split(/,/,$row->{v_validation_status}); } # Create the variation object $obj = Bio::EnsEMBL::Variation::Variation->new( -dbID => $row->{variation_id}, -ADAPTOR => $self, -NAME => $row->{v_name}, -SOURCE => $row->{v_source_name}, -SOURCE_DESCRIPTION => $row->{v_source_description}, -SOURCE_URL => $row->{v_source_url}, -SOURCE_TYPE => $row->{v_source_type}, -IS_SOMATIC => $row->{v_somatic}, -ANCESTRAL_ALLELE => $row->{v_ancestral_allele}, -MOLTYPE => $row->{vs_moltype}, -VALIDATION_STATES => \@states, -FLANK_FLAG => $row->{fs_flank_flag}, -CLASS_SO_TERM => $self->AttributeAdaptor()->attrib_value_for_id($row->{v_class_attrib_id}) ); $self->{_temp_objs}{$row->{variation_id}} = $obj; } # Add a synonym if available if (defined($row->{vs_source_name}) && defined($row->{vs_name})) { $obj->add_synonym($row->{vs_source_name},$row->{vs_name}); } } =head2 load_alleles Arg[1] : boolean $load A flag determining whether to load alleles at the same time as Variations are created (1) or to lazy-load them (0 = default) Example : # Tell the VariationAdaptor to load alleles when creating variations my $variation_adaptor->load_alleles(1); my $variation = $variation_adaptor->fetch_by_dbID(1); Description : Sets the behaviour when it comes to fetching alleles at the time of object creation or on demand. This setting will be in effect for all fetch methods for the lifespan of the adaptor or until reset. ReturnType : none Exceptions : none Caller : general Status : At Risk =cut sub load_alleles { my $self = shift; $self->{_load_alleles} = defined(shift); } 1;
adamsardar/perl-libs-custom
EnsemblAPI/ensembl-variation/modules/Bio/EnsEMBL/Variation/DBSQL/VariationAdaptor.pm
Perl
apache-2.0
40,833
use Test::More; use POSIX ":sys_wait_h"; use AE; use Promises qw(deferred); my $es = do "es_async.pl"; my $cxn_class = ref $es->transport->cxn_pool->cxns->[0]; ok wait_for( $es->info ), "$cxn_class - Info before fork"; my $Kids = 4; my %pids; for my $child ( 1 .. $Kids ) { my $pid = fork(); if ($pid) { $pids{$pid} = $child; next; } if ( !defined $pid ) { skip "fork() not supported"; done_testing; last; } for ( 1 .. 100 ) { wait_for( $es->info ); } exit; } my $ok = 0; for ( 1 .. 10 ) { my $pid = waitpid( -1, WNOHANG ); if ( $pid > 0 ) { delete $pids{$pid}; $ok++ unless $?; redo; } last unless keys %pids; sleep 1; } is $ok, $Kids, "$cxn_class - Fork"; done_testing; #=================================== sub wait_for { #=================================== my $promise = shift; my $cv = AE::cv; $promise->done( $cv, sub { $cv->croak } ); $cv->recv; }
gitpan/Search-Elasticsearch-Async
t/lib/es_async_fork.pl
Perl
apache-2.0
1,014
#!/usr/bin/perl -w ############################################################ # # $Id$ # mod_perl.pl - Example script bundled as part of RRD::Simple # # Copyright 2006 Nicola Worthington # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ############################################################ umask(0022); use 5.8.3; use strict; use LWP::UserAgent; use RRD::Simple "1.34"; use RRDs; use File::Spec; use Socket; use File::Spec::Functions qw(catdir); use Time::HiRes qw(); use constant TIMEOUT => 5; use constant RRDDIR => '/var/tmp'; use constant IMGDIR => '/var/tmp'; use constant HOSTS => qw( mod_perl1.london.company.com mod_perl2.london.company.com mod_perl3.london.company.com mod_perl1.paris.company.com mod_perl2.paris.company.com ); use vars qw($VERSION $DEBUG $VERBOSE); $VERSION = '0.02' || sprintf('%d', q$Revision$ =~ /(\d+)/g); $DEBUG = $ENV{DEBUG} ? 1 : 0; $VERBOSE = $ENV{VERBOSE} ? 1 : 0; $| = 1; $RRD::Simple::DEFAULT_DSTYPE = 'GAUGE'; our $ua = user_agent(); our $rrd = new RRD::Simple; for my $host (sort loc_server HOSTS) { my $logs = {}; TRACE("Processing $host ..."); my $start_time = Time::HiRes::time(); my $msg = "Processing $host"; $VERBOSE && printf('%s %s ', $msg, '.' x (79 - length($msg) - 10)); my ($status,$scoreboard) = parse_apache_status($ua, "http://$host:80/server-status?auto"); my ($modules) = parse_perl_status($ua, "http://$host:80/perl-status?inc"); $logs = parse_statlogs($ua, "http://$host:80/perl/statlogs.pl") unless keys(%{$logs}); my %rrdfile = ( status => catdir(RRDDIR,"$host-status.rrd"), scoreboard => catdir(RRDDIR,"$host-scoreboard.rrd"), modules => catdir(RRDDIR,"$host-modules.rrd"), logs => catdir(RRDDIR,"$host-logs.rrd"), ); if (keys %{$status}) { $status->{ReqPerSec} = $status->{TotalAccesses}; $status->{KBPerSec} = $status->{TotalkBytes}; if (!-f $rrdfile{status}) { my %def = %{$status}; for (keys %def) { $def{$_} = $_ =~ /^ReqPerSec|KBPerSec$/i ? 'DERIVE' : 'GAUGE'; } eval { $rrd->create($rrdfile{status}, %def); RRDs::tune($rrdfile{status},'-i','ReqPerSec:0','-d','ReqPerSec:DERIVE'); RRDs::tune($rrdfile{status},'-i','KBPerSec:0','-d','KBPerSec:DERIVE'); }; warn $@ if $@; } eval { $rrd->update($rrdfile{status}, %{$status}); }; warn $@ if $@; generate_graphs($rrdfile{status},$host) unless $@; } if (keys %{$scoreboard}) { eval { $rrd->update($rrdfile{scoreboard}, %{$scoreboard}); }; warn $@ if $@; generate_graphs($rrdfile{scoreboard},$host) unless $@; } if (keys %{$logs}) { if (!-f $rrdfile{logs}) { eval { $rrd->create($rrdfile{logs}, map {($_=>'DERIVE')} keys %{$logs})); RRDs::tune($rrdfile{logs},'-i',"$_:0") for $rrd->sources($rrdfile{logs}); }; warn $@ if $@; } eval { $rrd->update($rrdfile{logs}, map {($_=>$logs->{$_})} keys %{$logs})); }; warn $@ if $@; generate_graphs($rrdfile{logs},$host) unless $@; } if (keys %{$modules}) { eval { $rrd->update($rrdfile{modules}, %{$modules}); }; warn $@ if $@; generate_graphs($rrdfile{modules},$host) unless $@; } $VERBOSE && printf("[%6.2f]\n", Time::HiRes::time() - $start_time); } exit; ##################################### # Subs init sub loc_server { (split(/\./,$a))[1] cmp (split(/\./,$b))[1] || ($a =~ /^mod_perl(\d+)/)[0] <=> ($b =~ /^mod_perl(\d+)/)[0] } sub generate_graphs { my ($rrdfile,$host) = @_; eval { if ($rrdfile =~ /status/) { $rrd->graph($rrdfile, basename => "$host-status-total", destination => IMGDIR, title => "$host Total x", vertical_label => 'Total x', sources => [ grep(/Total|Uptime/i,$rrd->sources($rrdfile)) ], line_thickness => 2, ); $rrd->graph($rrdfile, basename => "$host-status-bytes2", destination => IMGDIR, title => "$host x/Sec", vertical_label => 'x/Sec', sources => [ grep(/KBPerSec|ReqPerSec/i,$rrd->sources($rrdfile)) ], line_thickness => 2, ); $rrd->graph($rrdfile, basename => "$host-status-bytes", destination => IMGDIR, title => "$host Bytes/x", vertical_label => 'Bytes/x', sources => [ grep(/BytesPerSec|BytesPerReq/i,$rrd->sources($rrdfile)) ], line_thickness => 2, ); $rrd->graph($rrdfile, basename => "$host-status-servers", destination => IMGDIR, title => "$host Servers", vertical_label => 'Children + Load', sources => [ grep(/Servers|CPULoad/i,$rrd->sources($rrdfile)) ], line_thickness => 2, ); } elsif ($rrdfile =~ /scoreboard/) { $rrd->graph($rrdfile, destination => IMGDIR, title => "$host Scoreboard", line_thickness => 2, vertical_label => 'Apache Children', source_colors => [ qw( FF0000 00FF00 0000FF FFFF00 00FFFF FF00FF 000000 AA0000 00AA00 0000AA AAAA00 00AAAA AA00AA AAAAAA 550000 005500 000055 555500 005555 550055 555555 ) ], ); } elsif ($rrdfile =~ /modules/) { $rrd->graph($rrdfile, basename => "$host-modules", destination => IMGDIR, vertical_label => 'Resident Modules', title => "$host Modules", line_thickness => 2, ); } elsif ($rrdfile =~ /logs/) { $rrd->graph($rrdfile, basename => "$host-logs", destination => IMGDIR, title => "$host Logging/Sec", line_thickness => 2, vertical_label => 'bytes/sec', sources => [ sort($rrd->sources($rrdfile)) ], ); } }; warn $@ if $@; } sub parse_statlogs { my ($ua,$url) = @_; my %logs = (); my $response = $ua->get($url); if ($response->is_success) { for (split(/\n+|\r+/,$response->content)) { my ($file,$size,$modified) = split(/\s+/,$_); $logs{$file} = $size; } } DUMP('parse_statlogs(): \%logs',\%logs); return \%logs; } sub parse_perl_status { my ($ua,$url) = @_; my %modules = map {($_=>0)} qw(usr_lib other); my $response = $ua->get($url); if ($response->is_success) { for (split(/\n+|\r+/,$response->content)) { if (my ($module,$file) = $_ =~ m,^<tr><td><a href="/perl-status\?(.+?)".+</td><td>(.+?)</td></tr>\s*$,) { local $_ = $file; if (m,^/usr/,) { $modules{usr_lib}++; } else { $modules{other}++; } } } } DUMP('parse_perl_status(): \%modules',\%modules); return \%modules; } sub parse_apache_status { my ($ua,$url) = @_; my %scoreboard = (); my %status = (); my %keys = (W => 'Write', G => 'GraceClose', D => 'DNS', S => 'Starting', L => 'Logging', R => 'Read', K => 'Keepalive', C => 'Closing', I => 'Idle', '_' => 'Waiting'); my $response = $ua->get($url); if ($response->is_success) { for (split(/\n+|\r+/,$response->content)) { my ($k,$v) = $_ =~ /^\s*(.+?):\s+(.+?)\s*$/; $k =~ s/\s+//g; #$k = lc($k); if ($k eq 'Scoreboard') { my %x; $x{$_}++ for split(//,$v); %scoreboard = ( map { ($keys{$_}, $x{$_}) } keys %keys ); } else { $status{$k} = $v; } } } else { TRACE("parse_apache_status(): failed to get $url; ".$response->status_line); } DUMP('parse_apache_status(): \%scoreboard',\%scoreboard); DUMP('parse_apache_status(): \%status',\%status); return (\%status,\%scoreboard); } sub user_agent { my $ua = LWP::UserAgent->new( agent => "RRD::Simple example $0 $VERSION", timeout => TIMEOUT, ); $ua->env_proxy; $ua->max_size(1024*250); return $ua; } sub ip2host { my $ip = shift; my @numbers = split(/\./, $ip); my $ip_number = pack("C4", @numbers); my ($host) = (gethostbyaddr($ip_number, 2))[0]; if (defined $host && $host) { return $host; } else { return $ip; } } sub TRACE { return unless $DEBUG; warn(shift()); } sub DUMP { return unless $DEBUG; eval { require Data::Dumper; warn(shift().': '.Data::Dumper::Dumper(shift())); } } 1; __END__
neechbear/RRD-Simple
examples/mod_perl.pl
Perl
apache-2.0
8,301
package Paws::KinesisAnalytics::KinesisFirehoseOutputUpdate; use Moose; has ResourceARNUpdate => (is => 'ro', isa => 'Str'); has RoleARNUpdate => (is => 'ro', isa => 'Str'); 1; ### main pod documentation begin ### =head1 NAME Paws::KinesisAnalytics::KinesisFirehoseOutputUpdate =head1 USAGE This class represents one of two things: =head3 Arguments in a call to a service Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. Each attribute should be used as a named argument in the calls that expect this type of object. As an example, if Att1 is expected to be a Paws::KinesisAnalytics::KinesisFirehoseOutputUpdate object: $service_obj->Method(Att1 => { ResourceARNUpdate => $value, ..., RoleARNUpdate => $value }); =head3 Results returned from an API call Use accessors for each attribute. If Att1 is expected to be an Paws::KinesisAnalytics::KinesisFirehoseOutputUpdate object: $result = $service_obj->Method(...); $result->Att1->ResourceARNUpdate =head1 DESCRIPTION When updating an output configuration using the UpdateApplication operation, provides information about an Amazon Kinesis Firehose delivery stream configured as the destination. =head1 ATTRIBUTES =head2 ResourceARNUpdate => Str Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream to write to. =head2 RoleARNUpdate => Str ARN of the IAM role that Amazon Kinesis Analytics can assume to access the stream on your behalf. You need to grant necessary permissions to this role. =head1 SEE ALSO This class forms part of L<Paws>, describing an object used in L<Paws::KinesisAnalytics> =head1 BUGS and CONTRIBUTIONS The source code is located here: https://github.com/pplu/aws-sdk-perl Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues =cut
ioanrogers/aws-sdk-perl
auto-lib/Paws/KinesisAnalytics/KinesisFirehoseOutputUpdate.pm
Perl
apache-2.0
1,839
# # Copyright 2019 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package storage::overland::neo::snmp::mode::eventlog; use base qw(centreon::plugins::mode); use strict; use warnings; my %severity_map = ( 0 => 'informational', 1 => 'mild', 2 => 'hard', 3 => 'severe', ); my $mapping = { errCode => { oid => '.1.3.6.1.4.1.3351.1.3.2.3.3.1.2' }, errSeverity => { oid => '.1.3.6.1.4.1.3351.1.3.2.3.3.1.3', map => \%severity_map }, errMsg => { oid => '.1.3.6.1.4.1.3351.1.3.2.3.3.1.4' }, }; my $oid_errorEntry = '.1.3.6.1.4.1.3351.1.3.2.3.3.1'; sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $options{options}->add_options(arguments => { "filter-severity:s" => { name => 'filter_severity', default => 'hard|severe' }, "filter-message:s" => { name => 'filter_message' }, "warning" => { name => 'warning' }, }); return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); } sub run { my ($self, %options) = @_; my $exit = defined($self->{option_results}->{warning}) ? 'WARNING' : 'CRITICAL'; my ($num_eventlog_checked, $num_errors) = (0, 0); $self->{output}->output_add(severity => 'OK', short_msg => "No problems detected."); my $results = $options{snmp}->get_table(oid => $oid_errorEntry); foreach my $oid ($options{snmp}->oid_lex_sort(keys %$results)) { next if ($oid !~ /^$mapping->{errSeverity}->{oid}(?:\.(.*)|$)/); my $instance = defined($1) ? $1 : undef; my $result = $options{snmp}->map_instance(mapping => $mapping, results => $results, instance => $instance); $num_eventlog_checked++; next if (defined($self->{option_results}->{filter_severity}) && $self->{option_results}->{filter_severity} ne '' && $result->{errSeverity} !~ /$self->{option_results}->{filter_severity}/); next if (defined($self->{option_results}->{filter_message}) && $self->{option_results}->{filter_message} ne '' && $result->{errMsg} !~ /$self->{option_results}->{filter_message}/); $num_errors++; $self->{output}->output_add(long_msg => sprintf("%s : %s [severity: %s]", $result->{errCode}, $result->{errMsg}, $result->{errSeverity} ) ); } $self->{output}->output_add(long_msg => sprintf("Number of message checked: %s", $num_eventlog_checked)); if ($num_errors != 0) { # Message problem $self->{output}->output_add(severity => $exit, short_msg => sprintf("%d problem detected (use verbose for more details)", $num_errors) ); } $self->{output}->display(); $self->{output}->exit(); } 1; __END__ =head1 MODE Check eventlogs. =over 8 =item B<--warning> Use warning return instead 'critical'. =item B<--filter-severity> Filter on severity. (Default: hard|severe) Can be: severe, hard, mild, informational. =item B<--filter-message> Filter on event message. (Default: none) =back =cut
Sims24/centreon-plugins
storage/overland/neo/snmp/mode/eventlog.pm
Perl
apache-2.0
4,265
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2021] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut package EnsEMBL::Draw::Style::Feature::Read; =head2 Description: Draws sequence reads for BAM files =cut use parent qw(EnsEMBL::Draw::Style::Feature); sub draw_feature { ### Create a composite glyph to represent an aligned read ### @param feature Hashref - data for a single feature ### @param position Hashref - information about the feature's size and position my ($self, $feature, $position) = @_; return unless $feature->{'colour'}; my $height = $position->{'height'}; my $composite = $self->Composite({ 'height' => $height, 'title' => $feature->{'title'}, 'href' => $feature->{'href'}, }); ## First the simple feature block my $x = $feature->{'start'}; $x = 0 if $x < 0; my $y = $position->{'y'} + $self->track_config->get('y_offset'); my $params = { x => $x, y => $y, width => $position->{'width'}, height => $height, }; $params->{'colour'} = $feature->{'colour'} if $feature->{'colour'}; $params->{'bordercolour'} = $feature->{'bordercolour'} if $feature->{'bordercolour'}; $composite->push($self->Rect($params)); ## Add an arrow if defined if ($feature->{'arrow'}{'position'}) { my $thickness = 1 / $self->{'pix_per_bp'}; ## Align with correct end of feature my $arrow_x = $feature->{'arrow'}{'position'} eq 'start' ? $x : $feature->{'end'} - $thickness; if ($height == 8) { ## vertical $composite->push($self->Rect({ 'x' => $arrow_x, 'y' => $y, 'width' => $thickness, 'height' => $height, 'colour' => $feature->{'arrow'}{'colour'}, })); } ## horizontal $arrow_x = $feature->{'arrow'}{'position'} eq 'start' ? $arrow_x : $arrow_x - $thickness; $composite->push($self->Rect({ 'x' => $arrow_x, 'y' => $y, 'width' => $thickness * 2, 'height' => 1, 'colour' => $feature->{'arrow'}{'colour'}, })); } ## Add inserts if (scalar @{$feature->{'inserts'}}) { my $insert_colour = $self->track_config->get('insert_colour'); foreach (@{$feature->{'inserts'}}) { $composite->push($self->Rect({ 'x' => $x + $_, 'y' => $y, 'width' => 1, 'height' => $height, 'colour' => $insert_colour, 'zindex' => 10, })); } } ## Add consensus base-pair labels if ($feature->{'consensus'}) { foreach (@{$feature->{'consensus'}}) { $composite->push($self->Text({ 'x' => $x + $_->[0], 'y' => $y, 'width' => 1, 'font' => 'Tiny', 'text' => $_->[1], 'colour' => $_->[2], })); } } push @{$self->glyphs}, $composite; return $height; } 1;
Ensembl/ensembl-webcode
modules/EnsEMBL/Draw/Style/Feature/Read.pm
Perl
apache-2.0
4,131
false :- main_verifier_error. verifier_error(A,B,C) :- A=0, B=0, C=0. verifier_error(A,B,C) :- A=0, B=1, C=1. verifier_error(A,B,C) :- A=1, B=0, C=1. verifier_error(A,B,C) :- A=1, B=1, C=1. addition(A,B,C,D,E,F) :- A=1, B=1, C=1. addition(A,B,C,D,E,F) :- A=0, B=1, C=1. addition(A,B,C,D,E,F) :- A=0, B=0, C=0. addition__1(A,B) :- true. addition___0(A,B,C) :- B=A, addition__1(B,C), C=0. addition__4(A,B,C) :- addition__1(A,B), B<0. addition__4(A,B,C) :- addition__1(A,B), B>0. addition__6(A,B) :- addition__4(A,B,C), B>0. addition__10(A,B,C) :- addition__4(A,B,C), B=<0. addition___0(A,B,C) :- D=1, E=0, F=0, G=B+1, H=C+ -1, addition__6(B,C), addition(D,E,F,G,H,A). addition__12(A,B) :- addition__10(A,B,C), B<0. addition___0(A,B,C) :- addition__10(B,C,A), C>=0. addition___0(A,B,C) :- D=1, E=0, F=0, G=B+ -1, H=C+1, addition__12(B,C), addition(D,E,F,G,H,A). addition__split(A,B,C) :- addition___0(A,B,C). addition(A,B,C,D,E,F) :- A=1, B=0, C=0, addition__split(F,D,E). main_entry :- true. main__un(A) :- main_entry, A>=0. main__un1(A,B) :- main__un(A), B>=0. main__un2 :- main__un1(A,B), addition(1,0,0,A,B,C), C<A+B. main__un2 :- main__un1(A,B), addition(1,0,0,A,B,C), C>A+B. main_verifier_error :- main__un2.
bishoksan/RAHFT
benchmarks_scp/SVCOMP15/svcomp15-clp/Addition01_true-unreach-call_true-termination.c.pl
Perl
apache-2.0
1,420
=pod =head1 NAME openssl-verification-options - generic X.509 certificate verification options =head1 SYNOPSIS B<openssl> I<command> [ I<options> ... ] [ I<parameters> ... ] =head1 DESCRIPTION There are many situations where X.509 certificates are verified within the OpenSSL libraries and in various OpenSSL commands. Certificate verification is implemented by L<X509_verify_cert(3)>. It is a complicated process consisting of a number of steps and depending on numerous options. The most important of them are detailed in the following sections. In a nutshell, a valid chain of certificates needs to be built up and verified starting from the I<target certificate> that is to be verified and ending in a certificate that due to some policy is trusted. Verification is done relative to the given I<purpose>, which is the intended use of the target certificate, such as SSL server, or by default for any purpose. The details of how each OpenSSL command handles errors are documented on the specific command page. DANE support is documented in L<openssl-s_client(1)>, L<SSL_CTX_dane_enable(3)>, L<SSL_set1_host(3)>, L<X509_VERIFY_PARAM_set_flags(3)>, and L<X509_check_host(3)>. =head2 Trust Anchors In general, according to RFC 4158 and RFC 5280, a I<trust anchor> is any public key and related subject distinguished name (DN) that for some reason is considered trusted and thus is acceptable as the root of a chain of certificates. In practice, trust anchors are given in the form of certificates, where their essential fields are the public key and the subject DN. In addition to the requirements in RFC 5280, OpenSSL checks the validity period of such certificates and makes use of some further fields. In particular, the subject key identifier extension, if present, is used for matching trust anchors during chain building. In the most simple and common case, trust anchors are by default all self-signed "root" CA certificates that are placed in the I<trust store>, which is a collection of certificates that are trusted for certain uses. This is akin to what is used in the trust stores of Mozilla Firefox, or Apple's and Microsoft's certificate stores, ... From the OpenSSL perspective, a trust anchor is a certificate that should be augmented with an explicit designation for which uses of a target certificate the certificate may serve as a trust anchor. In PEM encoding, this is indicated by the C<TRUSTED CERTIFICATE> string. Such a designation provides a set of positive trust attributes explicitly stating trust for the listed purposes and/or a set of negative trust attributes explicitly rejecting the use for the listed purposes. The purposes are encoded using the values defined for the extended key usages (EKUs) that may be given in X.509 extensions of end-entity certificates. See also the L</Extended Key Usage> section below. The currently recognized uses are B<clientAuth> (SSL client use), B<serverAuth> (SSL server use), B<emailProtection> (S/MIME email use), B<codeSigning> (object signer use), B<OCSPSigning> (OCSP responder use), B<OCSP> (OCSP request use), B<timeStamping> (TSA server use), and B<anyExtendedKeyUsage>. As of OpenSSL 1.1.0, the last of these blocks all uses when rejected or enables all uses when trusted. A certificate, which may be CA certificate or an end-entity certificate, is considered a trust anchor for the given use if and only if all the following conditions hold: =over 4 =item * It is an an element of the trust store. =item * It does not have a negative trust attribute rejecting the given use. =item * It has a positive trust attribute accepting the given use or (by default) one of the following compatibility conditions apply: It is self-signed or the B<-partial_chain> option is given (which corresponds to the B<X509_V_FLAG_PARTIAL_CHAIN> flag being set). =back =head2 Certification Path Building First, a certificate chain is built up starting from the target certificate and ending in a trust anchor. The chain is built up iteratively, looking up in turn a certificate with suitable key usage that matches as an issuer of the current "subject" certificate as described below. If there is such a certificate, the first one found that is currently valid is taken, otherwise the one that expired most recently of all such certificates. For efficiency, no backtracking is performed, thus any further candidate issuer certificates that would match equally are ignored. When a self-signed certificate has been added, chain construction stops. In this case it must fully match a trust anchor, otherwise chain building fails. A candidate issuer certificate matches a subject certificate if all of the following conditions hold: =over 4 =item * Its subject name matches the issuer name of the subject certificate. =item * If the subject certificate has an authority key identifier extension, each of its sub-fields equals the corresponding subject key identifier, serial number, and issuer field of the candidate issuer certificate, as far as the respective fields are present in both certificates. =item * The certificate signature algorithm used to sign the subject certificate is supported and equals the public key algorithm of the candidate issuer certificate. =back The lookup first searches for issuer certificates in the trust store. If it does not find a match there it consults the list of untrusted ("intermediate" CA) certificates, if provided. =head2 Certification Path Validation When the certificate chain building process was successful the chain components and their links are checked thoroughly. The first step is to check that each certificate is well-formed. Part of these checks are enabled only if the B<-x509_strict> option is given. The second step is to check the extensions of every untrusted certificate for consistency with the supplied purpose. If the B<-purpose> option is not given then no such checks are done except for SSL/TLS connection setup, where by default C<sslserver> or C<sslclient>, are checked. The target or "leaf" certificate, as well as any other untrusted certificates, must have extensions compatible with the specified purpose. All certificates except the target or "leaf" must also be valid CA certificates. The precise extensions required are described in more detail in L<openssl-x509(1)/CERTIFICATE EXTENSIONS>. The third step is to check the trust settings on the last certificate (which typically is a self-signed root CA certificate). It must be trusted for the given use. For compatibility with previous versions of OpenSSL, a self-signed certificate with no trust attributes is considered to be valid for all uses. The fourth, and final, step is to check the validity of the certificate chain. For each element in the chain, including the root CA certificate, the validity period as specified by the C<notBefore> and C<notAfter> fields is checked against the current system time. The B<-attime> flag may be used to use a reference time other than "now." The certificate signature is checked as well (except for the signature of the typically self-signed root CA certificate, which is verified only if the B<-check_ss_sig> option is given). When verifying a certificate signature the keyUsage extension (if present) of the candidate issuer certificate is checked to permit digitalSignature for signing proxy certificates or to permit keyCertSign for signing other certificates, respectively. If all operations complete successfully then certificate is considered valid. If any operation fails then the certificate is not valid. =head1 OPTIONS =head2 Trusted Certificate Options The following options specify how to supply the certificates that can be used as trust anchors for certain uses. As mentioned, a collection of such certificates is called a I<trust store>. Note that OpenSSL does not provide a default set of trust anchors. Many Linux distributions include a system default and configure OpenSSL to point to that. Mozilla maintains an influential trust store that can be found at L<https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/>. The certificates to add to the trust store can be specified using following options. =over 4 =item B<-CAfile> I<file> Load the specified file which contains a certificate or several of them in case the input is in PEM or PKCS#12 format. PEM-encoded certificates may also have trust attributes set. =item B<-no-CAfile> Do not load the default file of trusted certificates. =item B<-CApath> I<dir> Use the specified directory as a collection of trusted certificates, i.e., a trust store. Files should be named with the hash value of the X.509 SubjectName of each certificate. This is so that the library can extract the IssuerName, hash it, and directly lookup the file to get the issuer certificate. See L<openssl-rehash(1)> for information on creating this type of directory. =item B<-no-CApath> Do not use the default directory of trusted certificates. =item B<-CAstore> I<uri> Use I<uri> as a store of CA certificates. The URI may indicate a single certificate, as well as a collection of them. With URIs in the C<file:> scheme, this acts as B<-CAfile> or B<-CApath>, depending on if the URI indicates a single file or directory. See L<ossl_store-file(7)> for more information on the C<file:> scheme. These certificates are also used when building the server certificate chain (for example with L<openssl-s_server(1)>) or client certificate chain (for example with L<openssl-s_time(1)>). =item B<-no-CAstore> Do not use the default store of trusted CA certificates. =back =head2 Verification Options The certificate verification can be fine-tuned with the following flags. =over 4 =item B<-verbose> Print extra information about the operations being performed. =item B<-attime> I<timestamp> Perform validation checks using time specified by I<timestamp> and not current system time. I<timestamp> is the number of seconds since January 1, 1970 (i.e., the Unix Epoch). =item B<-no_check_time> This option suppresses checking the validity period of certificates and CRLs against the current time. If option B<-attime> is used to specify a verification time, the check is not suppressed. =item B<-x509_strict> This disables non-compliant workarounds for broken certificates. Thus errors are thrown on certificates not compliant with RFC 5280. When this option is set, among others, the following certificate well-formedness conditions are checked: =over 4 =item * The basicConstraints of CA certificates must be marked critical. =item * CA certificates must explicitly include the keyUsage extension. =item * If a pathlenConstraint is given the key usage keyCertSign must be allowed. =item * The pathlenConstraint must not be given for non-CA certificates. =item * The issuer name of any certificate must not be empty. =item * The subject name of CA certs, certs with keyUsage crlSign, and certs without subjectAlternativeName must not be empty. =item * If a subjectAlternativeName extension is given it must not be empty. =item * The signatureAlgorithm field and the cert signature must be consistent. =item * Any given authorityKeyIdentifier and any given subjectKeyIdentifier must not be marked critical. =item * The authorityKeyIdentifier must be given for X.509v3 certs unless they are self-signed. =item * The subjectKeyIdentifier must be given for all X.509v3 CA certs. =back =item B<-ignore_critical> Normally if an unhandled critical extension is present that is not supported by OpenSSL the certificate is rejected (as required by RFC5280). If this option is set critical extensions are ignored. =item B<-issuer_checks> Ignored. =item B<-crl_check> Checks end entity certificate validity by attempting to look up a valid CRL. If a valid CRL cannot be found an error occurs. =item B<-crl_check_all> Checks the validity of B<all> certificates in the chain by attempting to look up valid CRLs. =item B<-use_deltas> Enable support for delta CRLs. =item B<-extended_crl> Enable extended CRL features such as indirect CRLs and alternate CRL signing keys. =item B<-suiteB_128_only>, B<-suiteB_128>, B<-suiteB_192> Enable the Suite B mode operation at 128 bit Level of Security, 128 bit or 192 bit, or only 192 bit Level of Security respectively. See RFC6460 for details. In particular the supported signature algorithms are reduced to support only ECDSA and SHA256 or SHA384 and only the elliptic curves P-256 and P-384. =item B<-auth_level> I<level> Set the certificate chain authentication security level to I<level>. The authentication security level determines the acceptable signature and public key strength when verifying certificate chains. For a certificate chain to validate, the public keys of all the certificates must meet the specified security I<level>. The signature algorithm security level is enforced for all the certificates in the chain except for the chain's I<trust anchor>, which is either directly trusted or validated by means other than its signature. See L<SSL_CTX_set_security_level(3)> for the definitions of the available levels. The default security level is -1, or "not set". At security level 0 or lower all algorithms are acceptable. Security level 1 requires at least 80-bit-equivalent security and is broadly interoperable, though it will, for example, reject MD5 signatures or RSA keys shorter than 1024 bits. =item B<-partial_chain> Allow verification to succeed if an incomplete chain can be built. That is, a chain ending in a certificate that normally would not be trusted (because it has no matching positive trust attributes and is not self-signed) but is an element of the trust store. This certificate may be self-issued or belong to an intermediate CA. =item B<-check_ss_sig> Verify the signature of the last certificate in a chain if the certificate is supposedly self-signed. This is prohibited and will result in an error if it is a non-conforming CA certificate with key usage restrictions not including the keyCertSign bit. This verification is disabled by default because it doesn't add any security. =item B<-allow_proxy_certs> Allow the verification of proxy certificates. =item B<-trusted_first> As of OpenSSL 1.1.0 this option is on by default and cannot be disabled. When constructing the certificate chain, the trusted certificates specified via B<-CAfile>, B<-CApath>, B<-CAstore> or B<-trusted> are always used before any certificates specified via B<-untrusted>. =item B<-no_alt_chains> As of OpenSSL 1.1.0, since B<-trusted_first> always on, this option has no effect. =item B<-trusted> I<file> Parse I<file> as a set of one or more certificates. Each of them qualifies as trusted if has a suitable positive trust attribute or it is self-signed or the B<-partial_chain> option is specified. This option implies the B<-no-CAfile>, B<-no-CApath>, and B<-no-CAstore> options and it cannot be used with the B<-CAfile>, B<-CApath> or B<-CAstore> options, so only certificates specified using the B<-trusted> option are trust anchors. This option may be used multiple times. =item B<-untrusted> I<file> Parse I<file> as a set of one or more certificates. All certificates (typically of intermediate CAs) are considered untrusted and may be used to construct a certificate chain from the target certificate to a trust anchor. This option may be used multiple times. =item B<-policy> I<arg> Enable policy processing and add I<arg> to the user-initial-policy-set (see RFC5280). The policy I<arg> can be an object name an OID in numeric form. This argument can appear more than once. =item B<-explicit_policy> Set policy variable require-explicit-policy (see RFC5280). =item B<-policy_check> Enables certificate policy processing. =item B<-policy_print> Print out diagnostics related to policy processing. =item B<-inhibit_any> Set policy variable inhibit-any-policy (see RFC5280). =item B<-inhibit_map> Set policy variable inhibit-policy-mapping (see RFC5280). =item B<-purpose> I<purpose> The intended use for the certificate. Currently defined purposes are C<sslclient>, C<sslserver>, C<nssslserver>, C<smimesign>, C<smimeencrypt>, C<crlsign>, C<ocsphelper>, C<timestampsign>, and C<any>. If peer certificate verification is enabled, by default the TLS implementation as well as the commands B<s_client> and B<s_server> check for consistency with TLS server or TLS client use, respectively. While IETF RFC 5280 says that B<id-kp-serverAuth> and B<id-kp-clientAuth> are only for WWW use, in practice they are used for all kinds of TLS clients and servers, and this is what OpenSSL assumes as well. =item B<-verify_depth> I<num> Limit the certificate chain to I<num> intermediate CA certificates. A maximal depth chain can have up to I<num>+2 certificates, since neither the end-entity certificate nor the trust-anchor certificate count against the B<-verify_depth> limit. =item B<-verify_email> I<email> Verify if I<email> matches the email address in Subject Alternative Name or the email in the subject Distinguished Name. =item B<-verify_hostname> I<hostname> Verify if I<hostname> matches DNS name in Subject Alternative Name or Common Name in the subject certificate. =item B<-verify_ip> I<ip> Verify if I<ip> matches the IP address in Subject Alternative Name of the subject certificate. =item B<-verify_name> I<name> Use default verification policies like trust model and required certificate policies identified by I<name>. The trust model determines which auxiliary trust or reject OIDs are applicable to verifying the given certificate chain. They can be given using the B<-addtrust> and B<-addreject> options for L<openssl-x509(1)>. Supported policy names include: B<default>, B<pkcs7>, B<smime_sign>, B<ssl_client>, B<ssl_server>. These mimics the combinations of purpose and trust settings used in SSL, CMS and S/MIME. As of OpenSSL 1.1.0, the trust model is inferred from the purpose when not specified, so the B<-verify_name> options are functionally equivalent to the corresponding B<-purpose> settings. =back =head2 Extended Verification Options Sometimes there may be more than one certificate chain leading to an end-entity certificate. This usually happens when a root or intermediate CA signs a certificate for another a CA in other organization. Another reason is when a CA might have intermediates that use two different signature formats, such as a SHA-1 and a SHA-256 digest. The following options can be used to provide data that will allow the OpenSSL command to generate an alternative chain. =over 4 =item B<-xkey> I<infile>, B<-xcert> I<infile>, B<-xchain> Specify an extra certificate, private key and certificate chain. These behave in the same manner as the B<-cert>, B<-key> and B<-cert_chain> options. When specified, the callback returning the first valid chain will be in use by the client. =item B<-xchain_build> Specify whether the application should build the certificate chain to be provided to the server for the extra certificates via the B<-xkey>, B<-xcert>, and B<-xchain> options. =item B<-xcertform> B<DER>|B<PEM>|B<P12> The input format for the extra certificate. This option has no effect and is retained for backward compatibility only. =item B<-xkeyform> B<DER>|B<PEM>|B<P12> The input format for the extra key. This option has no effect and is retained for backward compatibility only. =back =head2 Certificate Extensions Options like B<-purpose> lead to checking the certificate extensions, which determine what the target certificate and intermediate CA certificates can be used for. =head3 Basic Constraints The basicConstraints extension CA flag is used to determine whether the certificate can be used as a CA. If the CA flag is true then it is a CA, if the CA flag is false then it is not a CA. B<All> CAs should have the CA flag set to true. If the basicConstraints extension is absent, which includes the case that it is an X.509v1 certificate, then the certificate is considered to be a "possible CA" and other extensions are checked according to the intended use of the certificate. The treatment of certificates without basicConstraints as a CA is presently supported, but this could change in the future. =head3 Key Usage If the keyUsage extension is present then additional restraints are made on the uses of the certificate. A CA certificate B<must> have the keyCertSign bit set if the keyUsage extension is present. =head3 Extended Key Usage The extKeyUsage (EKU) extension places additional restrictions on the certificate uses. If this extension is present (whether critical or not) the key can only be used for the purposes specified. A complete description of each check is given below. The comments about basicConstraints and keyUsage and X.509v1 certificates above apply to B<all> CA certificates. =over 4 =item B<SSL Client> The extended key usage extension must be absent or include the "web client authentication" OID. The keyUsage extension must be absent or it must have the digitalSignature bit set. The Netscape certificate type must be absent or it must have the SSL client bit set. =item B<SSL Client CA> The extended key usage extension must be absent or include the "web client authentication" OID. The Netscape certificate type must be absent or it must have the SSL CA bit set. This is used as a work around if the basicConstraints extension is absent. =item B<SSL Server> The extended key usage extension must be absent or include the "web server authentication" and/or one of the SGC OIDs. The keyUsage extension must be absent or it must have the digitalSignature, the keyEncipherment set or both bits set. The Netscape certificate type must be absent or have the SSL server bit set. =item B<SSL Server CA> The extended key usage extension must be absent or include the "web server authentication" and/or one of the SGC OIDs. The Netscape certificate type must be absent or the SSL CA bit must be set. This is used as a work around if the basicConstraints extension is absent. =item B<Netscape SSL Server> For Netscape SSL clients to connect to an SSL server it must have the keyEncipherment bit set if the keyUsage extension is present. This isn't always valid because some cipher suites use the key for digital signing. Otherwise it is the same as a normal SSL server. =item B<Common S/MIME Client Tests> The extended key usage extension must be absent or include the "email protection" OID. The Netscape certificate type must be absent or should have the S/MIME bit set. If the S/MIME bit is not set in the Netscape certificate type then the SSL client bit is tolerated as an alternative but a warning is shown. This is because some Verisign certificates don't set the S/MIME bit. =item B<S/MIME Signing> In addition to the common S/MIME client tests the digitalSignature bit or the nonRepudiation bit must be set if the keyUsage extension is present. =item B<S/MIME Encryption> In addition to the common S/MIME tests the keyEncipherment bit must be set if the keyUsage extension is present. =item B<S/MIME CA> The extended key usage extension must be absent or include the "email protection" OID. The Netscape certificate type must be absent or must have the S/MIME CA bit set. This is used as a work around if the basicConstraints extension is absent. =item B<CRL Signing> The keyUsage extension must be absent or it must have the CRL signing bit set. =item B<CRL Signing CA> The normal CA tests apply. Except in this case the basicConstraints extension must be present. =back =head1 BUGS The issuer checks still suffer from limitations in the underlying X509_LOOKUP API. One consequence of this is that trusted certificates with matching subject name must appear in a file (as specified by the B<-CAfile> option), a directory (as specified by B<-CApath>), or a store (as specified by B<-CAstore>). If there are multiple such matches, possibly in multiple locations, only the first one (in the mentioned order of locations) is recognised. =head1 SEE ALSO L<X509_verify_cert(3)>, L<openssl-verify(1)>, L<openssl-ocsp(1)>, L<openssl-ts(1)>, L<openssl-s_client(1)>, L<openssl-s_server(1)>, L<openssl-smime(1)>, L<openssl-cmp(1)>, L<openssl-cms(1)> =head1 HISTORY The checks enabled by B<-x509_strict> have been extended in OpenSSL 3.0. =head1 COPYRIGHT Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L<https://www.openssl.org/source/license.html>. =cut
openssl/openssl
doc/man1/openssl-verification-options.pod
Perl
apache-2.0
24,737
package Forge::Model; use File::Spec::Functions qw[catdir]; my @R_PREFIX_SEGMENTS = ('Forge', 'Model', 'R'); my $R_PREFIX = join '::', @R_PREFIX_SEGMENTS; my $R_PATH = catdir($ENV{ LIB_PATH }, @R_PREFIX_SEGMENTS); sub R_PREFIX_SEGMENTS { @R_PREFIX_SEGMENTS; } sub R_PREFIX { $R_PREFIX; } sub R_PATH { $R_PATH; } sub domains { my $ns = shift; my $scan_dir = catdir(R_PATH, "*.pm"); map { $_ =~ s/^$R_PATH//; $_ =~ s/\.pm&//; return $_; } glob $scan_dir; } sub domain_packages { map { R_PREFIX() . "\::$_" } domains shift; } sub namespaces { grep { -d $_ } glob R_PATH(); }
ant-i/db-crud
lib/Forge/Model.pm
Perl
apache-2.0
589
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2021] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut package EnsEMBL::Draw::GlyphSet::TSE_background_exon; use strict; use base qw(EnsEMBL::Draw::GlyphSet); ### Needed for drawing vertical lines on supporting evidence view sub _init { my ($self) = @_; my $wuc = $self->{'config'}; my $flag = $self->my_config('flag'); #retrieve tag locations and colours (identified by TSE_transcript track) foreach my $tag (@{$wuc->cache('vertical_tags') || []}) { my ($extra,$e,$s) = split ':', $tag->[0]; my $col = $tag->[1]; my $tglyph = $self->Space({ 'x' => $s, 'y' => 0, 'height' => 0, 'width' => $e-$s, 'colour' => '$col', }); $self->join_tag( $tglyph, $tag->[0], 1-$flag, 0, $col, 'fill', -99 ); $self->join_tag( $tglyph, $tag->[0], $flag, 0, $col, 'fill', -99 ); $self->push( $tglyph ); } } 1;
Ensembl/ensembl-webcode
modules/EnsEMBL/Draw/GlyphSet/TSE_background_exon.pm
Perl
apache-2.0
1,526
package Google::Ads::AdWords::v201406::TypeMaps::CampaignService; use strict; use warnings; our $typemap_1 = { 'queryResponse/rval/entries/settings[DynamicSearchAdsSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors' => 'Google::Ads::AdWords::v201406::ApiError', 'mutateResponse/rval/partialFailureErrors[ClientTermsError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[DistinctError]' => 'Google::Ads::AdWords::v201406::DistinctError', 'mutateLabelResponse/rval/partialFailureErrors[IdError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityCountLimitExceeded]/existingCount' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateResponse/rval/partialFailureErrors[RangeError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/status' => 'Google::Ads::AdWords::v201406::CampaignStatus', 'mutateLabelResponse/rval/partialFailureErrors[OperatorError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DateError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[EntityAccessDenied]' => 'Google::Ads::AdWords::v201406::EntityAccessDenied', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpmBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[OperatorError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingError]' => 'Google::Ads::AdWords::v201406::BiddingError', 'mutate/operations/operand/urlCustomParameters/parameters/key' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[GeoTargetTypeSetting]' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[PercentCpaBid]/percentCpaBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'mutateLabelResponse/rval/partialFailureErrors[StringLengthError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get/serviceSelector/predicates' => 'Google::Ads::AdWords::v201406::Predicate', 'mutateResponse/rval/partialFailureErrors[DistinctError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DateError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[KeywordMatchSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingStrategySource' => 'Google::Ads::AdWords::v201406::BiddingStrategySource', 'mutateLabelResponse/rval/partialFailureErrors[BiddingErrors]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RangeError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[ReadOnlyError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PercentCpaBiddingScheme]' => 'Google::Ads::AdWords::v201406::PercentCpaBiddingScheme', 'mutateResponse/rval/partialFailureErrors[OperatorError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'Fault/detail/ApiExceptionFault/errors[StatsQueryError]' => 'Google::Ads::AdWords::v201406::StatsQueryError', 'Fault/detail/ApiExceptionFault/errors[RateExceededError]/reason' => 'Google::Ads::AdWords::v201406::RateExceededError::Reason', 'mutateResponse/rval/partialFailureErrors[RejectedError]' => 'Google::Ads::AdWords::v201406::RejectedError', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[NewEntityCreationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/urlCustomParameters' => 'Google::Ads::AdWords::v201406::CustomParameters', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]/cpmBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'mutateLabelResponse/rval/partialFailureErrors[ForwardCompatibilityError]/reason' => 'Google::Ads::AdWords::v201406::ForwardCompatibilityError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[DatabaseError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[NotEmptyError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'queryResponse/rval/entries/labels[TextLabel]/status' => 'Google::Ads::AdWords::v201406::Label::Status', 'mutateLabelResponse/rval/partialFailureErrors[TargetError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/status' => 'Google::Ads::AdWords::v201406::CampaignStatus', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[ReadOnlyError]' => 'Google::Ads::AdWords::v201406::ReadOnlyError', 'Fault/detail/ApiExceptionFault/errors[BiddingErrors]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[ClientTermsError]' => 'Google::Ads::AdWords::v201406::ClientTermsError', 'mutateLabelResponse/rval/partialFailureErrors[SizeLimitError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingErrors]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[ShoppingSetting]/campaignPriority' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateResponse/rval/value/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[UrlError]/reason' => 'Google::Ads::AdWords::v201406::UrlError::Reason', 'ApiExceptionFault/errors/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BudgetError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[KeywordMatchSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[CampaignError]/reason' => 'Google::Ads::AdWords::v201406::CampaignError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityAccessDenied]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QuotaCheckError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[GeoTargetTypeSetting]/negativeGeoTargetType' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting::NegativeGeoTargetType', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SelectorError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get/serviceSelector/predicates/operator' => 'Google::Ads::AdWords::v201406::Predicate::Operator', 'mutateResponse/rval/partialFailureErrors[RequestError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[GeoTargetTypeSetting]/negativeGeoTargetType' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting::NegativeGeoTargetType', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/raiseBidWhenBudgetConstained' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/raiseBidWhenLowQualityScore' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[DateRangeError]' => 'Google::Ads::AdWords::v201406::DateRangeError', 'mutateLabelResponse/rval/partialFailureErrors[BiddingTransitionError]' => 'Google::Ads::AdWords::v201406::BiddingTransitionError', 'mutateResponse/rval/value/settings[ShoppingSetting]' => 'Google::Ads::AdWords::v201406::ShoppingSetting', 'mutate/operations/operand/urlCustomParameters/parameters/isRemove' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ManualCpmBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[PercentCpaBid]/percentCpaBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'mutateLabelResponse/rval/partialFailureErrors[SelectorError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/budget/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpcBid]' => 'Google::Ads::AdWords::v201406::CpcBid', 'mutate/operations/operand/biddingStrategyConfiguration/biddingStrategySource' => 'Google::Ads::AdWords::v201406::BiddingStrategySource', 'Fault/detail/ApiExceptionFault/errors[StringLengthError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[GeoTargetTypeSetting]/positiveGeoTargetType' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting::PositiveGeoTargetType', 'mutateLabelResponse/rval/partialFailureErrors[OperationAccessDenied]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[PercentCpaBid]/bid' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateResponse/rval/partialFailureErrors[DistinctError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DateError]/reason' => 'Google::Ads::AdWords::v201406::DateError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpcBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'mutate/operations/operand/settings[ShoppingSetting]' => 'Google::Ads::AdWords::v201406::ShoppingSetting', 'mutateResponse/rval/partialFailureErrors[RateExceededError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/networkSetting/targetSearchNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get/serviceSelector/dateRange/min' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[TargetError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RequiredError]/reason' => 'Google::Ads::AdWords::v201406::RequiredError::Reason', 'mutateResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/limit' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ManualCpmBiddingScheme]' => 'Google::Ads::AdWords::v201406::ManualCpmBiddingScheme', 'mutateResponse/rval/value/labels/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[EntityAccessDenied]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[StatsQueryError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[ForwardCompatibilityError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]' => 'Google::Ads::AdWords::v201406::PageOnePromotedBiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/networkSetting' => 'Google::Ads::AdWords::v201406::NetworkSetting', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[UrlError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/settings[DynamicSearchAdsSetting]/domainName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SelectorError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[OperatorError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[ShoppingSetting]/salesCountry' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/totalNumEntries' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateLabelResponse/rval/partialFailureErrors[RateExceededError]/rateScope' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[DateRangeError]/reason' => 'Google::Ads::AdWords::v201406::DateRangeError::Reason', 'queryResponse/rval/entries/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/enclosingId' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/labels/Label.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]' => 'Google::Ads::AdWords::v201406::CpmBid', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpmBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/urlCustomParameters' => 'Google::Ads::AdWords::v201406::CustomParameters', 'mutateResponse/rval/partialFailureErrors[SelectorError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/labels/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NewEntityCreationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[TargetError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityCountLimitExceeded]' => 'Google::Ads::AdWords::v201406::EntityCountLimitExceeded', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingTransitionError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/budget/period' => 'Google::Ads::AdWords::v201406::Budget::BudgetPeriod', 'mutateLabelResponse/rval/partialFailureErrors[InternalApiError]' => 'Google::Ads::AdWords::v201406::InternalApiError', 'mutate/operations/operand/budget/deliveryMethod' => 'Google::Ads::AdWords::v201406::Budget::BudgetDeliveryMethod', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[EnhancedCpcBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SizeLimitError]' => 'Google::Ads::AdWords::v201406::SizeLimitError', 'mutateResponse/rval/partialFailureErrors[BiddingError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[TargetError]' => 'Google::Ads::AdWords::v201406::TargetError', 'mutateLabelResponse/rval/partialFailureErrors[EntityNotFound]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[InternalApiError]' => 'Google::Ads::AdWords::v201406::InternalApiError', 'mutateLabelResponse/rval/value/labelId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[AuthorizationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RejectedError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QuotaCheckError]' => 'Google::Ads::AdWords::v201406::QuotaCheckError', 'queryResponse/rval/entries/forwardCompatibilityMap' => 'Google::Ads::AdWords::v201406::String_StringMapEntry', 'mutateResponse/rval/partialFailureErrors[OperationAccessDenied]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[SettingError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[KeywordMatchSetting]/optIn' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/value/labels[TextLabel]/status' => 'Google::Ads::AdWords::v201406::Label::Status', 'queryResponse/rval/Page.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[AuthenticationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/budget/amount/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[ForwardCompatibilityError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/forwardCompatibilityMap' => 'Google::Ads::AdWords::v201406::String_StringMapEntry', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'Fault/detail/ApiExceptionFault/errors[BiddingTransitionError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/networkSetting/targetGoogleSearch' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[SelectorError]/reason' => 'Google::Ads::AdWords::v201406::SelectorError::Reason', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetRoasBiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[DistinctError]/reason' => 'Google::Ads::AdWords::v201406::DistinctError::Reason', 'mutateResponse/rval/partialFailureErrors[NotEmptyError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[IdError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BiddingError]' => 'Google::Ads::AdWords::v201406::BiddingError', 'mutateResponse/rval/partialFailureErrors[DistinctError]/reason' => 'Google::Ads::AdWords::v201406::DistinctError::Reason', 'mutateResponse/rval/partialFailureErrors[DatabaseError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/labels[TextLabel]' => 'Google::Ads::AdWords::v201406::TextLabel', 'getResponse/rval' => 'Google::Ads::AdWords::v201406::CampaignPage', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingStrategyType' => 'Google::Ads::AdWords::v201406::BiddingStrategyType', 'mutate/operations/operand/budget' => 'Google::Ads::AdWords::v201406::Budget', 'getResponse/rval/entries/settings[ShoppingSetting]/salesCountry' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[ClientTermsError]' => 'Google::Ads::AdWords::v201406::ClientTermsError', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutateLabelResponse/rval/partialFailureErrors[SelectorError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/conversionOptimizerEligibility/eligible' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[BudgetError]' => 'Google::Ads::AdWords::v201406::BudgetError', 'Fault/detail/ApiExceptionFault/errors[OperatorError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[EntityAccessDenied]' => 'Google::Ads::AdWords::v201406::EntityAccessDenied', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[QueryError]/reason' => 'Google::Ads::AdWords::v201406::QueryError::Reason', 'getResponse/rval/entries/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/budget/isExplicitlyShared' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'Fault/detail/ApiExceptionFault/errors[RejectedError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ClientTermsError]/reason' => 'Google::Ads::AdWords::v201406::ClientTermsError::Reason', 'mutate/operations/operand/urlCustomParameters/parameters' => 'Google::Ads::AdWords::v201406::CustomParameter', 'mutateResponse/rval/partialFailureErrors[DateError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/budget/isExplicitlyShared' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/settings[GeoTargetTypeSetting]' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting', 'getResponse/rval/entries/labels/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RejectedError]/reason' => 'Google::Ads::AdWords::v201406::RejectedError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]' => 'Google::Ads::AdWords::v201406::BudgetOptimizerBiddingScheme', 'Fault/detail/ApiExceptionFault/errors[NewEntityCreationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'ApiExceptionFault/ApplicationException.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/adServingOptimizationStatus' => 'Google::Ads::AdWords::v201406::AdServingOptimizationStatus', 'mutateResponse/rval/partialFailureErrors[EntityAccessDenied]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[GeoTargetTypeSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'Fault/detail/ApiExceptionFault/errors[EntityNotFound]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[TrackingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[ShoppingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QuotaError]' => 'Google::Ads::AdWords::v201406::QuotaError', 'mutateResponse/rval/partialFailureErrors[BiddingErrors]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[NullError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[QuotaError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/settings[GeoTargetTypeSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AuthorizationError]' => 'Google::Ads::AdWords::v201406::AuthorizationError', 'queryResponse/rval/entries/frequencyCap/impressions' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[DateRangeError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[IdError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DateError]/reason' => 'Google::Ads::AdWords::v201406::DateError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'Fault/detail/ApiExceptionFault/errors[DatabaseError]' => 'Google::Ads::AdWords::v201406::DatabaseError', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]/enhancedCpcEnabled' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/trackingUrlTemplate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/pricingMode' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme::PricingMode', 'queryResponse/rval/entries/trackingUrlTemplate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[InternalApiError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[ForwardCompatibilityError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/pricingMode' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme::PricingMode', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[PercentCpaBid]/bid' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateResponse/rval/partialFailureErrors[EntityNotFound]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RequestError]/reason' => 'Google::Ads::AdWords::v201406::RequestError::Reason', 'mutateResponse/rval/partialFailureErrors[QuotaCheckError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[InternalApiError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[IdError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/budget/amount/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[RealTimeBiddingSetting]/optIn' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[QuotaError]/limit' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'queryResponse/rval/entries/budget/deliveryMethod' => 'Google::Ads::AdWords::v201406::Budget::BudgetDeliveryMethod', 'mutateResponse/rval/partialFailureErrors[ForwardCompatibilityError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetCpaBiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[BiddingTransitionError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operator' => 'Google::Ads::AdWords::v201406::Operator', 'mutateLabelResponse/rval/partialFailureErrors[StringLengthError]/reason' => 'Google::Ads::AdWords::v201406::StringLengthError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[RateExceededError]/retryAfterSeconds' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'Fault/detail/ApiExceptionFault/errors[BiddingErrors]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[StringLengthError]' => 'Google::Ads::AdWords::v201406::StringLengthError', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpcBid]/cpcBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'mutateLabelResponse/rval/partialFailureErrors[DistinctError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids' => 'Google::Ads::AdWords::v201406::Bids', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings' => 'Google::Ads::AdWords::v201406::Setting', 'queryResponse/rval/entries/settings[KeywordMatchSetting]' => 'Google::Ads::AdWords::v201406::KeywordMatchSetting', 'Fault/detail/ApiExceptionFault/errors[DistinctError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'ApiExceptionFault/message' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor' => 'Google::Ads::AdWords::v201406::Money', 'query' => 'Google::Ads::AdWords::v201406::CampaignService::query', 'Fault/detail/ApiExceptionFault/errors[DatabaseError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[InternalApiError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[ClientTermsError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[CampaignError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RequiredError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[PercentCpaBid]' => 'Google::Ads::AdWords::v201406::PercentCpaBid', 'mutateResponse/rval/partialFailureErrors[CampaignError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[InternalApiError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BudgetError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[NotEmptyError]' => 'Google::Ads::AdWords::v201406::NotEmptyError', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/labels[TextLabel]/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[RequestError]' => 'Google::Ads::AdWords::v201406::RequestError', 'getResponse/rval/entries/labels/Label.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[DynamicSearchAdsSetting]/languageCode' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpaBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[ForwardCompatibilityError]/reason' => 'Google::Ads::AdWords::v201406::ForwardCompatibilityError::Reason', 'Fault/faultcode' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyURI', 'mutateLabelResponse/rval/partialFailureErrors[EntityNotFound]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[DynamicSearchAdsSetting]/languageCode' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[EntityNotFound]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpaBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AdxError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/urlCustomParameters/parameters' => 'Google::Ads::AdWords::v201406::CustomParameter', 'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AuthenticationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RateExceededError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityCountLimitExceeded]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[CampaignError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[ShoppingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/labels[TextLabel]/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[DateRangeError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[AuthorizationError]' => 'Google::Ads::AdWords::v201406::AuthorizationError', 'getResponse/rval/entries/forwardCompatibilityMap/key' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[QuotaError]/limit' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'Fault/detail/ApiExceptionFault/errors[QueryError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/raiseBidWhenLowQualityScore' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'Fault/detail/ApiExceptionFault/errors[AdxError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[StringLengthError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[SettingError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[NewEntityCreationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[TrackingSetting]/trackingUrl' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/budget/amount/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[DatabaseError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ForwardCompatibilityError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[PercentCpaBid]' => 'Google::Ads::AdWords::v201406::PercentCpaBid', 'Fault/detail/ApiExceptionFault/errors[AdxError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[EntityCountLimitExceeded]' => 'Google::Ads::AdWords::v201406::EntityCountLimitExceeded', 'mutate/operations/operand/labels[TextLabel]/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DateError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpcBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[UrlError]' => 'Google::Ads::AdWords::v201406::UrlError', 'queryResponse/rval/entries/startDate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[SizeLimitError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/forwardCompatibilityMap/value' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[OperatorError]' => 'Google::Ads::AdWords::v201406::OperatorError', 'mutate/operations/operand/settings/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[NullError]' => 'Google::Ads::AdWords::v201406::NullError', 'Fault/detail/ApiExceptionFault/message' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[ReadOnlyError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'ApiExceptionFault' => 'Google::Ads::AdWords::v201406::ApiException', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingStrategyType' => 'Google::Ads::AdWords::v201406::BiddingStrategyType', 'mutateLabelResponse/rval/partialFailureErrors[SizeLimitError]/reason' => 'Google::Ads::AdWords::v201406::SizeLimitError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[IdError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SelectorError]/reason' => 'Google::Ads::AdWords::v201406::SelectorError::Reason', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]' => 'Google::Ads::AdWords::v201406::ManualCpcBiddingScheme', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[OperationAccessDenied]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/existingCount' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutate/operations/operand/settings[TrackingSetting]/trackingUrl' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RangeError]/reason' => 'Google::Ads::AdWords::v201406::RangeError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[DateError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]' => 'Google::Ads::AdWords::v201406::ReadOnlyError', 'mutateLabelResponse/rval/partialFailureErrors' => 'Google::Ads::AdWords::v201406::ApiError', 'mutateLabelResponse/rval/partialFailureErrors[QuotaCheckError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[PercentCpaBid]' => 'Google::Ads::AdWords::v201406::PercentCpaBid', 'mutateResponse/rval/partialFailureErrors[StatsQueryError]' => 'Google::Ads::AdWords::v201406::StatsQueryError', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[NotEmptyError]' => 'Google::Ads::AdWords::v201406::NotEmptyError', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/value/budget/period' => 'Google::Ads::AdWords::v201406::Budget::BudgetPeriod', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]' => 'Google::Ads::AdWords::v201406::PageOnePromotedBiddingScheme', 'queryResponse/rval/entries/forwardCompatibilityMap/value' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RequestError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[UrlError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[NullError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[QueryError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[QuotaCheckError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/budget/referenceCount' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateResponse/rval/partialFailureErrors[RejectedError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/networkSetting/targetGoogleSearch' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/value/frequencyCap/impressions' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/enhancedCpcEnabled' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/settings[TrackingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DateRangeError]' => 'Google::Ads::AdWords::v201406::DateRangeError', 'getResponse/rval/Page.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AdxError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityNotFound]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration' => 'Google::Ads::AdWords::v201406::BiddingStrategyConfiguration', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]' => 'Google::Ads::AdWords::v201406::PageOnePromotedBiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[RejectedError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[TargetError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[AuthenticationError]/reason' => 'Google::Ads::AdWords::v201406::AuthenticationError::Reason', 'mutateLabelResponse/rval/ListReturnValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RateExceededError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids' => 'Google::Ads::AdWords::v201406::Bids', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]/enhancedCpcEnabled' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'queryResponse/rval/entries/settings[DynamicSearchAdsSetting]/domainName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/budget/isExplicitlyShared' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[RequestError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RangeError]' => 'Google::Ads::AdWords::v201406::RangeError', 'mutateLabelResponse/rval/partialFailureErrors[QuotaError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[SizeLimitError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'queryResponse/rval/entries/budget' => 'Google::Ads::AdWords::v201406::Budget', 'mutateLabelResponse/rval/partialFailureErrors[OperationAccessDenied]' => 'Google::Ads::AdWords::v201406::OperationAccessDenied', 'mutateResponse/rval/partialFailureErrors[IdError]/reason' => 'Google::Ads::AdWords::v201406::IdError::Reason', 'getResponse/rval/entries/frequencyCap/level' => 'Google::Ads::AdWords::v201406::Level', 'mutate/operations/Operation.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]' => 'Google::Ads::AdWords::v201406::BudgetOptimizerBiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[QueryError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RangeError]/reason' => 'Google::Ads::AdWords::v201406::RangeError::Reason', 'mutateResponse/rval/partialFailureErrors[DateRangeError]/reason' => 'Google::Ads::AdWords::v201406::DateRangeError::Reason', 'mutateResponse/rval/value/settings[DynamicSearchAdsSetting]/domainName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[StatsQueryError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[ManualCpmBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[UrlError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/settings[ShoppingSetting]/merchantId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingError]' => 'Google::Ads::AdWords::v201406::BiddingError', 'mutateLabelResponse/rval/partialFailureErrors[AuthenticationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ManualCpmBiddingScheme]' => 'Google::Ads::AdWords::v201406::ManualCpmBiddingScheme', 'Fault/detail/ApiExceptionFault/errors[AdxError]' => 'Google::Ads::AdWords::v201406::AdxError', 'mutateLabelResponse/rval/partialFailureErrors[DatabaseError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/displaySelect' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'Fault/detail/ApiExceptionFault/errors[SettingError]/reason' => 'Google::Ads::AdWords::v201406::SettingError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[UrlError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BiddingErrors]' => 'Google::Ads::AdWords::v201406::BiddingErrors', 'queryResponse/rval/entries/labels[TextLabel]/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[RateExceededError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[IdError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[InternalApiError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/frequencyCap/level' => 'Google::Ads::AdWords::v201406::Level', 'mutateResponse/rval/partialFailureErrors[RangeError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'Fault/detail/ApiExceptionFault/errors[IdError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[DynamicSearchAdsSetting]' => 'Google::Ads::AdWords::v201406::DynamicSearchAdsSetting', 'mutate/operations/operand/labels/status' => 'Google::Ads::AdWords::v201406::Label::Status', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingTransitionError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpmBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingErrors]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/raiseBidWhenLowQualityScore' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'queryResponse/rval/entries/displaySelect' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'queryResponse/rval/entries/frequencyCap/level' => 'Google::Ads::AdWords::v201406::Level', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PercentCpaBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[NewEntityCreationError]' => 'Google::Ads::AdWords::v201406::NewEntityCreationError', 'getResponse/rval/entries/settings[ShoppingSetting]' => 'Google::Ads::AdWords::v201406::ShoppingSetting', 'mutateResponse/rval/partialFailureErrors[BudgetError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get/serviceSelector/dateRange' => 'Google::Ads::AdWords::v201406::DateRange', 'get/serviceSelector/ordering/sortOrder' => 'Google::Ads::AdWords::v201406::SortOrder', 'mutateLabelResponse/rval/partialFailureErrors[RangeError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[IdError]' => 'Google::Ads::AdWords::v201406::IdError', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[DateError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get' => 'Google::Ads::AdWords::v201406::CampaignService::get', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/raiseBidWhenBudgetConstained' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutateLabelResponse/rval/partialFailureErrors[ClientTermsError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[ReadOnlyError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/frequencyCap' => 'Google::Ads::AdWords::v201406::FrequencyCap', 'Fault/detail/ApiExceptionFault/errors[RequestError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[TrackingSetting]' => 'Google::Ads::AdWords::v201406::TrackingSetting', 'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]' => 'Google::Ads::AdWords::v201406::QuotaCheckError', 'Fault/detail/ApiExceptionFault/errors[RateExceededError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/value/settings[ShoppingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QuotaError]/reason' => 'Google::Ads::AdWords::v201406::QuotaError::Reason', 'mutateResponse/rval/value/budget/referenceCount' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateLabelResponse/rval/partialFailureErrors[SettingError]' => 'Google::Ads::AdWords::v201406::SettingError', 'mutateResponse/rval/partialFailureErrors[DateRangeError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[OperationAccessDenied]/reason' => 'Google::Ads::AdWords::v201406::OperationAccessDenied::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetSpendBiddingScheme', 'Fault/detail/ApiExceptionFault/errors[SelectorError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BudgetError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[BudgetError]' => 'Google::Ads::AdWords::v201406::BudgetError', 'mutateResponse/rval/value/forwardCompatibilityMap/key' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpaBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'queryResponse/rval/entries/labels/status' => 'Google::Ads::AdWords::v201406::Label::Status', 'mutateResponse/rval/partialFailureErrors[BiddingErrors]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[QueryError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]' => 'Google::Ads::AdWords::v201406::ManualCpcBiddingScheme', 'getResponse/rval/entries/budget/budgetId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[RejectedError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BiddingTransitionError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[DatabaseError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SizeLimitError]/reason' => 'Google::Ads::AdWords::v201406::SizeLimitError::Reason', 'mutateResponse/rval/partialFailureErrors[RequiredError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetSpendBiddingScheme', 'mutate/operations/operand/biddingStrategyConfiguration' => 'Google::Ads::AdWords::v201406::BiddingStrategyConfiguration', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'getResponse/rval/entries/forwardCompatibilityMap/value' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[StringLengthError]' => 'Google::Ads::AdWords::v201406::StringLengthError', 'mutateResponse/rval/partialFailureErrors[AuthenticationError]/reason' => 'Google::Ads::AdWords::v201406::AuthenticationError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpmBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'getResponse/rval/entries/endDate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[GeoTargetTypeSetting]' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/enhancedCpcEnabled' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/biddingStrategyConfiguration/bids/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/labels[TextLabel]/Label.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SettingError]/reason' => 'Google::Ads::AdWords::v201406::SettingError::Reason', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PercentCpaBiddingScheme]' => 'Google::Ads::AdWords::v201406::PercentCpaBiddingScheme', 'mutateResponse/rval/value/budget/amount/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpcBid]/cpcBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/bidType' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme::BidType', 'mutate/operations/operand/budget/period' => 'Google::Ads::AdWords::v201406::Budget::BudgetPeriod', 'mutateLabelResponse/rval/partialFailureErrors[StringLengthError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RangeError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[DynamicSearchAdsSetting]/domainName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/labels/Label.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[QueryError]/reason' => 'Google::Ads::AdWords::v201406::QueryError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpaBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetRoasBiddingScheme', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PercentCpaBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[TargetError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/labels/Label.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/status' => 'Google::Ads::AdWords::v201406::CampaignStatus', 'mutateResponse/rval/partialFailureErrors[EntityNotFound]/reason' => 'Google::Ads::AdWords::v201406::EntityNotFound::Reason', 'mutateResponse/rval/partialFailureErrors[BiddingTransitionError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DistinctError]/reason' => 'Google::Ads::AdWords::v201406::DistinctError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[SizeLimitError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[ManualCpmBiddingScheme]' => 'Google::Ads::AdWords::v201406::ManualCpmBiddingScheme', 'Fault/detail/ApiExceptionFault/errors[RateExceededError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[QuotaError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingError]/reason' => 'Google::Ads::AdWords::v201406::BiddingError::Reason', 'mutateResponse/rval/partialFailureErrors[OperationAccessDenied]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/labels[TextLabel]' => 'Google::Ads::AdWords::v201406::TextLabel', 'mutateLabelResponse/rval/partialFailureErrors[DatabaseError]' => 'Google::Ads::AdWords::v201406::DatabaseError', 'mutateResponse/rval/partialFailureErrors[RejectedError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[ClientTermsError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetRoasBiddingScheme', 'queryResponse/rval/entries/labels[TextLabel]' => 'Google::Ads::AdWords::v201406::TextLabel', 'mutateResponse/rval/partialFailureErrors[UrlError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AdxError]/reason' => 'Google::Ads::AdWords::v201406::AdxError::Reason', 'mutateResponse/rval/value/networkSetting/targetPartnerSearchNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'queryResponse/rval/entries/labels/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[QuotaError]/reason' => 'Google::Ads::AdWords::v201406::QuotaError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[IdError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingTransitionError]/reason' => 'Google::Ads::AdWords::v201406::BiddingTransitionError::Reason', 'Fault/detail/ApiExceptionFault/errors[ForwardCompatibilityError]' => 'Google::Ads::AdWords::v201406::ForwardCompatibilityError', 'Fault/detail/ApiExceptionFault/errors[NullError]' => 'Google::Ads::AdWords::v201406::NullError', 'mutateLabelResponse/rval/partialFailureErrors[DistinctError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/urlCustomParameters/parameters' => 'Google::Ads::AdWords::v201406::CustomParameter', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpaBid]' => 'Google::Ads::AdWords::v201406::CpaBid', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpmBid]' => 'Google::Ads::AdWords::v201406::CpmBid', 'mutateResponse/rval/partialFailureErrors[AdxError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'ApiExceptionFault/errors/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[StatsQueryError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[OperationAccessDenied]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabel/operations/operator' => 'Google::Ads::AdWords::v201406::Operator', 'mutateResponse/rval/partialFailureErrors[EntityAccessDenied]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'queryResponse/rval' => 'Google::Ads::AdWords::v201406::CampaignPage', 'mutateResponse/rval/partialFailureErrors[UrlError]/reason' => 'Google::Ads::AdWords::v201406::UrlError::Reason', 'mutateLabelResponse/rval' => 'Google::Ads::AdWords::v201406::CampaignLabelReturnValue', 'mutateResponse/rval/value/urlCustomParameters/parameters/key' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityAccessDenied]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[PercentCpaBid]/bid' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/labels[TextLabel]/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'getResponse/rval/entries/networkSetting' => 'Google::Ads::AdWords::v201406::NetworkSetting', 'mutateLabelResponse/rval/partialFailureErrors[NullError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[StatsQueryError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/enhancedCpcEnabled' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[NotEmptyError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'ApiExceptionFault/errors/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/conversionOptimizerEligibility/eligible' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/partialFailureErrors[AuthenticationError]' => 'Google::Ads::AdWords::v201406::AuthenticationError', 'mutateResponse/rval/partialFailureErrors[NotEmptyError]/reason' => 'Google::Ads::AdWords::v201406::NotEmptyError::Reason', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[PercentCpaBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[NullError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingErrors]/reason' => 'Google::Ads::AdWords::v201406::BiddingErrors::Reason', 'mutateResponse/rval/partialFailureErrors/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[PercentCpaBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PercentCpaBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QuotaError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[DateError]' => 'Google::Ads::AdWords::v201406::DateError', 'mutateLabelResponse/rval/partialFailureErrors[NewEntityCreationError]' => 'Google::Ads::AdWords::v201406::NewEntityCreationError', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/value/conversionOptimizerEligibility/rejectionReasons' => 'Google::Ads::AdWords::v201406::ConversionOptimizerEligibility::RejectionReason', 'mutateResponse/rval/partialFailureErrors[IdError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/settings[TrackingSetting]' => 'Google::Ads::AdWords::v201406::TrackingSetting', 'getResponse/rval/entries/budget/status' => 'Google::Ads::AdWords::v201406::Budget::BudgetStatus', 'mutateResponse/rval/partialFailureErrors[NewEntityCreationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[RealTimeBiddingSetting]' => 'Google::Ads::AdWords::v201406::RealTimeBiddingSetting', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RangeError]' => 'Google::Ads::AdWords::v201406::RangeError', 'Fault/detail/ApiExceptionFault/errors[RateExceededError]/retryAfterSeconds' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateResponse/rval/partialFailureErrors[AuthenticationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DateError]' => 'Google::Ads::AdWords::v201406::DateError', 'Fault/detail/ApiExceptionFault/errors[EntityAccessDenied]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/reason' => 'Google::Ads::AdWords::v201406::EntityCountLimitExceeded::Reason', 'mutateResponse/rval/value/labels[TextLabel]' => 'Google::Ads::AdWords::v201406::TextLabel', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[UrlError]' => 'Google::Ads::AdWords::v201406::UrlError', 'mutateLabelResponse/rval/partialFailureErrors[OperatorError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme' => 'Google::Ads::AdWords::v201406::BiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[ClientTermsError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/settings[ShoppingSetting]/salesCountry' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor' => 'Google::Ads::AdWords::v201406::Money', 'Fault/detail/ApiExceptionFault/errors[AuthorizationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]/cpcBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[CampaignError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RequiredError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NullError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[KeywordMatchSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/ApplicationException.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get/serviceSelector/ordering/field' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[CampaignError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/servingStatus' => 'Google::Ads::AdWords::v201406::ServingStatus', 'mutateLabelResponse/rval/partialFailureErrors[StatsQueryError]/reason' => 'Google::Ads::AdWords::v201406::StatsQueryError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[NullError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[NotEmptyError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[EnhancedCpcBiddingScheme]' => 'Google::Ads::AdWords::v201406::EnhancedCpcBiddingScheme', 'Fault/detail/ApiExceptionFault/errors[EntityCountLimitExceeded]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpaBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get/serviceSelector/fields' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/urlCustomParameters/parameters/isRemove' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpcBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetSpendBiddingScheme', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor' => 'Google::Ads::AdWords::v201406::Money', 'queryResponse/rval/entries/settings/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BudgetError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[EntityNotFound]/reason' => 'Google::Ads::AdWords::v201406::EntityNotFound::Reason', 'mutateResponse/rval/partialFailureErrors[QuotaError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[EntityNotFound]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ForwardCompatibilityError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[TrackingSetting]/trackingUrl' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/faultactor' => 'SOAP::WSDL::XSD::Typelib::Builtin::token', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'ApiExceptionFault/errors' => 'Google::Ads::AdWords::v201406::ApiError', 'mutateResponse/rval/value/settings[RealTimeBiddingSetting]' => 'Google::Ads::AdWords::v201406::RealTimeBiddingSetting', 'mutateLabelResponse/rval/partialFailureErrors[EntityNotFound]' => 'Google::Ads::AdWords::v201406::EntityNotFound', 'mutateLabelResponse/rval/partialFailureErrors[DateRangeError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[EntityNotFound]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RequestError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RequestError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/labels' => 'Google::Ads::AdWords::v201406::Label', 'mutateResponse/rval/value/networkSetting' => 'Google::Ads::AdWords::v201406::NetworkSetting', 'queryResponse/rval/entries/settings[GeoTargetTypeSetting]/positiveGeoTargetType' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting::PositiveGeoTargetType', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate' => 'Google::Ads::AdWords::v201406::CampaignService::mutate', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/targetRoas' => 'SOAP::WSDL::XSD::Typelib::Builtin::double', 'mutateResponse/rval/partialFailureErrors[QuotaCheckError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/budget/status' => 'Google::Ads::AdWords::v201406::Budget::BudgetStatus', 'getResponse/rval/entries/advertisingChannelType' => 'Google::Ads::AdWords::v201406::AdvertisingChannelType', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'Fault/detail/ApiExceptionFault/errors[QueryError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AuthorizationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[CampaignError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/budget/amount' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[EntityAccessDenied]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'queryResponse/rval/entries/conversionOptimizerEligibility' => 'Google::Ads::AdWords::v201406::ConversionOptimizerEligibility', 'mutateLabelResponse/rval/partialFailureErrors[SettingError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/networkSetting/targetGoogleSearch' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/partialFailureErrors[RejectedError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NullError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BiddingError]/reason' => 'Google::Ads::AdWords::v201406::BiddingError::Reason', 'mutate/operations/operand/settings[KeywordMatchSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/displaySelect' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[StatsQueryError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[SizeLimitError]/reason' => 'Google::Ads::AdWords::v201406::SizeLimitError::Reason', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]' => 'Google::Ads::AdWords::v201406::PageOnePromotedBiddingScheme', 'queryResponse/rval/entries/settings[RealTimeBiddingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[QueryError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidChangesForRaisesOnly' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidChangesForRaisesOnly' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/partialFailureErrors[QuotaError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BudgetError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[EntityCountLimitExceeded]' => 'Google::Ads::AdWords::v201406::EntityCountLimitExceeded', 'mutateLabelResponse/rval/partialFailureErrors[SettingError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]' => 'Google::Ads::AdWords::v201406::CpcBid', 'mutateLabelResponse/rval/partialFailureErrors[BiddingTransitionError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DistinctError]' => 'Google::Ads::AdWords::v201406::DistinctError', 'mutateResponse/rval/partialFailureErrors[NullError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SelectorError]' => 'Google::Ads::AdWords::v201406::SelectorError', 'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[IdError]' => 'Google::Ads::AdWords::v201406::IdError', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpaBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[OperationAccessDenied]/reason' => 'Google::Ads::AdWords::v201406::OperationAccessDenied::Reason', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[BudgetError]/reason' => 'Google::Ads::AdWords::v201406::BudgetError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpcBid]' => 'Google::Ads::AdWords::v201406::CpcBid', 'Fault/detail/ApiExceptionFault/errors[EntityAccessDenied]/reason' => 'Google::Ads::AdWords::v201406::EntityAccessDenied::Reason', 'mutateLabelResponse/rval/partialFailureErrors[ReadOnlyError]/reason' => 'Google::Ads::AdWords::v201406::ReadOnlyError::Reason', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/pricingMode' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme::PricingMode', 'Fault/detail/ApiExceptionFault/errors[IdError]' => 'Google::Ads::AdWords::v201406::IdError', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[EnhancedCpcBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get/serviceSelector/predicates/field' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ReadOnlyError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingError]/reason' => 'Google::Ads::AdWords::v201406::BiddingError::Reason', 'Fault/detail/ApiExceptionFault/errors[StringLengthError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RequiredError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme' => 'Google::Ads::AdWords::v201406::BiddingScheme', 'mutateResponse/rval' => 'Google::Ads::AdWords::v201406::CampaignReturnValue', 'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]/reason' => 'Google::Ads::AdWords::v201406::OperationAccessDenied::Reason', 'mutateLabelResponse/rval/partialFailureErrors[QueryError]/message' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DatabaseError]' => 'Google::Ads::AdWords::v201406::DatabaseError', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpaBid]' => 'Google::Ads::AdWords::v201406::CpaBid', 'mutateResponse/rval/partialFailureErrors[DateRangeError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityCountLimitExceeded]/enclosingId' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NotEmptyError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QuotaError]/limit' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateResponse/rval/value/frequencyCap' => 'Google::Ads::AdWords::v201406::FrequencyCap', 'mutateResponse/rval/partialFailureErrors[AuthorizationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingStrategyName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[UrlError]' => 'Google::Ads::AdWords::v201406::UrlError', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme' => 'Google::Ads::AdWords::v201406::BiddingScheme', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[StringLengthError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[OperatorError]' => 'Google::Ads::AdWords::v201406::OperatorError', 'mutateLabelResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/accountLimitType' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[EnhancedCpcBiddingScheme]' => 'Google::Ads::AdWords::v201406::EnhancedCpcBiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[NullError]' => 'Google::Ads::AdWords::v201406::NullError', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingStrategyType' => 'Google::Ads::AdWords::v201406::BiddingStrategyType', 'mutateResponse/rval/partialFailureErrors[NewEntityCreationError]/reason' => 'Google::Ads::AdWords::v201406::NewEntityCreationError::Reason', 'Fault/detail/ApiExceptionFault/errors[BiddingTransitionError]/reason' => 'Google::Ads::AdWords::v201406::BiddingTransitionError::Reason', 'get/serviceSelector' => 'Google::Ads::AdWords::v201406::Selector', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor' => 'Google::Ads::AdWords::v201406::Money', 'getResponse/rval/entries/settings[KeywordMatchSetting]' => 'Google::Ads::AdWords::v201406::KeywordMatchSetting', 'mutateResponse/rval/partialFailureErrors[DistinctError]' => 'Google::Ads::AdWords::v201406::DistinctError', 'getResponse/rval/entries/settings[DynamicSearchAdsSetting]/languageCode' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RateExceededError]/rateName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[BudgetError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[SelectorError]' => 'Google::Ads::AdWords::v201406::SelectorError', 'mutateLabelResponse/rval/partialFailureErrors[BiddingError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[QuotaError]' => 'Google::Ads::AdWords::v201406::QuotaError', 'mutateLabelResponse/rval/partialFailureErrors[QuotaCheckError]/reason' => 'Google::Ads::AdWords::v201406::QuotaCheckError::Reason', 'Fault/detail/ApiExceptionFault/errors[EntityNotFound]/reason' => 'Google::Ads::AdWords::v201406::EntityNotFound::Reason', 'mutate/operations/operand/labels/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'getResponse/rval/entries/trackingUrlTemplate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/advertisingChannelType' => 'Google::Ads::AdWords::v201406::AdvertisingChannelType', 'mutateResponse/rval/partialFailureErrors[SettingError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[AdxError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/labels[TextLabel]/Label.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DateError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[ReadOnlyError]' => 'Google::Ads::AdWords::v201406::ReadOnlyError', 'Fault/detail/ApiExceptionFault/errors[ClientTermsError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AdxError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetCpaBiddingScheme', 'mutateResponse/rval/partialFailureErrors[AdxError]' => 'Google::Ads::AdWords::v201406::AdxError', 'mutateLabelResponse/rval/partialFailureErrors[NullError]/reason' => 'Google::Ads::AdWords::v201406::NullError::Reason', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpmBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpaBid]' => 'Google::Ads::AdWords::v201406::CpaBid', 'mutateLabelResponse/rval/partialFailureErrors[SelectorError]' => 'Google::Ads::AdWords::v201406::SelectorError', 'Fault/detail/ApiExceptionFault/errors[StatsQueryError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NotEmptyError]/reason' => 'Google::Ads::AdWords::v201406::NotEmptyError::Reason', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpcBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingTransitionError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QuotaCheckError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabel/operations/Operation.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[EnhancedCpcBiddingScheme]' => 'Google::Ads::AdWords::v201406::EnhancedCpcBiddingScheme', 'mutateResponse/rval/partialFailureErrors[NullError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/networkSetting/targetSearchNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/frequencyCap/impressions' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[RateExceededError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutate/operations/operand/networkSetting/targetContentNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[QueryError]/reason' => 'Google::Ads::AdWords::v201406::QueryError::Reason', 'mutateResponse/rval/partialFailureErrors[ForwardCompatibilityError]' => 'Google::Ads::AdWords::v201406::ForwardCompatibilityError', 'Fault/detail/ApiExceptionFault/errors[AuthorizationError]/reason' => 'Google::Ads::AdWords::v201406::AuthorizationError::Reason', 'mutate/operations/operand/networkSetting/targetSearchNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'get/serviceSelector/paging' => 'Google::Ads::AdWords::v201406::Paging', 'Fault/detail/ApiExceptionFault/errors[EntityCountLimitExceeded]/limit' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'Fault/detail/ApiExceptionFault/errors[RequestError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NewEntityCreationError]' => 'Google::Ads::AdWords::v201406::NewEntityCreationError', 'mutateResponse/rval/partialFailureErrors[BiddingTransitionError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingStrategyName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[StatsQueryError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[InternalApiError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RateExceededError]/rateScope' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries' => 'Google::Ads::AdWords::v201406::Campaign', 'getResponse/rval/entries/budget/deliveryMethod' => 'Google::Ads::AdWords::v201406::Budget::BudgetDeliveryMethod', 'Fault/detail/ApiExceptionFault/errors[EntityNotFound]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ForwardCompatibilityError]' => 'Google::Ads::AdWords::v201406::ForwardCompatibilityError', 'Fault/detail/ApiExceptionFault/errors[QueryError]/message' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/budget/amount/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[EntityNotFound]' => 'Google::Ads::AdWords::v201406::EntityNotFound', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[EnhancedCpcBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/networkSetting/targetContentNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'Fault/detail/ApiExceptionFault/errors[EntityCountLimitExceeded]/accountLimitType' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RateExceededError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/limit' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PercentCpaBiddingScheme]' => 'Google::Ads::AdWords::v201406::PercentCpaBiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[RequiredError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[NotEmptyError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/value/campaignId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[SizeLimitError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[IdError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[KeywordMatchSetting]/optIn' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/partialFailureErrors[StatsQueryError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[StatsQueryError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/trackingUrlTemplate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NullError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/bidType' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme::BidType', 'mutateResponse/rval/partialFailureErrors[SelectorError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[PercentCpaBid]' => 'Google::Ads::AdWords::v201406::PercentCpaBid', 'mutateLabelResponse/rval/partialFailureErrors[BudgetError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[SizeLimitError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/networkSetting/targetPartnerSearchNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidChangesForRaisesOnly' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'Fault/detail/ApiExceptionFault/errors[SettingError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/urlCustomParameters/parameters/key' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[EntityNotFound]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[TargetError]' => 'Google::Ads::AdWords::v201406::TargetError', 'mutateResponse/rval/partialFailureErrors[BudgetError]' => 'Google::Ads::AdWords::v201406::BudgetError', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DateError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/conversionOptimizerEligibility' => 'Google::Ads::AdWords::v201406::ConversionOptimizerEligibility', 'mutate/operations/operand/settings[DynamicSearchAdsSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[SettingError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[NewEntityCreationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[DateError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]' => 'Google::Ads::AdWords::v201406::OperationAccessDenied', 'mutateResponse/rval/partialFailureErrors[IdError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[UrlError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/strategyGoal' => 'Google::Ads::AdWords::v201406::PageOnePromotedBiddingScheme::StrategyGoal', 'getResponse/rval/entries/frequencyCap/impressions' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[ManualCpmBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[GeoTargetTypeSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[StatsQueryError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/accountLimitType' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[KeywordMatchSetting]/optIn' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[UrlError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget' => 'Google::Ads::AdWords::v201406::Money', 'Fault/detail/ApiExceptionFault/errors[QueryError]' => 'Google::Ads::AdWords::v201406::QueryError', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[RateExceededError]' => 'Google::Ads::AdWords::v201406::RateExceededError', 'mutateResponse/rval/partialFailureErrors[AuthenticationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RequestError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[StringLengthError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[GeoTargetTypeSetting]/negativeGeoTargetType' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting::NegativeGeoTargetType', 'mutateLabelResponse' => 'Google::Ads::AdWords::v201406::CampaignService::mutateLabelResponse', 'mutateResponse/rval/value/conversionOptimizerEligibility/eligible' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DistinctError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[SizeLimitError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RejectedError]/reason' => 'Google::Ads::AdWords::v201406::RejectedError::Reason', 'Fault/detail/ApiExceptionFault/errors[RateExceededError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/targetRoas' => 'SOAP::WSDL::XSD::Typelib::Builtin::double', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'ApiExceptionFault/errors/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RequiredError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[RejectedError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QuotaError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[CampaignError]/reason' => 'Google::Ads::AdWords::v201406::CampaignError::Reason', 'Fault/detail/ApiExceptionFault/errors[ClientTermsError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/settings[KeywordMatchSetting]' => 'Google::Ads::AdWords::v201406::KeywordMatchSetting', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RequiredError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DateRangeError]' => 'Google::Ads::AdWords::v201406::DateRangeError', 'mutate/operations/operand/settings[KeywordMatchSetting]/optIn' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/partialFailureErrors[StringLengthError]/reason' => 'Google::Ads::AdWords::v201406::StringLengthError::Reason', 'Fault/detail/ApiExceptionFault/errors[StatsQueryError]/reason' => 'Google::Ads::AdWords::v201406::StatsQueryError::Reason', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[PercentCpaBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/faultstring' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[ShoppingSetting]/campaignPriority' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutate/operations/operand/budget/isExplicitlyShared' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/settings[DynamicSearchAdsSetting]' => 'Google::Ads::AdWords::v201406::DynamicSearchAdsSetting', 'queryResponse/rval/entries/adServingOptimizationStatus' => 'Google::Ads::AdWords::v201406::AdServingOptimizationStatus', 'Fault/detail/ApiExceptionFault/errors[DateRangeError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[ForwardCompatibilityError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[StatsQueryError]' => 'Google::Ads::AdWords::v201406::StatsQueryError', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[PercentCpaBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpaBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme' => 'Google::Ads::AdWords::v201406::BiddingScheme', 'mutateResponse/rval/partialFailureErrors[AuthorizationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[InternalApiError]/reason' => 'Google::Ads::AdWords::v201406::InternalApiError::Reason', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BudgetError]/reason' => 'Google::Ads::AdWords::v201406::BudgetError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PercentCpaBiddingScheme]' => 'Google::Ads::AdWords::v201406::PercentCpaBiddingScheme', 'queryResponse/rval/entries/servingStatus' => 'Google::Ads::AdWords::v201406::ServingStatus', 'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]/reason' => 'Google::Ads::AdWords::v201406::QuotaCheckError::Reason', 'mutate/operations/operand/urlCustomParameters' => 'Google::Ads::AdWords::v201406::CustomParameters', 'Fault/detail/ApiExceptionFault/errors[DatabaseError]/reason' => 'Google::Ads::AdWords::v201406::DatabaseError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]' => 'Google::Ads::AdWords::v201406::BudgetOptimizerBiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[AuthorizationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QueryError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/labels' => 'Google::Ads::AdWords::v201406::Label', 'getResponse/rval/entries/labels' => 'Google::Ads::AdWords::v201406::Label', 'mutateResponse/rval/partialFailureErrors[EntityAccessDenied]/reason' => 'Google::Ads::AdWords::v201406::EntityAccessDenied::Reason', 'Fault/detail/ApiExceptionFault/errors[DateError]' => 'Google::Ads::AdWords::v201406::DateError', 'Fault/detail/ApiExceptionFault/errors[ClientTermsError]/reason' => 'Google::Ads::AdWords::v201406::ClientTermsError::Reason', 'Fault/detail/ApiExceptionFault/errors[DateRangeError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[QueryError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[NullError]/reason' => 'Google::Ads::AdWords::v201406::NullError::Reason', 'Fault/detail/ApiExceptionFault/errors[AuthenticationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/conversionOptimizerEligibility/rejectionReasons' => 'Google::Ads::AdWords::v201406::ConversionOptimizerEligibility::RejectionReason', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]' => 'Google::Ads::AdWords::v201406::CpmBid', 'mutateResponse/rval/value/budget/amount/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[ForwardCompatibilityError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/startDate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[QueryError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingStrategyId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[TargetError]' => 'Google::Ads::AdWords::v201406::TargetError', 'queryResponse/rval/entries/urlCustomParameters/parameters' => 'Google::Ads::AdWords::v201406::CustomParameter', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidModifier' => 'SOAP::WSDL::XSD::Typelib::Builtin::double', 'mutateLabelResponse/rval/partialFailureErrors[QueryError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[CampaignError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme', 'Fault/detail/ApiExceptionFault/errors[DateRangeError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[PercentCpaBid]/percentCpaBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'queryResponse/rval/entries/budget/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SizeLimitError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/budget/budgetId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpaBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RangeError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/frequencyCap/level' => 'Google::Ads::AdWords::v201406::Level', 'mutate/operations/operand/conversionOptimizerEligibility/rejectionReasons' => 'Google::Ads::AdWords::v201406::ConversionOptimizerEligibility::RejectionReason', 'getResponse/rval/entries/budget' => 'Google::Ads::AdWords::v201406::Budget', 'mutate/operations/operand/settings' => 'Google::Ads::AdWords::v201406::Setting', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpmBid]/cpmBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'mutateLabelResponse/rval/partialFailureErrors[CampaignError]' => 'Google::Ads::AdWords::v201406::CampaignError', 'getResponse' => 'Google::Ads::AdWords::v201406::CampaignService::getResponse', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingStrategyId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]' => 'Google::Ads::AdWords::v201406::CpcBid', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]' => 'Google::Ads::AdWords::v201406::ManualCpcBiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[TargetError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[EntityAccessDenied]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[StatsQueryError]/reason' => 'Google::Ads::AdWords::v201406::StatsQueryError::Reason', 'mutateResponse/rval/value/biddingStrategyConfiguration' => 'Google::Ads::AdWords::v201406::BiddingStrategyConfiguration', 'mutateResponse/rval/partialFailureErrors[DatabaseError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ForwardCompatibilityError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RejectedError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingErrors]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DateRangeError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/value' => 'Google::Ads::AdWords::v201406::CampaignLabel', 'mutateResponse/rval/partialFailureErrors[ForwardCompatibilityError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/urlCustomParameters/parameters/isRemove' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]/cpcBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'mutateLabelResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityNotFound]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/forwardCompatibilityMap/key' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/urlCustomParameters/parameters/isRemove' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/partialFailureErrors[OperatorError]/reason' => 'Google::Ads::AdWords::v201406::OperatorError::Reason', 'Fault/detail/ApiExceptionFault/errors[AuthorizationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DatabaseError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/urlCustomParameters/parameters/value' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/budget/amount/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetCpaBiddingScheme', 'getResponse/rval/entries/budget/period' => 'Google::Ads::AdWords::v201406::Budget::BudgetPeriod', 'mutateLabelResponse/rval/partialFailureErrors[DistinctError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/adServingOptimizationStatus' => 'Google::Ads::AdWords::v201406::AdServingOptimizationStatus', 'mutateLabelResponse/rval/partialFailureErrors[CampaignError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/strategyGoal' => 'Google::Ads::AdWords::v201406::PageOnePromotedBiddingScheme::StrategyGoal', 'mutateLabelResponse/rval/partialFailureErrors[BiddingTransitionError]/reason' => 'Google::Ads::AdWords::v201406::BiddingTransitionError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[RangeError]' => 'Google::Ads::AdWords::v201406::RangeError', 'Fault/detail/ApiExceptionFault/errors[ClientTermsError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[TargetError]/reason' => 'Google::Ads::AdWords::v201406::TargetError::Reason', 'Fault/detail/ApiExceptionFault/errors[ClientTermsError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[AuthorizationError]/reason' => 'Google::Ads::AdWords::v201406::AuthorizationError::Reason', 'mutateResponse/rval/partialFailureErrors[RequiredError]' => 'Google::Ads::AdWords::v201406::RequiredError', 'queryResponse/rval/entries' => 'Google::Ads::AdWords::v201406::Campaign', 'mutateLabelResponse/rval/partialFailureErrors[IdError]/reason' => 'Google::Ads::AdWords::v201406::IdError::Reason', 'Fault/detail/ApiExceptionFault/errors[BudgetError]/reason' => 'Google::Ads::AdWords::v201406::BudgetError::Reason', 'Fault/detail/ApiExceptionFault/errors[InternalApiError]/reason' => 'Google::Ads::AdWords::v201406::InternalApiError::Reason', 'mutateResponse/rval/partialFailureErrors[OperatorError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RateExceededError]' => 'Google::Ads::AdWords::v201406::RateExceededError', 'queryResponse/rval/entries/networkSetting' => 'Google::Ads::AdWords::v201406::NetworkSetting', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidChangesForRaisesOnly' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[AuthorizationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BiddingErrors]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabel/operations/operand' => 'Google::Ads::AdWords::v201406::CampaignLabel', 'mutateResponse/rval/partialFailureErrors[QuotaCheckError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get/serviceSelector/predicates/values' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingErrors]' => 'Google::Ads::AdWords::v201406::BiddingErrors', 'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[QuotaError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[ShoppingSetting]/merchantId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/pricingMode' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme::PricingMode', 'Fault/detail/ApiExceptionFault/errors[DistinctError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RequiredError]' => 'Google::Ads::AdWords::v201406::RequiredError', 'Fault/detail/ApiExceptionFault/errors[StringLengthError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[SelectorError]/reason' => 'Google::Ads::AdWords::v201406::SelectorError::Reason', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids' => 'Google::Ads::AdWords::v201406::Bids', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[EnhancedCpcBiddingScheme]' => 'Google::Ads::AdWords::v201406::EnhancedCpcBiddingScheme', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[OperatorError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[AuthorizationError]' => 'Google::Ads::AdWords::v201406::AuthorizationError', 'mutateLabelResponse/rval/partialFailureErrors[AdxError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/networkSetting/targetPartnerSearchNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[TargetError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingStrategyName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[ShoppingSetting]/merchantId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetCpaBiddingScheme', 'mutateResponse/rval/value/settings/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[RequiredError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get/serviceSelector/dateRange/max' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RateExceededError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[GeoTargetTypeSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[AdxError]/reason' => 'Google::Ads::AdWords::v201406::AdxError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration' => 'Google::Ads::AdWords::v201406::BiddingStrategyConfiguration', 'Fault/detail/ApiExceptionFault/errors[SizeLimitError]' => 'Google::Ads::AdWords::v201406::SizeLimitError', 'Fault/detail/ApiExceptionFault/errors[UrlError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[QueryError]/message' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/labels/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/settings[ShoppingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BiddingError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NewEntityCreationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DistinctError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AdxError]' => 'Google::Ads::AdWords::v201406::AdxError', 'Fault/detail/ApiExceptionFault/errors[NewEntityCreationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[ManualCpmBiddingScheme]' => 'Google::Ads::AdWords::v201406::ManualCpmBiddingScheme', 'getResponse/rval/entries/settings/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[RealTimeBiddingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SettingError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpaBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'queryResponse' => 'Google::Ads::AdWords::v201406::CampaignService::queryResponse', 'Fault/detail/ApiExceptionFault/errors[QuotaError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[NewEntityCreationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[OperationAccessDenied]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpaBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityCountLimitExceeded]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/networkSetting/targetSearchNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/biddingStrategyConfiguration/biddingStrategyType' => 'Google::Ads::AdWords::v201406::BiddingStrategyType', 'Fault/detail/ApiExceptionFault/errors[UrlError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[UrlError]/reason' => 'Google::Ads::AdWords::v201406::UrlError::Reason', 'mutate/operations/operand/labels[TextLabel]/status' => 'Google::Ads::AdWords::v201406::Label::Status', 'mutateResponse/rval/partialFailureErrors[RateExceededError]/retryAfterSeconds' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateLabelResponse/rval/partialFailureErrors[BiddingError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/status' => 'Google::Ads::AdWords::v201406::CampaignStatus', 'mutateResponse/rval/value/settings[RealTimeBiddingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/urlCustomParameters/parameters/key' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NewEntityCreationError]/reason' => 'Google::Ads::AdWords::v201406::NewEntityCreationError::Reason', 'mutate/operations/operand/urlCustomParameters/doReplace' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/partialFailureErrors[RangeError]/reason' => 'Google::Ads::AdWords::v201406::RangeError::Reason', 'Fault/detail/ApiExceptionFault/errors[TargetError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[ReadOnlyError]/reason' => 'Google::Ads::AdWords::v201406::ReadOnlyError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[SelectorError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/startDate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme', 'mutateResponse/rval/partialFailureErrors[SizeLimitError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[CampaignError]' => 'Google::Ads::AdWords::v201406::CampaignError', 'mutateResponse/rval/partialFailureErrors[SettingError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/labels[TextLabel]/Label.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids' => 'Google::Ads::AdWords::v201406::Bids', 'Fault/detail/ApiExceptionFault/errors[SelectorError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[NotEmptyError]' => 'Google::Ads::AdWords::v201406::NotEmptyError', 'mutate/operations/operand/endDate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DatabaseError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/budget/status' => 'Google::Ads::AdWords::v201406::Budget::BudgetStatus', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[ForwardCompatibilityError]/reason' => 'Google::Ads::AdWords::v201406::ForwardCompatibilityError::Reason', 'queryResponse/rval/entries/settings[ShoppingSetting]/salesCountry' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/labels/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpmBid]/cpmBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'Fault/detail/ApiExceptionFault/errors[BiddingTransitionError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail' => 'Google::Ads::AdWords::FaultDetail', 'mutateLabelResponse/rval/partialFailureErrors[DateRangeError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/budget/deliveryMethod' => 'Google::Ads::AdWords::v201406::Budget::BudgetDeliveryMethod', 'Fault/detail/ApiExceptionFault/errors[OperatorError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/labels' => 'Google::Ads::AdWords::v201406::Label', 'Fault/detail/ApiExceptionFault/errors[CampaignError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RequiredError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[StringLengthError]' => 'Google::Ads::AdWords::v201406::StringLengthError', 'mutateLabelResponse/rval/partialFailureErrors[NotEmptyError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[CampaignError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[QuotaError]' => 'Google::Ads::AdWords::v201406::QuotaError', 'mutateResponse/rval/partialFailureErrors[RequiredError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BudgetError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RangeError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutate/operations/operand/settings[RealTimeBiddingSetting]/optIn' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/targetCpa' => 'Google::Ads::AdWords::v201406::Money', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingStrategySource' => 'Google::Ads::AdWords::v201406::BiddingStrategySource', 'Fault/detail/ApiExceptionFault/errors[RequestError]' => 'Google::Ads::AdWords::v201406::RequestError', 'queryResponse/rval/entries/settings[DynamicSearchAdsSetting]' => 'Google::Ads::AdWords::v201406::DynamicSearchAdsSetting', 'mutateLabelResponse/rval/partialFailureErrors[RequiredError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ClientTermsError]' => 'Google::Ads::AdWords::v201406::ClientTermsError', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[RequiredError]' => 'Google::Ads::AdWords::v201406::RequiredError', 'mutate/operations/operand/settings[ShoppingSetting]/campaignPriority' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'get/serviceSelector/paging/numberResults' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateResponse/rval/partialFailureErrors[BiddingErrors]' => 'Google::Ads::AdWords::v201406::BiddingErrors', 'Fault/detail/ApiExceptionFault/errors[AuthenticationError]' => 'Google::Ads::AdWords::v201406::AuthenticationError', 'Fault/detail/ApiExceptionFault/errors[SizeLimitError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[NotEmptyError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RejectedError]/reason' => 'Google::Ads::AdWords::v201406::RejectedError::Reason', 'mutateResponse/rval/value/settings[KeywordMatchSetting]' => 'Google::Ads::AdWords::v201406::KeywordMatchSetting', 'mutateLabelResponse/rval/partialFailureErrors[DistinctError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityAccessDenied]' => 'Google::Ads::AdWords::v201406::EntityAccessDenied', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/strategyGoal' => 'Google::Ads::AdWords::v201406::PageOnePromotedBiddingScheme::StrategyGoal', 'queryResponse/rval/entries/settings[TrackingSetting]' => 'Google::Ads::AdWords::v201406::TrackingSetting', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpaBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/value/networkSetting/targetGoogleSearch' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/value/forwardCompatibilityMap/value' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]/cpmBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]' => 'Google::Ads::AdWords::v201406::ManualCpcBiddingScheme', 'Fault/detail/ApiExceptionFault/errors[SelectorError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingErrors]/reason' => 'Google::Ads::AdWords::v201406::BiddingErrors::Reason', 'mutateLabelResponse/rval/partialFailureErrors[QueryError]' => 'Google::Ads::AdWords::v201406::QueryError', 'mutateResponse/rval/partialFailureErrors[NotEmptyError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/reason' => 'Google::Ads::AdWords::v201406::EntityCountLimitExceeded::Reason', 'mutateResponse/rval/value/urlCustomParameters/parameters/value' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/endDate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[TrackingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RequestError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RangeError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BiddingErrors]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabel/operations' => 'Google::Ads::AdWords::v201406::CampaignLabelOperation', 'Fault/detail/ApiExceptionFault/errors[AuthorizationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/budget/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[QueryError]' => 'Google::Ads::AdWords::v201406::QueryError', 'mutateResponse/rval/partialFailureErrors[TargetError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/budget/amount' => 'Google::Ads::AdWords::v201406::Money', 'Fault/detail/ApiExceptionFault/errors[RateExceededError]/rateScope' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BiddingTransitionError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[StringLengthError]/reason' => 'Google::Ads::AdWords::v201406::StringLengthError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpaBid]' => 'Google::Ads::AdWords::v201406::CpaBid', 'Fault/detail/ApiExceptionFault/errors[BiddingErrors]/reason' => 'Google::Ads::AdWords::v201406::BiddingErrors::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpmBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse' => 'Google::Ads::AdWords::v201406::CampaignService::mutateResponse', 'mutateLabelResponse/rval/partialFailureErrors[UrlError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AuthenticationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[EntityNotFound]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[OperatorError]/reason' => 'Google::Ads::AdWords::v201406::OperatorError::Reason', 'Fault/detail/ApiExceptionFault/errors[CampaignError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AuthenticationError]' => 'Google::Ads::AdWords::v201406::AuthenticationError', 'mutateResponse/rval/partialFailureErrors[DatabaseError]/reason' => 'Google::Ads::AdWords::v201406::DatabaseError::Reason', 'mutateResponse/rval/value/settings[RealTimeBiddingSetting]/optIn' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/frequencyCap' => 'Google::Ads::AdWords::v201406::FrequencyCap', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]/enhancedCpcEnabled' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'Fault/detail/ApiExceptionFault/errors[OperatorError]/reason' => 'Google::Ads::AdWords::v201406::OperatorError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[RangeError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingStrategyId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'getResponse/rval/entries/settings' => 'Google::Ads::AdWords::v201406::Setting', 'mutateResponse/rval/partialFailureErrors[TargetError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityCountLimitExceeded]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SettingError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RequestError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[OperatorError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[AdxError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[OperationAccessDenied]' => 'Google::Ads::AdWords::v201406::OperationAccessDenied', 'queryResponse/rval/entries/urlCustomParameters/doReplace' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[OperationAccessDenied]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SettingError]' => 'Google::Ads::AdWords::v201406::SettingError', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[SettingError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[EntityCountLimitExceeded]/reason' => 'Google::Ads::AdWords::v201406::EntityCountLimitExceeded::Reason', 'Fault/detail/ApiExceptionFault/errors[DateRangeError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor' => 'Google::Ads::AdWords::v201406::Money', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetRoasBiddingScheme', 'mutateResponse/rval/partialFailureErrors[StringLengthError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ReadOnlyError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[DynamicSearchAdsSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/raiseBidWhenBudgetConstained' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/partialFailureErrors[QuotaError]/reason' => 'Google::Ads::AdWords::v201406::QuotaError::Reason', 'Fault/detail/ApiExceptionFault/errors[NullError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NotEmptyError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/advertisingChannelType' => 'Google::Ads::AdWords::v201406::AdvertisingChannelType', 'mutateLabelResponse/rval/partialFailureErrors[AuthorizationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpaBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/urlCustomParameters/doReplace' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[RequestError]' => 'Google::Ads::AdWords::v201406::RequestError', 'Fault' => 'SOAP::WSDL::SOAP::Typelib::Fault11', 'getResponse/rval/entries/settings[DynamicSearchAdsSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/enhancedCpcEnabled' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[InternalApiError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpcBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[UrlError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[AuthenticationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/raiseBidWhenLowQualityScore' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations/operand/biddingStrategyConfiguration/biddingStrategyName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[SizeLimitError]' => 'Google::Ads::AdWords::v201406::SizeLimitError', 'mutate/operations/operand/settings[DynamicSearchAdsSetting]/languageCode' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[TargetError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BiddingError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/labels[TextLabel]/status' => 'Google::Ads::AdWords::v201406::Label::Status', 'getResponse/rval/entries/adServingOptimizationStatus' => 'Google::Ads::AdWords::v201406::AdServingOptimizationStatus', 'mutateLabelResponse/rval/partialFailureErrors[InternalApiError]/reason' => 'Google::Ads::AdWords::v201406::InternalApiError::Reason', 'Fault/detail/ApiExceptionFault/errors[RejectedError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RequiredError]/reason' => 'Google::Ads::AdWords::v201406::RequiredError::Reason', 'mutateResponse/rval/partialFailureErrors[StatsQueryError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[AuthenticationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[UrlError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingStrategySource' => 'Google::Ads::AdWords::v201406::BiddingStrategySource', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/value/settings[GeoTargetTypeSetting]/positiveGeoTargetType' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting::PositiveGeoTargetType', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ManualCpmBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RangeError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/frequencyCap/timeUnit' => 'Google::Ads::AdWords::v201406::TimeUnit', 'mutateResponse/rval/partialFailureErrors[OperatorError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RateExceededError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/settings[RealTimeBiddingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/settings[GeoTargetTypeSetting]/negativeGeoTargetType' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting::NegativeGeoTargetType', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[ClientTermsError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SizeLimitError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/labels/status' => 'Google::Ads::AdWords::v201406::Label::Status', 'mutateResponse/rval/partialFailureErrors[RejectedError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'get/serviceSelector/paging/startIndex' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'Fault/detail/ApiExceptionFault/errors[BiddingTransitionError]' => 'Google::Ads::AdWords::v201406::BiddingTransitionError', 'mutateLabelResponse/rval/partialFailureErrors[InternalApiError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[AuthenticationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[ReadOnlyError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/enclosingId' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpmBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[AdxError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/budget/amount' => 'Google::Ads::AdWords::v201406::Money', 'mutate/operations/operand/urlCustomParameters/parameters/value' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpaBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[EntityNotFound]' => 'Google::Ads::AdWords::v201406::EntityNotFound', 'getResponse/rval/entries/forwardCompatibilityMap' => 'Google::Ads::AdWords::v201406::String_StringMapEntry', 'getResponse/rval/entries/conversionOptimizerEligibility' => 'Google::Ads::AdWords::v201406::ConversionOptimizerEligibility', 'mutateLabelResponse/rval/partialFailureErrors[DatabaseError]/reason' => 'Google::Ads::AdWords::v201406::DatabaseError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[InternalApiError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/frequencyCap/timeUnit' => 'Google::Ads::AdWords::v201406::TimeUnit', 'mutateLabelResponse/rval/partialFailureErrors[EntityAccessDenied]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[OperatorError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[StringLengthError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RequestError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[QuotaCheckError]' => 'Google::Ads::AdWords::v201406::QuotaCheckError', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[AuthenticationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingTransitionError]' => 'Google::Ads::AdWords::v201406::BiddingTransitionError', 'queryResponse/rval/entries/settings[ShoppingSetting]/campaignPriority' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/existingCount' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutateLabelResponse/rval/partialFailureErrors[StringLengthError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'mutateLabelResponse/rval/partialFailureErrors[SelectorError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/labels[TextLabel]/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[DateError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/budget/budgetId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[AuthenticationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[SettingError]' => 'Google::Ads::AdWords::v201406::SettingError', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpcBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[ManualCpcBiddingScheme]/enhancedCpcEnabled' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[CampaignError]/reason' => 'Google::Ads::AdWords::v201406::CampaignError::Reason', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutate/operations/operand/budget/budgetId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[RateExceededError]/reason' => 'Google::Ads::AdWords::v201406::RateExceededError::Reason', 'mutateResponse/rval/value/budget' => 'Google::Ads::AdWords::v201406::Budget', 'mutateResponse/rval/partialFailureErrors[RateExceededError]/rateName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[TargetError]/reason' => 'Google::Ads::AdWords::v201406::TargetError::Reason', 'mutate/operations/operand/advertisingChannelType' => 'Google::Ads::AdWords::v201406::AdvertisingChannelType', 'Fault/detail/ApiExceptionFault/errors[TargetError]/reason' => 'Google::Ads::AdWords::v201406::TargetError::Reason', 'getResponse/rval/entries/urlCustomParameters/parameters/value' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[QueryError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[DynamicSearchAdsSetting]' => 'Google::Ads::AdWords::v201406::DynamicSearchAdsSetting', 'mutateResponse/rval/value/frequencyCap/timeUnit' => 'Google::Ads::AdWords::v201406::TimeUnit', 'mutateResponse/rval/partialFailureErrors[StatsQueryError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'getResponse/rval/entries/networkSetting/targetPartnerSearchNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme', 'mutateLabelResponse/rval/partialFailureErrors[RateExceededError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[EntityAccessDenied]/reason' => 'Google::Ads::AdWords::v201406::EntityAccessDenied::Reason', 'Fault/detail/ApiExceptionFault/errors[BudgetError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/budget/status' => 'Google::Ads::AdWords::v201406::Budget::BudgetStatus', 'Fault/detail/ApiExceptionFault/errors[BudgetError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutateLabelResponse/rval/partialFailureErrors[OperationAccessDenied]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[DistinctError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/servingStatus' => 'Google::Ads::AdWords::v201406::ServingStatus', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidModifier' => 'SOAP::WSDL::XSD::Typelib::Builtin::double', 'mutateLabelResponse/rval/partialFailureErrors[RateExceededError]' => 'Google::Ads::AdWords::v201406::RateExceededError', 'mutateLabelResponse/rval/partialFailureErrors[EntityAccessDenied]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingErrors]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/urlCustomParameters/doReplace' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/partialFailureErrors[QuotaCheckError]/reason' => 'Google::Ads::AdWords::v201406::QuotaCheckError::Reason', 'mutateLabelResponse/rval/partialFailureErrors[RateExceededError]/rateName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ForwardCompatibilityError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpmBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'getResponse/rval/entries/startDate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpaBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[BiddingError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PercentCpaBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DateError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/labels[TextLabel]/Label.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings' => 'Google::Ads::AdWords::v201406::Setting', 'mutateLabelResponse/rval/partialFailureErrors[SettingError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[InternalApiError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/bidCeiling/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[ReadOnlyError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingStrategyId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[DateRangeError]/reason' => 'Google::Ads::AdWords::v201406::DateRangeError::Reason', 'Fault/detail/ApiExceptionFault/errors[DatabaseError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[ShoppingSetting]' => 'Google::Ads::AdWords::v201406::ShoppingSetting', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'get/serviceSelector/ordering' => 'Google::Ads::AdWords::v201406::OrderBy', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpmBid]' => 'Google::Ads::AdWords::v201406::CpmBid', 'queryResponse/rval/entries/budget/amount' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[DateError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[OperatorError]' => 'Google::Ads::AdWords::v201406::OperatorError', 'mutateLabelResponse/rval/partialFailureErrors[RangeError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidModifier' => 'SOAP::WSDL::XSD::Typelib::Builtin::double', 'Fault/detail/ApiExceptionFault/errors[BiddingError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[SizeLimitError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QuotaError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/displaySelect' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/value/networkSetting/targetContentNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/value/labels[TextLabel]/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/networkSetting/targetContentNetwork' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'Fault/detail/ApiExceptionFault/errors[RequiredError]/reason' => 'Google::Ads::AdWords::v201406::RequiredError::Reason', 'Fault/detail/ApiExceptionFault/errors[SelectorError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NotEmptyError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[QuotaCheckError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[IdError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[EntityAccessDenied]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/endDate' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[SettingError]/reason' => 'Google::Ads::AdWords::v201406::SettingError::Reason', 'Fault/detail/ApiExceptionFault/errors[AdxError]/reason' => 'Google::Ads::AdWords::v201406::AdxError::Reason', 'mutateLabel/operations/operand/labelId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[BudgetError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[InternalApiError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[QuotaError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[DateError]/reason' => 'Google::Ads::AdWords::v201406::DateError::Reason', 'Fault/detail/ApiExceptionFault/errors[DatabaseError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]/reason' => 'Google::Ads::AdWords::v201406::ReadOnlyError::Reason', 'mutateResponse/rval/value/budget/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DistinctError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/frequencyCap/timeUnit' => 'Google::Ads::AdWords::v201406::TimeUnit', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[EnhancedCpcBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabel' => 'Google::Ads::AdWords::v201406::CampaignService::mutateLabel', 'Fault/detail/ApiExceptionFault/errors[NullError]/reason' => 'Google::Ads::AdWords::v201406::NullError::Reason', 'Fault/detail/ApiExceptionFault/errors[CampaignError]' => 'Google::Ads::AdWords::v201406::CampaignError', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[AdxError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/budget/referenceCount' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'Fault/detail/ApiExceptionFault/errors[IdError]/reason' => 'Google::Ads::AdWords::v201406::IdError::Reason', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpmBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[AuthenticationError]/reason' => 'Google::Ads::AdWords::v201406::AuthenticationError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutate/operations/operand/biddingStrategyConfiguration/bids[PercentCpaBid]/bid' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget' => 'Google::Ads::AdWords::v201406::Money', 'mutateResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/settings[RealTimeBiddingSetting]' => 'Google::Ads::AdWords::v201406::RealTimeBiddingSetting', 'getResponse/rval/entries/budget/amount/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[StringLengthError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[BiddingError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/bids[CpcBid]/bid/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[ForwardCompatibilityError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/labels[TextLabel]/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateLabelResponse/rval/partialFailureErrors[QueryError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabel/operations/operand/campaignId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'getResponse/rval/entries/settings[RealTimeBiddingSetting]' => 'Google::Ads::AdWords::v201406::RealTimeBiddingSetting', 'mutate/operations/operand/forwardCompatibilityMap' => 'Google::Ads::AdWords::v201406::String_StringMapEntry', 'getResponse/rval/entries/id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors' => 'Google::Ads::AdWords::v201406::ApiError', 'queryResponse/rval/entries/biddingStrategyConfiguration/bids[CpcBid]/bid' => 'Google::Ads::AdWords::v201406::Money', 'queryResponse/rval/entries/budget/referenceCount' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'Fault/detail/ApiExceptionFault/errors[RequestError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[NotEmptyError]/reason' => 'Google::Ads::AdWords::v201406::NotEmptyError::Reason', 'mutate/operations/operand/settings[GeoTargetTypeSetting]/positiveGeoTargetType' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting::PositiveGeoTargetType', 'getResponse/rval/entries/biddingStrategyConfiguration/bids[PercentCpaBid]/percentCpaBidSource' => 'Google::Ads::AdWords::v201406::BidSource', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/raiseBidWhenBudgetConstained' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[NewEntityCreationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/frequencyCap' => 'Google::Ads::AdWords::v201406::FrequencyCap', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpaBid]/Bids.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[RateExceededError]/reason' => 'Google::Ads::AdWords::v201406::RateExceededError::Reason', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/strategyGoal' => 'Google::Ads::AdWords::v201406::PageOnePromotedBiddingScheme::StrategyGoal', 'mutateResponse/rval/value/labels/status' => 'Google::Ads::AdWords::v201406::Label::Status', 'Fault/detail/ApiExceptionFault' => 'Google::Ads::AdWords::v201406::ApiException', 'mutateResponse/rval/partialFailureErrors[InternalApiError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/BiddingScheme.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpcBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[AuthorizationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[NewEntityCreationError]/reason' => 'Google::Ads::AdWords::v201406::NewEntityCreationError::Reason', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidModifier' => 'SOAP::WSDL::XSD::Typelib::Builtin::double', 'mutateLabelResponse/rval/partialFailureErrors[ClientTermsError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingErrors]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RejectedError]' => 'Google::Ads::AdWords::v201406::RejectedError', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/bidFloor/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/ListReturnValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/servingStatus' => 'Google::Ads::AdWords::v201406::ServingStatus', 'mutateLabelResponse/rval/partialFailureErrors[RejectedError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/forwardCompatibilityMap/key' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[RequestError]/reason' => 'Google::Ads::AdWords::v201406::RequestError::Reason', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[PageOnePromotedBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/settings[TrackingSetting]/Setting.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[NotEmptyError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RequestError]/reason' => 'Google::Ads::AdWords::v201406::RequestError::Reason', 'mutateResponse/rval/partialFailureErrors[InternalApiError]' => 'Google::Ads::AdWords::v201406::InternalApiError', 'mutateLabelResponse/rval/partialFailureErrors[AuthorizationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ClientTermsError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[TrackingSetting]/trackingUrl' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'Fault/detail/ApiExceptionFault/errors[RequiredError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[ReadOnlyError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/biddingStrategyConfiguration/bids[CpaBid]/bid/microAmount' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'Fault/detail/ApiExceptionFault/errors[QuotaError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[GeoTargetTypeSetting]' => 'Google::Ads::AdWords::v201406::GeoTargetTypeSetting', 'mutateLabelResponse/rval/partialFailureErrors[NullError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/bidType' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme::BidType', 'Fault/detail/ApiExceptionFault/errors[RangeError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[DateRangeError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[AuthorizationError]/reason' => 'Google::Ads::AdWords::v201406::AuthorizationError::Reason', 'mutateResponse/rval/partialFailureErrors[CampaignError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'query/query' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[DatabaseError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[ConversionOptimizerBiddingScheme]/bidType' => 'Google::Ads::AdWords::v201406::ConversionOptimizerBiddingScheme::BidType', 'getResponse/rval/totalNumEntries' => 'SOAP::WSDL::XSD::Typelib::Builtin::int', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]/bidCeiling/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[BiddingTransitionError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value' => 'Google::Ads::AdWords::v201406::Campaign', 'mutateResponse/rval/partialFailureErrors[TargetError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[BudgetOptimizerBiddingScheme]' => 'Google::Ads::AdWords::v201406::BudgetOptimizerBiddingScheme', 'Fault/detail/ApiExceptionFault/errors[RejectedError]' => 'Google::Ads::AdWords::v201406::RejectedError', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetCpaBiddingScheme]/maxCpcBidFloor/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'getResponse/rval/entries/settings[TrackingSetting]' => 'Google::Ads::AdWords::v201406::TrackingSetting', 'mutateResponse/rval/value/conversionOptimizerEligibility' => 'Google::Ads::AdWords::v201406::ConversionOptimizerEligibility', 'mutateResponse/rval/value/settings[ShoppingSetting]/merchantId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long', 'mutateResponse/rval/partialFailureErrors[NewEntityCreationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateLabelResponse/rval/partialFailureErrors[NewEntityCreationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[ClientTermsError]/reason' => 'Google::Ads::AdWords::v201406::ClientTermsError::Reason', 'mutateResponse/rval/value/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]/spendTarget/ComparableValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/value/labels/name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutate/operations/operand' => 'Google::Ads::AdWords::v201406::Campaign', 'getResponse/rval/entries/conversionOptimizerEligibility/rejectionReasons' => 'Google::Ads::AdWords::v201406::ConversionOptimizerEligibility::RejectionReason', 'queryResponse/rval/entries/urlCustomParameters' => 'Google::Ads::AdWords::v201406::CustomParameters', 'Fault/detail/ApiExceptionFault/errors[EntityAccessDenied]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'mutateResponse/rval/partialFailureErrors[AdxError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/settings[RealTimeBiddingSetting]/optIn' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutateLabelResponse/rval/partialFailureErrors[EntityCountLimitExceeded]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', 'queryResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetSpendBiddingScheme]' => 'Google::Ads::AdWords::v201406::TargetSpendBiddingScheme', 'getResponse/rval/entries/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/targetRoas' => 'SOAP::WSDL::XSD::Typelib::Builtin::double', 'mutate/operations/operand/conversionOptimizerEligibility/eligible' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean', 'mutate/operations' => 'Google::Ads::AdWords::v201406::CampaignOperation', 'mutate/operations/operand/biddingStrategyConfiguration/biddingScheme[TargetRoasBiddingScheme]/targetRoas' => 'SOAP::WSDL::XSD::Typelib::Builtin::double' }; ; sub get_class { my $name = join '/', @{ $_[1] }; return $typemap_1->{ $name }; } sub get_typemap { return $typemap_1; } 1; __END__ __END__ =pod =head1 NAME Google::Ads::AdWords::v201406::TypeMaps::CampaignService - typemap for CampaignService =head1 DESCRIPTION Typemap created by SOAP::WSDL for map-based SOAP message parsers. =cut
gitpan/GOOGLE-ADWORDS-PERL-CLIENT
lib/Google/Ads/AdWords/v201406/TypeMaps/CampaignService.pm
Perl
apache-2.0
203,562
# # Copyright 2022 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package database::couchdb::restapi::mode::server; use base qw(centreon::plugins::templates::counter); use strict; use warnings; use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold catalog_status_calc); use JSON::XS; sub custom_server_output { my ($self, %options) = @_; my $msg = 'server status is ' . $self->{result_values}->{status}; return $msg; } sub custom_compaction_output { my ($self, %options) = @_; my $msg = "compaction status is '" . $self->{result_values}->{compaction_status} . "'"; return $msg; } sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'global', type => 0 }, { name => 'database', type => 1, cb_prefix_output => 'prefix_db_output', message_multiple => 'All databases are ok', skipped_code => { -10 => 1 } }, ]; $self->{maps_counters}->{global} = [ { label => 'status', threshold => 0, set => { key_values => [ { name => 'status' } ], closure_custom_calc => \&catalog_status_calc, closure_custom_output => $self->can('custom_server_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, } }, ]; $self->{maps_counters}->{database} = [ { label => 'compaction-status', threshold => 0, set => { key_values => [ { name => 'compaction_status' }, { name => 'display' } ], closure_custom_calc => \&catalog_status_calc, closure_custom_output => $self->can('custom_compaction_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold, } }, { label => 'database-size-active', nlabel => 'server.database.size.active.bytes', set => { key_values => [ { name => 'sizes_active' }, { name => 'display' } ], output_template => 'live data size: %s %s', output_change_bytes => 1, perfdatas => [ { value => 'sizes_active', template => '%d', min => 0, unit => 'B', label_extra_instance => 1, instance_use => 'display' } ], } }, { label => 'database-size-file', nlabel => 'server.database.size.file.bytes', set => { key_values => [ { name => 'sizes_file' }, { name => 'display' } ], output_template => 'file size: %s %s', output_change_bytes => 1, perfdatas => [ { value => 'sizes_file', template => '%d', min => 0, unit => 'B', label_extra_instance => 1, instance_use => 'display' } ], } }, { label => 'database-documents-current', nlabel => 'server.database.documents.currrent.count', display_ok => 0, set => { key_values => [ { name => 'doc_count' }, { name => 'display' } ], output_template => 'number of documents: %s', perfdatas => [ { value => 'doc_count', template => '%d', min => 0, label_extra_instance => 1, instance_use => 'display' } ], } }, { label => 'database-documents-deleted', nlabel => 'server.database.documents.deleted.count', display_ok => 0, set => { key_values => [ { name => 'doc_del_count' }, { name => 'display' } ], output_template => 'number of deleted documents: %s', perfdatas => [ { value => 'doc_del_count', template => '%d', min => 0, label_extra_instance => 1, instance_use => 'display' } ], } }, ]; } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1); bless $self, $class; $options{options}->add_options(arguments => { 'filter-db-name:s' => { name => 'filter_db_name' }, 'unknown-status:s' => { name => 'unknown_status', default => '' }, 'warning-status:s' => { name => 'warning_status', default => '' }, 'critical-status:s' => { name => 'critical_status', default => '%{status} !~ /^ok/i' }, 'unknown-compaction-status:s' => { name => 'unknown_compaction_status', default => '' }, 'warning-compaction-status:s' => { name => 'warning_compaction_status', default => '' }, 'critical-compaction-status:s' => { name => 'critical_compaction_status', default => '' }, }); return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); $self->change_macros(macros => [ 'warning_status', 'critical_status', 'unknown_status', 'warning_compaction_status', 'critical_compaction_status', 'unknown_compaction_status' ]); } sub prefix_db_output { my ($self, %options) = @_; return "Database '" . $options{instance_value}->{display} . "' "; } sub manage_selection { my ($self, %options) = @_; my $results = $options{custom}->request_api(url_path => '/_up'); $self->{global} = { status => $results->{status} }; $results = $options{custom}->request_api(url_path => '/_all_dbs'); my $db = { keys => $results }; my $encoded; eval { $encoded = JSON::XS->new->utf8->encode($db); }; if ($@) { $self->{output}->add_option_msg(short_msg => "Cannot encode json request"); $self->{output}->option_exit(); } $results = $options{custom}->request_api( method => 'POST', url_path => '/_dbs_info', query_form_post => $encoded ); $self->{database} = {}; foreach (@$results) { if (defined($self->{option_results}->{filter_db_name}) && $self->{option_results}->{filter_db_name} ne '' && $_->{info}->{db_name} !~ /$self->{option_results}->{filter_db_name}/) { $self->{output}->output_add(long_msg => "skipping database '" . $_->{info}->{db_name} . "': no matching filter.", debug => 1); next; } $self->{database}->{$_->{info}->{db_name}} = { display => $_->{info}->{db_name}, compaction_status => $_->{info}->{compact_running} ? 'running' : 'notRunning', doc_count => $_->{info}->{doc_count}, doc_del_count => $_->{info}->{doc_del_count}, sizes_active => $_->{info}->{sizes}->{active}, sizes_file => $_->{info}->{sizes}->{file} }; } } 1; __END__ =head1 MODE Check server status and database stastistics. =over 8 =item B<--filter-counters> Only display some counters (regexp can be used). Example: --filter-counters='^status$' =item B<--filter-db-name> Filter database name (can be a regexp). =item B<--unknown-status> Set unknown threshold for status (Default: ''). Can used special variables like: %{status} =item B<--warning-status> Set warning threshold for status (Default: ''). Can used special variables like: %{status} =item B<--critical-status> Set critical threshold for status (Default: '%{status} !~ /^ok/i'). Can used special variables like: %{status} =item B<--unknown-compaction-status> Set unknown threshold for status (Default: ''). Can used special variables like: %{compaction_status}, %{display} =item B<--warning-compaction-status> Set warning threshold for status (Default: ''). Can used special variables like: %{compaction_status}, %{display} =item B<--critical-compaction-status> Set critical threshold for status (Default: ''). Can used special variables like: %{compaction_status}, %{display} =item B<--warning-*> B<--critical-*> Thresholds. Can be: 'database-size-active' (B), 'database-size-file' (B), 'database-documents-deleted', 'database-documents-current'. =back =cut
centreon/centreon-plugins
database/couchdb/restapi/mode/server.pm
Perl
apache-2.0
8,804
%%------------------------------------------------%% %% FIPA Request Interaction protocol Participant %% %%------------------------------------------------%% :- interface(request_participant). :- export(request/12).
leuschel/ecce
www/CiaoDE/ciao/library/agents/protocols/fipa/request/request_participant.pl
Perl
apache-2.0
227
package Kalamar::Controller::Search; use Mojo::Base 'Mojolicious::Controller'; use Mojo::Collection 'c'; use Mojo::ByteStream 'b'; use Mojo::Util qw/quote/; use Mojo::JSON; use POSIX 'ceil'; has items_per_page => 25; # TODO: # Support server timing API # # TODO: # use "token" instead of "user" # # TODO: # Add match_info template for HTML # # TODO: # Support search in corpus and virtualcollection # # TODO: # set caches with timing like '120min' # Query endpoint sub query { my $c = shift; # Validate user input my $v = $c->validation; $v->optional('q', 'trim')->size(1,1000); $v->optional('ql')->in(qw/poliqarp cosmas2 annis cql fcsql/); $v->optional('collection', 'trim'); # Legacy $v->optional('cq', 'trim'); # New $v->optional('cutoff', 'trim')->in(qw/1 0 true false/); $v->optional('count', 'trim')->num(1, undef); $v->optional('p', 'trim')->num(1, undef); # Start page $v->optional('o', 'trim')->num(1, undef); # Offset $v->optional('context'); $v->optional('pipe', 'trim'); # $v->optional('action'); # action 'inspect' is no longer valid # $v->optional('snippet'); my $cutoff; if ($v->param('cutoff') && $v->param('cutoff') =~ /^1|true$/i) { $cutoff = 'true'; }; # Deal with legacy collection my $cq = $v->param('cq'); if ($v->param('collection') && !defined $cq) { $c->param(cq => $v->param('collection')); $cq = $v->param('collection'); }; # No query (Check ignoring validation) unless ($c->param('q')) { return $c->render( $c->loc('Template_intro', 'intro'), robots => 'index,follow' ); }; $c->res->headers->header('X-Robots', 'noindex'); my %query = (); $query{q} = $v->param('q') // ''; $query{ql} = $v->param('ql') // 'poliqarp'; $c->stash(q => $query{q}); $c->stash(ql => $query{ql}); $c->stash(title => $c->loc( 'searchtitle', q => $query{'q'}, ql => $query{'ql'} )); # Check validation if ($v->has_error) { # Create error notifications foreach my $failed_field (@{$v->failed}) { $c->notify(error => 'Parameter ' . quote($failed_field) . ' invalid'); }; return $c->render( status => 400, template => 'failure' ); }; $query{count} = $v->param('count') // $c->items_per_page; $query{cq} = $cq; $query{cutoff} = $cutoff; # Before: 'base/s:p'/'paragraph' $query{context} = $v->param('context') // '40-t,40-t'; # Start page my $page = $v->param('p') // 1; my $items_per_page = $c->items_per_page; # Set count if ($query{count} && $query{count} <= $c->items_per_page ) { $items_per_page = delete $query{count}; $query{count} = $items_per_page; }; # Forward pipe if ($v->param('pipe')) { # Temporary, as this is not agreed among the services yet $query{pipes} = $v->param('pipe'); }; $c->stash(items_per_page => $items_per_page); # TODO: # if ($v->param('action') eq 'inspect') use trace! # Set offset # From Mojolicious::Plugin::Search::Index $query{offset} = $v->param('o') || ((($page // 1) - 1) * ($items_per_page || 1)); # Create remote request URL my $url = Mojo::URL->new($c->korap->api); $url->path('search'); $url->query(map { $_ => $query{$_}} sort keys %query); # In case the user is not known, it is assumed, the user is not logged in my $total_cache_str; # Check if total results information is cached my $total_results = -1; if (!$cutoff && !$c->stash('no_cache')) { # Create cache string my $user = $c->user_handle; my $cache_url = $url->clone; $cache_url->query->remove('context')->remove('count')->remove('cutoff')->remove('offset'); $total_cache_str = "total-$user-" . $cache_url->to_string; $c->app->log->debug('Check for total results: ' . $total_cache_str); # Get total results value $total_results = $c->chi->get($total_cache_str); # Set stash if cache exists if (defined $total_results) { if ($total_results =~ s/^!//) { $c->stash(time_exceeded => 1); }; $c->stash(total_results => $total_results); $c->app->log->debug('Get total result from cache: ' . $total_results); # Set cutoff unless already set $url->query({cutoff => 'true'}); }; }; # Wait for rendering $c->render_later; # Fetch resource $c->cached_koral_p('get', $url)->then( # Process response sub { my $json = shift; $c->app->log->debug("Receiving cached promised results"); ####################### # Cache total results # ####################### # The stash is set in case the total results value is from the cache, # so in that case, it does not need to be cached again my $total_results = $c->stash('total_results'); unless (defined $total_results) { # There are results to remember if (!$cutoff && !$c->stash('no_cache') && $json->{meta}->{totalResults} >= 0) { # Remove cutoff requirement again # $url->query([cutoff => 'true']); $total_results = $json->{meta}->{totalResults}; $c->stash(total_results => $total_results); $c->app->log->debug('Set for total results: ' . $total_cache_str); # Set cache $c->chi->set( $total_cache_str => ($json->{meta}->{timeExceeded} ? '!' : '') . $total_results ); } # Undefined total results else { $c->stash(total_results => -1); $total_results = -1; }; }; $c->stash(total_pages => 0); # Set total pages # From Mojolicious::Plugin::Search::Index if ($total_results > 0) { $c->stash( total_pages => ceil($total_results / ($c->stash('items_per_page') || 1)) ); }; # Process meta my $meta = $json->{meta}; # TODO: # Set benchmark in case of development mode only. # Use server timing API # # Reformat benchmark counter # my $benchmark = $meta->{benchmark}; # if ($benchmark && $benchmark =~ s/\s+(m)?s$//) { # $benchmark = sprintf("%.2f", $benchmark) . ($1 ? $1 : '') . 's'; # }; # # # Set benchmark # $self->stash(benchmark => $benchmark); # Set time exceeded if ($meta->{timeExceeded} && $meta->{timeExceeded} eq Mojo::JSON::true) { $c->stash(time_exceeded => 1); }; # Set result values $c->stash(items_per_page => $meta->{itemsPerPage}); # Bouncing collection query if ($json->{corpus} || $json->{collection}) { $c->stash(corpus_jsonld => ($json->{corpus} || $json->{collection})); }; # TODO: # scalar $v->param('snippet') ? 'snippet' : 'search'; # Set search results in stash $c->stash(results => _map_matches($json->{matches})); $c->stash(start_page => $page); $c->stash(start_index => $json->{meta}->{startIndex}); # Emit after search hook $c->app->plugins->emit_hook(after_search => $c); # Render result return $c->render(template => 'search'); } # Deal with errors )->catch( sub { my $err_msg = shift; # Only raised in case of connection errors if ($err_msg) { $c->notify(error => { src => 'Backend' } => $err_msg) }; $c->app->log->debug("Receiving cached promised failure"); # $c->_notify_on_errors(shift); return $c->render( status => 400, template => 'failure' ); } ) # Start IOLoop ->wait; return 1; }; # Corpus info endpoint # This replaces the collections endpoint sub corpus_info { my $c = shift; # Input validation my $v = $c->validation; $v->optional('cq'); my $url = Mojo::URL->new($c->korap->api); # Use hash slice to create path $url->path('statistics'); # Add query my $cq = $v->param('cq'); if ($cq) { $url->query({cq => $cq}); # Temporary for backwards compatibility # with Kustvakt < 0.62.1 $url->query({corpusQuery => $cq}); }; $c->app->log->debug("Statistics info: $url"); # Async $c->render_later; $c->res->headers->header('X-Robots', 'noindex'); # Request koral, maybe cached $c->cached_koral_p('get', $url) # Process response ->then( sub { my $json = shift; return $c->render( json => $c->notifications(json => $json), status => 200 ); } ) # Deal with errors ->catch( sub { return $c->render( json => $c->notifications('json') ) } ) # Start IOLoop ->wait; return 1; }; # Text info endpoint sub text_info { my $c = shift; # Input validation my $v = $c->validation; $v->optional('fields'); my %query = (fields => '@all'); $query{fields} = $v->param('fields') if $v->param('fields'); my $url = Mojo::URL->new($c->korap->api); # Use hash slice to create path $url->path( join('/', ( 'corpus', $c->stash('corpus_id'), $c->stash('doc_id'), $c->stash('text_id') )) ); $url->query(%query); # Async $c->render_later; # Request koral, maybe cached $c->cached_koral_p('get', $url) # Process response ->then( sub { my $json = shift; return $c->render( json => $c->notifications(json => $json), status => 200 ); } ) # Deal with errors ->catch( sub { return $c->render( json => $c->notifications('json') ) } ) # Start IOLoop ->wait; return 1; }; # Match info endpoint sub match_info { my $c = shift; $c->res->headers->header('X-Robots', 'noindex'); # Validate user input my $v = $c->validation; $v->optional('foundry'); $v->optional('layer'); $v->optional('spans')->in(qw/true false/); # Check validation if ($v->has_error) { # Create error notifications foreach my $failed_field (@{$v->failed}) { $c->notify(error => 'Parameter ' . quote($failed_field) . ' invalid'); }; return $c->respond_to( html => sub { shift->render( status => 400, template => 'failure' ); }, any => sub { my $c = shift; $c->render( status => 400, json => $c->notifications('json') ); } ); }; # Old API foundry/layer usage my $foundry = '*'; my %query = (foundry => '*'); if ($v->param('foundry')) { $query{foundry} = $v->param('foundry'); $query{layer} = $v->param('layer') if $v->param('layer'); $query{spans} = $v->param('spans') if $v->param('spans'); }; # Create new request API my $url = Mojo::URL->new($c->korap->api); # Use stash information to create url path $url->path( join('/', ( 'corpus', $c->stash('corpus_id'), $c->stash('doc_id'), $c->stash('text_id'), $c->stash('match_id'), 'matchInfo' )) ); # Set query parameters in order $url->query(map { $_ => $query{$_}} sort keys %query); $c->render_later; $c->cached_koral_p('get', $url)->then( sub { my $json = shift; # Process results $json = _map_match($json); $c->stash(results => $json); return $c->respond_to( html => sub { my $c = shift; return $c->render( status => 200, template => 'match_info' ); }, any => sub { my $c = shift; return $c->render( json => $c->notifications(json => $json), status => 200 ); } ); } ) # Deal with errors ->catch( sub { my $err_msg = shift; # Only raised in case of connection errors if ($err_msg) { $c->notify(error => { src => 'Backend' } => $err_msg) }; unless ($c->stash('status')) { $c->stash(status => 400); }; $c->app->log->debug("Receiving cached promised failure"); return $c->respond_to( html => sub { shift->render( template => 'failure' ); }, any => sub { my $c = shift; $c->render( json => $c->notifications('json') ); } ); } ) # Start IOLoop ->wait; return 1; }; # Cleanup array of matches sub _map_matches { return c() unless $_[0]; c(map { _map_match($_) } @{ shift() }); }; # Cleanup single match sub _map_match { my $match = shift or return; # Legacy match id if ($match->{matchID}) { $match->{matchID} =~ s/^match\-(?:[^!]+!|[^_]+_)[^\.]+?\..+?-([pc]\d)/$1/ or $match->{matchID} =~ s!^match\-(?:[^\/]+\/){2}.+?-([pc]\d)!$1!; }; return unless $match->{textSigle}; # Set IDs based on the sigle ( $match->{corpusID}, $match->{docID}, $match->{textID} ) = ($match->{textSigle} =~ /^([^_]+?)_+([^\.]+?)\.(.+?)$/); return $match; }; 1; __END__ =pod =encoding utf8 =head1 NAME Kalamar::Controller::Search =head1 DESCRIPTION L<Kalamar::Controller::Search> is the controller class for search related endpoints in Kalamar. Actions are released when routes match. =head1 METHODS L<Kalamar::Controller::Search> inherits all methods from L<Mojolicious::Controller> and implements the following new ones. =head2 query GET /?q=Baum&ql=poliqarp Action for all queries to the system. Returns C<HTML> only for the moment. The following parameters are supported. =over 2 =item B<q> The query string. This may any query written in a supported query language. =item B<ql> The query language. This may be any query language supported by the system, written as the API expects the string. =item B<action> May be C<inspect>. In that case, the serialized request is mirrored instead of processed. B<This switch is experimental and may change without warnings!> =item B<snippet> If set, the query is returned in the snippet view template. B<This parameter is experimental and may change without warnings!> =item B<cutoff> If set, the query will be cut off after the matches. B<This parameter is directly forwarded to the API and may not be supported in the future.> =item B<count> If set, the query will be only return the given number of matches, in case the API supports it. Will fallback to the default number of matches defined by the API or the backend. B<This parameter is directly forwarded to the API and may not be supported in the future.> =item B<p> If set, the query will page to the given number of pages in the result set. Will default to 1. B<This parameter is directly forwarded to the API and may not be supported in the future.> =item B<o> If set, the matches will offset to the given match in the result set. Will default to 0. B<This parameter is directly forwarded to the API and may not be supported in the future.> =item B<context> The context of the snippets to retrieve. Defaults to C<40-t,40-t>. B<This parameter is directly forwarded to the API and may not be supported in the future.> =item B<cq> The corpus query to limit the search to. =back =head2 corpus /corpus?cq=corpusSigle+%3D+%22GOE%22 Returns statistics information for a virtual corpus. =head2 text /corpus/:corpus_id/:doc_id/:text_id Returns meta data information for a specific text. =head2 match /corpus/:corpus_id/:doc_id/:text_id/:match_id?foundry=* Returns information to a match either as a C<JSON> or an C<HTML> document. The path defines the concrete match, by corpus identifier, document identifier, text identifier (all information as given by DeReKo), and match identifier (essentially the position of the match in the document, including highlight information). The following parameters are supported. =over 2 =item B<foundry> Expects a foundry definition for retrieved information. If not given, returns all annotations for the match. If given, returns only given layer information for the defined foundry. B<This parameter is experimental and may change without warnings!> =item B<layer> Expects a layer definition for retrieved information. If not given, returns all annotations for the foundry. If given, returns only given layer information for the defined foundry. B<This parameter is experimental and may change without warnings!> =item B<spans> Boolean value - either C<true> or C<false> - indicating, whether span information (i.e. for tree structures) should be retrieved. =back =head1 COPYRIGHT AND LICENSE Copyright (C) 2015-2018, L<IDS Mannheim|http://www.ids-mannheim.de/> Author: L<Nils Diewald|http://nils-diewald.de/> Kalamar is developed as part of the L<KorAP|http://korap.ids-mannheim.de/> Corpus Analysis Platform at the L<Leibniz Institute for the German Language (IDS)|http://ids-mannheim.de/>, member of the L<Leibniz-Gemeinschaft|http://www.leibniz-gemeinschaft.de> and supported by the L<KobRA|http://www.kobra.tu-dortmund.de> project, funded by the L<Federal Ministry of Education and Research (BMBF)|http://www.bmbf.de/en/>. Kalamar is free software published under the L<BSD-2 License|https://raw.githubusercontent.com/KorAP/Kalamar/master/LICENSE>. =cut
KorAP/Kalamar
lib/Kalamar/Controller/Search.pm
Perl
bsd-2-clause
17,162
package ZonemasterDB::CouchDB v0.0.1; use Moose; use utf8; use 5.14.0; use Data::Dumper; use DBI qw(:utils); use Store::CouchDB; use Time::HiRes qw(gettimeofday); use Digest::MD5 qw(md5_hex); use JSON; use ZonemasterDB; with 'ZonemasterDB'; has 'db' => ( is => 'ro', isa => 'Store::CouchDB', lazy => 1, builder => '_connect_to_couch_db', ); sub _connect_to_couch_db { my $db = Store::CouchDB->new(host => '127.0.0.1', debug => 0); $db->db('zonemaster'); return $db; } sub create_db{ my ($self) = @_; # Unusable without debug => 1 # say Dumper( $self->db->delete_db('zonemaster') ); # say Dumper( $self->db->create_db('zonemaster') ); # Kills CouchDB 1.0.4 (hangs, restart necesserry) my @dbs = $self->db->all_dbs; foreach my $db (@dbs) { say "FOUND DB:$db"; if ($db eq 'zonemaster') { say Dumper( $self->db->delete_db('zonemaster') ); } } say Dumper( $self->db->create_db('zonemaster') ); say "------------ Create Views START -------------------"; # To create a new document dont put the _revision parameter my ($id, $rev) = $self->db->put_doc({ dbname => 'zonemaster', doc => { "_id" => "_design/application", "views" => { "users" => { "map" => "function(doc) { if(doc.doc_type == 'user' && doc.username) { emit(doc.username, null); } }" }, "tests_by_deterministic_hash" => { "map" => "function(doc) { if(doc.doc_type == 'test') { emit(doc.deterministic_hash, { 'doc_id' : doc.doc_id, 'creation_time' : doc.creation_time }); } }" }, "tests_by_domain" => { "map" => "function(doc) { if(doc.doc_type == 'test') { emit(doc.params.domain, { 'creation_time' : doc.creation_time, 'advanced_options' : doc.params.advanced_options }); } }" } } } }); say "id: $id"; say "rev: $rev"; say "------------ Create Views END -------------------"; say "------------ Search Documet 1 START -------------------"; my $hashref = $self->db->get_view({ view => 'application/users', opts => { key => 'user1' }, }); print Dumper($hashref); say "------------ Search Documet 1 END -------------------"; say "------------ INSERT Documet 1 START -------------------"; ($id, $rev) = $self->db->put_doc({ dbname => 'zonemaster', doc => { doc_type => 'user', username => 'user1' } } ); say "------------ INSERT Documet 1 STOP -------------------"; say "------------ Search Documet 1 START -------------------"; $hashref = $self->db->get_view({ view => 'application/users', opts => { key => 'user1' }, }); print Dumper($hashref); say "------------ Search Documet 1 STOP -------------------"; } sub user_exists_in_db { my ($self, $user) = @_; say __PACKAGE__."::user_exists_in_db"; my $hashref = $self->db->get_view({ view => 'application/users', opts => { key => $user }, }); return ($hashref)?(1):(0); } sub add_api_user_to_db { my ($self, $params) = @_; say __PACKAGE__."::add_api_user_to_db"; $params->{doc_type} = 'user'; my ($id, $rev) = $self->db->put_doc({ doc => $params }); say "id: $id"; say "rev: $rev"; return $id; }; sub user_authorized { my ($self, $user, $api_key) = @_; my $hashref = $self->db->get_view({ view => 'application/users', opts => { key => $user }, }); return ($hashref && $hashref->{$user} eq $api_key)?(1):(0); } sub create_new_batch_job { my ($self, $username) = @_; # find all batch jobs of the user die "create_new_batch_job NOT IMPLEMENTED in ".__PACKAGE__."\n"; } sub create_new_test { my ($self, $domain, $test_params, $minutes_between_tests_with_same_params, $priority, $batch_id) = @_; my $result; say __PACKAGE__."::create_new_test"; $test_params->{domain} = $domain; my $js = JSON->new; $js->canonical(1); my $encoded_params = $js->encode($test_params); my $test_params_deterministic_hash = md5_hex($encoded_params); my $hashref = $self->db->get_array_view({ view => 'application/tests_by_deterministic_hash', opts => { key => $test_params_deterministic_hash }, }); # Find a recently started (within $minutes_between_tests_with_same_params) tests with the exact same params ($test_params_deterministic_hash) if ($hashref) { foreach my $test (@$hashref) { say Dumper($test); if ((defined $test->{creation_time}) && ($test->{creation_time} > time() - 60 * $minutes_between_tests_with_same_params) ) { $result = $test->{doc_id}; } } } say "Result:".Dumper($result); unless ($result) { my ($s, $usec) = gettimeofday(); my $id = $s*100000 + $usec; my $doc = { doc_type => 'test', batch_id => $batch_id, priority => $priority, deterministic_hash => $test_params_deterministic_hash, params => $test_params, doc_id => $id, test_start_time => time(), creation_time => time(), progress => 0, }; my ($doc_id, $rev) = $self->db->put_doc({ dbname => 'zonemaster', doc => $doc } ); $result = $doc_id; } return $result; } sub get_test_history { my($self, $p) = @_; my $href = $self->db->get_array_view({ view => 'application/tests_by_domain', opts => { key => $p->{frontend_params}->{domain} }, }); return $href; } sub get_test_params { my($self, $test_id) = @_; my $doc = $self->db->get_doc($test_id); my $result = $doc->{params} if ($doc); return $result; } sub test_progress { my($self, $test_id, $progress) = @_; # $self->dbh->do("UPDATE test_results SET progress=$progress WHERE id=$test_id") if ($progress); my $doc = $self->db->get_doc($test_id); $doc->{progress} = $progress; $doc->{results} = undef; my ($id, $rev) = $self->db->update_doc({ doc => $doc, name => $test_id, dbname => 'zonemaster' }) if ($progress); $doc = $self->db->get_doc($test_id); my $result = $doc->{progress} if ($doc); return $result; } sub test_results { my($self, $test_id, $results) = @_; my $doc = $self->db->get_doc($test_id); if ($results) { $doc->{results} = decode_json($results); $doc->{progress} = 100; my ($id, $rev) = $self->db->update_doc({ doc => $doc, name => $test_id, dbname => 'zonemaster' }); } my $res; $doc = $self->db->get_doc($test_id); if ($doc) { $res = $doc; $res->{id} = $res->{_id}; } return $res; } no Moose; __PACKAGE__->meta()->make_immutable(); 1;
mtoma/zonemaster
Zonemaster-Backend/ZonemasterDB/CouchDB.pm
Perl
bsd-2-clause
6,340
#!/usr/bin/perl # perlpath.pl # This script gets run only from setup.sh in order to replace the # #!/usr/local/bin/perl line at the start of scripts with the real path to perl $ppath = $ARGV[0]; if ($ARGV[1] eq "-") { @files = <STDIN>; chop(@files); } else { # Get files from command line @files = @ARGV[1..$#ARGV]; } foreach $f (@files) { open(IN, $f); @lines = <IN>; close(IN); if ($lines[0] =~ /^#!\/\S*perl\S*(.*)/) { open(OUT, "> $f"); print OUT "#!$ppath$1\n"; for($i=1; $i<@lines; $i++) { print OUT $lines[$i]; } close(OUT); } }
xtso520ok/webmin
perlpath.pl
Perl
bsd-3-clause
567
#!/usr/bin/env perl # # This file is part of moses. Its use is licensed under the GNU Lesser General # Public License version 2.1 or, at your option, any later version. # $Id$ use warnings; use strict; my $lowercase = 0; if ($ARGV[0] eq "-lc") { $lowercase = 1; shift; } my $stem = $ARGV[0]; if (!defined $stem) { print STDERR "usage: multi-bleu.pl [-lc] reference < hypothesis\n"; print STDERR "Reads the references from reference or reference0, reference1, ...\n"; exit(1); } $stem .= ".ref" if !-e $stem && !-e $stem."0" && -e $stem.".ref0"; my @REF; my $ref=0; while(-e "$stem$ref") { &add_to_ref("$stem$ref",\@REF); $ref++; } &add_to_ref($stem,\@REF) if -e $stem; die("ERROR: could not find reference file $stem") unless scalar @REF; # add additional references explicitly specified on the command line shift; foreach my $stem (@ARGV) { &add_to_ref($stem,\@REF) if -e $stem; } sub add_to_ref { my ($file,$REF) = @_; my $s=0; if ($file =~ /.gz$/) { open(REF,"gzip -dc $file|") or die "Can't read $file"; } else { open(REF,$file) or die "Can't read $file"; } while(<REF>) { chop; $_ = tokenization($_); push @{$$REF[$s++]}, $_; } close(REF); } my(@CORRECT,@TOTAL,$length_translation,$length_reference); my $s=0; while(<STDIN>) { chop; $_ = lc if $lowercase; $_ = tokenization($_); my @WORD = split; my %REF_NGRAM = (); my $length_translation_this_sentence = scalar(@WORD); my ($closest_diff,$closest_length) = (9999,9999); foreach my $reference (@{$REF[$s]}) { # print "$s $_ <=> $reference\n"; $reference = lc($reference) if $lowercase; my @WORD = split(' ',$reference); my $length = scalar(@WORD); my $diff = abs($length_translation_this_sentence-$length); if ($diff < $closest_diff) { $closest_diff = $diff; $closest_length = $length; # print STDERR "$s: closest diff ".abs($length_translation_this_sentence-$length)." = abs($length_translation_this_sentence-$length), setting len: $closest_length\n"; } elsif ($diff == $closest_diff) { $closest_length = $length if $length < $closest_length; # from two references with the same closeness to me # take the *shorter* into account, not the "first" one. } for(my $n=1;$n<=4;$n++) { my %REF_NGRAM_N = (); for(my $start=0;$start<=$#WORD-($n-1);$start++) { my $ngram = "$n"; for(my $w=0;$w<$n;$w++) { $ngram .= " ".$WORD[$start+$w]; } $REF_NGRAM_N{$ngram}++; } foreach my $ngram (keys %REF_NGRAM_N) { if (!defined($REF_NGRAM{$ngram}) || $REF_NGRAM{$ngram} < $REF_NGRAM_N{$ngram}) { $REF_NGRAM{$ngram} = $REF_NGRAM_N{$ngram}; # print "$i: REF_NGRAM{$ngram} = $REF_NGRAM{$ngram}<BR>\n"; } } } } $length_translation += $length_translation_this_sentence; $length_reference += $closest_length; for(my $n=1;$n<=4;$n++) { my %T_NGRAM = (); for(my $start=0;$start<=$#WORD-($n-1);$start++) { my $ngram = "$n"; for(my $w=0;$w<$n;$w++) { $ngram .= " ".$WORD[$start+$w]; } $T_NGRAM{$ngram}++; } foreach my $ngram (keys %T_NGRAM) { $ngram =~ /^(\d+) /; my $n = $1; # my $corr = 0; # print "$i e $ngram $T_NGRAM{$ngram}<BR>\n"; $TOTAL[$n] += $T_NGRAM{$ngram}; if (defined($REF_NGRAM{$ngram})) { if ($REF_NGRAM{$ngram} >= $T_NGRAM{$ngram}) { $CORRECT[$n] += $T_NGRAM{$ngram}; # $corr = $T_NGRAM{$ngram}; # print "$i e correct1 $T_NGRAM{$ngram}<BR>\n"; } else { $CORRECT[$n] += $REF_NGRAM{$ngram}; # $corr = $REF_NGRAM{$ngram}; # print "$i e correct2 $REF_NGRAM{$ngram}<BR>\n"; } } # $REF_NGRAM{$ngram} = 0 if !defined $REF_NGRAM{$ngram}; # print STDERR "$ngram: {$s, $REF_NGRAM{$ngram}, $T_NGRAM{$ngram}, $corr}\n" } } $s++; } my $brevity_penalty = 1; my $bleu = 0; my @bleu=(); for(my $n=1;$n<=4;$n++) { if (defined ($TOTAL[$n])){ $bleu[$n]=($TOTAL[$n])?$CORRECT[$n]/$TOTAL[$n]:0; # print STDERR "CORRECT[$n]:$CORRECT[$n] TOTAL[$n]:$TOTAL[$n]\n"; }else{ $bleu[$n]=0; } } if ($length_reference==0){ printf "BLEU = 0, 0/0/0/0 (BP=0, ratio=0, hyp_len=0, ref_len=0)\n"; exit(1); } if ($length_translation<$length_reference) { $brevity_penalty = exp(1-$length_reference/$length_translation); } $bleu = $brevity_penalty * exp((my_log( $bleu[1] ) + my_log( $bleu[2] ) + my_log( $bleu[3] ) + my_log( $bleu[4] ) ) / 4) ; printf "BLEU = %.2f, %.1f/%.1f/%.1f/%.1f (BP=%.3f, ratio=%.3f, hyp_len=%d, ref_len=%d)\n", 100*$bleu, 100*$bleu[1], 100*$bleu[2], 100*$bleu[3], 100*$bleu[4], $brevity_penalty, $length_translation / $length_reference, $length_translation, $length_reference; sub my_log { return -9999999999 unless $_[0]; return log($_[0]); } sub tokenization { my ($norm_text) = @_; # language-independent part: $norm_text =~ s/<skipped>//g; # strip "skipped" tags $norm_text =~ s/-\n//g; # strip end-of-line hyphenation and join lines $norm_text =~ s/\n/ /g; # join lines $norm_text =~ s/&quot;/"/g; # convert SGML tag for quote to " $norm_text =~ s/&amp;/&/g; # convert SGML tag for ampersand to & $norm_text =~ s/&lt;/</g; # convert SGML tag for less-than to > $norm_text =~ s/&gt;/>/g; # convert SGML tag for greater-than to < # language-dependent part (assuming Western languages): $norm_text = " $norm_text "; $norm_text =~ s/([\{-\~\[-\` -\&\(-\+\:-\@\/])/ $1 /g; # tokenize punctuation $norm_text =~ s/([^0-9])([\.,])/$1 $2 /g; # tokenize period and comma unless preceded by a digit $norm_text =~ s/([\.,])([^0-9])/ $1 $2/g; # tokenize period and comma unless followed by a digit $norm_text =~ s/([0-9])(-)/$1 $2 /g; # tokenize dash when preceded by a digit $norm_text =~ s/\s+/ /g; # one space only between words $norm_text =~ s/^\s+//; # no leading space $norm_text =~ s/\s+$//; # no trailing space return $norm_text; }
shuoyangd/nematus
data/multi-bleu-detok.perl
Perl
bsd-3-clause
6,000
%The grammar files are saved in grammars.pl statement_with_semicolon(Data,Return_type,return(To_return)) --> return_(Data,[ expr(Data,Return_type,To_return) ]). statement_with_semicolon(Data,_,plus_plus(Name)) --> plus_plus_(Data,[ var_name_(Data,int,Name) ]),!. statement_with_semicolon(Data,_,minus_minus(Name)) --> minus_minus_(Data,[var_name_(Data,int,Name)]),!. statement_with_semicolon(Data,_,initialize_constant(Type,Name,Expr)) --> initialize_constant_(Data,[ var_name_(Data,Type,Name), type(Data,Type), expr(Data,Type,Expr) ]). statement_with_semicolon(Data,_,set_array_size(Name,Size,Type)) --> set_array_size_(Data,[ var_name_(Data,Name,[array,Type]), expr(Data,int,Size), type(Data,Type) ]). statement_with_semicolon(Data,_,set_dict(Name,Index,Expr,Type)) --> set_dict_(Data,[ var_name_(Data,[dict,Type],Name), parentheses_expr(Data,string,Index), expr(Data,Type,Expr) ]). statement_with_semicolon(Data,_,set_array_index(Name,Index,Expr,Type)) --> set_array_index_(Data,[ var_name_(Data,[array,Type],Name), parentheses_expr(Data,int,Index), parentheses_expr(Data,Type,Expr) ]). statement_with_semicolon(Data,_,set_var(Name,Expr,Type)) --> set_var_(Data,[ var_name_(Data,Type,Name), expr(Data,Type,Expr) ]). statement_with_semicolon(Data,_,set_instance_var(Name,Expr,Type)) --> set_var_(Data,[ expr(Data,Type,this(Name)), expr(Data,Type,Expr) ]). statement_with_semicolon(Data,_,initialize_empty_var(Type,Name)) --> initialize_empty_var_(Data,[ var_name_(Data,Type,Name), type(Data,Type) ]). statement_with_semicolon(Data,_,throw(Expr)) --> throw_(Data,expr(Data,string,Expr)). statement_with_semicolon(Data,_,initialize_var(Name,Expr,Type)) --> initialize_var_(Data,[ var_name_(Data,Type,Name), expr(Data,Type,Expr), type(Data,Type) ]). statement_with_semicolon(Data,_,append_to_array(Name,Expr,Type)) --> append_to_array_(Data,[ var_name_(Data,[array,Type],Name), expr(Data,Type,Expr) ]). statement_with_semicolon(Data,_,reverse_list_in_place(List,Type)) --> reverse_list_in_place_(Data,[ parentheses_expr(Data,[array,Type],List) ]). statement_with_semicolon(Data,_,plus_equals(Name,Expr)) --> plus_equals_(Data,[ var_name_(Data,int,Name), expr(Data,int,Expr) ]). statement_with_semicolon(Data,_,divide_equals(Name,Expr)) --> divide_equals_(Data,[ var_name_(Data,int,Name), expr(Data,int,Expr) ]). statement_with_semicolon(Data,_,modulo_equals(Name,Expr)) --> modulo_equals_(Data,[ var_name_(Data,int,Name), expr(Data,int,Expr) ]). statement_with_semicolon(Data,_,array_plus_equals(Name,Expr,Type)) --> array_plus_equals_(Data,[ var_name_(Data,[array,Type],Name), expr(Data,[array,Type],Expr) ]). statement_with_semicolon(Data,_,string_plus_equals(Name,Expr)) --> string_plus_equals_(Data,[ var_name_(Data,string,Name), expr(Data,string,Expr) ]). statement_with_semicolon(Data,_,minus_equals(Name,Expr)) --> minus_equals_(Data,[ var_name_(Data,int,Name), expr(Data,int,Expr) ]). statement_with_semicolon(Data,_,append_to_string(Name,Expr)) --> append_to_string_(Data,[ var_name_(Data,string,Name), expr(Data,string,Expr) ]). statement_with_semicolon(Data,_,times_equals(Name,Expr)) --> times_equals_(Data,[ var_name_(Data,int,Name), expr(Data,int,Expr) ]). statement_with_semicolon(Data,_,assert(Expr)) --> assert_(Data,[expr(Data,bool,Expr)]). statement_with_semicolon(Data,Type,println(Expr,Type)) --> println_(Data,[ expr(Data,Type,Expr), Type ]). statement_with_semicolon(Data,Type, function_call(Name,Params1,Params2)) --> function_call_(Data,[ function_name(Data,Type,Name,Params2), function_call_parameters(Data,Params1,Params2) ]).
jarble/transpiler
prolog/optimized_python_parser/statement_with_semicolon.pl
Perl
mit
3,851
#!/usr/bin/env perl # ==================================================================== # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL # project. The module is, however, dual licensed under OpenSSL and # CRYPTOGAMS licenses depending on where you obtain it. For further # details see http://www.openssl.org/~appro/cryptogams/. # ==================================================================== # sha1_block procedure for ARMv4. # # January 2007. # Size/performance trade-off # ==================================================================== # impl size in bytes comp cycles[*] measured performance # ==================================================================== # thumb 304 3212 4420 # armv4-small 392/+29% 1958/+64% 2250/+96% # armv4-compact 740/+89% 1552/+26% 1840/+22% # armv4-large 1420/+92% 1307/+19% 1370/+34%[***] # full unroll ~5100/+260% ~1260/+4% ~1300/+5% # ==================================================================== # thumb = same as 'small' but in Thumb instructions[**] and # with recurring code in two private functions; # small = detached Xload/update, loops are folded; # compact = detached Xload/update, 5x unroll; # large = interleaved Xload/update, 5x unroll; # full unroll = interleaved Xload/update, full unroll, estimated[!]; # # [*] Manually counted instructions in "grand" loop body. Measured # performance is affected by prologue and epilogue overhead, # i-cache availability, branch penalties, etc. # [**] While each Thumb instruction is twice smaller, they are not as # diverse as ARM ones: e.g., there are only two arithmetic # instructions with 3 arguments, no [fixed] rotate, addressing # modes are limited. As result it takes more instructions to do # the same job in Thumb, therefore the code is never twice as # small and always slower. # [***] which is also ~35% better than compiler generated code. Dual- # issue Cortex A8 core was measured to process input block in # ~990 cycles. # August 2010. # # Rescheduling for dual-issue pipeline resulted in 13% improvement on # Cortex A8 core and in absolute terms ~870 cycles per input block # [or 13.6 cycles per byte]. # February 2011. # # Profiler-assisted and platform-specific optimization resulted in 10% # improvement on Cortex A8 core and 12.2 cycles per byte. while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {} open STDOUT,">$output"; $ctx="r0"; $inp="r1"; $len="r2"; $a="r3"; $b="r4"; $c="r5"; $d="r6"; $e="r7"; $K="r8"; $t0="r9"; $t1="r10"; $t2="r11"; $t3="r12"; $Xi="r14"; @V=($a,$b,$c,$d,$e); sub Xupdate { my ($a,$b,$c,$d,$e,$opt1,$opt2)=@_; $code.=<<___; ldr $t0,[$Xi,#15*4] ldr $t1,[$Xi,#13*4] ldr $t2,[$Xi,#7*4] add $e,$K,$e,ror#2 @ E+=K_xx_xx ldr $t3,[$Xi,#2*4] eor $t0,$t0,$t1 eor $t2,$t2,$t3 @ 1 cycle stall eor $t1,$c,$d @ F_xx_xx mov $t0,$t0,ror#31 add $e,$e,$a,ror#27 @ E+=ROR(A,27) eor $t0,$t0,$t2,ror#31 str $t0,[$Xi,#-4]! $opt1 @ F_xx_xx $opt2 @ F_xx_xx add $e,$e,$t0 @ E+=X[i] ___ } sub BODY_00_15 { my ($a,$b,$c,$d,$e)=@_; $code.=<<___; #if __ARM_ARCH__<7 ldrb $t1,[$inp,#2] ldrb $t0,[$inp,#3] ldrb $t2,[$inp,#1] add $e,$K,$e,ror#2 @ E+=K_00_19 ldrb $t3,[$inp],#4 orr $t0,$t0,$t1,lsl#8 eor $t1,$c,$d @ F_xx_xx orr $t0,$t0,$t2,lsl#16 add $e,$e,$a,ror#27 @ E+=ROR(A,27) orr $t0,$t0,$t3,lsl#24 #else ldr $t0,[$inp],#4 @ handles unaligned add $e,$K,$e,ror#2 @ E+=K_00_19 eor $t1,$c,$d @ F_xx_xx add $e,$e,$a,ror#27 @ E+=ROR(A,27) #ifdef __ARMEL__ rev $t0,$t0 @ byte swap #endif #endif and $t1,$b,$t1,ror#2 add $e,$e,$t0 @ E+=X[i] eor $t1,$t1,$d,ror#2 @ F_00_19(B,C,D) str $t0,[$Xi,#-4]! add $e,$e,$t1 @ E+=F_00_19(B,C,D) ___ } sub BODY_16_19 { my ($a,$b,$c,$d,$e)=@_; &Xupdate(@_,"and $t1,$b,$t1,ror#2"); $code.=<<___; eor $t1,$t1,$d,ror#2 @ F_00_19(B,C,D) add $e,$e,$t1 @ E+=F_00_19(B,C,D) ___ } sub BODY_20_39 { my ($a,$b,$c,$d,$e)=@_; &Xupdate(@_,"eor $t1,$b,$t1,ror#2"); $code.=<<___; add $e,$e,$t1 @ E+=F_20_39(B,C,D) ___ } sub BODY_40_59 { my ($a,$b,$c,$d,$e)=@_; &Xupdate(@_,"and $t1,$b,$t1,ror#2","and $t2,$c,$d"); $code.=<<___; add $e,$e,$t1 @ E+=F_40_59(B,C,D) add $e,$e,$t2,ror#2 ___ } $code=<<___; #if defined(__arm__) #include "arm_arch.h" .text .global sha1_block_data_order .hidden sha1_block_data_order .type sha1_block_data_order,%function .align 2 sha1_block_data_order: stmdb sp!,{r4-r12,lr} add $len,$inp,$len,lsl#6 @ $len to point at the end of $inp ldmia $ctx,{$a,$b,$c,$d,$e} .Lloop: ldr $K,.LK_00_19 mov $Xi,sp sub sp,sp,#15*4 mov $c,$c,ror#30 mov $d,$d,ror#30 mov $e,$e,ror#30 @ [6] .L_00_15: ___ for($i=0;$i<5;$i++) { &BODY_00_15(@V); unshift(@V,pop(@V)); } $code.=<<___; teq $Xi,sp bne .L_00_15 @ [((11+4)*5+2)*3] sub sp,sp,#25*4 ___ &BODY_00_15(@V); unshift(@V,pop(@V)); &BODY_16_19(@V); unshift(@V,pop(@V)); &BODY_16_19(@V); unshift(@V,pop(@V)); &BODY_16_19(@V); unshift(@V,pop(@V)); &BODY_16_19(@V); unshift(@V,pop(@V)); $code.=<<___; ldr $K,.LK_20_39 @ [+15+16*4] cmn sp,#0 @ [+3], clear carry to denote 20_39 .L_20_39_or_60_79: ___ for($i=0;$i<5;$i++) { &BODY_20_39(@V); unshift(@V,pop(@V)); } $code.=<<___; teq $Xi,sp @ preserve carry bne .L_20_39_or_60_79 @ [+((12+3)*5+2)*4] bcs .L_done @ [+((12+3)*5+2)*4], spare 300 bytes ldr $K,.LK_40_59 sub sp,sp,#20*4 @ [+2] .L_40_59: ___ for($i=0;$i<5;$i++) { &BODY_40_59(@V); unshift(@V,pop(@V)); } $code.=<<___; teq $Xi,sp bne .L_40_59 @ [+((12+5)*5+2)*4] ldr $K,.LK_60_79 sub sp,sp,#20*4 cmp sp,#0 @ set carry to denote 60_79 b .L_20_39_or_60_79 @ [+4], spare 300 bytes .L_done: add sp,sp,#80*4 @ "deallocate" stack frame ldmia $ctx,{$K,$t0,$t1,$t2,$t3} add $a,$K,$a add $b,$t0,$b add $c,$t1,$c,ror#2 add $d,$t2,$d,ror#2 add $e,$t3,$e,ror#2 stmia $ctx,{$a,$b,$c,$d,$e} teq $inp,$len bne .Lloop @ [+18], total 1307 #if __ARM_ARCH__>=5 ldmia sp!,{r4-r12,pc} #else ldmia sp!,{r4-r12,lr} tst lr,#1 moveq pc,lr @ be binary compatible with V4, yet bx lr @ interoperable with Thumb ISA:-) #endif .align 2 .LK_00_19: .word 0x5a827999 .LK_20_39: .word 0x6ed9eba1 .LK_40_59: .word 0x8f1bbcdc .LK_60_79: .word 0xca62c1d6 .size sha1_block_data_order,.-sha1_block_data_order .asciz "SHA1 block transform for ARMv4, CRYPTOGAMS by <appro\@openssl.org>" .align 2 #endif ___ $code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm; # make it possible to compile with -march=armv4 print $code; close STDOUT; # enforce flush
mxOBS/deb-pkg_trusty_chromium-browser
third_party/boringssl/src/crypto/sha/asm/sha1-armv4-large.pl
Perl
bsd-3-clause
6,423
package utf8; $utf8::hint_bits = 0x00800000; our $VERSION = '1.19'; sub import { $^H |= $utf8::hint_bits; } sub unimport { $^H &= ~$utf8::hint_bits; } sub AUTOLOAD { require "utf8_heavy.pl"; goto &$AUTOLOAD if defined &$AUTOLOAD; require Carp; Carp::croak("Undefined subroutine $AUTOLOAD called"); } 1; __END__ =head1 NAME utf8 - Perl pragma to enable/disable UTF-8 (or UTF-EBCDIC) in source code =head1 SYNOPSIS use utf8; no utf8; # Convert the internal representation of a Perl scalar to/from UTF-8. $num_octets = utf8::upgrade($string); $success = utf8::downgrade($string[, $fail_ok]); # Change each character of a Perl scalar to/from a series of # characters that represent the UTF-8 bytes of each original character. utf8::encode($string); # "\x{100}" becomes "\xc4\x80" utf8::decode($string); # "\xc4\x80" becomes "\x{100}" # Convert a code point from the platform native character set to # Unicode, and vice-versa. $unicode = utf8::native_to_unicode(ord('A')); # returns 65 on both # ASCII and EBCDIC # platforms $native = utf8::unicode_to_native(65); # returns 65 on ASCII # platforms; 193 on # EBCDIC $flag = utf8::is_utf8($string); # since Perl 5.8.1 $flag = utf8::valid($string); =head1 DESCRIPTION The C<use utf8> pragma tells the Perl parser to allow UTF-8 in the program text in the current lexical scope. The C<no utf8> pragma tells Perl to switch back to treating the source text as literal bytes in the current lexical scope. (On EBCDIC platforms, technically it is allowing UTF-EBCDIC, and not UTF-8, but this distinction is academic, so in this document the term UTF-8 is used to mean both). B<Do not use this pragma for anything else than telling Perl that your script is written in UTF-8.> The utility functions described below are directly usable without C<use utf8;>. Because it is not possible to reliably tell UTF-8 from native 8 bit encodings, you need either a Byte Order Mark at the beginning of your source code, or C<use utf8;>, to instruct perl. When UTF-8 becomes the standard source format, this pragma will effectively become a no-op. See also the effects of the C<-C> switch and its cousin, the C<PERL_UNICODE> environment variable, in L<perlrun>. Enabling the C<utf8> pragma has the following effect: =over 4 =item * Bytes in the source text that are not in the ASCII character set will be treated as being part of a literal UTF-8 sequence. This includes most literals such as identifier names, string constants, and constant regular expression patterns. =back Note that if you have non-ASCII, non-UTF-8 bytes in your script (for example embedded Latin-1 in your string literals), C<use utf8> will be unhappy. If you want to have such bytes under C<use utf8>, you can disable this pragma until the end the block (or file, if at top level) by C<no utf8;>. =head2 Utility functions The following functions are defined in the C<utf8::> package by the Perl core. You do not need to say C<use utf8> to use these and in fact you should not say that unless you really want to have UTF-8 source code. =over 4 =item * C<$num_octets = utf8::upgrade($string)> (Since Perl v5.8.0) Converts in-place the internal representation of the string from an octet sequence in the native encoding (Latin-1 or EBCDIC) to UTF-8. The logical character sequence itself is unchanged. If I<$string> is already stored as UTF-8, then this is a no-op. Returns the number of octets necessary to represent the string as UTF-8. Can be used to make sure that the UTF-8 flag is on, so that C<\w> or C<lc()> work as Unicode on strings containing non-ASCII characters whose code points are below 256. B<Note that this function does not handle arbitrary encodings>; use L<Encode> instead. =item * C<$success = utf8::downgrade($string[, $fail_ok])> (Since Perl v5.8.0) Converts in-place the internal representation of the string from UTF-8 to the equivalent octet sequence in the native encoding (Latin-1 or EBCDIC). The logical character sequence itself is unchanged. If I<$string> is already stored as native 8 bit, then this is a no-op. Can be used to make sure that the UTF-8 flag is off, e.g. when you want to make sure that the substr() or length() function works with the usually faster byte algorithm. Fails if the original UTF-8 sequence cannot be represented in the native 8 bit encoding. On failure dies or, if the value of I<$fail_ok> is true, returns false. Returns true on success. B<Note that this function does not handle arbitrary encodings>; use L<Encode> instead. =item * C<utf8::encode($string)> (Since Perl v5.8.0) Converts in-place the character sequence to the corresponding octet sequence in UTF-8. That is, every (possibly wide) character gets replaced with a sequence of one or more characters that represent the individual UTF-8 bytes of the character. The UTF8 flag is turned off. Returns nothing. my $a = "\x{100}"; # $a contains one character, with ord 0x100 utf8::encode($a); # $a contains two characters, with ords (on # ASCII platforms) 0xc4 and 0x80. On EBCDIC # 1047, this would instead be 0x8C and 0x41. B<Note that this function does not handle arbitrary encodings>; use L<Encode> instead. =item * C<$success = utf8::decode($string)> (Since Perl v5.8.0) Attempts to convert in-place the octet sequence encoded as UTF-8 to the corresponding character sequence. That is, it replaces each sequence of characters in the string whose ords represent a valid UTF-8 byte sequence, with the corresponding single character. The UTF-8 flag is turned on only if the source string contains multiple-byte UTF-8 characters. If I<$string> is invalid as UTF-8, returns false; otherwise returns true. my $a = "\xc4\x80"; # $a contains two characters, with ords # 0xc4 and 0x80 utf8::decode($a); # On ASCII platforms, $a contains one char, # with ord 0x100. Since these bytes aren't # legal UTF-EBCDIC, on EBCDIC platforms, $a is # unchanged and the function returns FALSE. B<Note that this function does not handle arbitrary encodings>; use L<Encode> instead. =item * C<$unicode = utf8::native_to_unicode($code_point)> (Since Perl v5.8.0) This takes an unsigned integer (which represents the ordinal number of a character (or a code point) on the platform the program is being run on) and returns its Unicode equivalent value. Since ASCII platforms natively use the Unicode code points, this function returns its input on them. On EBCDIC platforms it converts from EBCDIC to Unicode. A meaningless value will currently be returned if the input is not an unsigned integer. Since Perl v5.22.0, calls to this function are optimized out on ASCII platforms, so there is no performance hit in using it there. =item * C<$native = utf8::unicode_to_native($code_point)> (Since Perl v5.8.0) This is the inverse of C<utf8::native_to_unicode()>, converting the other direction. Again, on ASCII platforms, this returns its input, but on EBCDIC platforms it will find the native platform code point, given any Unicode one. A meaningless value will currently be returned if the input is not an unsigned integer. Since Perl v5.22.0, calls to this function are optimized out on ASCII platforms, so there is no performance hit in using it there. =item * C<$flag = utf8::is_utf8($string)> (Since Perl 5.8.1) Test whether I<$string> is marked internally as encoded in UTF-8. Functionally the same as C<Encode::is_utf8()>. =item * C<$flag = utf8::valid($string)> [INTERNAL] Test whether I<$string> is in a consistent state regarding UTF-8. Will return true if it is well-formed UTF-8 and has the UTF-8 flag on B<or> if I<$string> is held as bytes (both these states are 'consistent'). Main reason for this routine is to allow Perl's test suite to check that operations have left strings in a consistent state. You most probably want to use C<utf8::is_utf8()> instead. =back C<utf8::encode> is like C<utf8::upgrade>, but the UTF8 flag is cleared. See L<perlunicode>, and the C API functions C<L<sv_utf8_upgrade|perlapi/sv_utf8_upgrade>>, C<L<perlapi/sv_utf8_downgrade>>, C<L<perlapi/sv_utf8_encode>>, and C<L<perlapi/sv_utf8_decode>>, which are wrapped by the Perl functions C<utf8::upgrade>, C<utf8::downgrade>, C<utf8::encode> and C<utf8::decode>. Also, the functions C<utf8::is_utf8>, C<utf8::valid>, C<utf8::encode>, C<utf8::decode>, C<utf8::upgrade>, and C<utf8::downgrade> are actually internal, and thus always available, without a C<require utf8> statement. =head1 BUGS Some filesystems may not support UTF-8 file names, or they may be supported incompatibly with Perl. Therefore UTF-8 names that are visible to the filesystem, such as module names may not work. =head1 SEE ALSO L<perlunitut>, L<perluniintro>, L<perlrun>, L<bytes>, L<perlunicode> =cut
operepo/ope
bin/usr/share/perl5/core_perl/utf8.pm
Perl
mit
9,115
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Clownfish::Test; use Clownfish; our $VERSION = '0.006000'; $VERSION = eval $VERSION; sub dl_load_flags { 1 } BEGIN { require DynaLoader; our @ISA = qw( DynaLoader ); bootstrap Clownfish::Test '0.6.0'; } sub run_tests { my $class_name = shift; my $formatter = Clownfish::TestHarness::TestFormatterTAP->new(); my $suite = Clownfish::Test::create_test_suite(); return $suite->run_batch( class_name => $class_name, formatter => $formatter, ); } 1; __END__
nwellnhof/lucy-clownfish
runtime/perl/lib/Clownfish/Test.pm
Perl
apache-2.0
1,305
# # Copyright 2017 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package centreon::common::emc::navisphere::mode::controller; use base qw(centreon::plugins::mode); use strict; use warnings; use centreon::plugins::statefile; use Digest::MD5 qw(md5_hex); use centreon::plugins::values; my $maps_counters = { 'read-iops' => { class => 'centreon::plugins::values', obj => undef, set => { key_values => [ { name => 'read', diff => 1 }, ], per_second => 1, output_template => 'Read IOPs : %.2f', perfdatas => [ { value => 'read_per_second', template => '%.2f', unit => 'iops', min => 0 }, ], } }, 'write-iops' => { class => 'centreon::plugins::values', obj => undef, set => { key_values => [ { name => 'write', diff => 1 }, ], per_second => 1, output_template => 'Write IOPs : %.2f', perfdatas => [ { value => 'write_per_second', template => '%.2f', unit => 'iops', min => 0 }, ], } }, 'busy' => { class => 'centreon::plugins::values', obj => undef, set => { key_values => [ { name => 'idle_ticks', diff => 1 }, { name => 'busy_ticks', diff => 1 }, ], closure_custom_calc => \&custom_busy_calc, output_template => 'Busy : %.2f %%', output_use => 'busy_prct', threshold_use => 'busy_prct', perfdatas => [ { value => 'busy_prct', template => '%.2f', unit => '%', min => 0, max => 100 }, ], } }, }; sub custom_busy_calc { my ($self, %options) = @_; my $diff_busy = ($options{new_datas}->{$self->{instance} . '_busy_ticks'} - $options{old_datas}->{$self->{instance} . '_busy_ticks'}); my $total = $diff_busy + ($options{new_datas}->{$self->{instance} . '_idle_ticks'} - $options{old_datas}->{$self->{instance} . '_idle_ticks'}); if ($total == 0) { $self->{error_msg} = "skipped"; return -2; } $self->{result_values}->{busy_prct} = $diff_busy * 100 / $total; return 0; } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $self->{version} = '1.0'; $options{options}->add_options(arguments => { }); $self->{statefile_value} = centreon::plugins::statefile->new(%options); foreach (keys %{$maps_counters}) { $options{options}->add_options(arguments => { 'warning-' . $_ . ':s' => { name => 'warning-' . $_ }, 'critical-' . $_ . ':s' => { name => 'critical-' . $_ }, }); my $class = $maps_counters->{$_}->{class}; $maps_counters->{$_}->{obj} = $class->new(statefile => $self->{statefile_value}, output => $self->{output}, perfdata => $self->{perfdata}, label => $_); $maps_counters->{$_}->{obj}->set(%{$maps_counters->{$_}->{set}}); } return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); foreach (keys %{$maps_counters}) { $maps_counters->{$_}->{obj}->init(option_results => $self->{option_results}); } $self->{statefile_value}->check_options(%options); } sub run { my ($self, %options) = @_; my $clariion = $options{custom}; $self->{response} = $clariion->execute_command(cmd => 'getcontrol -cbt -busy -write -read -idle'); $self->manage_selection(); $self->{new_datas} = {}; $self->{statefile_value}->read(statefile => "cache_clariion_" . $clariion->{hostname} . '_' . $self->{mode}); $self->{new_datas}->{last_timestamp} = time(); my ($short_msg, $short_msg_append, $long_msg, $long_msg_append) = ('', '', '', ''); my @exits; foreach (sort keys %{$maps_counters}) { $maps_counters->{$_}->{obj}->set(instance => 'gcontrol'); my ($value_check) = $maps_counters->{$_}->{obj}->execute(values => $self->{gcontrol}, new_datas => $self->{new_datas}); if ($value_check != 0) { $long_msg .= $long_msg_append . $maps_counters->{$_}->{obj}->output_error(); $long_msg_append = ', '; next; } my $exit2 = $maps_counters->{$_}->{obj}->threshold_check(); push @exits, $exit2; my $output = $maps_counters->{$_}->{obj}->output(); $long_msg .= $long_msg_append . $output; $long_msg_append = ', '; if (!$self->{output}->is_status(litteral => 1, value => $exit2, compare => 'ok')) { $short_msg .= $short_msg_append . $output; $short_msg_append = ', '; } $maps_counters->{$_}->{obj}->perfdata(); } my $exit = $self->{output}->get_most_critical(status => [ @exits ]); if (!$self->{output}->is_status(litteral => 1, value => $exit, compare => 'ok')) { $self->{output}->output_add(severity => $exit, short_msg => "Global Controller $short_msg" ); } else { $self->{output}->output_add(short_msg => "Global Controller $long_msg"); } $self->{statefile_value}->write(data => $self->{new_datas}); $self->{output}->display(); $self->{output}->exit(); } sub manage_selection { my ($self, %options) = @_; $self->{gcontrol} = {}; $self->{gcontrol}->{read} = $self->{response} =~ /^Total Reads:\s*(\d+)/msi ? $1 : undef; $self->{gcontrol}->{write} = $self->{response} =~ /^Total Writes:\s*(\d+)/msi ? $1 : undef;; $self->{gcontrol}->{idle_ticks} = $self->{response} =~ /^Controller idle ticks:\s*(\d+)/msi ? $1 : undef; $self->{gcontrol}->{busy_ticks} = $self->{response} =~ /^Controller busy ticks:\s*(\d+)/msi ? $1 : undef; } 1; __END__ =head1 MODE Check global controller (busy usage, iops). =over 8 =item B<--warning-*> Threshold warning. Can be: 'busy', 'read-iops', 'write-iops'. =item B<--critical-*> Threshold critical. Can be: 'busy', 'read-iops', 'write-iops'. =back =cut
nichols-356/centreon-plugins
centreon/common/emc/navisphere/mode/controller.pm
Perl
apache-2.0
7,877
=head1 NAME Parallel::ForkManager - A simple parallel processing fork manager =head1 SYNOPSIS use Parallel::ForkManager; $pm = new Parallel::ForkManager($MAX_PROCESSES); foreach $data (@all_data) { # Forks and returns the pid for the child: my $pid = $pm->start and next; ... do some work with $data in the child process ... $pm->finish; # Terminates the child process } =head1 DESCRIPTION This module is intended for use in operations that can be done in parallel where the number of processes to be forked off should be limited. Typical use is a downloader which will be retrieving hundreds/thousands of files. The code for a downloader would look something like this: use LWP::Simple; use Parallel::ForkManager; ... @links=( ["http://www.foo.bar/rulez.data","rulez_data.txt"], ["http://new.host/more_data.doc","more_data.doc"], ... ); ... # Max 30 processes for parallel download my $pm = new Parallel::ForkManager(30); foreach my $linkarray (@links) { $pm->start and next; # do the fork my ($link,$fn) = @$linkarray; warn "Cannot get $fn from $link" if getstore($link,$fn) != RC_OK; $pm->finish; # do the exit in the child process } $pm->wait_all_children; First you need to instantiate the ForkManager with the "new" constructor. You must specify the maximum number of processes to be created. If you specify 0, then NO fork will be done; this is good for debugging purposes. Next, use $pm->start to do the fork. $pm returns 0 for the child process, and child pid for the parent process (see also L<perlfunc(1p)/fork()>). The "and next" skips the internal loop in the parent process. NOTE: $pm->start dies if the fork fails. $pm->finish terminates the child process (assuming a fork was done in the "start"). NOTE: You cannot use $pm->start if you are already in the child process. If you want to manage another set of subprocesses in the child process, you must instantiate another Parallel::ForkManager object! =head1 METHODS The comment letter indicates where the method should be run. P for parent, C for child. =over 5 =item new $processes [, $tempdir] # P Instantiate a new Parallel::ForkManager object. You must specify the maximum number of children to fork off. If you specify 0 (zero), then no children will be forked. This is intended for debugging purposes. The optional second parameter, $tempdir, is only used if you want the children to send back a reference to some data (see RETRIEVING DATASTRUCTURES below). If not provided, it is set to $L<File::Spec>->tmpdir(). The new method will die if the temporary directory does not exist or it is not a directory, whether you provided this parameter or the $L<File::Spec>->tmpdir() is used. =item start [ $process_identifier ] # P This method does the fork. It returns the pid of the child process for the parent, and 0 for the child process. If the $processes parameter for the constructor is 0 then, assuming you're in the child process, $pm->start simply returns 0. An optional $process_identifier can be provided to this method... It is used by the "run_on_finish" callback (see CALLBACKS) for identifying the finished process. =item finish [ $exit_code [, $data_structure_reference] ] # C Closes the child process by exiting and accepts an optional exit code (default exit code is 0) which can be retrieved in the parent via callback. If the second optional parameter is provided, the child attempts to send it's contents back to the parent. If you use the program in debug mode ($processes == 0), this method just calls the callback. If the $data_structure_reference is provided, then it is serialized and passed to the parent process. See RETRIEVING DATASTRUCTURES for more info. =item set_max_procs $processes # P Allows you to set a new maximum number of children to maintain. =item wait_all_children # P You can call this method to wait for all the processes which have been forked. This is a blocking wait. =back =head1 CALLBACKS You can define callbacks in the code, which are called on events like starting a process or upon finish. Declare these before the first call to start(). The callbacks can be defined with the following methods: =over 4 =item run_on_finish $code [, $pid ] # P You can define a subroutine which is called when a child is terminated. It is called in the parent process. The paremeters of the $code are the following: - pid of the process, which is terminated - exit code of the program - identification of the process (if provided in the "start" method) - exit signal (0-127: signal name) - core dump (1 if there was core dump at exit) - datastructure reference or undef (see RETRIEVING DATASTRUCTURES) =item run_on_start $code # P You can define a subroutine which is called when a child is started. It called after the successful startup of a child in the parent process. The parameters of the $code are the following: - pid of the process which has been started - identification of the process (if provided in the "start" method) =item run_on_wait $code, [$period] # P You can define a subroutine which is called when the child process needs to wait for the startup. If $period is not defined, then one call is done per child. If $period is defined, then $code is called periodically and the module waits for $period seconds betwen the two calls. Note, $period can be fractional number also. The exact "$period seconds" is not guarranteed, signals can shorten and the process scheduler can make it longer (on busy systems). The $code called in the "start" and the "wait_all_children" method also. No parameters are passed to the $code on the call. =back =head1 RETRIEVING DATASTRUCTURES from child processes The ability for the parent to retrieve data structures is new as of version 0.7.6. Each child process may optionally send 1 data structure back to the parent. By data structure, we mean a reference to a string, hash or array. The contents of the data structure are written out to temporary files on disc using the L<Storable> modules' store() method. The reference is then retrieved from within the code you send to the run_on_finish callback. The data structure can be any scalar perl data structure which makes sense: string, numeric value or a reference to an array, hash or object. There are 2 steps involved in retrieving data structures: 1) A reference to the data structure the child wishes to send back to the parent is provided as the second argument to the finish() call. It is up to the child to decide whether or not to send anything back to the parent. 2) The data structure reference is retrieved using the callback provided in the run_on_finish() method. Keep in mind that data structure retrieval is not the same as returning a data structure from a method call. That is not what actually occurs. The data structure referenced in a given child process is serialized and written out to a file by L<Storable>. The file is subsequently read back into memory and a new data structure belonging to the parent process is created. Please consider the performance penality it can imply, so try to keep the returned structure small. =head1 EXAMPLES =head2 Parallel get This small example can be used to get URLs in parallel. use Parallel::ForkManager; use LWP::Simple; my $pm=new Parallel::ForkManager(10); for my $link (@ARGV) { $pm->start and next; my ($fn)= $link =~ /^.*\/(.*?)$/; if (!$fn) { warn "Cannot determine filename from $fn\n"; } else { $0.=" ".$fn; print "Getting $fn from $link\n"; my $rc=getstore($link,$fn); print "$link downloaded. response code: $rc\n"; }; $pm->finish; }; =head2 Callbacks Example of a program using callbacks to get child exit codes: use strict; use Parallel::ForkManager; my $max_procs = 5; my @names = qw( Fred Jim Lily Steve Jessica Bob Dave Christine Rico Sara ); # hash to resolve PID's back to child specific information my $pm = new Parallel::ForkManager($max_procs); # Setup a callback for when a child finishes up so we can # get it's exit code $pm->run_on_finish( sub { my ($pid, $exit_code, $ident) = @_; print "** $ident just got out of the pool ". "with PID $pid and exit code: $exit_code\n"; } ); $pm->run_on_start( sub { my ($pid,$ident)=@_; print "** $ident started, pid: $pid\n"; } ); $pm->run_on_wait( sub { print "** Have to wait for one children ...\n" }, 0.5 ); foreach my $child ( 0 .. $#names ) { my $pid = $pm->start($names[$child]) and next; # This code is the child process print "This is $names[$child], Child number $child\n"; sleep ( 2 * $child ); print "$names[$child], Child $child is about to get out...\n"; sleep 1; $pm->finish($child); # pass an exit code to finish } print "Waiting for Children...\n"; $pm->wait_all_children; print "Everybody is out of the pool!\n"; =head2 Data structure retrieval In this simple example, each child sends back a string reference. use Parallel::ForkManager 0.7.6; use strict; my $pm = new Parallel::ForkManager(2, '/server/path/to/temp/dir/'); # data structure retrieval and handling $pm -> run_on_finish ( # called BEFORE the first call to start() sub { my ($pid, $exit_code, $ident, $exit_signal, $core_dump, $data_structure_reference) = @_; # retrieve data structure from child if (defined($data_structure_reference)) { # children are not forced to send anything my $string = ${$data_structure_reference}; # child passed a string reference print "$string\n"; } else { # problems occuring during storage or retrieval will throw a warning print qq|No message received from child process $pid!\n|; } } ); # prep random statement components my @foods = ('chocolate', 'ice cream', 'peanut butter', 'pickles', 'pizza', 'bacon', 'pancakes', 'spaghetti', 'cookies'); my @preferences = ('loves', q|can't stand|, 'always wants more', 'will walk 100 miles for', 'only eats', 'would starve rather than eat'); # run the parallel processes my $person = ''; foreach $person (qw(Fred Wilma Ernie Bert Lucy Ethel Curly Moe Larry)) { $pm->start() and next; # generate a random statement about food preferences my $statement = $person . ' ' . $preferences[int(rand @preferences)] . ' ' . $foods[int(rand @foods)]; # send it back to the parent process $pm->finish(0, \$statement); # note that it's a scalar REFERENCE, not the scalar itself } $pm->wait_all_children; A second datastructure retrieval example demonstrates how children decide whether or not to send anything back, what to send and how the parent should process whatever is retrieved. =for example begin use Parallel::ForkManager 0.7.6; use Data::Dumper; # to display the data structures retrieved. use strict; my $pm = new Parallel::ForkManager(20); # using the system temp dir $L<File::Spec>->tmpdir() # data structure retrieval and handling my %retrieved_responses = (); # for collecting responses $pm -> run_on_finish ( sub { my ($pid, $exit_code, $ident, $exit_signal, $core_dump, $data_structure_reference) = @_; # see what the child sent us, if anything if (defined($data_structure_reference)) { # test rather than assume child sent anything my $reftype = ref($data_structure_reference); print qq|ident "$ident" returned a "$reftype" reference.\n\n|; if (1) { # simple on/off switch to display the contents print &Dumper($data_structure_reference) . qq|end of "$ident" sent structure\n\n|; } # we can also collect retrieved data structures for processing after all children have exited $retrieved_responses{$ident} = $data_structure_reference; } else { print qq|ident "$ident" did not send anything.\n\n|; } } ); # generate a list of instructions my @instructions = ( # a unique identifier and what the child process should send {'name' => '%ENV keys as a string', 'send' => 'keys'}, {'name' => 'Send Nothing'}, # not instructing the child to send anything back to the parent {'name' => 'Childs %ENV', 'send' => 'all'}, {'name' => 'Child chooses randomly', 'send' => 'random'}, {'name' => 'Invalid send instructions', 'send' => 'Na Na Nana Na'}, {'name' => 'ENV values in an array', 'send' => 'values'}, ); my $instruction = ''; foreach $instruction (@instructions) { $pm->start($instruction->{'name'}) and next; # this time we are using an explicit, unique child process identifier # last step in child processing $pm->finish(0) unless $instruction->{'send'}; # no data structure is sent unless this child is told what to send. if ($instruction->{'send'} eq 'keys') { $pm->finish(0, \join(', ', keys %ENV)); } elsif ($instruction->{'send'} eq 'values') { $pm->finish(0, [values %ENV]); # kinda useless without knowing which keys they belong to... } elsif ($instruction->{'send'} eq 'all') { $pm->finish(0, \%ENV); # remember, we are not "returning" anything, just copying the hash to disc # demonstrate clearly that the child determines what type of reference to send } elsif ($instruction->{'send'} eq 'random') { my $string = q|I'm just a string.|; my @array = qw(I am an array); my %hash = (type => 'associative array', synonym => 'hash', cool => 'very :)'); my $return_choice = ('string', 'array', 'hash')[int(rand 3)]; # randomly choose return data type $pm->finish(0, \$string) if ($return_choice eq 'string'); $pm->finish(0, \@array) if ($return_choice eq 'array'); $pm->finish(0, \%hash) if ($return_choice eq 'hash'); # as a responsible child, inform parent that their instruction was invalid } else { $pm->finish(0, \qq|Invalid instructions: "$instruction->{'send'}".|); # ordinarily I wouldn't include invalid input in a response... } } $pm->wait_all_children; # blocks until all forked processes have exited # post fork processing of returned data structures for (sort keys %retrieved_responses) { print qq|Post processing "$_"...\n|; } =for example end =head1 BUGS AND LIMITATIONS Do not use Parallel::ForkManager in an environment, where other child processes can affect the run of the main program, so using this module is not recommended in an environment where fork() / wait() is already used. If you want to use more than one copies of the Parallel::ForkManager, then you have to make sure that all children processes are terminated, before you use the second object in the main program. You are free to use a new copy of Parallel::ForkManager in the child processes, although I don't think it makes sense. =head1 COPYRIGHT Copyright (c) 2000-2010 Szabó, Balázs (dLux) All right reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR dLux (Szabó, Balázs) <dlux@dlux.hu> =head1 CREDITS Noah Robin <sitz@onastick.net> (documentation tweaks) Chuck Hirstius <chirstius@megapathdsl.net> (callback exit status, example) Grant Hopwood <hopwoodg@valero.com> (win32 port) Mark Southern <mark_southern@merck.com> (bugfix) Ken Clarke <www.perlprogrammer.net> (datastructure retrieval) =cut package Parallel::ForkManager; use POSIX ":sys_wait_h"; use Storable qw(store retrieve); use File::Spec; use strict; use vars qw($VERSION); $VERSION="0.7.9"; $VERSION = eval $VERSION; sub new { my ($c,$processes, $tempdir)=@_; my $h={ max_proc => $processes, processes => {}, in_child => 0, parent_pid => $$, }; # determine temporary directory for storing data structures $tempdir = File::Spec->tmpdir() unless (defined($tempdir) && length($tempdir)); die qq|Temporary directory "$tempdir" doesn't exist or is not a directory.| unless (-e $tempdir && -d _); # ensure temp dir exists and is indeed a directory $h->{tempdir} = $tempdir; # add tempdir to Parallel::ForkManager object so children can use it return bless($h,ref($c)||$c); }; sub start { my ($s,$identification)=@_; die "Cannot start another process while you are in the child process" if $s->{in_child}; while ($s->{max_proc} && ( keys %{ $s->{processes} } ) >= $s->{max_proc}) { $s->on_wait; $s->wait_one_child(defined $s->{on_wait_period} ? &WNOHANG : undef); }; $s->wait_children; if ($s->{max_proc}) { my $pid=fork(); die "Cannot fork: $!" if !defined $pid; if ($pid) { $s->{processes}->{$pid}=$identification; $s->on_start($pid,$identification); } else { $s->{in_child}=1 if !$pid; } return $pid; } else { $s->{processes}->{$$}=$identification; $s->on_start($$,$identification); return 0; # Simulating the child which returns 0 } } sub finish { my ($s, $x, $r)=@_; if ( $s->{in_child} ) { if (defined($r)) { # store the child's data structure my $storable_tempfile = File::Spec->catfile($s->{tempdir}, 'Parallel-ForkManager-' . $s->{parent_pid} . '-' . $$ . '.txt'); my $stored = eval { return &store($r, $storable_tempfile); }; # handle Storables errors, IE logcarp or carp returning undef, or die (via logcroak or croak) if (not $stored or $@) { warn(qq|The storable module was unable to store the child's data structure to the temp file "$storable_tempfile": | . join(', ', $@)); } } CORE::exit($x || 0); } if ($s->{max_proc} == 0) { # max_proc == 0 $s->on_finish($$, $x ,$s->{processes}->{$$}, 0, 0, $r); delete $s->{processes}->{$$}; } return 0; } sub wait_children { my ($s)=@_; return if !keys %{$s->{processes}}; my $kid; do { $kid = $s->wait_one_child(&WNOHANG); } while $kid > 0 || $kid < -1; # AS 5.6/Win32 returns negative PIDs }; *wait_childs=*wait_children; # compatibility sub wait_one_child { my ($s,$par)=@_; my $kid; while (1) { $kid = $s->_waitpid(-1,$par||=0); last if $kid == 0 || $kid == -1; # AS 5.6/Win32 returns negative PIDs redo if !exists $s->{processes}->{$kid}; my $id = delete $s->{processes}->{$kid}; # retrieve child data structure, if any my $retrieved = undef; my $storable_tempfile = File::Spec->catfile($s->{tempdir}, 'Parallel-ForkManager-' . $$ . '-' . $kid . '.txt'); if (-e $storable_tempfile) { # child has option of not storing anything, so we need to see if it did or not $retrieved = eval { return &retrieve($storable_tempfile); }; # handle Storables errors if (not $retrieved or $@) { warn(qq|The storable module was unable to retrieve the child's data structure from the temporary file "$storable_tempfile": | . join(', ', $@)); } # clean up after ourselves unlink $storable_tempfile; } $s->on_finish( $kid, $? >> 8 , $id, $? & 0x7f, $? & 0x80 ? 1 : 0, $retrieved); last; } $kid; }; sub wait_all_children { my ($s)=@_; while (keys %{ $s->{processes} }) { $s->on_wait; $s->wait_one_child(defined $s->{on_wait_period} ? &WNOHANG : undef); }; } *wait_all_childs=*wait_all_children; # compatibility; sub run_on_finish { my ($s,$code,$pid)=@_; $s->{on_finish}->{$pid || 0}=$code; } sub on_finish { my ($s,$pid,@par)=@_; my $code=$s->{on_finish}->{$pid} || $s->{on_finish}->{0} or return 0; $code->($pid,@par); }; sub run_on_wait { my ($s,$code, $period)=@_; $s->{on_wait}=$code; $s->{on_wait_period} = $period; } sub on_wait { my ($s)=@_; if(ref($s->{on_wait}) eq 'CODE') { $s->{on_wait}->(); if (defined $s->{on_wait_period}) { local $SIG{CHLD} = sub { } if ! defined $SIG{CHLD}; select undef, undef, undef, $s->{on_wait_period} }; }; }; sub run_on_start { my ($s,$code)=@_; $s->{on_start}=$code; } sub on_start { my ($s,@par)=@_; $s->{on_start}->(@par) if ref($s->{on_start}) eq 'CODE'; }; sub set_max_procs { my ($s, $mp)=@_; $s->{max_proc} = $mp; } # OS dependant code follows... sub _waitpid { # Call waitpid() in the standard Unix fashion. return waitpid($_[1],$_[2]); } # On ActiveState Perl 5.6/Win32 build 625, waitpid(-1, &WNOHANG) always # blocks unless an actual PID other than -1 is given. sub _NT_waitpid { my ($s, $pid, $par) = @_; if ($par == &WNOHANG) { # Need to nonblock on each of our PIDs in the pool. my @pids = keys %{ $s->{processes} }; # Simulate -1 (no processes awaiting cleanup.) return -1 unless scalar(@pids); # Check each PID in the pool. my $kid; foreach $pid (@pids) { $kid = waitpid($pid, $par); return $kid if $kid != 0; # AS 5.6/Win32 returns negative PIDs. } return $kid; } else { # Normal waitpid() call. return waitpid($pid, $par); } } { local $^W = 0; if ($^O eq 'NT' or $^O eq 'MSWin32') { *_waitpid = \&_NT_waitpid; } } 1;
bugs-bioinf/satta-2016
scripts/Parallel/ForkManager.pm
Perl
mit
21,083
#!/usr/bin/perl -w # In general, doing # run.pl some.log a b c is like running the command a b c in # the bash shell, and putting the standard error and output into some.log. # To run parallel jobs (backgrounded on the host machine), you can do (e.g.) # run.pl JOB=1:4 some.JOB.log a b c JOB is like running the command a b c JOB # and putting it in some.JOB.log, for each one. [Note: JOB can be any identifier]. # If any of the jobs fails, this script will fail. # A typical example is: # run.pl some.log my-prog "--opt=foo bar" foo \| other-prog baz # and run.pl will run something like: # ( my-prog '--opt=foo bar' foo | other-prog baz ) >& some.log # # Basically it takes the command-line arguments, quotes them # as necessary to preserve spaces, and evaluates them with bash. # In addition it puts the command line at the top of the log, and # the start and end times of the command at the beginning and end. # The reason why this is useful is so that we can create a different # version of this program that uses a queueing system instead. @ARGV < 2 && die "usage: run.pl log-file command-line arguments..."; $max_jobs_run = -1; $jobstart = 1; $jobend = 1; $ignored_opts = ""; # These will be ignored. # First parse an option like JOB=1:4, and any # options that would normally be given to # queue.pl, which we will just discard. if (@ARGV > 0) { while (@ARGV >= 2 && $ARGV[0] =~ m:^-:) { # parse any options # that would normally go to qsub, but which will be ignored here. $switch = shift @ARGV; if ($switch eq "-V") { $ignored_opts .= "-V "; } elsif ($switch eq "--max-jobs-run" || $switch eq "-tc") { # we do support the option --max-jobs-run n, and its GridEngine form -tc n. $max_jobs_run = shift @ARGV; if (! ($max_jobs_run > 0)) { die "run.pl: invalid option --max-jobs-run $max_jobs_run"; } } else { $option = shift @ARGV; if ($switch eq "-sync" && $option =~ m/^[yY]/) { $ignored_opts .= "-sync "; # Note: in the # corresponding code in queue.pl it says instead, just "$sync = 1;". } $ignored_opts .= "$switch $option "; if ($switch eq "-pe") { # e.g. -pe smp 5 $option2 = shift @ARGV; $ignored_opts .= "$option2 "; } } } if ($ARGV[0] =~ m/^([\w_][\w\d_]*)+=(\d+):(\d+)$/) { # e.g. JOB=1:10 $jobname = $1; $jobstart = $2; $jobend = $3; shift; if ($jobstart > $jobend) { die "run.pl: invalid job range $ARGV[0]"; } if ($jobstart <= 0) { die "run.pl: invalid job range $ARGV[0], start must be strictly positive (this is required for GridEngine compatibility)."; } } elsif ($ARGV[0] =~ m/^([\w_][\w\d_]*)+=(\d+)$/) { # e.g. JOB=1. $jobname = $1; $jobstart = $2; $jobend = $2; shift; } elsif ($ARGV[0] =~ m/.+\=.*\:.*$/) { print STDERR "Warning: suspicious first argument to run.pl: $ARGV[0]\n"; } } if ($ignored_opts ne "") { print STDERR "Warning: run.pl ignoring options \"$ignored_opts\"\n"; } if ($max_jobs_run == -1) { # If --max-jobs-run option not set, # then work out the number of processors if possible, # and set it based on that. $max_jobs_run = 0; if (open(P, "</proc/cpuinfo")) { # Linux while (<P>) { if (m/^processor/) { $max_jobs_run++; } } if ($max_jobs_run == 0) { print STDERR "run.pl: warning failed to detect any processors from /proc/cpuinfo\n"; $max_jobs_run = 10; # reasonable default. } close(P); } elsif (open(P, "sysctl -a |")) { # BSD/Darwin while (<P>) { if (m/hw\.ncpu\s*[:=]\s*(\d+)/) { # hw.ncpu = 4, or hw.ncpu: 4 $max_jobs_run = $1; last; } } close(P); if ($max_jobs_run == 0) { print STDERR "run.pl: warning failed to detect any processors from sysctl -a\n"; $max_jobs_run = 10; # reasonable default. } } else { # allow at most 32 jobs at once, on non-UNIX systems; change this code # if you need to change this default. $max_jobs_run = 32; } # The just-computed value of $max_jobs_run is just the number of processors # (or our best guess); and if it happens that the number of jobs we need to # run is just slightly above $max_jobs_run, it will make sense to increase # $max_jobs_run to equal the number of jobs, so we don't have a small number # of leftover jobs. $num_jobs = $jobend - $jobstart + 1; if ($num_jobs > $max_jobs_run && $num_jobs < 1.4 * $max_jobs_run) { $max_jobs_run = $num_jobs; } } $logfile = shift @ARGV; if (defined $jobname && $logfile !~ m/$jobname/ && $jobend > $jobstart) { print STDERR "run.pl: you are trying to run a parallel job but " . "you are putting the output into just one log file ($logfile)\n"; exit(1); } $cmd = ""; foreach $x (@ARGV) { if ($x =~ m/^\S+$/) { $cmd .= $x . " "; } elsif ($x =~ m:\":) { $cmd .= "'$x' "; } else { $cmd .= "\"$x\" "; } } $ret = 0; $numfail = 0; for ($jobid = $jobstart; $jobid <= $jobend; $jobid++) { $prev_jobid = $jobid - $max_jobs_run; if ($prev_jobid >= $jobstart) { $r = waitpid($pid[$prev_jobid], 0); if ($r == -1) { die "Error waiting for child process"; } # should never happen. if ($? != 0) { $numfail++; $ret = 1; } # The child process failed. } $childpid = fork(); if (!defined $childpid) { die "Error forking in run.pl (writing to $logfile)"; } if ($childpid == 0) { # We're in the child... this branch # executes the job and returns (possibly with an error status). if (defined $jobname) { $cmd =~ s/$jobname/$jobid/g; $logfile =~ s/$jobname/$jobid/g; } system("mkdir -p `dirname $logfile` 2>/dev/null"); open(F, ">$logfile") || die "Error opening log file $logfile"; print F "# " . $cmd . "\n"; print F "# Started at " . `date`; $starttime = `date +'%s'`; print F "#\n"; close(F); # Pipe into bash.. make sure we're not using any other shell. open(B, "|bash") || die "Error opening shell command"; print B "( " . $cmd . ") 2>>$logfile >> $logfile"; close(B); # If there was an error, exit status is in $? $ret = $?; $lowbits = $ret & 127; $highbits = $ret >> 8; if ($lowbits != 0) { $return_str = "code $highbits; signal $lowbits" } else { $return_str = "code $highbits"; } $endtime = `date +'%s'`; open(F, ">>$logfile") || die "Error opening log file $logfile (again)"; $enddate = `date`; chop $enddate; print F "# Accounting: time=" . ($endtime - $starttime) . " threads=1\n"; print F "# Ended ($return_str) at " . $enddate . ", elapsed time " . ($endtime-$starttime) . " seconds\n"; close(F); exit($ret == 0 ? 0 : 1); } else { $pid[$jobid] = $childpid; } } for ($jobid = $jobstart; $jobid <= $jobend; $jobid++) { if ($jobid > $jobend - $max_jobs_run) { $r = waitpid($pid[$jobid], 0); if ($r == -1) { die "Error waiting for child process"; } # should never happen. if ($? != 0) { $numfail++; $ret = 1; } # The child process failed. } } if ($ret != 0) { $njobs = $jobend - $jobstart + 1; if ($njobs == 1) { if (defined $jobname) { $logfile =~ s/$jobname/$jobstart/; # only one numbered job, so replace name with # that job. } print STDERR "run.pl: job failed, log is in $logfile\n"; if ($logfile =~ m/JOB/) { print STDERR "run.pl: probably you forgot to put JOB=1:\$nj in your script."; } } else { $logfile =~ s/$jobname/*/g; print STDERR "run.pl: $numfail / $njobs failed, log is in $logfile\n"; } } exit ($ret);
thorsonlinguistics/german-neutralization
utils/run.pl
Perl
apache-2.0
7,679
package Moose::Manual::Unsweetened; # ABSTRACT: Moose idioms in plain old Perl 5 without the sugar =pod =head1 NAME Moose::Manual::Unsweetened - Moose idioms in plain old Perl 5 without the sugar =head1 VERSION version 2.0604 =head1 DESCRIPTION If you're trying to figure out just what the heck Moose does, and how it saves you time, you might find it helpful to see what Moose is I<really> doing for you. This document shows you the translation from Moose sugar back to plain old Perl 5. =head1 CLASSES AND ATTRIBUTES First, we define two very small classes the Moose way. package Person; use DateTime; use DateTime::Format::Natural; use Moose; use Moose::Util::TypeConstraints; has name => ( is => 'rw', isa => 'Str', required => 1, ); # Moose doesn't know about non-Moose-based classes. class_type 'DateTime'; my $en_parser = DateTime::Format::Natural->new( lang => 'en', time_zone => 'UTC', ); coerce 'DateTime' => from 'Str' => via { $en_parser->parse_datetime($_) }; has birth_date => ( is => 'rw', isa => 'DateTime', coerce => 1, handles => { birth_year => 'year' }, ); enum 'ShirtSize' => qw( s m l xl xxl ); has shirt_size => ( is => 'rw', isa => 'ShirtSize', default => 'l', ); This is a fairly simple class with three attributes. We also define an enum type to validate t-shirt sizes because we don't want to end up with something like "blue" for the shirt size! package User; use Email::Valid; use Moose; use Moose::Util::TypeConstraints; extends 'Person'; subtype 'Email' => as 'Str' => where { Email::Valid->address($_) } => message { "$_ is not a valid email address" }; has email_address => ( is => 'rw', isa => 'Email', required => 1, ); This class subclasses Person to add a single attribute, email address. Now we will show what these classes would look like in plain old Perl 5. For the sake of argument, we won't use any base classes or any helpers like C<Class::Accessor>. package Person; use strict; use warnings; use Carp qw( confess ); use DateTime; use DateTime::Format::Natural; sub new { my $class = shift; my %p = ref $_[0] ? %{ $_[0] } : @_; exists $p{name} or confess 'name is a required attribute'; $class->_validate_name( $p{name} ); exists $p{birth_date} or confess 'birth_date is a required attribute'; $p{birth_date} = $class->_coerce_birth_date( $p{birth_date} ); $class->_validate_birth_date( $p{birth_date} ); $p{shirt_size} = 'l' unless exists $p{shirt_size}: $class->_validate_shirt_size( $p{shirt_size} ); return bless \%p, $class; } sub _validate_name { shift; my $name = shift; local $Carp::CarpLevel = $Carp::CarpLevel + 1; defined $name or confess 'name must be a string'; } { my $en_parser = DateTime::Format::Natural->new( lang => 'en', time_zone => 'UTC', ); sub _coerce_birth_date { shift; my $date = shift; return $date unless defined $date && ! ref $date; my $dt = $en_parser->parse_datetime($date); return $dt ? $dt : undef; } } sub _validate_birth_date { shift; my $birth_date = shift; local $Carp::CarpLevel = $Carp::CarpLevel + 1; $birth_date->isa('DateTime') or confess 'birth_date must be a DateTime object'; } sub _validate_shirt_size { shift; my $shirt_size = shift; local $Carp::CarpLevel = $Carp::CarpLevel + 1; defined $shirt_size or confess 'shirt_size cannot be undef'; my %sizes = map { $_ => 1 } qw( s m l xl xxl ); $sizes{$shirt_size} or confess "$shirt_size is not a valid shirt size (s, m, l, xl, xxl)"; } sub name { my $self = shift; if (@_) { $self->_validate_name( $_[0] ); $self->{name} = $_[0]; } return $self->{name}; } sub birth_date { my $self = shift; if (@_) { my $date = $self->_coerce_birth_date( $_[0] ); $self->_validate_birth_date( $date ); $self->{birth_date} = $date; } return $self->{birth_date}; } sub birth_year { my $self = shift; return $self->birth_date->year; } sub shirt_size { my $self = shift; if (@_) { $self->_validate_shirt_size( $_[0] ); $self->{shirt_size} = $_[0]; } return $self->{shirt_size}; } Wow, that was a mouthful! One thing to note is just how much space the data validation code consumes. As a result, it's pretty common for Perl 5 programmers to just not bother. Unfortunately, not validating arguments leads to surprises down the line ("why is birth_date an email address?"). Also, did you spot the (intentional) bug? It's in the C<_validate_birth_date()> method. We should check that the value in C<$birth_date> is actually defined and an object before we go and call C<isa()> on it! Leaving out those checks means our data validation code could actually cause our program to die. Oops. Note that if we add a superclass to Person we'll have to change the constructor to account for that. (As an aside, getting all the little details of what Moose does for you just right in this example was really not easy, which emphasizes the point of the example. Moose saves you a lot of work!) Now let's see User: package User; use strict; use warnings; use Carp qw( confess ); use Email::Valid; use Scalar::Util qw( blessed ); use base 'Person'; sub new { my $class = shift; my %p = ref $_[0] ? %{ $_[0] } : @_; exists $p{email_address} or confess 'email_address is a required attribute'; $class->_validate_email_address( $p{email_address} ); my $self = $class->SUPER::new(%p); $self->{email_address} = $p{email_address}; return $self; } sub _validate_email_address { shift; my $email_address = shift; local $Carp::CarpLevel = $Carp::CarpLevel + 1; defined $email_address or confess 'email_address must be a string'; Email::Valid->address($email_address) or confess "$email_address is not a valid email address"; } sub email_address { my $self = shift; if (@_) { $self->_validate_email_address( $_[0] ); $self->{email_address} = $_[0]; } return $self->{email_address}; } That one was shorter, but it only has one attribute. Between the two classes, we have a whole lot of code that doesn't do much. We could probably simplify this by defining some sort of "attribute and validation" hash, like this: package Person; my %Attr = ( name => { required => 1, validate => sub { defined $_ }, }, birth_date => { required => 1, validate => sub { blessed $_ && $_->isa('DateTime') }, }, shirt_size => { required => 1, validate => sub { defined $_ && $_ =~ /^(?:s|m|l|xl|xxl)$/i }, } ); Then we could define a base class that would accept such a definition, and do the right thing. Keep that sort of thing up and we're well on our way to writing a half-assed version of Moose! Of course, there are CPAN modules that do some of what Moose does, like C<Class::Accessor>, C<Class::Meta>, and so on. But none of them put together all of Moose's features along with a layer of declarative sugar, nor are these other modules designed for extensibility in the same way as Moose. With Moose, it's easy to write a MooseX module to replace or extend a piece of built-in functionality. Moose is a complete OO package in and of itself, and is part of a rich ecosystem of extensions. It also has an enthusiastic community of users, and is being actively maintained and developed. =head1 AUTHOR Moose is maintained by the Moose Cabal, along with the help of many contributors. See L<Moose/CABAL> and L<Moose/CONTRIBUTORS> for details. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Infinity Interactive, Inc.. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut __END__
Dokaponteam/ITF_Project
xampp/perl/vendor/lib/Moose/Manual/Unsweetened.pod
Perl
mit
8,471
# This file is auto-generated by the Perl DateTime Suite time zone # code generator (0.07) This code generator comes with the # DateTime::TimeZone module distribution in the tools/ directory # # Generated from /tmp/Q713JNUf8G/northamerica. Olson data version 2016a # # Do not edit this file directly. # package DateTime::TimeZone::America::Rankin_Inlet; $DateTime::TimeZone::America::Rankin_Inlet::VERSION = '1.95'; use strict; use Class::Singleton 1.03; use DateTime::TimeZone; use DateTime::TimeZone::OlsonDB; @DateTime::TimeZone::America::Rankin_Inlet::ISA = ( 'Class::Singleton', 'DateTime::TimeZone' ); my $spans = [ [ DateTime::TimeZone::NEG_INFINITY, # utc_start 61725456000, # utc_end 1957-01-01 00:00:00 (Tue) DateTime::TimeZone::NEG_INFINITY, # local_start 61725456000, # local_end 1957-01-01 00:00:00 (Tue) 0, 0, 'zzz', ], [ 61725456000, # utc_start 1957-01-01 00:00:00 (Tue) 61987788000, # utc_end 1965-04-25 06:00:00 (Sun) 61725434400, # local_start 1956-12-31 18:00:00 (Mon) 61987766400, # local_end 1965-04-25 00:00:00 (Sun) -21600, 0, 'CST', ], [ 61987788000, # utc_start 1965-04-25 06:00:00 (Sun) 62004117600, # utc_end 1965-10-31 06:00:00 (Sun) 61987773600, # local_start 1965-04-25 02:00:00 (Sun) 62004103200, # local_end 1965-10-31 02:00:00 (Sun) -14400, 1, 'CDDT', ], [ 62004117600, # utc_start 1965-10-31 06:00:00 (Sun) 62461353600, # utc_end 1980-04-27 08:00:00 (Sun) 62004096000, # local_start 1965-10-31 00:00:00 (Sun) 62461332000, # local_end 1980-04-27 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62461353600, # utc_start 1980-04-27 08:00:00 (Sun) 62477074800, # utc_end 1980-10-26 07:00:00 (Sun) 62461335600, # local_start 1980-04-27 03:00:00 (Sun) 62477056800, # local_end 1980-10-26 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62477074800, # utc_start 1980-10-26 07:00:00 (Sun) 62492803200, # utc_end 1981-04-26 08:00:00 (Sun) 62477053200, # local_start 1980-10-26 01:00:00 (Sun) 62492781600, # local_end 1981-04-26 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62492803200, # utc_start 1981-04-26 08:00:00 (Sun) 62508524400, # utc_end 1981-10-25 07:00:00 (Sun) 62492785200, # local_start 1981-04-26 03:00:00 (Sun) 62508506400, # local_end 1981-10-25 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62508524400, # utc_start 1981-10-25 07:00:00 (Sun) 62524252800, # utc_end 1982-04-25 08:00:00 (Sun) 62508502800, # local_start 1981-10-25 01:00:00 (Sun) 62524231200, # local_end 1982-04-25 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62524252800, # utc_start 1982-04-25 08:00:00 (Sun) 62540578800, # utc_end 1982-10-31 07:00:00 (Sun) 62524234800, # local_start 1982-04-25 03:00:00 (Sun) 62540560800, # local_end 1982-10-31 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62540578800, # utc_start 1982-10-31 07:00:00 (Sun) 62555702400, # utc_end 1983-04-24 08:00:00 (Sun) 62540557200, # local_start 1982-10-31 01:00:00 (Sun) 62555680800, # local_end 1983-04-24 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62555702400, # utc_start 1983-04-24 08:00:00 (Sun) 62572028400, # utc_end 1983-10-30 07:00:00 (Sun) 62555684400, # local_start 1983-04-24 03:00:00 (Sun) 62572010400, # local_end 1983-10-30 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62572028400, # utc_start 1983-10-30 07:00:00 (Sun) 62587756800, # utc_end 1984-04-29 08:00:00 (Sun) 62572006800, # local_start 1983-10-30 01:00:00 (Sun) 62587735200, # local_end 1984-04-29 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62587756800, # utc_start 1984-04-29 08:00:00 (Sun) 62603478000, # utc_end 1984-10-28 07:00:00 (Sun) 62587738800, # local_start 1984-04-29 03:00:00 (Sun) 62603460000, # local_end 1984-10-28 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62603478000, # utc_start 1984-10-28 07:00:00 (Sun) 62619206400, # utc_end 1985-04-28 08:00:00 (Sun) 62603456400, # local_start 1984-10-28 01:00:00 (Sun) 62619184800, # local_end 1985-04-28 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62619206400, # utc_start 1985-04-28 08:00:00 (Sun) 62634927600, # utc_end 1985-10-27 07:00:00 (Sun) 62619188400, # local_start 1985-04-28 03:00:00 (Sun) 62634909600, # local_end 1985-10-27 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62634927600, # utc_start 1985-10-27 07:00:00 (Sun) 62650656000, # utc_end 1986-04-27 08:00:00 (Sun) 62634906000, # local_start 1985-10-27 01:00:00 (Sun) 62650634400, # local_end 1986-04-27 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62650656000, # utc_start 1986-04-27 08:00:00 (Sun) 62666377200, # utc_end 1986-10-26 07:00:00 (Sun) 62650638000, # local_start 1986-04-27 03:00:00 (Sun) 62666359200, # local_end 1986-10-26 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62666377200, # utc_start 1986-10-26 07:00:00 (Sun) 62680291200, # utc_end 1987-04-05 08:00:00 (Sun) 62666355600, # local_start 1986-10-26 01:00:00 (Sun) 62680269600, # local_end 1987-04-05 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62680291200, # utc_start 1987-04-05 08:00:00 (Sun) 62697826800, # utc_end 1987-10-25 07:00:00 (Sun) 62680273200, # local_start 1987-04-05 03:00:00 (Sun) 62697808800, # local_end 1987-10-25 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62697826800, # utc_start 1987-10-25 07:00:00 (Sun) 62711740800, # utc_end 1988-04-03 08:00:00 (Sun) 62697805200, # local_start 1987-10-25 01:00:00 (Sun) 62711719200, # local_end 1988-04-03 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62711740800, # utc_start 1988-04-03 08:00:00 (Sun) 62729881200, # utc_end 1988-10-30 07:00:00 (Sun) 62711722800, # local_start 1988-04-03 03:00:00 (Sun) 62729863200, # local_end 1988-10-30 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62729881200, # utc_start 1988-10-30 07:00:00 (Sun) 62743190400, # utc_end 1989-04-02 08:00:00 (Sun) 62729859600, # local_start 1988-10-30 01:00:00 (Sun) 62743168800, # local_end 1989-04-02 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62743190400, # utc_start 1989-04-02 08:00:00 (Sun) 62761330800, # utc_end 1989-10-29 07:00:00 (Sun) 62743172400, # local_start 1989-04-02 03:00:00 (Sun) 62761312800, # local_end 1989-10-29 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62761330800, # utc_start 1989-10-29 07:00:00 (Sun) 62774640000, # utc_end 1990-04-01 08:00:00 (Sun) 62761309200, # local_start 1989-10-29 01:00:00 (Sun) 62774618400, # local_end 1990-04-01 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62774640000, # utc_start 1990-04-01 08:00:00 (Sun) 62792780400, # utc_end 1990-10-28 07:00:00 (Sun) 62774622000, # local_start 1990-04-01 03:00:00 (Sun) 62792762400, # local_end 1990-10-28 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62792780400, # utc_start 1990-10-28 07:00:00 (Sun) 62806694400, # utc_end 1991-04-07 08:00:00 (Sun) 62792758800, # local_start 1990-10-28 01:00:00 (Sun) 62806672800, # local_end 1991-04-07 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62806694400, # utc_start 1991-04-07 08:00:00 (Sun) 62824230000, # utc_end 1991-10-27 07:00:00 (Sun) 62806676400, # local_start 1991-04-07 03:00:00 (Sun) 62824212000, # local_end 1991-10-27 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62824230000, # utc_start 1991-10-27 07:00:00 (Sun) 62838144000, # utc_end 1992-04-05 08:00:00 (Sun) 62824208400, # local_start 1991-10-27 01:00:00 (Sun) 62838122400, # local_end 1992-04-05 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62838144000, # utc_start 1992-04-05 08:00:00 (Sun) 62855679600, # utc_end 1992-10-25 07:00:00 (Sun) 62838126000, # local_start 1992-04-05 03:00:00 (Sun) 62855661600, # local_end 1992-10-25 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62855679600, # utc_start 1992-10-25 07:00:00 (Sun) 62869593600, # utc_end 1993-04-04 08:00:00 (Sun) 62855658000, # local_start 1992-10-25 01:00:00 (Sun) 62869572000, # local_end 1993-04-04 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62869593600, # utc_start 1993-04-04 08:00:00 (Sun) 62887734000, # utc_end 1993-10-31 07:00:00 (Sun) 62869575600, # local_start 1993-04-04 03:00:00 (Sun) 62887716000, # local_end 1993-10-31 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62887734000, # utc_start 1993-10-31 07:00:00 (Sun) 62901043200, # utc_end 1994-04-03 08:00:00 (Sun) 62887712400, # local_start 1993-10-31 01:00:00 (Sun) 62901021600, # local_end 1994-04-03 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62901043200, # utc_start 1994-04-03 08:00:00 (Sun) 62919183600, # utc_end 1994-10-30 07:00:00 (Sun) 62901025200, # local_start 1994-04-03 03:00:00 (Sun) 62919165600, # local_end 1994-10-30 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62919183600, # utc_start 1994-10-30 07:00:00 (Sun) 62932492800, # utc_end 1995-04-02 08:00:00 (Sun) 62919162000, # local_start 1994-10-30 01:00:00 (Sun) 62932471200, # local_end 1995-04-02 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62932492800, # utc_start 1995-04-02 08:00:00 (Sun) 62950633200, # utc_end 1995-10-29 07:00:00 (Sun) 62932474800, # local_start 1995-04-02 03:00:00 (Sun) 62950615200, # local_end 1995-10-29 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62950633200, # utc_start 1995-10-29 07:00:00 (Sun) 62964547200, # utc_end 1996-04-07 08:00:00 (Sun) 62950611600, # local_start 1995-10-29 01:00:00 (Sun) 62964525600, # local_end 1996-04-07 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62964547200, # utc_start 1996-04-07 08:00:00 (Sun) 62982082800, # utc_end 1996-10-27 07:00:00 (Sun) 62964529200, # local_start 1996-04-07 03:00:00 (Sun) 62982064800, # local_end 1996-10-27 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 62982082800, # utc_start 1996-10-27 07:00:00 (Sun) 62995996800, # utc_end 1997-04-06 08:00:00 (Sun) 62982061200, # local_start 1996-10-27 01:00:00 (Sun) 62995975200, # local_end 1997-04-06 02:00:00 (Sun) -21600, 0, 'CST', ], [ 62995996800, # utc_start 1997-04-06 08:00:00 (Sun) 63013532400, # utc_end 1997-10-26 07:00:00 (Sun) 62995978800, # local_start 1997-04-06 03:00:00 (Sun) 63013514400, # local_end 1997-10-26 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63013532400, # utc_start 1997-10-26 07:00:00 (Sun) 63027446400, # utc_end 1998-04-05 08:00:00 (Sun) 63013510800, # local_start 1997-10-26 01:00:00 (Sun) 63027424800, # local_end 1998-04-05 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63027446400, # utc_start 1998-04-05 08:00:00 (Sun) 63044982000, # utc_end 1998-10-25 07:00:00 (Sun) 63027428400, # local_start 1998-04-05 03:00:00 (Sun) 63044964000, # local_end 1998-10-25 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63044982000, # utc_start 1998-10-25 07:00:00 (Sun) 63058896000, # utc_end 1999-04-04 08:00:00 (Sun) 63044960400, # local_start 1998-10-25 01:00:00 (Sun) 63058874400, # local_end 1999-04-04 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63058896000, # utc_start 1999-04-04 08:00:00 (Sun) 63077036400, # utc_end 1999-10-31 07:00:00 (Sun) 63058878000, # local_start 1999-04-04 03:00:00 (Sun) 63077018400, # local_end 1999-10-31 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63077036400, # utc_start 1999-10-31 07:00:00 (Sun) 63090345600, # utc_end 2000-04-02 08:00:00 (Sun) 63077014800, # local_start 1999-10-31 01:00:00 (Sun) 63090324000, # local_end 2000-04-02 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63090345600, # utc_start 2000-04-02 08:00:00 (Sun) 63108486000, # utc_end 2000-10-29 07:00:00 (Sun) 63090327600, # local_start 2000-04-02 03:00:00 (Sun) 63108468000, # local_end 2000-10-29 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63108486000, # utc_start 2000-10-29 07:00:00 (Sun) 63121795200, # utc_end 2001-04-01 08:00:00 (Sun) 63108468000, # local_start 2000-10-29 02:00:00 (Sun) 63121777200, # local_end 2001-04-01 03:00:00 (Sun) -18000, 0, 'EST', ], [ 63121795200, # utc_start 2001-04-01 08:00:00 (Sun) 63139935600, # utc_end 2001-10-28 07:00:00 (Sun) 63121777200, # local_start 2001-04-01 03:00:00 (Sun) 63139917600, # local_end 2001-10-28 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63139935600, # utc_start 2001-10-28 07:00:00 (Sun) 63153849600, # utc_end 2002-04-07 08:00:00 (Sun) 63139914000, # local_start 2001-10-28 01:00:00 (Sun) 63153828000, # local_end 2002-04-07 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63153849600, # utc_start 2002-04-07 08:00:00 (Sun) 63171385200, # utc_end 2002-10-27 07:00:00 (Sun) 63153831600, # local_start 2002-04-07 03:00:00 (Sun) 63171367200, # local_end 2002-10-27 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63171385200, # utc_start 2002-10-27 07:00:00 (Sun) 63185299200, # utc_end 2003-04-06 08:00:00 (Sun) 63171363600, # local_start 2002-10-27 01:00:00 (Sun) 63185277600, # local_end 2003-04-06 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63185299200, # utc_start 2003-04-06 08:00:00 (Sun) 63202834800, # utc_end 2003-10-26 07:00:00 (Sun) 63185281200, # local_start 2003-04-06 03:00:00 (Sun) 63202816800, # local_end 2003-10-26 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63202834800, # utc_start 2003-10-26 07:00:00 (Sun) 63216748800, # utc_end 2004-04-04 08:00:00 (Sun) 63202813200, # local_start 2003-10-26 01:00:00 (Sun) 63216727200, # local_end 2004-04-04 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63216748800, # utc_start 2004-04-04 08:00:00 (Sun) 63234889200, # utc_end 2004-10-31 07:00:00 (Sun) 63216730800, # local_start 2004-04-04 03:00:00 (Sun) 63234871200, # local_end 2004-10-31 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63234889200, # utc_start 2004-10-31 07:00:00 (Sun) 63248198400, # utc_end 2005-04-03 08:00:00 (Sun) 63234867600, # local_start 2004-10-31 01:00:00 (Sun) 63248176800, # local_end 2005-04-03 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63248198400, # utc_start 2005-04-03 08:00:00 (Sun) 63266338800, # utc_end 2005-10-30 07:00:00 (Sun) 63248180400, # local_start 2005-04-03 03:00:00 (Sun) 63266320800, # local_end 2005-10-30 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63266338800, # utc_start 2005-10-30 07:00:00 (Sun) 63279648000, # utc_end 2006-04-02 08:00:00 (Sun) 63266317200, # local_start 2005-10-30 01:00:00 (Sun) 63279626400, # local_end 2006-04-02 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63279648000, # utc_start 2006-04-02 08:00:00 (Sun) 63297788400, # utc_end 2006-10-29 07:00:00 (Sun) 63279630000, # local_start 2006-04-02 03:00:00 (Sun) 63297770400, # local_end 2006-10-29 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63297788400, # utc_start 2006-10-29 07:00:00 (Sun) 63309283200, # utc_end 2007-03-11 08:00:00 (Sun) 63297766800, # local_start 2006-10-29 01:00:00 (Sun) 63309261600, # local_end 2007-03-11 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63309283200, # utc_start 2007-03-11 08:00:00 (Sun) 63329842800, # utc_end 2007-11-04 07:00:00 (Sun) 63309265200, # local_start 2007-03-11 03:00:00 (Sun) 63329824800, # local_end 2007-11-04 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63329842800, # utc_start 2007-11-04 07:00:00 (Sun) 63340732800, # utc_end 2008-03-09 08:00:00 (Sun) 63329821200, # local_start 2007-11-04 01:00:00 (Sun) 63340711200, # local_end 2008-03-09 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63340732800, # utc_start 2008-03-09 08:00:00 (Sun) 63361292400, # utc_end 2008-11-02 07:00:00 (Sun) 63340714800, # local_start 2008-03-09 03:00:00 (Sun) 63361274400, # local_end 2008-11-02 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63361292400, # utc_start 2008-11-02 07:00:00 (Sun) 63372182400, # utc_end 2009-03-08 08:00:00 (Sun) 63361270800, # local_start 2008-11-02 01:00:00 (Sun) 63372160800, # local_end 2009-03-08 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63372182400, # utc_start 2009-03-08 08:00:00 (Sun) 63392742000, # utc_end 2009-11-01 07:00:00 (Sun) 63372164400, # local_start 2009-03-08 03:00:00 (Sun) 63392724000, # local_end 2009-11-01 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63392742000, # utc_start 2009-11-01 07:00:00 (Sun) 63404236800, # utc_end 2010-03-14 08:00:00 (Sun) 63392720400, # local_start 2009-11-01 01:00:00 (Sun) 63404215200, # local_end 2010-03-14 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63404236800, # utc_start 2010-03-14 08:00:00 (Sun) 63424796400, # utc_end 2010-11-07 07:00:00 (Sun) 63404218800, # local_start 2010-03-14 03:00:00 (Sun) 63424778400, # local_end 2010-11-07 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63424796400, # utc_start 2010-11-07 07:00:00 (Sun) 63435686400, # utc_end 2011-03-13 08:00:00 (Sun) 63424774800, # local_start 2010-11-07 01:00:00 (Sun) 63435664800, # local_end 2011-03-13 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63435686400, # utc_start 2011-03-13 08:00:00 (Sun) 63456246000, # utc_end 2011-11-06 07:00:00 (Sun) 63435668400, # local_start 2011-03-13 03:00:00 (Sun) 63456228000, # local_end 2011-11-06 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63456246000, # utc_start 2011-11-06 07:00:00 (Sun) 63467136000, # utc_end 2012-03-11 08:00:00 (Sun) 63456224400, # local_start 2011-11-06 01:00:00 (Sun) 63467114400, # local_end 2012-03-11 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63467136000, # utc_start 2012-03-11 08:00:00 (Sun) 63487695600, # utc_end 2012-11-04 07:00:00 (Sun) 63467118000, # local_start 2012-03-11 03:00:00 (Sun) 63487677600, # local_end 2012-11-04 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63487695600, # utc_start 2012-11-04 07:00:00 (Sun) 63498585600, # utc_end 2013-03-10 08:00:00 (Sun) 63487674000, # local_start 2012-11-04 01:00:00 (Sun) 63498564000, # local_end 2013-03-10 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63498585600, # utc_start 2013-03-10 08:00:00 (Sun) 63519145200, # utc_end 2013-11-03 07:00:00 (Sun) 63498567600, # local_start 2013-03-10 03:00:00 (Sun) 63519127200, # local_end 2013-11-03 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63519145200, # utc_start 2013-11-03 07:00:00 (Sun) 63530035200, # utc_end 2014-03-09 08:00:00 (Sun) 63519123600, # local_start 2013-11-03 01:00:00 (Sun) 63530013600, # local_end 2014-03-09 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63530035200, # utc_start 2014-03-09 08:00:00 (Sun) 63550594800, # utc_end 2014-11-02 07:00:00 (Sun) 63530017200, # local_start 2014-03-09 03:00:00 (Sun) 63550576800, # local_end 2014-11-02 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63550594800, # utc_start 2014-11-02 07:00:00 (Sun) 63561484800, # utc_end 2015-03-08 08:00:00 (Sun) 63550573200, # local_start 2014-11-02 01:00:00 (Sun) 63561463200, # local_end 2015-03-08 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63561484800, # utc_start 2015-03-08 08:00:00 (Sun) 63582044400, # utc_end 2015-11-01 07:00:00 (Sun) 63561466800, # local_start 2015-03-08 03:00:00 (Sun) 63582026400, # local_end 2015-11-01 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63582044400, # utc_start 2015-11-01 07:00:00 (Sun) 63593539200, # utc_end 2016-03-13 08:00:00 (Sun) 63582022800, # local_start 2015-11-01 01:00:00 (Sun) 63593517600, # local_end 2016-03-13 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63593539200, # utc_start 2016-03-13 08:00:00 (Sun) 63614098800, # utc_end 2016-11-06 07:00:00 (Sun) 63593521200, # local_start 2016-03-13 03:00:00 (Sun) 63614080800, # local_end 2016-11-06 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63614098800, # utc_start 2016-11-06 07:00:00 (Sun) 63624988800, # utc_end 2017-03-12 08:00:00 (Sun) 63614077200, # local_start 2016-11-06 01:00:00 (Sun) 63624967200, # local_end 2017-03-12 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63624988800, # utc_start 2017-03-12 08:00:00 (Sun) 63645548400, # utc_end 2017-11-05 07:00:00 (Sun) 63624970800, # local_start 2017-03-12 03:00:00 (Sun) 63645530400, # local_end 2017-11-05 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63645548400, # utc_start 2017-11-05 07:00:00 (Sun) 63656438400, # utc_end 2018-03-11 08:00:00 (Sun) 63645526800, # local_start 2017-11-05 01:00:00 (Sun) 63656416800, # local_end 2018-03-11 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63656438400, # utc_start 2018-03-11 08:00:00 (Sun) 63676998000, # utc_end 2018-11-04 07:00:00 (Sun) 63656420400, # local_start 2018-03-11 03:00:00 (Sun) 63676980000, # local_end 2018-11-04 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63676998000, # utc_start 2018-11-04 07:00:00 (Sun) 63687888000, # utc_end 2019-03-10 08:00:00 (Sun) 63676976400, # local_start 2018-11-04 01:00:00 (Sun) 63687866400, # local_end 2019-03-10 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63687888000, # utc_start 2019-03-10 08:00:00 (Sun) 63708447600, # utc_end 2019-11-03 07:00:00 (Sun) 63687870000, # local_start 2019-03-10 03:00:00 (Sun) 63708429600, # local_end 2019-11-03 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63708447600, # utc_start 2019-11-03 07:00:00 (Sun) 63719337600, # utc_end 2020-03-08 08:00:00 (Sun) 63708426000, # local_start 2019-11-03 01:00:00 (Sun) 63719316000, # local_end 2020-03-08 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63719337600, # utc_start 2020-03-08 08:00:00 (Sun) 63739897200, # utc_end 2020-11-01 07:00:00 (Sun) 63719319600, # local_start 2020-03-08 03:00:00 (Sun) 63739879200, # local_end 2020-11-01 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63739897200, # utc_start 2020-11-01 07:00:00 (Sun) 63751392000, # utc_end 2021-03-14 08:00:00 (Sun) 63739875600, # local_start 2020-11-01 01:00:00 (Sun) 63751370400, # local_end 2021-03-14 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63751392000, # utc_start 2021-03-14 08:00:00 (Sun) 63771951600, # utc_end 2021-11-07 07:00:00 (Sun) 63751374000, # local_start 2021-03-14 03:00:00 (Sun) 63771933600, # local_end 2021-11-07 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63771951600, # utc_start 2021-11-07 07:00:00 (Sun) 63782841600, # utc_end 2022-03-13 08:00:00 (Sun) 63771930000, # local_start 2021-11-07 01:00:00 (Sun) 63782820000, # local_end 2022-03-13 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63782841600, # utc_start 2022-03-13 08:00:00 (Sun) 63803401200, # utc_end 2022-11-06 07:00:00 (Sun) 63782823600, # local_start 2022-03-13 03:00:00 (Sun) 63803383200, # local_end 2022-11-06 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63803401200, # utc_start 2022-11-06 07:00:00 (Sun) 63814291200, # utc_end 2023-03-12 08:00:00 (Sun) 63803379600, # local_start 2022-11-06 01:00:00 (Sun) 63814269600, # local_end 2023-03-12 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63814291200, # utc_start 2023-03-12 08:00:00 (Sun) 63834850800, # utc_end 2023-11-05 07:00:00 (Sun) 63814273200, # local_start 2023-03-12 03:00:00 (Sun) 63834832800, # local_end 2023-11-05 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63834850800, # utc_start 2023-11-05 07:00:00 (Sun) 63845740800, # utc_end 2024-03-10 08:00:00 (Sun) 63834829200, # local_start 2023-11-05 01:00:00 (Sun) 63845719200, # local_end 2024-03-10 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63845740800, # utc_start 2024-03-10 08:00:00 (Sun) 63866300400, # utc_end 2024-11-03 07:00:00 (Sun) 63845722800, # local_start 2024-03-10 03:00:00 (Sun) 63866282400, # local_end 2024-11-03 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63866300400, # utc_start 2024-11-03 07:00:00 (Sun) 63877190400, # utc_end 2025-03-09 08:00:00 (Sun) 63866278800, # local_start 2024-11-03 01:00:00 (Sun) 63877168800, # local_end 2025-03-09 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63877190400, # utc_start 2025-03-09 08:00:00 (Sun) 63897750000, # utc_end 2025-11-02 07:00:00 (Sun) 63877172400, # local_start 2025-03-09 03:00:00 (Sun) 63897732000, # local_end 2025-11-02 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63897750000, # utc_start 2025-11-02 07:00:00 (Sun) 63908640000, # utc_end 2026-03-08 08:00:00 (Sun) 63897728400, # local_start 2025-11-02 01:00:00 (Sun) 63908618400, # local_end 2026-03-08 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63908640000, # utc_start 2026-03-08 08:00:00 (Sun) 63929199600, # utc_end 2026-11-01 07:00:00 (Sun) 63908622000, # local_start 2026-03-08 03:00:00 (Sun) 63929181600, # local_end 2026-11-01 02:00:00 (Sun) -18000, 1, 'CDT', ], [ 63929199600, # utc_start 2026-11-01 07:00:00 (Sun) 63940694400, # utc_end 2027-03-14 08:00:00 (Sun) 63929178000, # local_start 2026-11-01 01:00:00 (Sun) 63940672800, # local_end 2027-03-14 02:00:00 (Sun) -21600, 0, 'CST', ], [ 63940694400, # utc_start 2027-03-14 08:00:00 (Sun) 63961254000, # utc_end 2027-11-07 07:00:00 (Sun) 63940676400, # local_start 2027-03-14 03:00:00 (Sun) 63961236000, # local_end 2027-11-07 02:00:00 (Sun) -18000, 1, 'CDT', ], ]; sub olson_version {'2016a'} sub has_dst_changes {49} sub _max_year {2026} sub _new_instance { return shift->_init( @_, spans => $spans ); } sub _last_offset { -21600 } my $last_observance = bless( { 'format' => 'C%sT', 'gmtoff' => '-6:00', 'local_start_datetime' => bless( { 'formatter' => undef, 'local_rd_days' => 730576, 'local_rd_secs' => 10800, 'offset_modifier' => 0, 'rd_nanosecs' => 0, 'tz' => bless( { 'name' => 'floating', 'offset' => 0 }, 'DateTime::TimeZone::Floating' ), 'utc_rd_days' => 730576, 'utc_rd_secs' => 10800, 'utc_year' => 2002 }, 'DateTime' ), 'offset_from_std' => 0, 'offset_from_utc' => -21600, 'until' => [], 'utc_start_datetime' => bless( { 'formatter' => undef, 'local_rd_days' => 730576, 'local_rd_secs' => 28800, 'offset_modifier' => 0, 'rd_nanosecs' => 0, 'tz' => bless( { 'name' => 'floating', 'offset' => 0 }, 'DateTime::TimeZone::Floating' ), 'utc_rd_days' => 730576, 'utc_rd_secs' => 28800, 'utc_year' => 2002 }, 'DateTime' ) }, 'DateTime::TimeZone::OlsonDB::Observance' ) ; sub _last_observance { $last_observance } my $rules = [ bless( { 'at' => '2:00', 'from' => '2007', 'in' => 'Mar', 'letter' => 'D', 'name' => 'Canada', 'offset_from_std' => 3600, 'on' => 'Sun>=8', 'save' => '1:00', 'to' => 'max', 'type' => undef }, 'DateTime::TimeZone::OlsonDB::Rule' ), bless( { 'at' => '2:00', 'from' => '2007', 'in' => 'Nov', 'letter' => 'S', 'name' => 'Canada', 'offset_from_std' => 0, 'on' => 'Sun>=1', 'save' => '0', 'to' => 'max', 'type' => undef }, 'DateTime::TimeZone::OlsonDB::Rule' ) ] ; sub _rules { $rules } 1;
jkb78/extrajnm
local/lib/perl5/DateTime/TimeZone/America/Rankin_Inlet.pm
Perl
mit
26,845
package O2CMS::Obj::Territory::Subregion; use strict; use base 'O2CMS::Obj::Territory'; use O2 qw($context); #------------------------------------------------------------------------------- # return localized name sub getName { my ($obj) = @_; return $context->getLocale()->getTerritoryName( $obj->getCode() ); } #------------------------------------------------------------------------------- 1;
haakonsk/O2-CMS
lib/O2CMS/Obj/Territory/Subregion.pm
Perl
mit
405
% MODULE td_basic EXPORTS :- module( td_basic, [ distribute_vars/3, vars_of_type/3, enumerate_t/3, append_body/3 ]). % IMPORTS :- use_module(home(argument_types), [type_sub/2]). % METAPREDICATES % none %*********************************************************************** %* %* module: td_basic.pl %* %* author: I.Stahl date:12/92 %* %* changed: %* %* description: basics for top-down induction %* %* see also: %* %*********************************************************************** %*********************************************************************** %* %* predicate: append_body/3 %* %* syntax: append_body(+Clause,+Literal,-Clause1) %* %* args: Clause,Clause1.. Prolog clauses %* %* description: adds Literal to the end of the body of Clause %* %* example: %* %* peculiarities: none %* %* see also: %* %*********************************************************************** append_body((H:-true),B,(H:-B)):- !. append_body((H:-B),C,(H:-B1)):- !, append_body(B,C,B1). append_body((A,B),C,(A,D)):- !, append_body(B,C,D). append_body(A,B,(A,B)). %*********************************************************************** %* %* predicate: distribute_vars/3 %* %* syntax: distribute_vars(+PVars,+Terms,-DVars) %* %* args: PVars = [X:Tx|R]: terms X with types Tx in the new literal P %* Terms: all terms with their types in the clause C to be refined %* %* DVars = [X:Vx,...]: for each X in PVars a list of all type-matching %* variables Vx in Terms + an additional new variable %* %* description: computes DVars %* %* example: %* %* peculiarities: none %* %* see also: %* %*********************************************************************** distribute_vars([],_,[]). distribute_vars([X:Tx|R],V,[X:Vx|R1]):- distribute_vars(R,V,R1), vars_of_type(V,Tx,Vx). %*********************************************************************** %* %* predicate: vars_of_type/3 %* %* syntax: vars_of_type(+Terms,+Ty,-R2) %* %* args: Terms= [X:Tx|_]: terms X with types Tx in the clause C to be refined %* Ty: type Ty of an argument of the new literal %* R2: a list of all terms in C matching type Ty %* %* description: adds a term X of Terms to R2 if type Ty subsumes type %* of X or vice versa %* and one new term (last element in R2) %* %* example: %* %* peculiarities: none %* %* see also: %* %*********************************************************************** vars_of_type([],_,[_]). vars_of_type([X:Tx|R],Ty,R2):- vars_of_type(R,Ty,R1), ( (type_sub(Ty,Tx);type_sub(Tx,Ty)) -> R2 = [X|R1] ; R2 = R1 ). %*********************************************************************** %* %* predicate: enumerate_t/3 %* %* syntax: enumerate_t(+DVars,+PL,-PL2) %* %* args: DVars = [X:Vx,...]: all variables X in the new literal %* with their type-matching variables in C %* PL: initial predicate list %* %* PL2: predicate list %* %* description: computes predicates P where variables in Vx are unified to X in P %* %* example: %* %* peculiarities: none %* %* see also: %* %*********************************************************************** enumerate_t([],PL,PL). enumerate_t([X:Vx|R],PL,PL2):- enumerate_t(R,PL,PL1), et(Vx,X,PL1,PL2). %*********************************************************************** %* %* predicate: et/4 %* %* syntax: et(+Vx,+X,+PL,-PL3) %* %* args: Vx: a list of variables to be unified with X %* X: a term of P to be unified by a variable of Vx %* PL: initial predicate list %* %* PL3: predicate list %* %* example: %* %* peculiarities: none %* %* see also: %* %*********************************************************************** et([],_,_,[]). et([Y|R],X,PL,PL3):- et(R,X,PL,PL1), etx(PL,X,Y,PL2), append(PL2,PL1,PL3). %*********************************************************************** %* %* predicate: etx/4 %* %* syntax: etx(PL,X,Y,R2) %* %* args: PL: literals of P %* X: a term of P to be unified by Y %* Y: a term of the clause C to be unfied with X %* %* R2: predicate list where X and Y are unified %* %* description: (if Y is not in args(P) then ) "unify" X and Y. This is %* done by copying P and replacing X by Y. %* %* example: %* %* peculiarities: none %* %* see also: %* %*********************************************************************** etx([],_,_,[]). etx([P|R],X,Y,R2):- etx(R,X,Y,R1), functor(P,F,N), functor(P1,F,N), etx1(N,P,P1,X,Y), R2 = [P1|R1]. %*********************************************************************** %* %* predicate: etx1/5 %* %* syntax: etx1(+N,+P,-P1,+X,+Y) %* %* args: N: arity of literal P %* P: literal to be added %* X: variable to be replaced by Y %* Y: variable %* %* description: replaces X by Y in the copy P1 of P %* %* example: %* %* peculiarities: none %* %* see also: %* %*********************************************************************** etx1(0,_,_,_,_):- !. etx1(N,P,P1,X,Y):- N1 is N - 1, etx1(N1,P,P1,X,Y), arg(N,P,Pn), ( Pn == X -> arg(N,P1,Y) ; arg(N,P1,Pn) ).
TeamSPoon/logicmoo_workspace
packs_sys/logicmoo_nars/prolog/miles/td_basic.pl
Perl
mit
5,774
#!/usr/bin/perl -w package Standup; use strict; use base qw( Bot::BasicBot::Pluggable ); use Try::Tiny; use Switch qw( Perl6 ); use Data::Dumper; use List::Util qw( first shuffle ); use List::MoreUtils qw( first_index ); use POE qw(Component::Schedule); use DateTime::Event::Cron; my $VERSION = "1.2"; sub new { my $class = shift; return $class->SUPER::new(@_, in_progress => {}, joinlists => {}); } sub init { my $self = shift; $self->SUPER::init() or return; my $logger = Log::Log4perl->get_logger( ref $self ); STANDUP: for my $standup (@{ $self->{standups} }) { my $cronline = $standup->{schedule} or next STANDUP; my $when_iter = DateTime::Event::Cron->from_cron($cronline)->iterator( after => DateTime->now( time_zone => $standup->{schedule_tz} || q{UTC} ), ); my $sesh = POE::Session->create( inline_states => { _start => sub { $_[HEAP]{sched} = POE::Component::Schedule->add($_[SESSION], schedalerm => $when_iter); }, schedalerm => sub { $logger->debug("YAY SCHEDALERM FOR " . $standup->{id}); $self->start_standup($standup); }, } ); } return 1; } sub get { my ($self, $name) = @_; return $self->store->get(ref $self, $name); } sub set { my ($self, $name, $value) = @_; return $self->store->set(ref $self, $name, $value); } # a standup is: # channel # last to join # who's gone # parking lot # start time # stop time sub help { my ($self, $message) = @_; my $help = $message->{body}; $help =~ s{ \A help \s* }{}msx; return q{My commands are: standup, start, cancel, next, skip, park, left, when, ignore, heed. Ask me 'help <command>' for what they do.} if !$help; given ($help) { when (/^standup$/) { return q{Tell me 'standup' to start a standup manually.} }; when (/^start$/) { return q{When starting a standup, tell me 'start' when everyone's arrived and I'll begin the standup.} }; when (/^cancel$/) { return q{When starting a standup, tell me 'cancel' (before we 'start') to forget about it.} }; when (/^next$/) { return q{During standup, tell me 'next' and I'll pick someone to go next. You can also tell me 'next <name>' to tell me <name> should go next.} }; when (/^skip$/) { return q{During standup, tell me 'skip <name>' and I'll pick someone else to go instead.} }; when (/^park$/) { return q{During standup, tell me 'park <topic>' and I'll remind you about <topic> after we're done.} }; when (/^left$/) { return q{During standup, ask me 'left' and I'll tell you who has yet to be called on.} }; when (/^when$/) { return q{Tell me 'when' and I'll tell you when the next scheduled standup is.} }; when (/^ignore$/) { return q{At any time, tell me 'ignore <name>' and I'll ignore that person until I am next restarted.} }; when (/^heed$/) { return q{At any time, tell me 'heed <name>' and I'll stop ignoring that person.} }; default { return qq{I don't know what '$help' is.} }; } } sub said { my ($self, $message) = @_; my $logger = Log::Log4perl->get_logger( ref $self ); # Only care if we're addressed. if (!$message->{address}) { # Try harder than Bot::BasicBot to see if we're addressed. my $nick = $self->nick; my $body = $message->{body}; if ($message->{body} =~ s{ \A # first of message (?: .*? [[:punct:]] )? # up to a grammatic separator \s* (\Q$nick\E) \s* # bot's name [[:punct:]] \s* # a grammatic separator (required, unlike normally) }{}imsx) { $message->{address} = $1; $logger->debug("Supermatched addressed message '$body' into '$message->{address}' and '$message->{body}'"); } } return if !$message->{address}; my ($command, $rest) = split / /, $message->{body}, 2; $command = lc $command; $message->{command} = $command; $message->{rest} = $rest; my %commands = ( hi => q{hi}, hello => q{hi}, standup => q{standup}, start => q{start}, cancel => q{cancel}, q{next} => q{next_person}, skip => q{skip}, ignore => q{ignore}, heed => q{heed}, park => q{park}, left => q{left}, q{when} => q{when_standup}, dump => q{dump_data}, ); my $work = $commands{$command}; # Be more liberal when matching the 'next' and 'left' commands. if (!$work && $message->{body} =~ m{ \b (next|left) \b }imsx) { $work = $commands{$1}; } if (!$work) { $logger->debug("$message->{who} told me to '$message->{body}' but what is that"); return q{What? ('help' for help)}; } try { return $self->can($work)->($self, $message); } catch { return "$_"; }; } sub hi { my ($self, $message) = @_; return "tender standup-bot $VERSION at your service."; } sub start_standup { my ($self, $standup) = @_; my $logger = Log::Log4perl->get_logger( ref $self ); my $team = $standup->{id}; # Are we already in a standup? if ($self->{in_progress}->{ $standup->{id} }) { $logger->debug("We were scheduled to start a $team standup, but there's already one going"); return; } # Did we already have one of those today? my $now = DateTime->now( time_zone => $standup->{schedule_tz} || q{UTC} ); if ($self->get(q{last_day_} . $team) eq $now->ymd) { $logger->debug("We were scheduled to start a $team standup, but we already had one for " . $now->ymd(q{/})); return; } # Pretend we were started manually, I guess. try { return $self->standup({ channel => $standup->{team_channel} }); } catch { $logger->error("Tried to start scheduled standup '$team' but: $_"); } } sub standup { my ($self, $message) = @_; my $state = $self->state_for_message($message, start => 1); my ($team, $team_chan, $standup_chan) = @$state{qw( id team_channel standup_channel )}; my $now = DateTime->now( time_zone => $state->{schedule_tz} || q{UTC} ); $self->set(q{last_day_} . $team, $now->ymd); my $logger = Log::Log4perl->get_logger( ref $self ); $logger->debug("STANDUP self is $self, a " . ref($self)); if ($team_chan ne $standup_chan) { $self->say( channel => $team_chan, body => qq{Time for standup! It's in $standup_chan}, ); } $self->say( channel => $standup_chan, body => q{Time for standup! Tell me 'start' when everyone's here.}, ); # Ask for an update about who's here, in case we got out of sync somehow. $self->names($standup_chan); return; } sub state_for_message { my ($self, $message, %args) = @_; my $channel = $message->{channel}; die "What? There's no standup here!\n" if !$channel || $channel eq q{msg}; # Which standup is that? my $standup = first { $channel eq $_->{team_channel} || $channel eq $_->{standup_channel} } @{ $self->{standups} }; die "I don't know about the $channel standup.\n" if !$standup; return { %$standup } if $args{not_running}; my $team = $standup->{id}; my $state = $self->{in_progress}->{$team}; if (!$state && $args{start}) { my %standup = %$standup; $self->{in_progress}->{$team} = $state = \%standup; } elsif (!$state) { die "There's no $team standup right now.\n"; } return $state; } sub start { my ($self, $message) = @_; my $state = $self->state_for_message($message); return "The standup already started!" if $state->{started}; $state->{started} = 1; $state->{gone} = {}; $state->{parkinglot} = []; $state->{started} = time; return $self->next_person($message, pick_last => 1); } sub cancel { my ($self, $message) = @_; my $state = $self->state_for_message($message); return "The standup already started!" if $state->{started}; if ($message->{channel} ne $state->{standup_channel}) { my $who = $message->{who}; $self->say( channel => $state->{standup_channel}, body => qq{Never mind, $who cancelled the standup.}, ); } delete $self->{in_progress}->{ $state->{id} }; return "Cancelled."; } sub next_person { my ($self, $message, %args) = @_; my $logger = Log::Log4perl->get_logger( ref $self ); my $state = $self->state_for_message($message); my $channel = $state->{standup_channel}; # If it's not your turn, avoid double-nexting. my $not_my_turn = $state->{turn} && $state->{turn} ne $message->{who}; if ($not_my_turn && time - ($state->{last_next} || 0) <= 5) { $logger->debug(sprintf "Only %d secs since last next, ignoring", time - $state->{last_next}); return; } my $channel_data = $self->channel_data($channel); my @names = grep { defined $channel_data->{$_} } keys %$channel_data; $logger->debug("I see these folks in $channel: " . join(q{ }, @names)); my %ignore = map { $_ => 1 } $self->ignore_list; # Were any of them also named in the message? my $next = first { $message->{body} =~ m{ \b \Q$_\E \b }imsx } @names; if (defined $next) { return qq{I'm a chicken and I don't call on chickens.} if $next eq $self->nick; return qq{$next is a chicken and I don't call on chickens.} if $ignore{$next}; return qq{$next already went.} if $state->{gone}->{$next}; return qq{It's already ${next}'s turn.} if $state->{turn} && $state->{turn} eq $next; $logger->debug("The nexter asked for $next to go next"); } # You've gone when it's your turn and you ask to next. if ($state->{turn} && $state->{turn} eq $message->{who}) { $state->{gone}->{ $state->{turn} } = 1; } if (!defined $next) { @names = grep { !$state->{gone}->{$_} # already went && $_ ne $self->nick # the bot doesn't go && !$ignore{$_} # other bots don't go } @names; $logger->debug("Minus all the chickens that's: " . join(q{ }, @names)); # Was that everyone? return $self->done($message) if !@names; # If it's someone's turn but we're skipping them and there's someone else # to pick, don't pick whose turn it already is again immediately. if ($state->{turn} && !$state->{gone}->{ $state->{turn} } && @names > 1) { $logger->debug("Skipping $state->{turn} while there are others to pick"); @names = grep { $_ ne $state->{turn} } @names; } # When appropriate, pick the last person we saw join the channel. PICKLAST: { if ($args{pick_last}) { $logger->debug("The last shall go first!"); my $joinlist = $self->{joinlists}->{$channel}; if (!$joinlist) { $logger->debug("Oops, I don't know who joined $channel when; picking at random"); last PICKLAST; } my %eligible = map { $_ => 1 } @names; NICK: for my $nick (@$joinlist) { next NICK if !$eligible{$nick}; $logger->debug("Looks like I saw $nick join last"); $next = $nick; last PICKLAST; } $logger->debug("Hmm, I guess I didn't see when anyone who's left joined; picking at random"); } }; ($next, undef) = shuffle @names if !$next; $logger->debug("I picked $next to go next"); } $state->{turn} = $next; $state->{last_next} = time; $self->say( channel => $channel, who => $next, address => 1, body => q{your turn}, ); return; } sub ignore { my ($self, $message) = @_; my $who = $message->{rest}; $who =~ s{ \A \s+ | \s+ \z }{}gmsx; return q{Ignore whom?} if !$who; if ($who ~~ [$self->ignore_list]) { return qq{I was already ignoring $who. Use 'heed $who' to cancel.}; } else { $self->{ignore_list} = [ $self->ignore_list, $who ]; my $msg = qq{Alright, '$who' is now a chicken.}; return $msg; } } sub heed { my ($self, $message) = @_; my $who = $message->{rest}; $who =~ s{ \A \s+ | \s+ \z }{}gmsx; return q{Heed whom?} if !$who; if ($who ~~ [$self->ignore_list]) { $self->{ignore_list} = [ grep { $_ ne $who } $self->ignore_list ]; return qq{'$who' is now a pig (not a chicken).}; } else { return qq{I'm not ignoring $who}; } } sub skip { my ($self, $message) = @_; my $state = $self->state_for_message($message); my $who = $message->{rest}; $who =~ s{ \A \s+ | \s+ \z }{}gmsx; return q{Skip whom?} if !$who; # Is that someone in the channel? my $channel = $state->{standup_channel}; my $channel_data = $self->channel_data($channel); my %names = map { $_ => 1 } grep { defined $channel_data->{$_} } keys %$channel_data; return qq{$who isn't here to skip right now.} if !$names{$who}; return qq{$who already went.} if $state->{gone}->{$who}; # If it's already their turn, pretend they themselves nexted. return $self->next_person({ %$message, who => $who, body => q{next}, }) if $state->{turn} eq $who; # Otherwise just mark them as having gone. $state->{gone}->{$who} = 1; return qq{Okay, I'll skip $who.}; } sub park { my ($self, $message) = @_; my $state = $self->state_for_message($message); push @{ $state->{parkinglot} }, $message->{rest}; return "Parked."; } sub left { my ($self, $message) = @_; my $state = $self->state_for_message($message); my $channel = $state->{standup_channel}; my $channel_data = $self->channel_data($channel); my @names = grep { defined $channel_data->{$_} } keys %$channel_data; my %ignore = map { $_ => 1 } $self->ignore_list; @names = grep { !$state->{gone}->{$_} # already went && $_ ne $self->nick # the bot doesn't go && !$ignore{$_} # other bots don't go } @names; my $intro = q{The folks left are: }; if ($state->{turn}) { @names = grep { $_ ne $state->{turn} } @names; return qq{After $state->{turn}, no one is left.} if !@names; $intro = qq{After $state->{turn}, the folks left are: } } return q{No one is left.} if !@names; return $intro . join(q{, }, @names); } sub done { my ($self, $message) = @_; my $state = $self->state_for_message($message); # DONE delete $self->{in_progress}->{ $state->{id} }; my $min_duration = int ((time - $state->{started}) / 60); $self->say( channel => $state->{standup_channel}, body => sprintf(q{All done! Standup was %d minutes.}, $min_duration), ); my $logger = Log::Log4perl->get_logger( ref $self ); $logger->debug('Parked topics: ' . Dumper($state->{parkinglot})); if (my @parked = @{ $state->{parkinglot} }) { my $team = $state->{team_channel}; $self->say( channel => $team, body => 'Parked topics:', ); $self->say( channel => $team, body => ' * ' . $_, ) for @parked; } return; } sub when_standup { my ($self, $message) = @_; my $standup = $self->state_for_message($message, not_running => 1); my $now = DateTime->now( time_zone => $standup->{schedule_tz} || q{UTC} ); my $team = $standup->{id}; my $spec = $standup->{schedule} or return qq{The $team standup doesn't have a schedule.}; my $sched = DateTime::Event::Cron->from_cron($spec); my $next_time = $sched->next($now); # But is that one scheduled later today, when we already held a manual standup? if ($self->get(qq{last_day_$team}) eq $next_time->ymd) { # Then it's the first one tomorrow. my $tomorrow = $now->clone->add( days => 1 )->truncate( to => q{day} ); $next_time = $sched->next($tomorrow); } # Tell them! my $blah = q{Next standup is }; $blah .= $now->ymd eq $next_time->ymd ? q{today} : $next_time->strftime(q{%A}) ; $blah .= $next_time->strftime(q{ at HOUR%I:%M %P %Z}); if ((my $addl_tz) = $standup->{additional_tz}) { $next_time->set_time_zone($addl_tz); $blah .= $next_time->strftime(q{ (HOUR%I:%M %P %Z)}); } $blah =~ s{ HOUR 0? }{}gmsx; return $blah; } sub nick_change { my ($self, $old_nick, $new_nick) = @_; for my $joinlist (values %{ $self->{joinlists} }) { for my $nick (@{ $joinlist }) { $nick = $new_nick if $nick eq $old_nick; } } return; } sub chanjoin { my ($self, $message) = @_; my ($channel, $who) = @$message{qw( channel who )}; my $joinlist = ($self->{joinlists}->{$channel} ||= []); @$joinlist = grep { $_ && $_ ne $who } @$joinlist; unshift @$joinlist, $who; return; } sub dump_data { my ($self, $message) = @_; my $logger = Log::Log4perl->get_logger( ref $self ); my %data = %$self; delete $data{kernel}; delete $data{session}; $logger->debug(Data::Dumper->new([ \%data ])->Indent(2)->Dump()); return; } sub tick {} sub main { my $class = shift; require YAML; my $config = YAML::LoadFile(lc $class . '.yaml'); # Join all the channels where there are standups or standup teams. my @channels = map { ($_->{team_channel}, $_->{standup_channel}) } @{ $config->{standups} }; $config->{channels} = \@channels; my $bot = $class->new(%$config); $bot->run(); } Standup->main() unless caller; 1;
markpasc/tender
Standup.pm
Perl
mit
18,206
:- use_module(library(mqtt)). versions:- mqtt_version(MqttVerMa, MqttVerMi, MqttVerRe), pack_version(PackVerMa, PackVerMi, PackVerRe), format('% Pack version: ~w.~w.~w Mosquitto version: ~w.~w.~w~n', [PackVerMa, PackVerMi, PackVerRe, MqttVerMa, MqttVerMi, MqttVerRe]), true. /* 3 ?- simple_pub('topicone', test). % hook > on_log > connection: <swi_mqtt>(0x8a5980-0x8a5ae0) data: [level(16),log(Client swi_mqtt_client sending CONNECT)] % hook > on_log > connection: <swi_mqtt>(0x8a5980-0x8a5ae0) data: [level(16),log(Client swi_mqtt_client sending CONNECT)] % hook > on_log > connection: <swi_mqtt>(0x8a5980-0x8a5ae0) data: [level(16),log(Client swi_mqtt_client sending PUBLISH (d0, q0, r0, m1, 'topicone', ... (4 bytes)))] % hook > on_publish > connection: <swi_mqtt>(0x8a5980-0x8a5ae0) data: [message_id(1)] % hook > on_log > connection: <swi_mqtt>(0x8a5980-0x8a5ae0) data: [level(16),log(Client swi_mqtt_client sending DISCONNECT)] % hook > on_disconnect > connection: <swi_mqtt>(0x8a5980-0x8a5ae0) data: [reason(0)] true. */ simple_pub(Topic, Value) :- mqtt_connect(A, 'localhost', 1883, [alias(swi_mqtt), client_id(swi_mqtt_client), keepalive(120), is_async(false), debug_hooks(true)]), mqtt_pub(A, Topic, Value), mqtt_disconnect(A). /* 2 ?- simple_sub('topicino'). % hook > on_log > connection: <swi_mqtt>(0x889f20-0x889f50) data: [level(16),log(Client swi_mqtt_client sending CONNECT)] % hook > on_log > connection: <swi_mqtt>(0x889f20-0x889f50) data: [level(16),log(Client swi_mqtt_client sending CONNECT)] % hook > on_log > connection: <swi_mqtt>(0x889f20-0x889f50) data: [level(16),log(Client swi_mqtt_client sending SUBSCRIBE (Mid: 1, Topic: topicino, QoS: 0))] % hook > on_log > connection: <swi_mqtt>(0x889f20-0x889f50) data: [level(16),log(Client swi_mqtt_client sending UNSUBSCRIBE (Mid: 2, Topic: topicino))] % hook > on_log > connection: <swi_mqtt>(0x889f20-0x889f50) data: [level(16),log(Client swi_mqtt_client sending DISCONNECT)] % hook > on_disconnect > connection: <swi_mqtt>(0x889f20-0x889f50) data: [reason(0)] true. */ simple_sub(Topic) :- mqtt_connect(A, 'localhost', 1883, [alias(swi_mqtt), client_id(swi_mqtt_client), keepalive(120), is_async(false), debug_hooks(true)]), mqtt_sub(A, Topic, []), mqtt_loop(A), mqtt_loop(A), mqtt_unsub(A, Topic), mqtt_disconnect(A).
olsky/swi-mqtt-pack
examples/simple.pl
Perl
mit
2,474
:- set_prolog_flag(double_quotes, codes). parse(String, Expr) :- phrase(lisp(Expr), String). % Parse lisp input to AST /** * LISP grammar **/ lisp([Expr|Rest]) --> expression(Expr), space, lisp(Rest), !. % tail recursion lisp([]) --> []. % Whitespace separating expressions space --> [S], { S =< 0' }, space. %' space --> []. % (((()))) parenthesis_start --> space, "(", space. parenthesis_end --> space, ")", space. expression(s(Symbol)) --> symbol(Literal), { name(Symbol, Literal) }. % Expression is a symbol expression(n(Number)) --> number(Literal), { name(Number, Literal) }. % Expression is number literal expression(List) --> list(List). expression([s(quote),Q]) --> "'", expression(Q). %' % Parse numbers, longest match wins number([45 | N]) --> "-", numeral(N), !. % Negative numbers number(N) --> numeral(N), !. numeral([D | Rest]) --> digit(D), number(Rest). numeral([101 | Rest]) --> "e", exponent(Rest). numeral([46 | Rest]) --> ".", digits(Rest). numeral([D]) --> digit(D). exponent(Expt) --> digits(Expt). exponent([45 | Expt]) --> "-", digits(Expt). digits([D | Rest]) --> digit(D), digits(Rest). digits([D]) --> digit(D). digit(D) --> [D], { member(D, "0123456789") }. % Parse symbols symbol([Head | Tail]) --> % Symbol can't be empty \+(digit(Head)), % Mustn't start with a digit symbol_rest([Head | Tail]), !. % Longest wins symbol_rest([Head|Tail]) --> [Head], { member(Head, "+/-*><=abcdefghijklmnopqrstuvwxyz0123456789") }, symbol_rest(Tail). symbol_rest([]) --> []. % Parse lists (1 (1 2 3) 3) list(Expr) --> parenthesis_start, lisp(Expr), parenthesis_end. /** * LISP interpreter **/ % Transform typed symbols to lispy variables uncompile([H0], [H1]) :- uncompile(H0, H1), !. uncompile([H0 | T0], [H1 | T1]) :- uncompile(H0, H1),uncompile(T0, T1), !. uncompile([], []) :- !. uncompile(s(quote), "'"). %' uncompile(s(Symbol), Symbol). uncompile(n(N), N). uncompile(true, true). run(String, Result) :- empty_assoc(E), run(String, E, _, Results), last(Results, Result), !. run(String, E0, E1, Result) :- parse(String, Expressions), eval_all(Expressions, E0, R0, E1), maplist(uncompile, R0, Result), !. :- dynamic eval/4. % Assert/retract for function resolvation % Evaluate all expressions eval_all([H|T], E0, [V | Values], E2) :- eval(H, E0, V, E1), eval_all(T, E1, Values, E2). eval_all([], E0, [], E0). % Empty list eval([], E, [], E). eval(n(Number), E, n(Number), E). % Identity % Nil symbol eval(s(nil), E, [], E). % Other symbols eval(s(Symbol), E, R, E) :- get_assoc(s(Symbol), E, R). % Lookup variable from symbol table % Quote eval([s(quote) | [Arguments]], E, Arguments, E). % Defun eval([s(defun), Name, Arguments, Body], E0, Name, E1) :- put_assoc(f(Name), E0, [Arguments, Body], E1), !. % If - then eval([s(if), Cond, Then, _], E0, Value, E2) :- eval(Cond, E0, R, E1), \+ falsy(R), eval(Then, E1, Value, E2). % If - else eval([s(if), Cond , _ , Else], E0, Value, E2) :- eval(Cond, E0, [], E1), eval(Else, E1, Value, E2). % Evaluation of predefined functions eval([Function | Arguments], E0, Result, E3) :- eval_all(Arguments, E0, Values, E1), asserta(eval(s(A), B, A, B)), eval(Function, E1, F0, E2), retract(eval(s(A), B, A, B)), apply(F0, Values, E2, Result, E3), !. % Evaluation of user defined functions eval([Function | Arguments], E0, Result, E0) :- eval_all(Arguments, E0, Values, E1), asserta(eval(s(A), B, A, B)), eval(Function, E1, F0, E2), retract(eval(s(A), B, A, B)), apply(f(s(F0)), Values, E2, Result, _). falsy([]). % Math apply(+, Arguments, E, Sum, E) :- sumlist(Arguments, Sum). apply(-, [n(Head) | Tail], E, n(Sum), E) :- sumlist(Tail, n(Minuses)), Sum is Head - Minuses. apply(*, Arguments, E, Product, E) :- productlist(Arguments, Product). apply(/, [n(Head) | Tail], E, n(Result), E) :- productlist(Tail, n(Divident)), Divident \= 0, Result is Head / Divident. % < apply(<, [n(A), n(B)], E, true, E) :- <(A, B). apply(<, [n(A), n(B)], E, [], E) :- >=(A, B). % > apply(>, [n(A), n(B)], E, true, E) :- >(A, B). apply(>, [n(A), n(B)], E, [], E) :- =<(A, B). % eval apply(eval, [Arguments], E0, Result, E1) :- eval(Arguments, E0, Result, E1). % apply apply(apply, [Fun | [Arguments]], E0, Result, E2) :- eval([Fun | Arguments], E0, Result, E2). % not apply(not, [[]], E, true, E) :- !. apply(not, [_], E, [], E). % eq apply(eq, [A, A], E, true, E) :- !. apply(eq, [_, _], E, [], E). % car apply(car, [[Head | _]], E, Head, E). % cdr apply(cdr, [[_ | Tail]], E, Tail, E). % atom apply(atom, [n(A)], E, true, E) :- atomic(A). apply(atom, [A], E, true, E) :- atomic(A). apply(atom, [A], E, [], E) :- \+ atomic(A). % numberp apply(numberp, [n(A)], E, true, E) :- number(A). apply(numberp, [n(A)], E, [], E) :- \+ number(A). % cons apply(cons, [Head, Tail], E, [Head | Tail], E). % progn apply(progn, [_ | Rs], E, R, E) :- apply(progn, Rs, E, R, E). apply(progn, [R], E, R, E). % set apply(set, [Symbol, Value], E0, Value, E1) :- put_assoc(Symbol, E0, Value, E1). % User defined functions apply(f(Function), Arguments, E0, R, E0) :- get_assoc(f(Function), E0, [Names, Body]), bind_environment(Arguments, Names, E0, E1), apply(eval, [Body], E1, R, _). % Bind variables to environment bind_environment([Value | T0], [Name | T1], E0, E2) :- put_assoc(Name, E0, Value, E1), bind_environment(T0, T1, E1, E2). bind_environment([], [], E, E). % Helper rules for math sumlist(L,Sum) :- sumlist(L,0,Sum). sumlist([],Sum,n(Sum)). sumlist([n(H)|T],Count,Sum) :- NewCount is Count + H, sumlist(T,NewCount,Sum). productlist(L, Product) :- productlist(L, 1, Product). productlist(_, 0, 0) :- !. % Optimize! productlist([], Product, n(Product)). productlist([n(H)|T], Count, Product) :- NewCount is Count * H, productlist(T, NewCount, Product). last([_|T], L) :- last(T, L). last([H], H).
lautis/lisp-prolog
lisp.pl
Perl
mit
5,913
package Maximus::Task::Module::Upload; use Moose; use File::Temp; use namespace::autoclean; with 'Maximus::Role::Task'; has 'transporter' => ( is => 'ro', does => 'Maximus::Role::Transport', builder => '_transport_builder', lazy_build => 1, ); sub run { my ($self, $module_version) = @_; unless (ref($module_version) eq 'Maximus::Schema::Result::ModuleVersion') { $module_version = $self->schema->resultset('ModuleVersion') ->find({id => $module_version}); } return 1 if ($module_version->remote_location); my $tmp_file = File::Temp->new(); open my $fh, '>', $tmp_file or die('Failed to open tmp file'); binmode $fh; print $fh $module_version->get_column('archive'); close $fh; my $filename = sprintf('%s-%s-%s.zip', $module_version->module->modscope->name, $module_version->module->name, $module_version->version); my $remote_location = $self->transporter->transport($tmp_file->filename, $filename); unlink $tmp_file; $module_version->update({remote_location => $remote_location,}); $self->response($remote_location); 1; } sub _transport_builder { my $self = shift; my $driver = $self->cfg->{Transport}->{driver}; my %args = %{$self->cfg->{Transport}->{options}}; my $module = 'Maximus::Class::Transport::' . $driver; eval { my $module = $module; $module =~ s/::/\//g; require $module . '.pm'; }; die($@) if ($@); my $transporter = $module->new(\%args); return $transporter; } __PACKAGE__->meta->make_immutable; =head1 NAME Maximus::Task::Module::Upload - Upload module archive for persistent storage =head1 SYNOPSIS use Maximus::Task::Module::Upload; $task->run($module_version_id); # Module Version ID number $task->run($module_version); # Maximus::Schema::Result::ModuleVersion =head1 DESCRIPTION Upload module archive for persistent storage. =head1 ATTRIBUTES =head2 transporter Transport driver =head1 METHODS =head2 run Run task =head1 AUTHOR Christiaan Kras =head1 LICENSE Copyright (c) 2010-2013 Christiaan Kras Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. =cut 1;
maximos/maximus-web
lib/Maximus/Task/Module/Upload.pm
Perl
mit
3,214
package KinoSearch1::Index::SegTermDocs; use strict; use warnings; use KinoSearch1::Util::ToolSet; use base qw( KinoSearch1::Index::TermDocs ); BEGIN { __PACKAGE__->init_instance_vars( # constructor params reader => undef, ); } our %instance_vars; sub new { my $self = shift->SUPER::new; confess kerror() unless verify_args( \%instance_vars, @_ ); my %args = ( %instance_vars, @_ ); my $reader = $args{reader}; _init_child($self); # dupe some stuff from the parent reader. $self->_set_reader($reader); $self->_set_skip_interval( $reader->get_skip_interval ); $self->_set_freq_stream( $reader->get_freq_stream()->clone_stream ); $self->_set_skip_stream( $reader->get_freq_stream()->clone_stream ); $self->_set_prox_stream( $reader->get_prox_stream()->clone_stream ); $self->_set_deldocs( $reader->get_deldocs ); return $self; } sub seek { my ( $self, $term ) = @_; my $tinfo = defined $term ? $self->_get_reader()->fetch_term_info($term) : undef; $self->seek_tinfo($tinfo); } sub close { my $self = shift; $self->_get_freq_stream()->close; $self->_get_prox_stream()->close; $self->_get_skip_stream()->close; } 1; __END__ __XS__ MODULE = KinoSearch1 PACKAGE = KinoSearch1::Index::SegTermDocs void _init_child(term_docs) TermDocs *term_docs; PPCODE: Kino1_SegTermDocs_init_child(term_docs); SV* _set_or_get(term_docs, ...) TermDocs *term_docs; ALIAS: _set_count = 1 _get_count = 2 _set_freq_stream = 3 _get_freq_stream = 4 _set_prox_stream = 5 _get_prox_stream = 6 _set_skip_stream = 7 _get_skip_stream = 8 _set_deldocs = 9 _get_deldocs = 10 _set_reader = 11 _get_reader = 12 set_read_positions = 13 get_read_positions = 14 _set_skip_interval = 15 _get_skip_interval = 16 CODE: { SegTermDocsChild *child = (SegTermDocsChild*)term_docs->child; KINO_START_SET_OR_GET_SWITCH case 1: child->count = SvUV(ST(1)); /* fall through */ case 2: RETVAL = newSVuv(child->count); break; case 3: SvREFCNT_dec(child->freq_stream_sv); child->freq_stream_sv = newSVsv( ST(1) ); Kino1_extract_struct( child->freq_stream_sv, child->freq_stream, InStream*, "KinoSearch1::Store::InStream"); /* fall through */ case 4: RETVAL = newSVsv(child->freq_stream_sv); break; case 5: SvREFCNT_dec(child->prox_stream_sv); child->prox_stream_sv = newSVsv( ST(1) ); Kino1_extract_struct( child->prox_stream_sv, child->prox_stream, InStream*, "KinoSearch1::Store::InStream"); /* fall through */ case 6: RETVAL = newSVsv(child->prox_stream_sv); break; case 7: SvREFCNT_dec(child->skip_stream_sv); child->skip_stream_sv = newSVsv( ST(1) ); Kino1_extract_struct( child->skip_stream_sv, child->skip_stream, InStream*, "KinoSearch1::Store::InStream"); /* fall through */ case 8: RETVAL = newSVsv(child->skip_stream_sv); break; case 9: SvREFCNT_dec(child->deldocs_sv); child->deldocs_sv = newSVsv( ST(1) ); Kino1_extract_struct( child->deldocs_sv, child->deldocs, BitVector*, "KinoSearch1::Index::DelDocs" ); /* fall through */ case 10: RETVAL = newSVsv(child->deldocs_sv); break; case 11: SvREFCNT_dec(child->reader_sv); if (!sv_derived_from( ST(1), "KinoSearch1::Index::IndexReader") ) Kino1_confess("not a KinoSearch1::Index::IndexReader"); child->reader_sv = newSVsv( ST(1) ); /* fall through */ case 12: RETVAL = newSVsv(child->reader_sv); break; case 13: child->read_positions = SvTRUE( ST(1) ) ? 1 : 0; /* fall through */ case 14: RETVAL = newSViv(child->read_positions); break; case 15: child->skip_interval = SvUV(ST(1)); /* fall through */ case 16: RETVAL = newSVuv(child->skip_interval); break; KINO_END_SET_OR_GET_SWITCH } OUTPUT: RETVAL __H__ #ifndef H_KINO_SEG_TERM_DOCS #define H_KINO_SEG_TERM_DOCS 1 #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "KinoSearch1UtilBitVector.h" #include "KinoSearch1IndexTermDocs.h" #include "KinoSearch1IndexTermInfo.h" #include "KinoSearch1StoreInStream.h" #include "KinoSearch1UtilMemManager.h" typedef struct segtermdocschild { U32 count; U32 doc_freq; U32 doc; U32 freq; U32 skip_doc; U32 skip_count; U32 num_skips; SV *positions; U32 read_positions; U32 skip_interval; InStream *freq_stream; InStream *prox_stream; InStream *skip_stream; bool have_skipped; double frq_fileptr; double prx_fileptr; double skip_fileptr; BitVector *deldocs; SV *freq_stream_sv; SV *prox_stream_sv; SV *skip_stream_sv; SV *deldocs_sv; SV *reader_sv; } SegTermDocsChild; void Kino1_SegTermDocs_init_child(TermDocs*); void Kino1_SegTermDocs_set_doc_freq(TermDocs*, U32); U32 Kino1_SegTermDocs_get_doc_freq(TermDocs*); U32 Kino1_SegTermDocs_get_doc(TermDocs*); U32 Kino1_SegTermDocs_get_freq(TermDocs*); SV* Kino1_SegTermDocs_get_positions(TermDocs*); U32 Kino1_SegTermDocs_bulk_read(TermDocs*, SV*, SV*, U32); void Kino1_SegTermDocs_seek_tinfo(TermDocs*, TermInfo*); bool Kino1_SegTermDocs_next(TermDocs*); bool Kino1_SegTermDocs_skip_to(TermDocs*, U32 target); bool Kino1_SegTermDocs_skip_to_with_positions(TermDocs*); void Kino1_SegTermDocs_destroy(TermDocs*); #endif /* include guard */ __C__ #include "KinoSearch1IndexSegTermDocs.h" static void load_positions(TermDocs *term_docs); void Kino1_SegTermDocs_init_child(TermDocs *term_docs) { SegTermDocsChild *child; Kino1_New(1, child, 1, SegTermDocsChild); term_docs->child = child; child->doc_freq = KINO_TERM_DOCS_SENTINEL; child->doc = KINO_TERM_DOCS_SENTINEL; child->freq = KINO_TERM_DOCS_SENTINEL; /* child->positions starts life as an empty string */ child->positions = newSV(1); SvCUR_set(child->positions, 0); SvPOK_on(child->positions); term_docs->set_doc_freq = Kino1_SegTermDocs_set_doc_freq; term_docs->get_doc_freq = Kino1_SegTermDocs_get_doc_freq; term_docs->get_doc = Kino1_SegTermDocs_get_doc; term_docs->get_freq = Kino1_SegTermDocs_get_freq; term_docs->get_positions = Kino1_SegTermDocs_get_positions; term_docs->bulk_read = Kino1_SegTermDocs_bulk_read; term_docs->seek_tinfo = Kino1_SegTermDocs_seek_tinfo; term_docs->next = Kino1_SegTermDocs_next; term_docs->skip_to = Kino1_SegTermDocs_skip_to; term_docs->destroy = Kino1_SegTermDocs_destroy; child->freq_stream_sv = &PL_sv_undef; child->prox_stream_sv = &PL_sv_undef; child->skip_stream_sv = &PL_sv_undef; child->deldocs_sv = &PL_sv_undef; child->reader_sv = &PL_sv_undef; child->count = 0; child->read_positions = 0; /* off by default */ } void Kino1_SegTermDocs_set_doc_freq(TermDocs *term_docs, U32 doc_freq) { SegTermDocsChild *child; child = (SegTermDocsChild*)term_docs->child; child->doc_freq = doc_freq; } U32 Kino1_SegTermDocs_get_doc_freq(TermDocs *term_docs) { SegTermDocsChild *child; child = (SegTermDocsChild*)term_docs->child; return child->doc_freq; } U32 Kino1_SegTermDocs_get_doc(TermDocs *term_docs) { SegTermDocsChild *child; child = (SegTermDocsChild*)term_docs->child; return child->doc; } U32 Kino1_SegTermDocs_get_freq(TermDocs *term_docs) { SegTermDocsChild *child; child = (SegTermDocsChild*)term_docs->child; return child->freq; } SV* Kino1_SegTermDocs_get_positions(TermDocs *term_docs) { SegTermDocsChild *child; child = (SegTermDocsChild*)term_docs->child; return child->positions; } U32 Kino1_SegTermDocs_bulk_read(TermDocs *term_docs, SV* doc_nums_sv, SV* freqs_sv, U32 num_wanted) { SegTermDocsChild *child; InStream *freq_stream; U32 doc_code; U32 *doc_nums; U32 *freqs; STRLEN len; U32 num_got = 0; /* local copies */ child = (SegTermDocsChild*)term_docs->child; freq_stream = child->freq_stream; /* allocate space in supplied SVs and make them POK, if necessary */ len = num_wanted * sizeof(U32); SvUPGRADE(doc_nums_sv, SVt_PV); SvUPGRADE(freqs_sv, SVt_PV); SvPOK_on(doc_nums_sv); SvPOK_on(freqs_sv); doc_nums = (U32*)SvGROW(doc_nums_sv, len + 1); freqs = (U32*)SvGROW(freqs_sv, len + 1); while (child->count < child->doc_freq && num_got < num_wanted) { /* manually inlined call to term_docs->next */ child->count++; doc_code = freq_stream->read_vint(freq_stream);; child->doc += doc_code >> 1; if (doc_code & 1) child->freq = 1; else child->freq = freq_stream->read_vint(freq_stream); /* if the doc isn't deleted... */ if ( !Kino1_BitVec_get(child->deldocs, child->doc) ) { /* ... append to results */ *doc_nums++ = child->doc; *freqs++ = child->freq; num_got++; } } /* set the string end to the end of the U32 array */ SvCUR_set(doc_nums_sv, (num_got * sizeof(U32))); SvCUR_set(freqs_sv, (num_got * sizeof(U32))); return num_got; } bool Kino1_SegTermDocs_next(TermDocs *term_docs) { SegTermDocsChild *child = (SegTermDocsChild*)term_docs->child; InStream *freq_stream = child->freq_stream; U32 doc_code; while (1) { /* bail if we're out of docs */ if (child->count == child->doc_freq) { return 0; } /* decode delta doc */ doc_code = freq_stream->read_vint(freq_stream); child->doc += doc_code >> 1; /* if the stored num was odd, the freq is 1 */ if (doc_code & 1) { child->freq = 1; } /* otherwise, freq was stored as a VInt. */ else { child->freq = freq_stream->read_vint(freq_stream); } child->count++; /* read positions if desired */ if (child->read_positions) load_positions(term_docs); /* if the doc isn't deleted... success! */ if (!Kino1_BitVec_get(child->deldocs, child->doc)) break; } return 1; } static void load_positions(TermDocs *term_docs) { SegTermDocsChild *child = (SegTermDocsChild*)term_docs->child; InStream *prox_stream = child->prox_stream; STRLEN len = child->freq * sizeof(U32); U32 *positions, *positions_end; U32 position = 0; SvGROW( child->positions, len ); SvCUR_set(child->positions, len); positions = (U32*)SvPVX(child->positions); positions_end = (U32*)SvEND(child->positions); while (positions < positions_end) { position += prox_stream->read_vint(prox_stream); *positions++ = position; } } void Kino1_SegTermDocs_seek_tinfo(TermDocs *term_docs, TermInfo *tinfo) { SegTermDocsChild *child; child = (SegTermDocsChild*)term_docs->child; child->count = 0; if (tinfo == NULL) { child->doc_freq = 0; } else { child->doc = 0; child->freq = 0; child->skip_doc = 0; child->skip_count = 0; child->have_skipped = FALSE; child->num_skips = tinfo->doc_freq / child->skip_interval; child->doc_freq = tinfo->doc_freq; child->frq_fileptr = tinfo->frq_fileptr; child->prx_fileptr = tinfo->prx_fileptr; child->skip_fileptr = tinfo->frq_fileptr + tinfo->skip_offset; child->freq_stream->seek( child->freq_stream, tinfo->frq_fileptr ); child->prox_stream->seek( child->prox_stream, tinfo->prx_fileptr ); } } bool Kino1_SegTermDocs_skip_to(TermDocs *term_docs, U32 target) { SegTermDocsChild *child = (SegTermDocsChild*)term_docs->child; if (child->doc_freq >= child->skip_interval) { InStream *freq_stream = child->freq_stream; InStream *prox_stream = child->prox_stream; InStream *skip_stream = child->skip_stream; U32 last_skip_doc = child->skip_doc; double last_frq_fileptr = freq_stream->tell(freq_stream); double last_prx_fileptr = -1; I32 num_skipped = -1 - (child->count % child->skip_interval); if (!child->have_skipped) { child->skip_stream->seek(child->skip_stream, child->skip_fileptr); child->have_skipped = TRUE; } while (target > child->skip_doc) { last_skip_doc = child->skip_doc; last_frq_fileptr = child->frq_fileptr; last_prx_fileptr = child->prx_fileptr; if (child->skip_doc != 0 && child->skip_doc >= child->doc) { num_skipped += child->skip_interval; } if (child->skip_count >= child->num_skips) { break; } child->skip_doc += skip_stream->read_vint(skip_stream); child->frq_fileptr += skip_stream->read_vint(skip_stream); child->prx_fileptr += skip_stream->read_vint(skip_stream); child->skip_count++; } /* if there's something to skip, skip it */ if (last_frq_fileptr > freq_stream->tell(freq_stream)) { freq_stream->seek(freq_stream, last_frq_fileptr); if (child->read_positions) { prox_stream->seek(prox_stream, last_prx_fileptr); } child->doc = last_skip_doc; child->count += num_skipped; } } /* done skipping, so scan */ do { if (!term_docs->next(term_docs)) { return FALSE; } } while (target > child->doc); return TRUE; } void Kino1_SegTermDocs_destroy(TermDocs *term_docs){ SegTermDocsChild *child; child = (SegTermDocsChild*)term_docs->child; SvREFCNT_dec(child->positions); SvREFCNT_dec(child->freq_stream_sv); SvREFCNT_dec(child->prox_stream_sv); SvREFCNT_dec(child->skip_stream_sv); SvREFCNT_dec(child->deldocs_sv); SvREFCNT_dec(child->reader_sv); Kino1_Safefree(child); Kino1_TermDocs_destroy(term_docs); } __POD__ ==begin devdocs ==head1 NAME KinoSearch1::Index::SegTermDocs - single-segment TermDocs ==head1 DESCRIPTION Single-segment implemetation of KinoSearch1::Index::TermDocs. ==head1 COPYRIGHT Copyright 2005-2010 Marvin Humphrey ==head1 LICENSE, DISCLAIMER, BUGS, etc. See L<KinoSearch1> version 1.01. ==end devdocs ==cut
gitpan/KinoSearch1
lib/KinoSearch1/Index/SegTermDocs.pm
Perl
apache-2.0
15,135
use strict; use warnings; use Bio::Index::Fastq; use Getopt::Long; use Bio::EnsEMBL::Utils::Cache; my ($individual_name,$index_name,$database_name,$encode_region, $reads_file, $reads_names); { GetOptions('-index_name=s' => \$index_name, # '-individual_name=s' => \$individual_name, # '-encode_region=s' => \$encode_region, '-reads_names=s' => \$reads_names, '-reads_file=s' => \$reads_file, '-database_name=s' => \$database_name); } #we need to use cache to speed up fetch read sequence and quality data my $MAX_READS_CACHE_SIZE = 500; my %CACHE; tie(%CACHE, 'Bio::EnsEMBL::Utils::Cache', $MAX_READS_CACHE_SIZE); my $seq; my $new_index_name = "/tmp/index_name"; # #get read name from database # my ($name,$start,$end) = split /\:/,$encode_region; my $sql = qq{select s.query_name from ssahaSNP_feature s where substring_index(substring_index(target_name,'-',2),'-',1) = 'X' limit 10}; ## my $sql = qq{select s.query_name from ssahaSNP_feature s, query_match_length_strain q where target_start > $start and substring_index(substring_index(target_name,'-',2),'-',1) = '$name' and target_end < $end and target_start < $end and s.query_name = q.query_name and q.strain_name = 'HuBB'}; #my $call = qq{mysql -h ens-genomics1 -u ensro $database_name -e "$sql" > [reads_dir]/$encode_region\.$individual_name}; my $call = qq{mysql -h ens-genomics1 -u ensro $database_name -e "$sql" > $reads_names}; print $call,"\n"; system($call); system("cp $index_name $new_index_name"); # #open IN, "<[reads_dir]/$encode_region\.$individual_name" || die "Could not open file with reads:$!\n"; # open IN, "<[reads_dir]/$encode_region\.$individual_name\_yuan" || die "Could not open file with reads:$!\n"; # #open OUT , ">[reads_dir]/$encode_region\.$individual_name.out" || die "Could not open output file $!\n"; # open OUT , ">/[reads_dir]/$encode_region\.$individual_name\_yuan.out" || die "Could not open output file $!\n"; open IN, "<$reads_names" || die "Could not open file with reads:$!\n"; open OUT, ">$reads_file"|| die "Could not open output file:$!\n"; <IN>; #get rid of first line, the column name while (<IN>){ chomp; # next if ($_ eq 'gnl|ti|1823655463'); #this read is not present in the files: removed manually from fasta file $seq = get_pfetch_sequence_and_quality($index_name,$_); print OUT ">$_\n"; print OUT $seq->seq,"\n"; } close OUT; close IN; #unlink "$new_index_name"; sub get_pfetch_sequence_and_quality { my $index_filename = shift; my $query_name = shift; my $fastq_index = Bio::Index::Fastq->new(-filename => $index_filename); if (! defined($fastq_index)) { $fastq_index = Bio::Index::Fastq->new(-filename => $index_filename); } if (exists($CACHE{$query_name})) { return $CACHE{$query_name}; } my $seq = $fastq_index->fetch($query_name); die "could not fetch $query_name" unless ($seq); $CACHE{$query_name} = $seq; return $seq; }
adamsardar/perl-libs-custom
EnsemblAPI/ensembl-variation/scripts/import/get_reads.pl
Perl
apache-2.0
2,976
package Google::Ads::AdWords::v201809::PolicyTopicConstraint; use strict; use warnings; __PACKAGE__->_set_element_form_qualified(1); sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201809' }; our $XML_ATTRIBUTE_CLASS; undef $XML_ATTRIBUTE_CLASS; sub __get_attr_class { return $XML_ATTRIBUTE_CLASS; } use Class::Std::Fast::Storable constructor => 'none'; use base qw(Google::Ads::SOAP::Typelib::ComplexType); { # BLOCK to scope variables my %constraintType_of :ATTR(:get<constraintType>); my %PolicyTopicConstraint__Type_of :ATTR(:get<PolicyTopicConstraint__Type>); __PACKAGE__->_factory( [ qw( constraintType PolicyTopicConstraint__Type ) ], { 'constraintType' => \%constraintType_of, 'PolicyTopicConstraint__Type' => \%PolicyTopicConstraint__Type_of, }, { 'constraintType' => 'Google::Ads::AdWords::v201809::PolicyTopicConstraint::PolicyTopicConstraintType', 'PolicyTopicConstraint__Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string', }, { 'constraintType' => 'constraintType', 'PolicyTopicConstraint__Type' => 'PolicyTopicConstraint.Type', } ); } # end BLOCK 1; =pod =head1 NAME Google::Ads::AdWords::v201809::PolicyTopicConstraint =head1 DESCRIPTION Perl data type class for the XML Schema defined complexType PolicyTopicConstraint from the namespace https://adwords.google.com/api/adwords/cm/v201809. A target which caused a policy finding. =head2 PROPERTIES The following properties may be accessed using get_PROPERTY / set_PROPERTY methods: =over =item * constraintType =item * PolicyTopicConstraint__Type Note: The name of this property has been altered, because it didn't match perl's notion of variable/subroutine names. The altered name is used in perl code only, XML output uses the original name: PolicyTopicConstraint.Type =back =head1 METHODS =head2 new Constructor. The following data structure may be passed to new(): =head1 AUTHOR Generated by SOAP::WSDL =cut
googleads/googleads-perl-lib
lib/Google/Ads/AdWords/v201809/PolicyTopicConstraint.pm
Perl
apache-2.0
2,046
# # Copyright 2022 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package os::hpux::snmp::mode::process; use base qw(centreon::plugins::mode); use strict; use warnings; my %map_process_status = ( 1 => 'sleep', 2 => 'run', 3 => 'stop', 4 => 'zombie', 5 => 'other', 6 => 'idle', ); sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $options{options}->add_options(arguments => { "warning:s" => { name => 'warning', }, "critical:s" => { name => 'critical', }, "process-cmd:s" => { name => 'process_cmd', }, "regexp-cmd" => { name => 'regexp_cmd', }, "process-status:s" => { name => 'process_status', default => 'run' }, }); return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'."); $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'."); $self->{output}->option_exit(); } } my $oids = { status => '.1.3.6.1.4.1.11.2.3.1.4.2.1.19', # processStatus cmd => '.1.3.6.1.4.1.11.2.3.1.4.2.1.22', # processCmd }; sub run { my ($self, %options) = @_; $self->{snmp} = $options{snmp}; my $oid2check_filter = 'status'; # To have a better order foreach (('cmd', 'status')) { if (defined($self->{option_results}->{'process_' . $_}) && $self->{option_results}->{'process_' . $_} ne '') { $oid2check_filter = $_; last; } } # Build other my $mores_filters = {}; my $more_oids = []; foreach (keys %$oids) { if ($_ ne $oid2check_filter && defined($self->{option_results}->{'process_' . $_}) && $self->{option_results}->{'process_' . $_} ne '') { push @{$more_oids}, $oids->{$_}; $mores_filters->{$_} = 1; } } my $oids_multiple_table = [ { oid => $oids->{$oid2check_filter} } ]; $self->{results} = $self->{snmp}->get_multiple_table(oids => $oids_multiple_table); my $result = $self->{results}->{$oids->{$oid2check_filter}}; my $instances_keep = {}; foreach my $key ($self->{snmp}->oid_lex_sort(keys %{$result})) { my $option_val = $self->{option_results}->{'process_' . $oid2check_filter}; if ($oid2check_filter eq 'status') { if ($map_process_status{$result->{$key}} =~ /$option_val/) { $key =~ /\.([0-9]+)$/; $instances_keep->{$1} = 1; } } elsif ((defined($self->{option_results}->{'regexp_' . $oid2check_filter}) && $result->{$key} =~ /$option_val/) || (!defined($self->{option_results}->{'regexp_' . $oid2check_filter}) && $result->{$key} eq $option_val)) { $key =~ /\.([0-9]+)$/; $instances_keep->{$1} = 1; } } my $result2; if (scalar(keys %$instances_keep) > 0) { if (scalar(@$more_oids) > 0) { $self->{snmp}->load(oids => $more_oids, instances => [ keys %$instances_keep ]); $result2 = $self->{snmp}->get_leef(); } foreach my $key (keys %$instances_keep) { my $value = ($oid2check_filter eq 'status') ? $map_process_status{$result->{$oids->{$oid2check_filter} . '.' . $key}} : $result->{$oids->{$oid2check_filter} . '.' . $key}; my $long_value = '[ ' . $oid2check_filter . ' => ' . $value . ' ]'; my $deleted = 0; foreach (keys %$mores_filters) { my $opt_val = $self->{option_results}->{'process_' . $_}; $value = ($_ eq 'status') ? $map_process_status{$result2->{$oids->{$_} . '.' . $key}} : $result2->{$oids->{$_} . '.' . $key}; if ($_ eq 'status') { if ($value !~ /$opt_val/) { delete $instances_keep->{$key}; $deleted = 1; last; } } elsif ((defined($self->{option_results}->{'regexp_' . $_}) && $value !~ /$opt_val/) || (!defined($self->{option_results}->{'regexp_' . $_}) && $value ne $opt_val)) { delete $instances_keep->{$key}; $deleted = 1; last; } $long_value .= ' [ ' . $_ . ' => ' . $value . ' ]'; } if ($deleted == 0) { $self->{output}->output_add(long_msg => 'Process: ' . $long_value); } } } my $num_processes_match = scalar(keys(%$instances_keep)); my $exit = $self->{perfdata}->threshold_check(value => $num_processes_match, threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); $self->{output}->output_add(severity => $exit, short_msg => "Number of current processes running: $num_processes_match"); $self->{output}->perfdata_add(label => 'nbproc', value => $num_processes_match, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'), min => 0); $self->{output}->display(); $self->{output}->exit(); } 1; __END__ =head1 MODE Check system number of processes. =over 8 =item B<--warning> Threshold warning (process count). =item B<--critical> Threshold critical (process count). =item B<--process-cmd> Check process command. =item B<--regexp-cmd> Allows to use regexp to filter process command (with option --process-cmd). =item B<--process-status> Check process status (Default: 'run'). Can be a regexp. =back =cut
centreon/centreon-plugins
os/hpux/snmp/mode/process.pm
Perl
apache-2.0
7,274
=head1 LICENSE See the NOTICE file distributed with this work for additional information regarding copyright ownership. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =head1 NAME Bio::EnsEMBL::Compara::RunnableDB::PairAligner::LastZ =head1 DESCRIPTION This object wraps Bio::EnsEMBL::Compara::Production::Analysis::Lastz to add functionality to read and write to databases. =cut package Bio::EnsEMBL::Compara::RunnableDB::PairAligner::LastZ; use strict; use warnings; use Bio::EnsEMBL::Utils::Exception qw(throw); use Bio::EnsEMBL::Compara::Production::Analysis::Lastz; use Bio::EnsEMBL::Compara::RunnableDB::PairAligner::PairAligner; our @ISA = qw(Bio::EnsEMBL::Compara::RunnableDB::PairAligner::PairAligner); sub param_defaults { my $self = shift; return { %{$self->SUPER::param_defaults}, 'method_link_type' => 'LASTZ_RAW', } } sub run { my $self = shift; # # get the sequences and create the runnable # my $query_DnaFragChunkSet = $self->param('query_DnaFragChunkSet'); my $qyChunkSetFile = $self->dumpChunkSetToTmp($query_DnaFragChunkSet); my $dbChunkSet = $self->param('db_DnaFragChunkSet'); $dbChunkSet->load_all_sequences(); my @db_chunk_files; foreach my $db_chunk ( @{$dbChunkSet->get_all_DnaFragChunks()} ) { push @db_chunk_files, $self->dumpChunkToTmp($db_chunk); } if (@db_chunk_files > 1) { $self->warning("the given chunkset cotains more than one chunk: creating one runnable per chunk"); } if($self->debug) { print("running with analysis '".$self->input_job->analysis->logic_name."'\n"); } $self->compara_dba->dbc->disconnect_if_idle(); my $starttime = time(); my @output; foreach my $dbChunkFile (@db_chunk_files) { my $o = Bio::EnsEMBL::Compara::Production::Analysis::Lastz::run_lastz($self, $qyChunkSetFile, $dbChunkFile); push @output, @$o; } if($self->debug){printf("%1.3f secs to run %s pairwise alignment\n", (time()-$starttime), $self->param('method_link_type'));} $self->param('output', \@output); } 1;
Ensembl/ensembl-compara
modules/Bio/EnsEMBL/Compara/RunnableDB/PairAligner/LastZ.pm
Perl
apache-2.0
2,533
# Copyright 2020, Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Google::Ads::GoogleAds::V9::Services::FeedService::MutateFeedsResponse; use strict; use warnings; use base qw(Google::Ads::GoogleAds::BaseEntity); use Google::Ads::GoogleAds::Utils::GoogleAdsHelper; sub new { my ($class, $args) = @_; my $self = { partialFailureError => $args->{partialFailureError}, results => $args->{results}}; # Delete the unassigned fields in this object for a more concise JSON payload remove_unassigned_fields($self, $args); bless $self, $class; return $self; } 1;
googleads/google-ads-perl
lib/Google/Ads/GoogleAds/V9/Services/FeedService/MutateFeedsResponse.pm
Perl
apache-2.0
1,110
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2017] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut =head1 CONTACT Please email comments or questions to the public Ensembl developers list at <http://lists.ensembl.org/mailman/listinfo/dev>. Questions may also be sent to the Ensembl help desk at <http://www.ensembl.org/Help/Contact>. =cut # # Ensembl module for Bio::EnsEMBL::Variation::DBSQL::PopulationGenotypeAdaptor # # =head1 NAME Bio::EnsEMBL::Variation::DBSQL::PopulationGenotypeAdaptor =head1 SYNOPSIS my $registry = 'Bio::EnsEMBL::Registry'; $registry->load_registry_from_db(-host => 'ensembldb.ensembl.org', -user => 'anonymous'); my $pga = $registry->get_adaptor('human', 'variation', 'populationgenotype'); my $va = $registry->get_adaptor('human', 'variation', 'variation'); # Get a PopulationGenotype by its internal identifier my $pgtype = $pga->fetch_by_dbID(145); print join(' ', $pgtype->population()->name(), $pgtype->allele1(), $pgtype->allele2(), $pgtype->frequency()), "\n"; # Get all PopulationGenotypes for a Variation my $variation = $va->fetch_by_name('rs1121'); foreach $pgtype (@{ $pga->fetch_all_by_Variation($variation) }) { print join(' ', $pgtype->population()->name(), $pgtype->allele1(), $pgtype->allele2(), $pgtype->frequency()), "\n"; } =head1 DESCRIPTION This adaptor provides database connectivity for PopulationGenotype objects. PopulationGenotypes may be retrieved from the Ensembl variation database by several means using this module. =head1 METHODS =cut use strict; use warnings; package Bio::EnsEMBL::Variation::DBSQL::PopulationGenotypeAdaptor; use Bio::EnsEMBL::Variation::DBSQL::BaseGenotypeAdaptor; use Bio::EnsEMBL::Utils::Exception qw(throw warning); use Bio::EnsEMBL::Utils::Scalar qw(assert_ref); use Bio::EnsEMBL::Variation::PopulationGenotype; our @ISA = ('Bio::EnsEMBL::Variation::DBSQL::BaseGenotypeAdaptor'); our $CACHE_SIZE = 5; sub store { my ($self, $popgt) = @_; my $dbh = $self->dbc->db_handle; # get genotype code my $gt_code = $self->_genotype_code($popgt->genotype); my $sth = $dbh->prepare_cached(q{ INSERT DELAYED INTO population_genotype ( variation_id, subsnp_id, genotype_code_id, frequency, population_id, count ) VALUES (?,?,?,?,?,?) }); $sth->execute( $popgt->{_variation_id} || $popgt->variation->dbID, $popgt->{subsnp}, $gt_code, $popgt->frequency, $popgt->population ? $popgt->population->dbID : undef, $popgt->count ); # reset cache delete $self->{_cache} if $self->{_cache}; $sth->finish; } sub store_multiple { my ($self, $popgts) = @_; my $dbh = $self->dbc->db_handle; my $q_string = join ",", map {'(?,?,?,?,?,?)'} @$popgts; my @args = map { $_->{_variation_id} || $_->variation->dbID, $_->{subsnp}, $self->_genotype_code($_->genotype), $_->frequency, $_->population ? $_->population->dbID : undef, $_->count } @$popgts; my $sth = $dbh->prepare_cached(qq{ INSERT INTO population_genotype ( variation_id, subsnp_id, genotype_code_id, frequency, population_id, count ) VALUES $q_string }); $sth->execute(@args); # reset cache delete $self->{_cache} if $self->{_cache}; $sth->finish; } sub store_to_file_handle { my ($self, $popgt, $file_handle) = @_; print $file_handle join("\t", $popgt->{_variation_id} || $popgt->variation->dbID || '\N', $popgt->{subsnp} || '\N', $self->_genotype_code($popgt->genotype), defined($popgt->frequency) ? $popgt->frequency : '\N', $popgt->population ? $popgt->population->dbID : '\N', defined($popgt->count) ? $popgt->count : '\N', )."\n"; } =head2 fetch_by_dbID Arg [1] : int $dbID Example : $pgtype = $pgtype_adaptor->fetch_by_dbID(15767); Description: Retrieves a population genotype via its unique internal identifier. undef is returned if no such population genotype exists. Returntype : Bio::EnsEMBL::Variation::Variation::PopulationGenotype or undef Exceptions : throw if no dbID argument is provided Caller : general Status : Stable =cut sub fetch_by_dbID { my $self = shift; my $dbID = shift; if (! $dbID){ throw('no dbID argument provided'); } return shift @{$self->generic_fetch("pg.population_genotype_id = " . $dbID)}; } =head2 fetch_all_by_Population Arg [1] : Bio::EnsEMBL::Variation::Population Example : $pop = $pop_adaptor->fetch_by_dbID(1345); @gtys = $pgty_adaptor->fetch_all_by_Population($pop); Description: Retrieves all genotypes which are stored for a specified population. Returntype : Bio::EnsEMBL::Variation::PopulationGenotype Exceptions : throw on incorrect argument Caller : general Status : Stable =cut sub fetch_all_by_Population { my $self = shift; my $pop = shift; if(!ref($pop) || !$pop->isa('Bio::EnsEMBL::Variation::Population')) { throw('Bio::EnsEMBL::Variation::Population argument expected'); } if(!defined($pop->dbID())) { warning("Cannot retrieve genotypes for population without set dbID"); return []; } my $constraint = "pg.population_id = " . $pop->dbID(); # Add the constraint for failed variations $constraint .= " AND " . $self->db->_exclude_failed_variations_constraint() unless $self->db->include_failed_variations() ; return $self->generic_fetch($constraint); } =head2 fetch_all_by_Variation Arg [1] : Bio::EnsEMBL::Variation $variation Arg [2] : Bio::EnsEMBL::Variation::Population (optional) Example : my $var = $variation_adaptor->fetch_by_name( "rs1121" ) $poptypes = $poptype_adaptor->fetch_all_by_Variation( $var ) Description: Retrieves a list of population genotypes for the given Variation. If none are available an empty listref is returned. Returntype : listref Bio::EnsEMBL::Variation::PopulationGenotype Exceptions : throw on bad argument Caller : general Status : Stable =cut sub fetch_all_by_Variation { my $self = shift; my $variation = shift; my $population = shift; # Make sure that we are passed a Variation object assert_ref($variation,'Bio::EnsEMBL::Variation::Variation'); # If we got a population argument, make sure that it is a Population object assert_ref($population,'Bio::EnsEMBL::Variation::Population') if (defined($population)); my $variation_id = $variation->dbID(); my $cached; my $return = []; if(defined($self->{_cache})) { foreach my $stored(@{$self->{_cache}}) { my @keys = keys %{$stored}; $cached = $stored->{$keys[0]} if $keys[0] eq $variation_id; last if defined($cached); } } if(!defined($cached)) { # Add a constraint on the variation_id column and pass to generic fetch my $constraint = qq{ pg.variation_id = $variation_id }; # If required, add a constraint on the population id if (defined($population)) { my $population_id = $population->dbID(); $constraint .= qq{ AND pg.population_id = $population_id }; } $cached = $self->generic_fetch($constraint); # If a population was specified, attach the population to the object map {$_->population($population)} @{$cached} if (defined($population)); # add freqs from genotypes for human (1KG data) push @$cached, @{$self->_fetch_all_by_Variation_from_Genotypes($variation, $population)}; # don't store if population specified return $cached if defined($population); # add genotypes for this variant to the cache push @{$self->{_cache}}, {$variation_id => $cached}; # shift off first element to keep cache within size limit shift @{$self->{_cache}} if scalar @{$self->{_cache}} > $CACHE_SIZE; } if(defined($population)) { @$return = grep {$_->dbID eq $population->dbID} @{$cached}; } else { $return = $cached; } return $return; } sub _fetch_all_by_Variation_from_Genotypes { my $self = shift; return $self->_generic_fetch_all_by_Variation_from_Genotypes(@_, 'PopulationGenotype'); } =head2 fetch_all Description: Retrieves a list of all population genotypes. Returntype : listref Bio::EnsEMBL::Variation::PopulationGenotype Exceptions : throw on bad argument Caller : general Status : Stable =cut sub fetch_all { my $self = shift; my $constraint; # Add the constraint for failed variations if required $constraint = $self->db->_exclude_failed_variations_constraint() unless $self->db->include_failed_variations() ; return $self->generic_fetch($constraint); } sub _tables{ my $self = shift; my @tables = ( ['population_genotype','pg'] ); # join to variation table if fails are not to be included push @tables, ['variation','v'] unless $self->db->include_failed_variations() ; return @tables; } #Add a left join to the variation table if fails are not to be included sub _left_join { my $self = shift; return undef if $self->db->include_failed_variations() ; return ([ 'variation', 'v.variation_id = pg.variation_id']) ; } sub _columns{ return qw(pg.population_genotype_id pg.variation_id pg.subsnp_id pg.population_id pg.genotype_code_id pg.frequency pg.count) } sub _write_columns { return qw(variation_id subsnp_id genotype_code_id frequency population_id count); } sub _objs_from_sth{ my $self = shift; my $sth = shift; my ($dbID, $variation_id, $subsnp_id, $population_id, $gt_code, $freq, $count); $sth->bind_columns(\$dbID, \$variation_id, \$subsnp_id, \$population_id, \$gt_code, \$freq, \$count); my (%pop_hash, %gt_code_hash, @results); while($sth->fetch) { my $pgtype = Bio::EnsEMBL::Variation::PopulationGenotype->new_fast({ _variation_id => $variation_id, subsnp => $subsnp_id, adaptor => $self, frequency => $freq, count => $count, dbID => $dbID, }); $pop_hash{$population_id} ||= []; push @{$pop_hash{$population_id}}, $pgtype; $gt_code_hash{$gt_code} ||= []; push @{$gt_code_hash{$gt_code}}, $pgtype; push @results, $pgtype; } # fetch populations my $pa = $self->db()->get_PopulationAdaptor(); my $pops = $pa->fetch_all_by_dbID_list([keys %pop_hash]); foreach my $p (@$pops) { foreach my $pgty (@{$pop_hash{$p->dbID()}}) { $pgty->{population} = $p; } } # get all genotypes from codes my $gtca = $self->db->get_GenotypeCodeAdaptor(); my $gtcs = $gtca->fetch_all_by_dbID_list([keys %gt_code_hash]); foreach my $gtc(@$gtcs) { foreach my $pgty(@{$gt_code_hash{$gtc->dbID}}) { $pgty->{genotype} = $gtc->genotype; } } return \@results; } 1;
willmclaren/ensembl-variation
modules/Bio/EnsEMBL/Variation/DBSQL/PopulationGenotypeAdaptor.pm
Perl
apache-2.0
11,344
# # Copyright 2022 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package hardware::ups::mge::snmp::mode::environment; use base qw(centreon::plugins::templates::counter); use strict; use warnings; sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'global', type => 0, skipped_code => { -10 => 1 } }, ]; $self->{maps_counters}->{global} = [ { label => 'temperature', nlabel => 'hardware.sensor.temperature.celsius', set => { key_values => [ { name => 'temperature', no_value => 0, } ], output_template => 'Ambiant Temperature: %.2f C', output_error_template => 'Ambiant Temperature: %s', perfdatas => [ { value => 'temperature', label => 'temperature', template => '%.2f', unit => 'C' }, ], } }, { label => 'humidity', nlabel => 'hardware.sensor.humidity.percentage', set => { key_values => [ { name => 'humidity', no_value => 0 } ], output_template => 'Humidity: %.2f %%', output_error_template => 'Humidity: %s', perfdatas => [ { value => 'humidity', label => 'humidity', template => '%.2f', unit => '%', min => 0, max => 100 }, ], } }, ]; } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $options{options}->add_options(arguments => { }); return $self; } sub manage_selection { my ($self, %options) = @_; my $values_ok = 0; my $oid_upsmgEnvironAmbientTemp = '.1.3.6.1.4.1.705.1.8.1.0'; # in 0.1 degree centigrade my $oid_upsmgEnvironAmbientHumidity = '.1.3.6.1.4.1.705.1.8.2.0'; # in 0.1 % my $snmp_result = $options{snmp}->get_leef( oids => [$oid_upsmgEnvironAmbientTemp, $oid_upsmgEnvironAmbientHumidity], nothing_quit => 1 ); $self->{global} = {}; if (defined($snmp_result->{$oid_upsmgEnvironAmbientTemp}) && $snmp_result->{$oid_upsmgEnvironAmbientTemp} ne '' && $snmp_result->{$oid_upsmgEnvironAmbientTemp} != 0) { $self->{global}->{temperature} = $snmp_result->{$oid_upsmgEnvironAmbientTemp} / 10; $values_ok++; } if (defined($snmp_result->{$oid_upsmgEnvironAmbientHumidity}) && $snmp_result->{$oid_upsmgEnvironAmbientHumidity} ne '' && $snmp_result->{$oid_upsmgEnvironAmbientHumidity} != 0) { $self->{global}->{humidity} = $snmp_result->{$oid_upsmgEnvironAmbientHumidity} / 10; $values_ok++; } if ($values_ok == 0) { $self->{output}->add_option_msg(short_msg => "Cannot get temperature and humidity values."); $self->{output}->option_exit(); } } 1; __END__ =head1 MODE Check environment (temperature and humidity). =over 8 =item B<--warning-*> Threshold warning. Can be: 'temperature', 'humidity'. =item B<--critical-*> Threshold critical. Can be: 'temperature', 'humidity'. =back =cut
centreon/centreon-plugins
hardware/ups/mge/snmp/mode/environment.pm
Perl
apache-2.0
3,802
=head1 LICENSE Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut package EnsEMBL::OpenID::Component::Account::LinkExisting; ### Page displayed to the user when he just logs in for the very first time using openid and he chooses to link an existing account to openid account ### @author hr5 use strict; use warnings; use EnsEMBL::Users::Messages qw(MESSAGE_URL_EXPIRED); use base qw(EnsEMBL::Users::Component::Account); sub caption { return 'Link existing account'; } sub content { my $self = shift; my $hub = $self->hub; my $object = $self->object; my $login = $object->fetch_login_from_url_code(1) or return $self->render_message(MESSAGE_URL_EXPIRED, {'error' => 1}); my $provider = $login->provider or return $self->render_message(MESSAGE_URL_EXPIRED, {'error' => 1}); my $trusted_provider = $object->login_has_trusted_provider($login); my $form = $self->new_form({'action' => {'action' => 'OpenID', 'function' => 'Link'}}); $form->add_notes(sprintf 'Please enter the email address below for your existing %s account.', $self->site_name); $form->add_hidden({ 'name' => 'code', 'value' => $login->get_url_code }); $form->add_hidden({ 'name' => 'trusted_provider', 'class' => '_trusted_provider', 'value' => $trusted_provider ? '1' : '0' }); $form->add_field({ 'label' => 'Login via', 'type' => 'noedit', 'value' => $provider, 'no_input' => 1 }); $form->add_field({ 'label' => 'Email address of existing account', 'type' => 'email', 'name' => 'email', 'class' => '_openid_email', 'value' => $login->email || '', 'notes' => sprintf('<div class="%s">You will need to authenticate that this account belongs to you in the next step.</div>', $trusted_provider ? 'hidden _hide_if_trusted' : '_hide_if_trusted'), 'required' => 1 }); $form->add_button({'value' => 'Continue'}); return $self->js_section({'js_panel' => 'AccountForm', 'subsections' => [ $form->render ]}); } 1;
andrewyatz/public-plugins
openid/modules/EnsEMBL/OpenID/Component/Account/LinkExisting.pm
Perl
apache-2.0
2,758
package VNDRV::Connector::CG::Caspar; use Moose; use DB::CasparCGSchema; extends 'VNDRV::Connector::CG'; has 'data' => (is => 'ro', isa => 'DB::CasparCGSchema::Result::Main'); sub _db_drv_info { return {schema => 'DB::CasparCGSchema', name => 'Pg', options => { pg_utf8_strings => 1 }}; } sub _get_time_field_value { my $self = shift; my $time = shift; return \"to_timestamp($time)"; } 1;
ray66rus/vndrv
lib/VNDRV/Connector/CG/Caspar.pm
Perl
apache-2.0
400
# # Author:: Adam Jacob (<adam@opscode.com>) # Copyright:: Copyright (c) 2008 Adam Jacob # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package Sid::Web::Controller::Root; use strict; use warnings; use base 'Catalyst::Controller'; # # Sets the actions in this controller to be registered with no prefix # so they function identically to actions created in MyApp.pm # __PACKAGE__->config->{namespace} = ''; =head1 NAME Sid::Web::Controller::Root - Root Controller for Sid::Web =head1 DESCRIPTION [enter your description here] =head1 METHODS =cut =head2 default =cut sub default : Private { my ( $self, $c ) = @_; $c->res->status(404); $c->res->content_type('text/plain'); $c->res->body("File not found."); } =head2 end Attempt to render a view, if needed. =cut sub end : ActionClass('RenderView') {} =head1 AUTHOR Adam Jacob =head1 LICENSE This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. =cut 1;
adamhjk/sid
lib/Sid/Web/Controller/Root.pm
Perl
apache-2.0
1,539
# # Copyright 2021 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package apps::vmware::connector::mode::statuscluster; use base qw(centreon::plugins::templates::counter); use strict; use warnings; use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); sub custom_status_output { my ($self, %options) = @_; my $msg = 'status is ' . $self->{result_values}->{overall_status}; $msg .= ' [vsan status: ' . $self->{result_values}->{vsan_status} . ']' if ($self->{result_values}->{vsan_status} ne ''); $msg .= ' [ha enabled: ' . $self->{result_values}->{ha_enabled} . ']' if ($self->{result_values}->{ha_enabled} ne ''); $msg .= ' [drs enabled: ' . $self->{result_values}->{drs_enabled} . ']' if ($self->{result_values}->{drs_enabled} ne ''); return $msg; } sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'cluster', type => 1, cb_prefix_output => 'prefix_cluster_output', message_multiple => 'All clusters are ok' } ]; $self->{maps_counters}->{cluster} = [ { label => 'status', type => 2, unknown_default => '%{overall_status} =~ /gray/i || %{vsan_status} =~ /gray/i', warning_default => '%{overall_status} =~ /yellow/i || %{vsan_status} =~ /yellow/i', critical_default => '%{overall_status} =~ /red/i || %{vsan_status} =~ /red/i', set => { key_values => [ { name => 'overall_status' }, { name => 'vsan_status' }, { name => 'ha_enabled' }, { name => 'drs_enabled' }, { name => 'display' } ], closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold_ng } } ]; } sub prefix_cluster_output { my ($self, %options) = @_; return "Cluster '" . $options{instance_value}->{display} . "' "; } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $options{options}->add_options(arguments => { 'cluster-name:s' => { name => 'cluster_name' }, 'filter' => { name => 'filter' }, 'scope-datacenter:s' => { name => 'scope_datacenter' } }); return $self; } sub manage_selection { my ($self, %options) = @_; my $response = $options{custom}->execute( params => $self->{option_results}, command => 'statuscluster' ); $self->{cluster} = {}; foreach my $cluster_id (keys %{$response->{data}}) { my $cluster_name = $response->{data}->{$cluster_id}->{name}; $self->{cluster}->{$cluster_name} = { display => $cluster_name, overall_status => $response->{data}->{$cluster_id}->{overall_status}, vsan_status => defined($response->{data}->{$cluster_id}->{vsan_cluster_status}) ? $response->{data}->{$cluster_id}->{vsan_cluster_status} : '', ha_enabled => defined($response->{data}->{$cluster_id}->{ha_enabled}) ? $response->{data}->{$cluster_id}->{ha_enabled} : '', drs_enabled => defined($response->{data}->{$cluster_id}->{drs_enabled}) ? $response->{data}->{$cluster_id}->{drs_enabled} : '' }; } } 1; __END__ =head1 MODE Check cluster status (also vsan status). =over 8 =item B<--cluster-name> cluster to check. If not set, we check all clusters. =item B<--filter> Cluster name is a regexp. =item B<--scope-datacenter> Search in following datacenter(s) (can be a regexp). =item B<--unknown-status> Set warning threshold for status (Default: '%{overall_status} =~ /gray/i || %{vsan_status} =~ /gray/i'). Can used special variables like: %{overall_status}, %{vsan_status}, %{drs_enabled}, %{ha_enabled} =item B<--warning-status> Set warning threshold for status (Default: '%{overall_status} =~ /yellow/i || %{vsan_status} =~ /yellow/i'). Can used special variables like: %{overall_status}, %{vsan_status}, %{drs_enabled}, %{ha_enabled} =item B<--critical-status> Set critical threshold for status (Default: '%{overall_status} =~ /red/i || %{vsan_status} =~ /red/i'). Can used special variables like: %{overall_status}, %{vsan_status}, %{drs_enabled}, %{ha_enabled} =back =cut
Tpo76/centreon-plugins
apps/vmware/connector/mode/statuscluster.pm
Perl
apache-2.0
5,148
# # Copyright 2021 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package cloud::aws::transitgateway::mode::listgateways; use base qw(centreon::plugins::mode); use strict; use warnings; sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $options{options}->add_options(arguments => {}); return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); } sub manage_selection { my ($self, %options) = @_; $self->{volume} = $options{custom}->tgw_list_gateways(); } sub run { my ($self, %options) = @_; $self->manage_selection(%options); foreach (@{$self->{volume}}) { $self->{output}->output_add(long_msg => sprintf("[id = %s][name = %s]", $_->{id}, $_->{name})); } $self->{output}->output_add( severity => 'OK', short_msg => 'Transit Gateways list:' ); $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1); $self->{output}->exit(); } sub disco_format { my ($self, %options) = @_; $self->{output}->add_disco_format(elements => ['id', 'name']); } sub disco_show { my ($self, %options) = @_; $self->manage_selection(%options); foreach (@{$self->{volume}}) { $self->{output}->add_disco_entry( id => $_->{id}, name => $_->{name} ); }; } 1; __END__ =head1 MODE List AWS TransitGateways. =over 8 =back =cut
Tpo76/centreon-plugins
cloud/aws/transitgateway/mode/listgateways.pm
Perl
apache-2.0
2,211
package VMOMI::DatastoreFileCopiedEvent; use parent 'VMOMI::DatastoreFileEvent'; use strict; use warnings; our @class_ancestors = ( 'DatastoreFileEvent', 'DatastoreEvent', 'Event', 'DynamicData', ); our @class_members = ( ['sourceDatastore', 'DatastoreEventArgument', 0, ], ['sourceFile', undef, 0, ], ); sub get_class_ancestors { return @class_ancestors; } sub get_class_members { my $class = shift; my @super_members = $class->SUPER::get_class_members(); return (@super_members, @class_members); } 1;
stumpr/p5-vmomi
lib/VMOMI/DatastoreFileCopiedEvent.pm
Perl
apache-2.0
551
=head1 LICENSE Copyright 2015 EMBL - European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut package Bio::RefBuild; =head1 NAME Bio::RefBuild =head1 VERSION Version 0.01 =cut our $VERSION = '0.01'; 1;
FAANG/reference_data_builder
lib/Bio/RefBuild.pm
Perl
apache-2.0
745
#!/bin/perl -w use strict; my $F1; my $F2; open $F1, ">detailText"; open $F2, "<inputText"; while (my $line = <$F2>) { print $line; chomp $line; my $cmd = 'http://www.mudconnect.com/cgi-bin/adv_search.cgi?Mode=MUD2&mud=' . $line; print $F1 `curl "$cmd"`; sleep 1; } close $F1;
gbcs/iPadMudClient
MudList/getListing.pl
Perl
bsd-2-clause
282
# # GStage: a ridiculously (and intentionally) buggy IRC server # lib/Command/JOIN.pm: handle JOIN commands # # Copyright (c) 2010 Stephen Belcher (sycobuny) # package Command::JOIN; @ISA = qw(Command); use warnings; use strict; use Method::Signatures; use Numeric qw( ERR_NOTREGISTERED ERR_NEEDMOREPARAMS ERR_BANNEDFROMCHAN ERR_INVITEONLYCHAN ERR_BADCHANNELKEY ERR_CHANNELISFULL ERR_BADCHANMASK ERR_NOSUCHCHANNEL ERR_TOOMANYCHANNELS RPL_TOPIC RPL_NAMEREPLY RPL_ENDOFNAMES ); our (%channels, %keys); Class::self->private_variables qw(channels keys); my ($chanre) = qr/^(?:\&|\#)/; method initialize($server, $origin, $arguments) { $channels{id $self} = []; $keys{id $self} = []; $self->SUPER::initialize($server, $origin, $arguments); } method parse($arguments) { my ($c, $k) = split(' ', $arguments); @{ $channels{id $self} } = split(',', ($c || '')); @{ $keys{id $self} } = split(',', ($k || '')); } method run { my ($origin) = $self->origin; my ($server) = $self->server; my (@channels) = @{ $channels{id $self} }; my (@keys) = @{ $keys{id $self} }; unless ($origin->is_registered) { $origin->numeric(ERR_NOTREGISTERED); return; } unless (@channels) { $origin->numeric(ERR_NEEDMOREPARAMS, 'JOIN'); return; } foreach my $x (0 .. (scalar(@channels) - 1)) { local ($_); my ($channame) = $channels[$x]; my ($key) = $keys[$x]; my ($channel, $users, @users); unless ($channame =~ $chanre) { $origin->numeric(ERR_NOSUCHCHANNEL, $channame); next; } $channel = $server->find_channel($channame); unless ($channel) { $channel = Channel->new($server, $channame); $channel->set_key($key) if $key; $channel->add_op($origin); } if ($channel->is_bozo($origin) and !$origin->is_supervisor) { $origin->numeric(ERR_BANNEDFROMCHAN, $channame); next; } $channel->add_user($origin); if ($key and $channel->key and ($channel->key eq $key)) { $channel->add_op($origin); } $channel->broadcast($origin->prefix("JOIN $channame")); @users = $channel->users; $users = join(' ', sort(map { my ($user, $prefix) = ($_, ''); if ($user->is_op($channel)) { $prefix .= '@' } if ($user->is_halfop($channel)) { $prefix .= '%' } if ($user->is_voice($channel)) { $prefix .= '+' } "$prefix@{[$user->nickname]}"; } @users)); $origin->numeric(RPL_TOPIC, $channame, $channel->topic); $origin->numeric(RPL_NAMEREPLY, $channame, $users); $origin->numeric(RPL_ENDOFNAMES, $channame); if ($origin->is_supervisor) { my ($arguments) = "@{[$channel->name]} :+o @{[$origin->nickname]}"; Command::MODE($server, $origin, $arguments)->run(); } } } method channels { @{ $channels{id $self} } } method keys { @{ $keys{id $self} } } 1;
sycobuny/GStage
lib/Command/JOIN.pm
Perl
bsd-3-clause
3,120
package Driver; # ************************************************************ # Description : Generate dependencies for Make and NMake. # Author : Chad Elliott # Create Date : 3/21/2007 # ************************************************************ # ************************************************************ # Pragma Section # ************************************************************ use strict; use File::Basename; use DependencyEditor; # ************************************************************ # Data Section # ************************************************************ my $version = '1.2'; my $os = ($^O eq 'MSWin32' ? 'Windows' : 'UNIX'); my %types; my %defaults = ('UNIX' => 'make', 'Windows' => 'nmake', ); # ************************************************************ # Subroutine Section # ************************************************************ sub BEGIN { my $fh = new FileHandle(); my(%writers, %generators); ## Find all the dependency writers and object generators foreach my $dir (@INC) { if (opendir($fh, $dir)) { foreach my $module (readdir($fh)) { if ($module =~ /(.+)DependencyWriter\.pm$/) { my $type = lc($1); my $class = $module; $class =~ s/\.pm$//; require $module; $writers{$type} = $class; $types{$type} = 1; } elsif ($module =~ /(.+)ObjectGenerator\.pm$/) { my $type = lc($1); my $class = $module; $class =~ s/\.pm$//; require $module; $generators{$type} = $class; } } closedir($fh); } } ## Register them with the right factory DependencyWriterFactory::register(\%writers); ObjectGeneratorFactory::register(\%generators); } sub new { my $class = shift; my $self = bless {'automatic' => [], }, $class; foreach my $add (@_) { if ($add =~ /(UNIX|Windows)=(.*)/) { $defaults{$1} = $2; } elsif ($add =~ /automatic=(.*)/) { my @auto = split(/,/, $1); $self->{'automatic'} = \@auto; } else { print "WARNING: Unknown parameter: $add\n"; } } return $self; } sub usageAndExit { my($self, $opt) = @_; my $base = basename($0); if (defined $opt) { print "$opt.\n"; } print "$base v$version\n" . "Usage: $base [-D<MACRO>[=VALUE]] [-I<include dir>] ", (defined $self->{'automatic'}->[0] ? "[-A] " : ''), "[-R <VARNAME>]\n" . " " . (" " x length($base)) . " [-e <file>] [-f <output file>] [-g] [-i] [-t <type>] [-n]\n" . " " . (" " x length($base)) . " <files...>\n" . "\n"; if (defined $self->{'automatic'}->[0]) { print "-A Replace paths equal to the following variables with ", "the corresponding \$()\n value: ", join(', ', @{$self->{'automatic'}}), ".\n"; } print "-D This option sets a macro to an optional value.\n" . "-I The -I option adds an include directory.\n" . "-R Replace \$VARNAME paths with \$(VARNAME).\n" . "-a Append to existing dependencies." . (exists $types{'gnuidl'} ? ' Useful with -t gnuidl.' : '') . "\n" . "-e Exclude dependencies generated by <file>, but not <file> " . "itself.\n" . "-f Specifies the output file. This file will be edited if it " . "already\n exists.\n" . "-g Do not create Cygwin paths when on Windows.\n" . "-i Do not print an error if no source files are provided.\n" . "-n Do not include inline files (ending in .i or .inl) in the " . "dependencies.\n" . "-t Use specified type ("; my @keys = sort keys %types; for(my $i = 0; $i <= $#keys; ++$i) { print "$keys[$i]" . ($i != $#keys ? $i == $#keys - 1 ? ' or ' : ', ' : '');; } print ") instead of the default.\n" . " The default is "; @keys = sort keys %defaults; for(my $i = 0; $i <= $#keys; ++$i) { my $def = $keys[$i]; print $defaults{$def} . " on $def" . ($i != $#keys ? $i == $#keys - 1 ? ' and ' : ', ' : ''); } print ".\n"; exit(0); } sub setReplace { my($self, $replace, $name, $value) = @_; if (defined $name) { ## The key will be used in a regular expression. ## So, we need to escape some special characters. $name = File::Spec->canonpath($name); $name =~ s/([\+\-\\\$\[\]\(\)\.])/\\$1/g; $$replace{$name} = $value; } } sub run { my($self, $args) = @_; my $argc = scalar(@$args); my $type = $defaults{$os}; my $output = '-'; my $needsrc = 1; my($noinline, @files, %macros, @ipaths, %replace, %exclude, $append); for(my $i = 0; $i < $argc; ++$i) { my $arg = $$args[$i]; if ($arg =~ /^\-D(\w+)(=(.*))?/) { $macros{$1} = $3; } elsif ($arg =~ /^\-(I|isystem)(.*)/) { # support '-Idir' and '-I dir' my $opt = $1; if ('' ne $2) { push(@ipaths, File::Spec->canonpath($2)); } else { # get next arg if (++$i < $argc) { $arg = $$args[$i]; if ($arg =~ /^\-/) { $self->usageAndExit('Invalid use of -' . $opt); } push(@ipaths, File::Spec->canonpath($arg)); } else { $self->usageAndExit('Invalid use of -' . $opt); } } } elsif ($arg eq '-A') { foreach my $auto (@{$self->{'automatic'}}) { $self->setReplace(\%replace, $ENV{$auto}, '$(' . $auto . ')'); } } elsif ($arg eq '-R') { ++$i; $arg = $$args[$i]; if (defined $arg) { my $val = $ENV{$arg}; if (defined $val) { $self->setReplace(\%replace, $val, "\$($arg)"); } } else { $self->usageAndExit('Invalid use of -R'); } } elsif ($arg eq '-e') { ++$i; $arg = $$args[$i]; if (defined $arg) { $exclude{$arg} = 1; } else { $self->usageAndExit('Invalid use of -e'); } } elsif ($arg eq '-f') { ++$i; $arg = $$args[$i]; if (defined $arg) { $output = $arg; } else { $self->usageAndExit('Invalid use of -f'); } } elsif ($arg eq '-g') { ## By default, on Windows, we assume Cygwin and create paths with ## /cygdrive. Some users have a non-Cygwin make and need paths with ## drive letters. delete $ENV{OS}; } elsif ($arg eq '-a') { $append = 1; } elsif ($arg eq '-i') { $needsrc = undef; } elsif ($arg eq '-n') { $noinline = 1; } elsif ($arg eq '-h') { $self->usageAndExit(); } elsif ($arg eq '-t') { ++$i; $arg = $$args[$i]; if (defined $arg && defined $types{$arg}) { $type = $arg; } else { $self->usageAndExit('Invalid use of -t'); } } elsif ($arg =~ /^[\-+]/) { ## We will ignore unknown options ## Some options for aCC start with + } else { push(@files, $arg); } } if (!defined $files[0]) { if ($needsrc) { $self->usageAndExit('No files specified'); } } my $editor = new DependencyEditor(); return $editor->process($output, $type, $noinline, \%macros, \@ipaths, \%replace, \%exclude, \@files, $append); }
wfnex/openbras
src/ace/ACE_wrappers/MPC/modules/Depgen/Driver.pm
Perl
bsd-3-clause
7,418
#!perl # people assigned to my colleagues' projects use strict; use warnings; use Web::Query; use Acme::CPANAuthors; local $| = 1; my @authors = Acme::CPANAuthors->new('Booking')->id; wq("http://rawgit.com/CPAN-PRC/resources/master/january.html") ->find('tbody > tr') ->each( sub { my $release = $_->find('td > a')->map( sub { $_->text } ); foreach my $id (@authors) { if ( $release->[2] eq $id || $release->[3] =~ /^$id/i ) { printf "%s was assigned with %s's %s distribution.\n", $release->[0], $id, $release->[1]; } } } );
mishin/web-scraping
prc2.pl
Perl
bsd-3-clause
625
/***************************************************************************** * This file is part of the Prolog Development Tool (PDT) * * WWW: http://sewiki.iai.uni-bonn.de/research/pdt/start * Mail: pdt@lists.iai.uni-bonn.de * Copyright (C): 2004-2012, CS Dept. III, University of Bonn * * All rights reserved. This program is made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * ****************************************************************************/ :- module( pdt_search, [ find_predicate_reference/9 % (+Functor,+Arity,?DefFile,?DefModule,?RefModule,?RefName,?RefArity,?RefFile,?RefLine,?PropertyList) , update_predicate_reference_search_term_to_context/5 , find_categorized_predicate_definitions/11 % (+EnclFile,+SelectionLine, +Term, -Functor, -Arity, -This, -DeclOrDef, -DefiningEntity, -FullPath, -Line, -Properties,-Visibility,+ExactMatch) , find_predicate_definitions/10 , find_primary_definition_visible_in/9 , find_definition_contained_in/9 , find_definition_contained_in/10 , find_completion/14 , find_entity_definition/6 , find_module_reference/9 , loaded_file/1 , loaded_by/4 ]). :- use_module( prolog_connector_pl(split_file_path), [ split_file_path/5 % (File,Folder,FileName,BaseName,Extension) ] ). :- use_module( 'xref/pdt_xref', [ find_reference_to/9 % ... ] ). :- use_module( properties, [ properties_for_predicate/4 ] ). %:- use_module( pdt_prolog_library(utils4modules_visibility), % [ module_of_file/2 % (File,FileModule) % , defined_in_module/3 % (Module,Name,Arity), % , declared_in_file/4 % (Module,Name,Arity,Location) % , defined_in_files/4 % (Module,Name,Arity,Locations) % ] ). :- use_module(pdt_prolog_library(utils4modules_visibility)). :- use_module(pdt_manual_entry). :- use_module(library(charsio)). :- use_module(library(lists)). %:- use_module(library(prolog_clause), except([hidden_module/1])). :- use_module(library(prolog_source), [ read_source_term_at_location/3 ]). :- use_module(pdt_prolog_library(compatibility), [ pdt_source_file/2 ]). :- use_module('callgraph/pdt_call_graph', [ ensure_call_graph_generated/0, pdt_walk_code/1 ]). :- op(600, xfy, ::). % Logtalk message sending operator %%% find_predicate_reference(Term, ExactMatch, Root, EnclFile, LineInEnclFile, RefModule, RefName, RefArity, RefFile, Position, PropertyList) %find_predicate_reference(Term0, ExactMatch, Root, EnclFile, _LineInEnclFile, RefModule, RefName, RefArity, RefFile, Position, PropertyList) :- % ( nonvar(EnclFile), % \+ split_file_path(EnclFile, _, _, _, lgt), % Term0 = predicate(M, S0, F, S1, A), % var(M) % -> once(module_of_file(EnclFile, FileModule)), % ( nonvar(F), % nonvar(A), % functor(H, F, A), % predicate_property(FileModule:H, imported_from(ImportedModule)) % -> Term = predicate(ImportedModule, S0, F, S1, A) % ; Term = predicate(FileModule, S0, F, S1, A) % ) % ; Term = Term0 % ), % find_reference_to(Term, ExactMatch, Root, RefModule, RefName, RefArity, RefFile, Position, PropertyList). %% find_predicate_reference(Term, ExactMatch, Root, RefModule, RefName, RefArity, RefFile, Position, PropertyList) find_predicate_reference(Term, ExactMatch, Root, RefModule, RefName, RefArity, RefFile, Position, PropertyList) :- current_predicate(logtalk_load/1), logtalk_adapter::find_reference_to(Term, ExactMatch, Root, RefModule, RefName, RefArity, RefFile, Line, PropertyList), ( var(RefName), read_term_position_at_location(RefFile, Line, user, Position) -> true ; Position = Line ). find_predicate_reference(Term, ExactMatch, Root, RefModule, RefName, RefArity, RefFile, Position, PropertyList) :- find_reference_to(Term, ExactMatch, Root, RefModule, RefName, RefArity, RefFile, Position, PropertyList). %% update_predicate_reference_search_term_to_context(+Term, +EnclFile, +LineInEnclFile, -NewModule, -NewTerm) update_predicate_reference_search_term_to_context(Term, EnclFile, _LineInEnclFile, NewModule, NewTerm) :- ( nonvar(EnclFile), \+ split_file_path(EnclFile, _, _, _, lgt), Term = predicate(M, S0, F, S1, A), var(M) -> once(module_of_file(EnclFile, FileModule)), ( nonvar(F), nonvar(A), functor(H, F, A), predicate_property(FileModule:H, imported_from(ImportedModule)) -> NewModule = ImportedModule ; NewModule = FileModule ), NewTerm = predicate(NewModule, S0, F, S1, A) ; NewTerm = Term ). /*********************************************************************** * Find Definitions and Declarations and categorize them by visibility * * --------------------------------------------------------------------* * for "Find All Declarations" (Ctrl+G) action * ***********************************************************************/ %% find_predicate_definitions(+Term, +ExactMatch, ?Root, -DefiningModule, -Functor, -Arity, -DeclOrDef, -File, -Location, -Properties) is nondet. % find_predicate_definitions(Term, ExactMatch, Root, DefiningModule, Functor, Arity, DeclOrDef, File, Location, PropertyList) :- Term = predicate(DefiningModule, _, SearchFunctor, Separator, Arity0), ( Separator == (//), nonvar(Arity0) -> Arity is Arity0 + 2 ; Arity = Arity0 ), ( ExactMatch == true -> Functor = SearchFunctor, declared_in_module(DefiningModule, Functor, Arity, DefiningModule) ; declared_in_module(DefiningModule, Functor, Arity, DefiningModule), once(sub_atom(Functor,_,_,_,SearchFunctor)) ), find_decl_or_def_2(Functor,Arity,Sources), % Unique, grouped sources (--> setof) member(DeclOrDef-DefiningModule-Locations,Sources), member(File-Lines,Locations), ( nonvar(Root) -> sub_atom(File, 0, _, _, Root) ; true ), member(location(Line, Ref),Lines), properties_for_predicate(DefiningModule,Functor,Arity,PropertyList0), ( head_position_of_clause(Ref, Position) -> Location = Position, PropertyList = [line(Line)|PropertyList0] ; Location = Line, PropertyList = PropertyList0 ). find_predicate_definitions(Term, ExactMatch, Root, DefiningModule, Functor, Arity, DeclOrDef, File,Line, PropertyList) :- current_predicate(logtalk_load/1), logtalk_adapter::find_predicate_definitions(Term, ExactMatch, Root, DefiningModule, Functor, Arity, DeclOrDef, File,Line, PropertyList). %% find_categorized_predicate_definitions(+Term, +EnclFile, +SelectionLine, Functor, Arity, DeclOrDef, DefiningEntity, FullPath, Line, Properties, Visibility) find_categorized_predicate_definitions(Term, EnclFile, SelectionLine, Functor, Arity, DeclOrDef, DefiningEntity, FullPath, Line, Properties, Visibility):- Term \= _:_, split_file_path(EnclFile, _Directory,_FileName,_,lgt), !, logtalk_adapter::find_categorized_predicate_definitions(Term, EnclFile, SelectionLine, Functor, Arity, DeclOrDef, DefiningEntity, FullPath, Line, Properties, Visibility). find_categorized_predicate_definitions(Term, EnclFile, _SelectionLine, Functor, Arity, DeclOrDef, DefiningModule, File, Location, PropertyList, Visibility):- referenced_entity(EnclFile, ReferencedModule), Term = predicate(_, _, Functor, _, Arity), find_decl_or_def(ReferencedModule,Functor,Arity,Sources), % Unique, grouped sources (--> setof) member(DeclOrDef-Visibility-DefiningModule-Locations,Sources), member(File-Lines,Locations), member(location(Line, Ref),Lines), properties_for_predicate(DefiningModule,Functor,Arity,PropertyList0), ( head_position_of_clause(Ref, Position) -> Location = Position, PropertyList = [line(Line)|PropertyList0] ; Location = Line, PropertyList = PropertyList0 ). head_position_of_clause(Ref, Position) :- catch(clause_info(Ref, _, TermPosition, _),_,fail), ( clause_property(Ref, fact) -> % fact TermPosition = HeadPosition ; % clause with body TermPosition = term_position(_, _, _, _, [HeadPosition|_]) ), ( HeadPosition = Start-End -> % no arguments true ; % at least one argument HeadPosition = term_position(Start, End, _, _, _) ), format(atom(Position), '~w-~w', [Start, End]). find_decl_or_def_2(Name,Arity,Declarations) :- setof( declaration-DeclModule-Location, Name^Arity^ ( declared_but_undefined(DeclModule,Name,Arity), declared_in_file(DeclModule,Name,Arity,Location) ), Declarations). find_decl_or_def_2(Name,Arity,Definitions) :- setof( definition-DefiningModule-Locations, Name^Arity^ % Locations is list of File-Lines terms ( defined_in_module(DefiningModule,Name,Arity), defined_in_files(DefiningModule,Name,Arity,Locations) % results_context_category_label(defined, Visibility, VisibilityText) ), Definitions ). referenced_entity(EnclFile, ReferencedModule) :- ( atom(ReferencedModule) -> true % Explicit entity reference ReferencedModule:Term (or ReferencedModule::Term ; module_of_file(EnclFile,ReferencedModule) % Implicit module reference ). search_term_to_predicate_indicator(_:Functor/(-1), Functor/_Arity) :- !. search_term_to_predicate_indicator(Functor/(-1), Functor/_Arity) :- !. search_term_to_predicate_indicator(_:Functor/Arity, Functor/Arity) :- !. search_term_to_predicate_indicator(Functor/Arity, Functor/Arity) :- !. search_term_to_predicate_indicator(_:Term, Functor/Arity) :- !, functor(Term, Functor, Arity). search_term_to_predicate_indicator(Term, Functor/Arity) :- functor(Term, Functor, Arity). %% find_decl_or_def(+ContextModule,+Name,?Arity,-Visibility,-Sources) find_decl_or_def(Module,Name,Arity,Sources) :- ( var(Module) ; var(Name) ), throw( input_argument_free(find_decl_or_def(Module,Name,Arity,Sources)) ). %find_decl_or_def(CallingModule,Name,Arity,['Missing declarations'-DeclModule-[File-[Line]]]) :- % referenced_but_undeclared(CallingModule,Name,Arity), % DeclModule = 'none', % File = 'none', % Line = 0. find_decl_or_def(CallingModule,Name,Arity,[declaration-none-none-[none-[none]]]) :- referenced_but_undeclared(CallingModule,Name,Arity). find_decl_or_def(ContextModule,Name,Arity,Declarations) :- setof( declaration-Visibility-DeclModule-Location, ContextModule^Name^Arity^ ( declared_but_undefined(DeclModule,Name,Arity), visibility(Visibility, ContextModule,Name,Arity,DeclModule), declared_in_file(DeclModule,Name,Arity,Location) % results_context_category_label(declared, Visibility, VisibilityText) ), Declarations). find_decl_or_def(ContextModule,Name,Arity,Definitions) :- setof( definition-Visibility-DefiningModule-Locations, ContextModule^Name^Arity^ % Locations is list of File-Lines terms ( defined_in_module(DefiningModule,Name,Arity), visibility(Visibility, ContextModule,Name,Arity,DefiningModule), defined_in_files(DefiningModule,Name,Arity,Locations) % results_context_category_label(defined, Visibility, VisibilityText) ), Definitions ). :- multifile(results_category_label/2). :- multifile(results_context_category_label/3). %results_context_category_label(declared, local, 'Local declaration' ) :- !. %results_context_category_label(declared, supermodule,'Imported declaration' ) :- !. %results_context_category_label(declared, submodule, 'Submodule declaration') :- !. %results_context_category_label(declared, invisible, 'Locally invisible declaration') :- !. % %results_context_category_label(defined, local, 'Local definitions' ) :- !. %results_context_category_label(defined, supermodule,'Imported definitions' ) :- !. %results_context_category_label(defined, submodule, 'Submodule definitions') :- !. %results_context_category_label(defined, invisible, 'Locally invisible definitions') :- !. % These clauses must stay in this order since they determine % the order of elements in the result of find_decl_or_def % and hence the order of elements in the search result view % (which is the INVERSE of the order of elements that we % compute here). visibility(super, ContextModule,Name,Arity,DeclModule) :- ( module_imports_predicate_from(ContextModule, Name, Arity, DeclModule, overridden) ; module_imports_predicate_from(ContextModule, Name, Arity, DeclModule, imported) ), !. % declared_in_module(ContextModule,Name,Arity,DeclModule), % ContextModule \== DeclModule. visibility(local, ContextModule,Name,Arity,DeclModule) :- declared_in_module(ContextModule,Name,Arity,DeclModule), ContextModule == DeclModule, !. visibility(sub, ContextModule,Name,Arity,DeclModule) :- ( module_imports_predicate_from(DeclModule, Name, Arity, ContextModule, overridden) ; module_imports_predicate_from(DeclModule, Name, Arity, ContextModule, imported) ), !. % declared_in_module(DeclModule,Name,Arity,DeclModule), % % DeclModule is a submodule of ContextModule % declared_in_module(DeclModule,_,_,ContextModule), % submodule % ContextModule \== DeclModule. visibility(invisible, ContextModule,Name,Arity,DeclModule) :- % Take care to generate all values befor using negation. % Otherwise the clause will not be able to generate values. % Negation DOES NOT generate values for unbound variables! % There is some DeclaringModule declared_in_module(DeclModule,Name,Arity,DeclModule), ContextModule \== DeclModule, \+ module_imports_predicate_from(DeclModule, Name, Arity, ContextModule, overridden), \+ module_imports_predicate_from(DeclModule, Name, Arity, ContextModule, imported), \+ module_imports_predicate_from(ContextModule, Name, Arity, DeclModule, overridden), \+ module_imports_predicate_from(ContextModule, Name, Arity, DeclModule, imported). % \+ declared_in_module(ContextModule,Name,Arity,DeclModule), % \+ declared_in_module(DeclModule,_,_,ContextModule). /*********************************************************************** * Find Primary Definition * * --------------------------------------------------------------------* * for "Open Primary Declaration" (F3) action * ***********************************************************************/ %% find_primary_definition_visible_in(+File, +Line, +OffsetStart, +OffsetEnd, +TermString, -TargetKind, -TargetFile, -TargetLine, -TargetLabel) % % Find first line of first clause in the *primary* file defining the predicate Name/Arity % visible in ReferencedModule. In case of multifile predicates, the primary file is either % the file whose module is the DefiningModule or otherwise (this case only occurs % for "magic" system modules, (e.g. 'system')) the file containing most clauses. % % Used for the open declaration action in % pdt/src/org/cs3/pdt/internal/actions/FindPredicateActionDelegate.java % % ResultKind is one of: single, multifile, foreign, dynamic find_primary_definition_visible_in(File, Line, OffsetStart, OffsetEnd, TermString, TargetKind, TargetFile, TargetLine, TargetLabel) :- retrieve_term_from_atom(File, TermString, Term), nonvar(Term), find_primary_definition_visible_in_(File, Line, OffsetStart, OffsetEnd, Term, TargetKind, TargetFile, TargetLine, TargetLabel). retrieve_term_from_atom(File, TermString, Term) :- ( module_property(Module, file(File)) -> atom_concat(TermString, '.', TermStringWithDot), open_chars_stream(TermStringWithDot, Stream), read_term(Stream, Term, [module(Module)]) ; atom_to_term(TermString, Term, _) ). % Logtalk file find_primary_definition_visible_in_(File, Line, _OffsetStart, _OffsetEnd, Term, single, TargetFile, TargetLine, _TargetLabel) :- split_file_path(File, _Directory, _FileName, _, lgt), !, current_predicate(logtalk_load/1), logtalk_adapter::find_primary_definition_visible_in(File, Line, Term, _Functor, _Arity, TargetFile, TargetLine), !. % Logtalk message in non-Logtalk file find_primary_definition_visible_in_(_File, _Line, _OffsetStart, _OffsetEnd, Term, single, TargetFile, TargetLine, _TargetLabel) :- Term = Obj::Call, !, current_predicate(logtalk_load/1), nonvar(Obj), nonvar(Call), functor(Call, Name, Arity), ( object_property(Obj, defines(Name/Arity, Properties)) ; object_property(Obj, declares(Name/Arity, Properties)) ), memberchk(line_count(TargetLine), Properties), object_property(Obj, file(FileName, Directory)), atom_concat(Directory, FileName, TargetFile), !. % file specification/loading directive find_primary_definition_visible_in_(File, _Line, _OffsetStart, _OffsetEnd, Term, single, TargetFile, TargetLine, _TargetLabel) :- find_file(File, Term, TargetFile, TargetLine), !. % metacall in a transparent predicate find_primary_definition_visible_in_(File, Line, OffsetStart, OffsetEnd, Term, transparent, TargetFile, TargetLine, TargetLabel) :- '$clause_from_source'(File, Line, ClauseRef), %'$clause_from_source'(File,File, Line, ClauseRef), clause_property(ClauseRef, predicate(SrcModule:SrcName/SrcArity)), functor(SrcHead, SrcName, SrcArity), predicate_property(SrcModule:SrcHead, transparent), \+ predicate_property(SrcModule:SrcHead, meta_predicate(_)), ( Term = _:_ -> RefTerm = Term ; RefTerm = _:Term ), retractall(alternative(_, _, _, _, _)), pdt_walk_code([clauses([ClauseRef]), trace_reference(RefTerm), reiterate(false), on_trace(pdt_search:assert_alternative(OffsetStart, OffsetEnd))]), findall(a(Module, Name, Arity, File2, Line2), retract(alternative(Module, Name, Arity, File2, Line2)), Alternatives), Alternatives \== [], !, member(a(RefModule, RefName, RefArity, TargetFile, TargetLine), Alternatives), format(atom(TargetLabel), '~w:~w/~w', [RefModule, RefName, RefArity]). % any other term find_primary_definition_visible_in_(File, _Line, _OffsetStart, _OffsetEnd, Term, TargetKind, TargetFile, TargetLine, TargetLabel) :- extract_name_arity(Term, Module, _Head, Name, Arity), find_definition_visible_in(File, Module, Name, Arity, _DefiningModule, Locations), ( Locations = [_,_|_] -> TargetKind = (multifile) ; Locations = [Location], ( Location = (dynamic)-_ -> TargetKind = (dynamic) ; Location = foreign-_ -> TargetKind = foreign ; TargetKind = single ) ), !, member(TargetFile-[location(TargetLine, _)|_], Locations), format(atom(TargetLabel), '~w:~w', [TargetFile, TargetLine]). :- if(current_prolog_flag(dialect, swi)). find_primary_definition_visible_in_(File, _Line, _OffsetStart, _OffsetEnd, Term, dwim, TargetFile, TargetLine, TargetLabel) :- extract_name_arity(Term, Module, Head, _Name, _Arity), ( var(Module) -> once(module_of_file(File,FileModule)), dwim_predicate(FileModule:Head, RefModule:RefHead) ; dwim_predicate(Module:Head, RefModule:RefHead) ), functor(RefHead, RefName, RefArity), ( predicate_property(RefModule:RefHead, file(TargetFile)), predicate_property(RefModule:RefHead, line_count(TargetLine)) -> true ; TargetFile = foreign, TargetLine = -1 ), format(atom(TargetLabel), '~w:~w/~w', [RefModule, RefName, RefArity]). :- endif. % If Term is a loading directive, find the related file, % eventually interpreting a FileSPec that contains an alias find_file(EnclFile,Term,File,Line) :- extract_file_spec(Term,FileSpec), catch( absolute_file_name(FileSpec,[relative_to(EnclFile), solutions(all),extensions(['.pl', '.lgt', '.ct', '.ctc'])], File), _, fail ), access_file(File, read), !, Line=1. % Work regardelessly whether the user selected the entire consult/use_module % statement or just the file spec. Does NOT work if he only selected a file % name within an alias but not the complete alias. extract_file_spec(consult(FileSpec),FileSpec) :- !. extract_file_spec(use_module(FileSpec),FileSpec) :- !. extract_file_spec(use_module(FileSpec,_),FileSpec) :- !. extract_file_spec(reexport(FileSpec),FileSpec) :- !. extract_file_spec(reexport(FileSpec,_),FileSpec) :- !. extract_file_spec(ensure_loaded(FileSpec),FileSpec) :- !. extract_file_spec(Term,Term). :- dynamic(alternative/5). assert_alternative(GivenStart, GivenEnd, Module0:Goal, _Caller, clause_term_position(_Ref, TermPosition), metacall(_, _)) :- ( TermPosition = term_position(Start, End, _, _, _) ; TermPosition = Start-End ), GivenStart =< Start, End =< GivenEnd, functor(Goal, Name, Arity), declared_in_module(Module0, Name, Arity, Module), predicate_property(Module:Goal, file(File)), predicate_property(Module:Goal, line_count(Line)), !, assertz(alternative(Module, Name, Arity, File, Line)). assert_alternative(_, _, _, _, _, _). extract_name_arity(Term,Module,Head,Name,Arity) :- % Special treatment of Name/Arity terms: ( Term = Module:Name/Arity -> true ; ( Term = Name/Arity -> true ; ( Term = Module:Term2 -> functor(Term2, Name, Arity) ; functor(Term,Name,Arity) ) ) ), % Create most general head functor(Head,Name,Arity). find_definition_visible_in(EnclFile,ReferencedModule,Name,Arity,DefiningModule,Locations) :- module_of_file(EnclFile,FileModule), ( atom(ReferencedModule) -> true % Explicit module reference ; ReferencedModule = FileModule % Implicit module reference ), declared_in_module(ReferencedModule,Name,Arity,DeclaringModule), defined_in_files(DeclaringModule,Name,Arity,Locations0), ( Locations0 == [] -> declared_in_file(DefiningModule, Name, Arity, Locations) ; Locations0 = Locations ). /*********************************************************************** * Find Definitions in File * * --------------------------------------------------------------------* * for Outline * ***********************************************************************/ % TODO: This is meanwhile subsumed by other predicates. Integrate! %% find_definition_contained_in(+File, +Options, -Entity, -EntityLine, -EntityKind, -Name, -Arity, -SearchCategory, -Line, -PropertyList) is nondet. % % Look up the starting line of a clause of a predicate Name/Arity defined in File. % Do this upon backtracking for each clause of each predicate in File. % % @param File The file to search for definitions. % @param Options multifile(boolean): show clauses of other files for multifile predicates % all_clauses(boolean): show all clauses or only the first of a predicate in a file % @param Entity The module (in Prolog) or Entity (in logtalk) to which a predicate belongs. % Note that there can be multiple entities in a file. % @param EntityKind "module" (in Prolog) or "object|category|protocoll" (in Logtalk) % @param Name The name of the defined predicate % @param Arity The arity of the defined predicate % @param SearchCategory "multifile|definition" % @param Line The starting line of a clause of Name/Arity contained in File. % @param PropertyList A list of properties of the predicate. % TODO: Enumerate values expected by the Java GUI. % Called from PDTOutlineQuery.java find_definition_contained_in(File, Entity, EntityLine, EntityKind, Functor, Arity, SearchCategory, Line, PropertyList) :- find_definition_contained_in(File, [multifile(true), all_clauses(true), first_arg_size_limit(102400)], Entity, EntityLine, EntityKind, Functor, Arity, SearchCategory, Line, PropertyList). find_definition_contained_in(File, Options, Entity, EntityLine, EntityKind, Functor, Arity, SearchCategory, Line, PropertyList) :- split_file_path(File, _Directory,_FileName,_,lgt), !, current_predicate(logtalk_load/1), logtalk_adapter::find_definition_contained_in(File, Options, Entity, EntityLine, EntityKind, Functor, Arity, SearchCategory, Line, PropertyList). find_definition_contained_in(ContextFile, Options, DefiningModule, ModuleLine, module, Functor, Arity, SearchCategory, Line, PropertyList) :- SearchCategory = definition, % module_of_file(ContextFile, ContextModule), % Backtrack over all predicates defined in File % including multifile contributions to other modules: ( pdt_source_file(DefiningModule:Head, ContextFile) ; source_file_property(ContextFile, included_in(ParentFile, _)), pdt_source_file(DefiningModule:Head, ParentFile) ), ( module_property(DefiningModule, line_count(ModuleLine)) -> true ; ModuleLine = 1 ), % Predicate properties: functor(Head, Functor, Arity), \+ find_blacklist(Functor,Arity,DefiningModule), properties_for_predicate(DefiningModule,Functor, Arity, PropertyList0), % In the case of a multifile predicate, we want to find all clauses for this % predicate, even when they occur in other files %defined_in_file(DefiningModule, Functor, Arity, Ref, _, DefiningFile, Line), find_definition_in_file(Options, ContextFile, DefiningModule, Functor, Arity, Ref, DefiningFile, Line), ( nonvar(ParentFile) -> DefiningFile \== ParentFile ; true ), ( DefiningFile == ContextFile -> ( module_of_file(ContextFile, DefiningModule)%DefiningModule == ContextModule -> % local definition PropertyList1 = [local(DefiningModule)|PropertyList0] ; % contribution of ContextModule for DefiningModule PropertyList1 = [for(DefiningModule), defining_file(DefiningFile) | PropertyList0] ) ; ( module_of_file(ContextFile, DefiningModule)%DefiningModule == ContextModule -> % contribution from DefiningFile to ContextModule, ContextFile PropertyList1 = [from(DefiningModule), defining_file(DefiningFile) | PropertyList0] ; % other file to itself PropertyList1 = [remote(DefiningModule), defining_file(DefiningFile) | PropertyList0] ) ), ( first_argument_of_clause(Ref, Options, FirstArg) -> PropertyList = [FirstArg|PropertyList1] ; PropertyList = PropertyList1 ). find_definition_in_file(Options, ContextFile, Module, Name, Arity, Ref, File, Line) :- once(member(multifile(IsMultifile), Options)), once(member(all_clauses(IsAllClauses), Options)), find_definition_in_file(IsAllClauses, IsMultifile, ContextFile, Module, Name, Arity, Ref, File, Line). find_definition_in_file(true, IsMultifile, ContextFile, Module, Name, Arity, Ref, File, Line) :- !, ( IsMultifile == true -> true ; ContextFile = File ), defined_in_file(Module, Name, Arity, Ref, _, File, Line). find_definition_in_file(_/*false*/, IsMultifile, ContextFile, Module, Name, Arity, Ref, File, Line) :- functor(Head, Name, Arity), ( predicate_property(Module:Head, multifile) -> ( IsMultifile == true -> true ; ContextFile = File ), find_lines(Module:Head, File, Line, Ref) ; ContextFile = File, predicate_property(Module:Head, line_count(Line)), nth_clause(Module:Head, _, Ref), clause_property(Ref, line_count(Line)), ! ). :- dynamic(file_line/3). find_lines(Head, File, Line, Ref) :- predicate_property(Head, number_of_clauses(N)), N > 1000, !, findall(F, (source_file(F), pdt_source_file(Head, F)), Files), Line = 1, Ref = [], member(File, Files). find_lines(Head, File, Line, Ref) :- with_mutex(find_lines, ( retractall(file_line(_, _, _)), walk_clauses(Head, 1), findall(F-L-R, file_line(F, L, R), Locations) )), member(File-Line-Ref, Locations). walk_clauses(Head, N) :- nth_clause(Head, N, Ref), !, ( clause_property(Ref, file(File)), clause_property(Ref, line_count(Line)) -> ( file_line(File, L, _) -> ( Line < L -> retract(file_line(File, L, _)), assertz(file_line(File, Line, Ref)) ; true ) ; assertz(file_line(File, Line, Ref)) ) ; true ), succ(N, N2), walk_clauses(Head, N2). walk_clauses(_, _). first_argument_of_clause(Ref, Options, first_argument(Arg)) :- catch(clause(_:Head, _, Ref), _, fail), compound(Head), arg(1, Head, FirstArg), ( var(FirstArg) -> clause_property(Ref, file(File)), ( memberchk(first_arg_size_limit(Limit), Options) -> true ; Limit = 102400 ), size_file(File, Size), Size =< Limit, clause_info(Ref, _, _, Varnames), arg(1, Varnames, FirstVarName), Arg = FirstVarName ; functor(FirstArg, F, N), ( N == 0 -> Arg = F ; format(atom(Arg), '~w/~w', [F, N]) ) ). % TODO: Reconcile the above with utils4modules_visibility.pl::module_of_file/2 %% find_blacklist(?Functor, ?Arity, ?Module) is nondet. % % Used to remove (internal) predicates from the results of find_definition_contained_in/8. % % find_blacklist('$load_context_module',2,_). find_blacklist('$load_context_module',3,_). find_blacklist('$mode',2,_). find_blacklist('$pldoc',4,_). /*********************************************** * FIND VISIBLE PREDICATE (FOR AUTOCOMPLETION) * ***********************************************/ %% find_completion(+Prefix, ?EnclosingFile, ?LineInFile, -Kind, -Entity, -Name, -Arity, -Visibility, -IsBuiltin, -IsDeprecated, -ArgNames, -DocKind, -Doc, -NeedsQuotes) is nondet. % find_completion(Prefix, EnclosingFile, LineInFile, Kind, Entity, Name, Arity, Visibility, IsBuiltin, IsDeprecated, ArgNames, DocKind, Doc, NeedsQuotes) :- var(Prefix), !, throw(prefix_not_bound(find_completion(Prefix, EnclosingFile, LineInFile, Kind, Entity, Name, Arity, Visibility, IsBuiltin, IsDeprecated, ArgNames, DocKind, Doc, NeedsQuotes))). find_completion(Prefix, EnclosingFile, LineInFile, Kind, Entity, Name, Arity, Visibility, IsBuiltin, IsDeprecated, ArgNames, DocKind, Doc, NeedsQuotes) :- nonvar(EnclosingFile), !, ( split_file_path(EnclosingFile, _, _, _, lgt) -> current_predicate(logtalk_load/1), IsDeprecated = false, logtalk_adapter::find_completion(Prefix, EnclosingFile, LineInFile, Kind, Entity, Name, Arity, Visibility, IsBuiltin, ArgNames, DocKind, Doc) ; find_completion_(Prefix, EnclosingFile, LineInFile, Kind, Entity, Name, Arity, Visibility, IsBuiltin, IsDeprecated, ArgNames, DocKind, Doc) ), needs_quotes(Name, NeedsQuotes). find_completion(Prefix, EnclosingFile, LineInFile, Kind, Entity, Name, Arity, Visibility, IsBuiltin, IsDeprecated, ArgNames, DocKind, Doc, NeedsQuotes) :- ( find_completion_(Prefix, EnclosingFile, LineInFile, Kind, Entity, Name, Arity, Visibility, IsBuiltin, IsDeprecated, ArgNames, DocKind, Doc) ; current_predicate(logtalk_load/1), IsDeprecated = false, logtalk_adapter::find_completion(Prefix, EnclosingFile, LineInFile, Kind, Entity, Name, Arity, Visibility, IsBuiltin, ArgNames, DocKind, Doc) ), needs_quotes(Name, NeedsQuotes). needs_quotes(Value, NeedsQuotes) :- ( atom(Value) -> with_output_to(atom(A), writeq(Value)), ( atom_length(Value, VL), atom_length(A, AL), AL > VL -> NeedsQuotes = true ; NeedsQuotes = false ) ; NeedsQuotes = false ). :- discontiguous(find_completion_/13). find_completion_(SpecifiedModule:PredicatePrefix, _EnclosingFile, _LineInFile, predicate, Module, Name, Arity, Visibility, IsBuiltin, IsDeprecated, ArgNames, DocKind, Doc) :- !, ( PredicatePrefix \== '' -> setof( Module-Name-Arity, SpecifiedModule^( declared_in_module(SpecifiedModule, Name, Arity, Module), is_case_insensitive_prefix_of(PredicatePrefix, Name) ), Predicates ) ; nonvar(SpecifiedModule), setof( SpecifiedModule-Name-Arity, SpecifiedModule^(declared_in_module(SpecifiedModule, Name, Arity, SpecifiedModule)), Predicates ) ), member(Module-Name-Arity, Predicates), predicate_information(Module, Name, Arity, IsBuiltin, IsDeprecated, Visibility, ArgNames, DocKind, Doc). find_completion_(PredicatePrefix, EnclosingFile, _LineInFile, predicate, Module, Name, Arity, Visibility, IsBuiltin, IsDeprecated, ArgNames, DocKind, Doc) :- atomic(PredicatePrefix), nonvar(EnclosingFile), setof( Module-Name-Arity, EnclosingFile^FileModule^IncludeLine^File^( ( File = EnclosingFile ; source_file_property(EnclosingFile, included_in(File, IncludeLine)) ), module_of_file(File, FileModule), declared_in_module(FileModule, Name, Arity, Module), is_case_insensitive_prefix_of(PredicatePrefix, Name) ), Predicates ), member(Module-Name-Arity, Predicates), predicate_information(Module, Name, Arity, IsBuiltin, IsDeprecated, Visibility, ArgNames, DocKind, Doc). find_completion_(PredicatePrefix, EnclosingFile, _LineInFile, predicate, Module, Name, Arity, Visibility, IsBuiltin, IsDeprecated, ArgNames, DocKind, Doc) :- atomic(PredicatePrefix), var(EnclosingFile), setof(Module-Name-Arity, ( declared_in_module(user, Name, Arity, Module), is_case_insensitive_prefix_of(PredicatePrefix, Name) ), Predicates), member(Module-Name-Arity, Predicates), predicate_information(Module, Name, Arity, IsBuiltin, IsDeprecated, Visibility, ArgNames, DocKind, Doc). predicate_information(Module, Name, Arity, IsBuiltin, IsDeprecated, Visibility, ArgNames, DocKind, Doc) :- functor(Head, Name, Arity), ( predicate_property(Module:Head, built_in) -> IsBuiltin = true ; IsBuiltin = false ), ( ( Module == user ; predicate_property(Module:Head, exported) ) -> Visibility = (public) ; Visibility = protected ), ( predicate_completion_documentation_hook(Module, Name, Arity, ArgNames, DocKind, Doc) -> true ; predicate_manual_entry(Module, Name, Arity, Content, IsDeprecated), ( Content == nodoc -> DocKind = nodoc ; DocKind = html, Doc = Content, ( Arity == 0 -> ArgNames = [] ; ignore(predicate_arg_list(Content, ArgNames)) ) ) ), ( var(IsDeprecated) -> IsDeprecated = false ; true ). :- multifile(predicate_completion_documentation_hook/6). predicate_arg_list(Comment, ArgList) :- sub_atom(Comment, End, _, _, '</var>'), sub_atom(Comment, BeforeBegin, BeforeBeginLength, _, '"arglist">'), !, Begin is BeforeBegin + BeforeBeginLength, Length is End - Begin, sub_atom(Comment, Begin, Length, _, Args), format(atom(ArgsWithDot), '~w.', [Args]), open_chars_stream(ArgsWithDot, Stream), call_cleanup(read_term(Stream, Term, [variable_names(Vars), module(pldoc_modes)]), close(Stream)), args_from_mode_term(Term, ArgList, Vars). args_from_mode_term(Arg, [ArgName], Vars) :- var(Arg), !, var_to_arg(Arg, ArgName, Vars). args_from_mode_term((Arg, Args), [ArgName|ArgNames], Vars) :- !, var_to_arg(Arg, ArgName, Vars), args_from_mode_term(Args, ArgNames, Vars). args_from_mode_term(Arg, [ArgName], Vars) :- var_to_arg(Arg, ArgName, Vars). var_to_arg(Arg, ArgName, Vars) :- ( var(Arg) -> Arg = Var ; Arg =.. [_Mode|Other], ( Other = [Var:_] ; Other = [Var] ) ), member(ArgName=V, Vars), V == Var, !. find_completion_(ModulePrefix, _EnclosingFile, _LineInFile, module, _, Name, _, _, _, _, _, _, _) :- atomic(ModulePrefix), current_module(Name), is_case_insensitive_prefix_of(ModulePrefix,Name). :- if(current_prolog_flag(dialect, swi)). find_completion_(AtomPrefix, _EnclosingFile, _LineInFile, atom, _, Atom, _, _, _, _, _, _, _) :- atomic(AtomPrefix), garbage_collect_atoms, '$atom_completions'(AtomPrefix, Atoms), member(Atom,Atoms), '$atom_references'(Atom, ReferenceCount), ReferenceCount > 0, % Atom \= AtomPrefix, \+ current_predicate(Atom/_Arity). :- endif. is_case_insensitive_prefix_of(Prefix, Name) :- downcase_atom(Prefix, PrefixDowncase), downcase_atom(Name, NameDowncase), atom_concat(PrefixDowncase, _, NameDowncase). %% find_entity_definition(SearchString, ExactMatch, Root, File, Line, Entity) find_entity_definition(SearchString, ExactMatch, Root, File, Line, Entity) :- current_predicate(logtalk_load/1), logtalk_adapter::find_entity_definition(SearchString, ExactMatch, Root, File, Line, Entity). find_entity_definition(SearchString, ExactMatch, Root, File, Line, Entity) :- find_module_definition(SearchString, ExactMatch, Root, File, Line, Entity). find_module_definition(SearchModule, ExactMatch, Root, File, Line, Module) :- current_module(Module), ( ExactMatch == true -> SearchModule = Module ; once(sub_atom(Module, _, _, _, SearchModule)) ), module_property(Module, file(File)), ( nonvar(Root) -> sub_atom(File, 0, _, _, Root) ; true ), module_property(Module, line_count(Line)). %% find_module_reference(Module, ExactMatch, Root, File, Line, ReferencingModule, RefName, RefArity, PropertyList) find_module_reference(Module, ExactMatch, Root, File, Location, LoadingModule, _, _, [line(Line), label(Label)]) :- find_use_module(Module, ExactMatch, _, LoadingModule, File, Line, OptionList), ( nonvar(Root) -> sub_atom(File, 0, _, _, Root) ; true ), format(atom(Label), ':- load_files(~w, ~w).', [Module, OptionList]), ( read_term_position_at_location(File, Line, LoadingModule, Location) -> true ; Location = Line ). find_module_reference(Module, ExactMatch, Root, File, Line, ReferencingModule, RefName, RefArity, PropertyList) :- search_module_name(Module, ExactMatch, SearchModule), find_reference_to(predicate(SearchModule, _, _, _, _), ExactMatch, Root, ReferencingModule, RefName, RefArity, File, Line, PropertyList). find_module_reference(Module, ExactMatch, Root, File, Location, ReferencingModule, RefName, RefArity, PropertyList) :- current_predicate(logtalk_load/1), logtalk_adapter::find_entity_reference(Module, ExactMatch, Root, File, Line, ReferencingModule, RefName, RefArity, PropertyList), ( var(RefName), read_term_position_at_location(File, Line, user, Location) -> true ; Location = Line ). read_term_position_at_location(File, Line, Module, Location) :- catch(open(File, read, In), _, fail), set_stream(In, newline(detect)), call_cleanup( read_source_term_at_location( In, _Clause, [ line(Line), module(Module), subterm_positions(TermPos) ] ), close(In) ), TermPos = term_position(Start, End, _, _, _), format(atom(Location), '~w-~w', [Start, End]), !. search_module_name(Module, true, Module) :- !. search_module_name(ModulePart, false, Module) :- current_module(Module), once(sub_atom(Module, _, _, _, ModulePart)). %% loaded_by(LoadedFile, LoadingFile, Line, Directive) /* For Load File Dependency Graph: */ loaded_by(LoadedFile, LoadingFile, Line, Directive) :- nonvar(LoadedFile), ( split_file_path(LoadedFile, _, _, _, lgt) ; split_file_path(LoadedFile, _, _, _, logtalk) ), % Logtalk source file !, logtalk_adapter::loaded_by(LoadedFile, LoadingFile, Line, Directive). loaded_by(LoadedFile, LoadingFile, Line, Directive) :- source_file_property(LoadedFile, load_context(_LoadingModule, LoadingFile:Line, _OptionList)), % If the loaded file is a module conclude that the % loading directive should have been 'use_module'. % Otherwise, treat it as a 'consult': ( module_property(_Module, file(LoadedFile)) -> Directive = use_module ; Directive = consult ). find_use_module(ModuleOrPart, ExactMatch, ModuleFile, LoadingModule, File, Line, OptionList) :- ( ExactMatch == true -> ModuleOrPart = Module ; current_module(Module), once(sub_atom(Module, _, _, _, ModuleOrPart)) ), module_property(Module, file(ModuleFile)), source_file_property(ModuleFile, load_context(LoadingModule, File:Line, OptionList)). % member(if(not_loaded), OptionList), % member(must_be_module(true), OptionList). module_imports_predicate_from(Module, Name, Arity, SuperModule, Case) :- has_super_module(Module, SuperModule), visible_in_module(Module, Name, Arity), ( defined_in_module(Module, Name, Arity) -> ( module_property(SuperModule, exports(ExportList)), member(Name/Arity, ExportList) -> Case = overridden ; Case = local ) ; functor(Head, Name, Arity), ( predicate_property(Module:Head, imported_from(SuperModule)) -> Case = imported ; Case = not_imported ) ). has_super_module(Module, SuperModule) :- module_property(SuperModule, file(SuperModuleFile)), source_file_property(SuperModuleFile, load_context(Module, _, _OptionList)). loaded_file(FullPath) :- ( ( split_file_path(FullPath, Directory, Basename, _, lgt) ; split_file_path(FullPath, Directory, Basename, _, logtalk) ) -> % Logtalk source file current_predicate(logtalk_load/1), % assume that Logtalk is loaded ( current_logtalk_flag(version, version(3, _, _)) -> logtalk::loaded_file(FullPath) ; logtalk::loaded_file(Basename, Directory) ) ; % assume Prolog source file source_file(FullPath) ).
TeamSPoon/logicmoo_base
prolog/logicmoo/pdt_server/pdt.common/pl/pdt_search.pl
Perl
mit
40,830
#!/usr/bin/perl ############################################################################### # # USAGE: perl prep_bnx.pl [dataset directory] [bnx directory] # # Created by jennifer shelton # # Script moves Molecules.bnx files into a common bnx directory and renames with auto-incremented numbers. Make paths absolute and do not include trailing spaces in paths. # The script takes the path to the directory with the transfered datasets from the IrysView workspaces and the new BNX directory name. This organizes the raw data in the correct format to run AssembleIrys.pl. # # Example: perl /home/irys/Data/Irys-scaffolding/KSU_bioinfo_lab/assemble/prep_bnx.pl /home/irys/Data/Esch_coli_0000 /home/irys/Data/Esch_coli_0000/bnx # ############################################################################### use strict; use warnings; #use File::Find::Rule; # use List::Util qw(max); # use List::Util qw(sum); # # ############################################################################### ############## get arguments ################## ############################################################################### my $dataset_directory=$ARGV[0]; my $i=1; my $directory = $ARGV[1]; unless(mkdir $directory) { print "Unable to create $directory\n"; } ############################################################################### ############## Move and rename files ################## ############################################################################### #my @dir_array = ('/homes', grep -d, glob "$dataset_directory/*"); my $logfile = "$directory/bnx_log.txt"; open (LOG, ">>", $logfile) or die "Can't open $logfile\n"; opendir (DATA, $dataset_directory) or die "Can't open $dataset_directory\n"; while (my $entry = readdir DATA ) { if (-d "${dataset_directory}/${entry}") { unless (($entry eq '..') || ($entry eq '.')) { my $link = "$directory/Molecules_${i}.bnx"; while (-e $link) { ++$i; $link = "$directory/Molecules_${i}.bnx"; } my $linked= `ln -s \'${dataset_directory}/${entry}/Detect Molecules/Molecules.bnx\' $link`; print "$linked"; print LOG "Molecules_${i}.bnx\t${entry}\n"; ++$i; } } } print "done\n";
kstatebioinfo/Irys-scaffolding
KSU_bioinfo_lab/assemble_SGE_cluster/prep_bnx.pl
Perl
mit
2,388
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut =head1 CONTACT Please email comments or questions to the public Ensembl developers list at <http://lists.ensembl.org/mailman/listinfo/dev>. Questions may also be sent to the Ensembl help desk at <http://www.ensembl.org/Help/Contact>. =head1 NAME Bio::EnsEMBL::Hive::RunnableDB::DumpMultiAlign::CreateSuperJobs =head1 SYNOPSIS This RunnableDB module is part of the DumpMultiAlign pipeline. =head1 DESCRIPTION This RunnableDB module generates DumpMultiAlign jobs from genomic_align_blocks on the species supercontigs. =cut package Bio::EnsEMBL::Compara::RunnableDB::DumpMultiAlign::CreateSuperJobs; use strict; use base ('Bio::EnsEMBL::Compara::RunnableDB::BaseRunnable'); use POSIX qw(ceil); sub write_output { my $self = shift @_; #Note this is using the database set in $self->param('compara_db'). my $compara_dba = $self->compara_dba; # #Find supercontigs and number of genomic_align_blocks # my $sql = " SELECT count(*) FROM genomic_align LEFT JOIN dnafrag USING (dnafrag_id) WHERE coord_system_name = ? AND genome_db_id= ? AND method_link_species_set_id=?"; my $sth = $compara_dba->dbc->prepare($sql); $sth->execute($self->param('coord_system_name'),$self->param('genome_db_id'), $self->param('mlss_id')); my ($total_blocks) = $sth->fetchrow_array; # exit if there is nothing to dump return unless $total_blocks; #Write out cmd for DumpMultiAlign and a few other parameters #used in downstream analyses my $output_ids = { 'region_name' => '#coord_system_name#', 'filename_suffix' => '*', # We need the star because DumpMultiAlignment.pl adds _1 to the output file and can create more if there are lots of supercontigs (when split_size is set) 'num_blocks' => $total_blocks, 'extra_args' => [ '--coord_system', '#coord_system_name#' ], }; $self->dataflow_output_id($output_ids, 2); } 1;
kumarsaurabh20/ensembl-compara
modules/Bio/EnsEMBL/Compara/RunnableDB/DumpMultiAlign/CreateSuperJobs.pm
Perl
apache-2.0
2,711
package Google::Ads::AdWords::v201409::SharedSetService::mutate; use strict; use warnings; { # BLOCK to scope variables sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201409' } __PACKAGE__->__set_name('mutate'); __PACKAGE__->__set_nillable(); __PACKAGE__->__set_minOccurs(); __PACKAGE__->__set_maxOccurs(); __PACKAGE__->__set_ref(); use base qw( SOAP::WSDL::XSD::Typelib::Element Google::Ads::SOAP::Typelib::ComplexType ); our $XML_ATTRIBUTE_CLASS; undef $XML_ATTRIBUTE_CLASS; sub __get_attr_class { return $XML_ATTRIBUTE_CLASS; } use Class::Std::Fast::Storable constructor => 'none'; use base qw(Google::Ads::SOAP::Typelib::ComplexType); { # BLOCK to scope variables my %operations_of :ATTR(:get<operations>); __PACKAGE__->_factory( [ qw( operations ) ], { 'operations' => \%operations_of, }, { 'operations' => 'Google::Ads::AdWords::v201409::SharedSetOperation', }, { 'operations' => 'operations', } ); } # end BLOCK } # end of BLOCK 1; =pod =head1 NAME Google::Ads::AdWords::v201409::SharedSetService::mutate =head1 DESCRIPTION Perl data type class for the XML Schema defined element mutate from the namespace https://adwords.google.com/api/adwords/cm/v201409. Applies the list of mutate operations. @param operations the operations to apply @return the modified CriterionList entities @throws ApiException =head1 PROPERTIES The following properties may be accessed using get_PROPERTY / set_PROPERTY methods: =over =item * operations $element->set_operations($data); $element->get_operations(); =back =head1 METHODS =head2 new my $element = Google::Ads::AdWords::v201409::SharedSetService::mutate->new($data); Constructor. The following data structure may be passed to new(): { operations => $a_reference_to, # see Google::Ads::AdWords::v201409::SharedSetOperation }, =head1 AUTHOR Generated by SOAP::WSDL =cut
gitpan/GOOGLE-ADWORDS-PERL-CLIENT
lib/Google/Ads/AdWords/v201409/SharedSetService/mutate.pm
Perl
apache-2.0
1,966
package Paws::ECR::GetRepositoryPolicyResponse; use Moose; has PolicyText => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'policyText' ); has RegistryId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'registryId' ); has RepositoryName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'repositoryName' ); has _request_id => (is => 'ro', isa => 'Str'); ### main pod documentation begin ### =head1 NAME Paws::ECR::GetRepositoryPolicyResponse =head1 ATTRIBUTES =head2 PolicyText => Str The JSON repository policy text associated with the repository. =head2 RegistryId => Str The registry ID associated with the request. =head2 RepositoryName => Str The repository name associated with the request. =head2 _request_id => Str =cut 1;
ioanrogers/aws-sdk-perl
auto-lib/Paws/ECR/GetRepositoryPolicyResponse.pm
Perl
apache-2.0
838
package # Date::Manip::Offset::off477; # Copyright (c) 2008-2013 Sullivan Beck. All rights reserved. # This program is free software; you can redistribute it and/or modify it # under the same terms as Perl itself. # This file was automatically generated. Any changes to this file will # be lost the next time 'tzdata' is run. # Generated on: Mon Jun 3 12:55:41 EDT 2013 # Data version: tzdata2013c # Code version: tzcode2013c # This module contains data from the zoneinfo time zone database. The original # data was obtained from the URL: # ftp://ftp.iana.orgtz use strict; use warnings; require 5.010000; our ($VERSION); $VERSION='6.40'; END { undef $VERSION; } our ($Offset,%Offset); END { undef $Offset; undef %Offset; } $Offset = '-11:22:48'; %Offset = ( 0 => [ 'pacific/pago_pago', ], ); 1;
nriley/Pester
Source/Manip/Offset/off477.pm
Perl
bsd-2-clause
855
#!/usr/bin/perl # # Generate a Mac OS X Finder .DS_Store file for use on the Mumble disk image. # # Copyright (c) 2009 Mikkel Krautz <mikkel@krautz.dk> # # Released under the same terms as Mumble itself. # # # Notes: # # The use of binary plists inside the DS_Store seems to be new for the Finder in Mac OS X 10.6 (Snow Leopard), # but we'll go with this for now. It falls back somewhat gracefully for older versions OS X, since the icons # will still be placed in their correct positions. # use Data::Plist::BinaryWriter; use Mac::Finder::DSStore::BuddyAllocator; use Mac::Finder::DSStore; use IO::File; use strict; my $plist = Data::Plist::BinaryWriter->new(serialize => 0); my $bwsp = $plist->write([dict => { "ShowPathbar" => [ false => 0 ], "ShowSidebar" => [ false => 0 ], "ShowStatusBar" => [ false => 0 ], "ShowToolbar" => [ false => 0 ], "SidebarWidth" => [ integer => 192 ], "WindowBounds" => [ string => "{{388, 166}, {530, 525}}" ], }]); my $icvp = $plist->write([ dict => { "arrangeBy" => [ string => "grid" ], # these are floats [0, 1] "backgroundColorBlue" => [ integer => 1 ], "backgroundColorGreen" => [ integer => 1 ], "backgroundColorRed" => [ integer => 1 ], # a mac os alias record or the background image. # fixme(mkrautz): add our pretty background. :) "backgroundImageAlias" => [ data => "" ], # background type. 1=color, 2=image "backgroundType" => [ integer => 1 ], "gridOffsetX" => [ integer => 0 ], "gridOffsetY" => [ integer => 0 ], "gridSpacing" => [ integer => 100 ], "iconSize" => [ integer => 80 ], "labelOnBottom" => [ true => 1 ], "showIconPreview" => [ true => 1 ], "showItemInfo" => [ false => 0 ], "textSize" => [ integer => 12 ], "viewOptionsVersion" => [ integer => 0 ], }]); my @entries = (); # styling my %styles = ( 'bwsp' => $bwsp, 'icvp' => $icvp, ); for my $key (keys %styles) { my $e = Mac::Finder::DSStore::Entry->new(".", $key); $e->value($styles{$key}); push(@entries, $e); } # file info my %iconpos = ( "Mumble.app" => [ 54, 40 ], "Mumble11x.app" => [ 157, 40 ], "Applications" => [ 466, 40 ], "ReadMe.txt" => [ 54, 416 ], "Changes.txt" => [ 157, 416 ], "Murmur Extras" => [ 363, 416 ], "Licenses" => [ 466, 416 ], ); for my $key (keys %iconpos) { my $e = Mac::Finder::DSStore::Entry->new($key, 'Iloc'); $e->value(pack('NNnnnn', $iconpos{$key}[0], $iconpos{$key}[1], 65536, 65536, 65536, 65536, 0)); push(@entries, $e); } @entries = sort { $a->cmp($b) } @entries; my $store = Mac::Finder::DSStore::BuddyAllocator->new(new IO::File "DS_Store", '>'); &Mac::Finder::DSStore::putDSDBEntries($store, \@entries); $store->writeMetaData; $store->close;
vgaessler/whisper_client
installer_macx/gendmg.pl
Perl
bsd-3-clause
2,752
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file is machine-generated by lib/unicore/mktables from the Unicode # database, Version 6.2.0. Any changes made here will be lost! # !!!!!!! INTERNAL PERL USE ONLY !!!!!!! # This file is for internal use by core Perl only. The format and even the # name or existence of this file are subject to change without notice. Don't # use it directly. return <<'END'; 32BA END
Bjay1435/capstone
rootfs/usr/share/perl/5.18.2/unicore/lib/Nv/45.pl
Perl
mit
430
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. package Lucy::Document::HitDoc; use Lucy; our $VERSION = '0.006000'; $VERSION = eval $VERSION; 1; __END__
apache/lucy
perl/lib/Lucy/Document/HitDoc.pm
Perl
apache-2.0
892
#----------------------------------------------------------- # sql_lastconnect.pl # # Per MS, Microsoft Data Access Components (MDAC) clients can attempt # to use multiple protocols based on a protocol ordering, which is # listed in the SuperSocketNetLib\ProtocolOrder value. Successful # connection attempts (for SQL Server 2000) are cached in the LastConnect # key. # # References: # http://support.microsoft.com/kb/273673/ # # copyright 2009 H. Carvey, keydet89@yahoo.com #----------------------------------------------------------- package sql_lastconnect; use strict; my %config = (hive => "Software", osmask => 22, hasShortDescr => 1, hasDescr => 0, hasRefs => 0, version => 20090112); sub getConfig{return %config} sub getShortDescr { return "MDAC cache of successful connections"; } sub getDescr{} sub getRefs {} sub getHive {return $config{hive};} sub getVersion {return $config{version};} my $VERSION = getVersion(); sub pluginmain { my $class = shift; my $hive = shift; ::logMsg("Launching sql_lastconnect v.".$VERSION); ::rptMsg("sql_lastconnect v.".$VERSION); # banner ::rptMsg("(".getHive().") ".getShortDescr()."\n"); # banner my $reg = Parse::Win32Registry->new($hive); my $root_key = $reg->get_root_key; my $key_path = "Microsoft\\MSSQLServer\\Client\\SuperSocketNetLib\\LastConnect"; my $key; if ($key = $root_key->get_subkey($key_path)) { ::rptMsg($key_path); ::rptMsg("MDAC Cache of successful connections"); ::rptMsg("LastWrite Time ".gmtime($key->get_timestamp())." (UTC)"); ::rptMsg(""); my @vals = $key->get_list_of_values(); if (scalar(@vals) > 0) { foreach my $v (@vals) { my $str = sprintf "%-15s %-25s",$v->get_name(),$v->get_data(); ::rptMsg($str); } } else { ::rptMsg($key_path." has no values."); } } else { ::rptMsg($key_path." not found."); } } 1;
raman-bt/autopsy
RecentActivity/release/rr-full/plugins/sql_lastconnect.pl
Perl
apache-2.0
2,019
# Copyright (c) 2009, 2010 Oleksandr Tymoshenko <gonzo@bluezbox.com> # All rights reserved. # 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 AUTHOR 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 THE AUTHOR 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. package EBook::EPUB::Spine::Itemref; use Moose; has linear => ( isa => 'Bool', is => 'rw', default => 1 ); has idref => ( isa => 'Str', is => 'rw' ); sub encode { my ($self, $writer) = @_; if ($self->linear()) { $writer->emptyTag("itemref", idref => $self->idref() ); } else { $writer->emptyTag("itemref", idref => $self->idref(), linear => "no", ); } } no Moose; __PACKAGE__->meta->make_immutable; 1; __END__ =head1 NAME EBook::EPUB::Spine::Itemref =head1 SYNOPSIS Itemref for E<lt>spineE<gt> element of OPF file. =head1 SUBROUTINES/METHODS =over 4 =item new(%opts) %opts is an anonymous hash that might containe followig keys: linear (0 or 1) idhref (string) =item encode($xmlwriter) Encode object to XML form using XML::Writer instance =item idref([$href]) Get/set reference to an OPS Content Document included in the manifest. =item linear([$linear]) Get/set linear property. If $linear is true - document is primary, otherwise - auxiliary (like appendix, notes, etc..) =back =head1 AUTHOR Oleksandr Tymoshenko, E<lt>gonzo@bluezbox.comE<gt> =head1 BUGS Please report any bugs or feature requests to E<lt>gonzo@bluezbox.comE<gt> =head1 LICENSE AND COPYRIGHT Copyright 2009, 2010 Oleksandr Tymoshenko. L<http://bluezbox.com> This module is free software; you can redistribute it and/or modify it under the terms of the BSD license. See the F<LICENSE> file included with this distribution.
melmothx/EBook-EPUB
lib/EBook/EPUB/Spine/Itemref.pm
Perl
bsd-2-clause
2,897
#!perl -w use strict; use Imager; my ($font_filename, $size, $out_filename, @text) = @ARGV; @text or usage(); $size =~ /^\d+$/ && $size >= 10 or die "size must be 10 or greater"; my $text = "@text"; my $mark_color = Imager::Color->new('#00F'); my $text_color = Imager::Color->new('#fff'); my $font = Imager::Font->new(file=>$font_filename, size => $size, color => $text_color, aa => 1) or die "Cannot create font from $font_filename: ", Imager->errstr; my @valigns = qw(top center bottom baseline); my @haligns = qw(left start center end right); my $bounds = $font->bounding_box(string => $text); my $text_width = $bounds->total_width; my $text_height = $bounds->text_height; my $img = Imager->new(xsize => $text_width * 2 * @haligns, ysize => $text_height * 2 * @valigns); my $xpos = $text_width; for my $halign (@haligns) { my $ypos = $text_height; for my $valign (@valigns) { # mark the align point $img->line(x1 => $xpos - $size, y1 => $ypos, x2 => $xpos + $size, y2 => $ypos, color => $mark_color); $img->line(x1 => $xpos, y1 => $ypos - $size, x2 => $xpos, y2 => $ypos + $size, color => $mark_color); $img->align_string(font => $font, string => $text, x => $xpos, y => $ypos, halign => $halign, valign => $valign); $ypos += 2 * $text_height; } $xpos += 2 * $text_width; } $img->write(file => $out_filename) or die "Cannot write $out_filename: ", $img->errstr, "\n"; sub usage { die <<USAGE; $0 fontfile size output text... USAGE } =head1 NAME align-string.pl - demo of the Imager align_string() method =head1 SYNOPSIS perl align-string.pl fontfile size outputfile text ... =head1 DESCRIPTION Create an image in output C<imagein> C<outputfile> displaying a grid of the various C<valign> and C<halign> options for the Imager align_string() method. Try it with different fonts and strings to get a better understanding of the effect of the different alignments. =head1 AUTHOR Tony Cook <tonyc@cpan.org> =head1 SEE ALSO Imager, Imager::Font =head1 REVISION $Revision$ =cut
oppai/isucon3
final/misc/Imager-patched/samples/align-string.pl
Perl
mit
2,146
#!/usr/bin/env perl # run-test-suites.pl # # This file is part of mbed TLS (https://tls.mbed.org) # # Copyright (c) 2015-2016, ARM Limited, All Rights Reserved # # Purpose # # Executes all the available test suites, and provides a basic summary of the # results. # # Usage: run-test-suites.pl [-v] # # Options : # -v|--verbose - Provide a pass/fail/skip breakdown per test suite and # in total # use warnings; use strict; use utf8; use open qw(:std utf8); use constant FALSE => 0; use constant TRUE => 1; my $verbose; my $switch = shift; if ( defined($switch) && ( $switch eq "-v" || $switch eq "--verbose" ) ) { $verbose = TRUE; } # All test suites = executable files, excluding source files, debug # and profiling information, etc. We can't just grep {! /\./} because # some of our test cases' base names contain a dot. my @suites = grep { -x $_ || /\.exe$/ } glob 'test_suite_*'; @suites = grep { !/\.c$/ && !/\.data$/ && -f } @suites; die "$0: no test suite found\n" unless @suites; # in case test suites are linked dynamically $ENV{'LD_LIBRARY_PATH'} = '../library'; $ENV{'DYLD_LIBRARY_PATH'} = '../library'; my $prefix = $^O eq "MSWin32" ? '' : './'; my ($failed_suites, $total_tests_run, $failed, $suite_cases_passed, $suite_cases_failed, $suite_cases_skipped, $total_cases_passed, $total_cases_failed, $total_cases_skipped ); for my $suite (@suites) { print "$suite ", "." x ( 72 - length($suite) - 2 - 4 ), " "; my $result = `$prefix$suite`; $suite_cases_passed = () = $result =~ /.. PASS/g; $suite_cases_failed = () = $result =~ /.. FAILED/g; $suite_cases_skipped = () = $result =~ /.. ----/g; if( $result =~ /PASSED/ ) { print "PASS\n"; } else { $failed_suites++; print "FAIL\n"; } my ($passed, $tests, $skipped) = $result =~ /([0-9]*) \/ ([0-9]*) tests.*?([0-9]*) skipped/; $total_tests_run += $tests - $skipped; if ( $verbose ) { print "(test cases passed:", $suite_cases_passed, " failed:", $suite_cases_failed, " skipped:", $suite_cases_skipped, " of total:", ($suite_cases_passed + $suite_cases_failed + $suite_cases_skipped), ")\n" } $total_cases_passed += $suite_cases_passed; $total_cases_failed += $suite_cases_failed; $total_cases_skipped += $suite_cases_skipped; } print "-" x 72, "\n"; print $failed_suites ? "FAILED" : "PASSED"; printf " (%d suites, %d tests run)\n", scalar @suites, $total_tests_run; if ( $verbose ) { print " test cases passed :", $total_cases_passed, "\n"; print " failed :", $total_cases_failed, "\n"; print " skipped :", $total_cases_skipped, "\n"; print " of tests executed :", ( $total_cases_passed + $total_cases_failed ), "\n"; print " of available tests :", ( $total_cases_passed + $total_cases_failed + $total_cases_skipped ), "\n" } exit( $failed_suites ? 1 : 0 );
bukepo/openthread
third_party/mbedtls/repo/tests/scripts/run-test-suites.pl
Perl
bsd-3-clause
3,046
#----------------------------------------------------------- # vmplayer.pl # Extracts full filepath for recent VMware Player VM images # # Change history # 20110830 [fpi] + banner, no change to the version number # # References # # copyright (c) 2011-02-04 Brendan Coles <bcoles@gmail.com> #----------------------------------------------------------- # Require # package vmplayer; use strict; # Declarations # my %config = (hive => "NTUSER\.DAT", hasShortDescr => 1, hasDescr => 0, hasRefs => 1, osmask => 22, version => 20110204); my $VERSION = getVersion(); # Functions # sub getDescr {} sub getConfig {return %config} sub getHive {return $config{hive};} sub getVersion {return $config{version};} sub getShortDescr { return "Extracts full filepath for recent VMware Player VM images."; } sub getRefs { my %refs = ("VMware Player Homepage:" => "http://www.vmware.com/products/player/"); return %refs; } ############################################################ # pluginmain # ############################################################ sub pluginmain { # Declarations # my $class = shift; my $hive = shift; # Initialize # ::logMsg("Launching vmplayer v.".$VERSION); ::rptMsg("vmplayer v.".$VERSION); # 20110830 [fpi] + banner ::rptMsg("(".getHive().") ".getShortDescr()."\n"); # 20110830 [fpi] + banner my $reg = Parse::Win32Registry->new($hive); my $root_key = $reg->get_root_key; my $key; my $key_path = "Software\\VMware, Inc.\\VMware Player\\VMplayer\\Window position"; # If # VMware Player path exists # if ($key = $root_key->get_subkey($key_path)) { # Return # plugin name, registry key and last modified date # ::rptMsg("VMware Player"); ::rptMsg($key_path); ::rptMsg("LastWrite Time ".gmtime($key->get_timestamp())." (UTC)"); ::rptMsg(""); # Extract # all keys from VMware Player registry path # my @vals = $key->get_list_of_values(); # If # registry keys exist in path # if (scalar(@vals) > 0) { # Extract # all key names+values for VMware Player registry path # foreach my $v (@vals) { ::rptMsg($v->get_name()." -> ".$v->get_data()); } # Error # key value is null # } else { ::rptMsg($key_path." has no values."); } # Error # VMware Player isn't here, try another castle # } else { ::rptMsg($key_path." not found."); ::logMsg($key_path." not found."); } # Return # obligatory new-line # ::rptMsg(""); } # Error # oh snap! # 1;
dgrove727/autopsy
thirdparty/rr-full/plugins/vmplayer.pl
Perl
apache-2.0
2,549
package URI::ssh; require URI::_login; @ISA=qw(URI::_login); # ssh://[USER@]HOST[:PORT]/SRC sub default_port { 22 } sub secure { 1 } 1;
Dokaponteam/ITF_Project
xampp/perl/vendor/lib/URI/ssh.pm
Perl
mit
140
#!/usr/bin/perl -w print "Username: "; $username = <STDIN>; print "Password: "; $password = <STDIN>; chomp $username; chomp $password; if (!open(FILE, "<users/$username.password")) { print "Username invalid\n"; } else { $real_password = <FILE>; chomp $real_password; if ($real_password eq $password) { print "Pls visit my shop.\n"; } else { print "Password invalid\n"; } close(FILE); }
Cyberbully/COMP2041-15s2
tut/9thu/login.pl
Perl
mit
434
package HTML; use URI; use URI::QueryParam; sub New { my $ClassName = shift; my $Self = shift; bless $Self, $ClassName; return $Self; } sub Hash2Query { my ($Self, $Hash) = @_; my $URI = URI->new; $URI->query_form_hash($Hash); return $URI->query; } sub HyperLink { my ($Self, $Attr) = @_; return qq!<a class="$Attr->{Class}" href="?$Attr->{HREF}">$Attr->{Text}</a>\n!; } sub NodeLink { my ($Self, $Attr) = @_; my $Node; my $Arrow; if (defined($Attr->{Parent})) { $Node = $Attr->{Parent}; $Arrow = '&uarr;'; } elsif (defined($Attr->{Child})) { $Node = $Attr->{Child}; $Arrow = '&darr;'; } elsif (defined($Attr->{Node})) { $Node = $Attr->{Node}; $Arrow = '&rarr;'; } my $HREF = $Self->Hash2Query({ FilterSchema => $Node->{schema} || $Self->{Params}->{FilterSchema}, FilterTable => $Node->{table} || $Self->{Params}->{FilterTable}, FilterColumn => $Node->{column} || $Self->{Params}->{FilterColumn}, FilterValue => $Node->{value} || $Self->{Params}->{FilterValue}, ShowUniqueNamesForIDs => $Self->{Params}->{ShowUniqueNamesForIDs} }); if ($Attr->{Type} eq 'TABLE') { return $Self->HyperLink({ HREF => $HREF, Text => ($Node->{schema} eq 'public' ? '' : $Node->{schema} . '.') . $Node->{table} . '.' . $Node->{column}, Class => $Attr->{Class} }); } elsif ($Attr->{Type} eq 'VALUE' && $Self->{Params}->{ShowUniqueNamesForIDs} eq '1' && defined($Node->{label})) { return $Self->HyperLink({ HREF => $HREF, Text => $Node->{label}, Class => $Attr->{Class} }); } return $Self->HyperLink({ HREF => $HREF, Text => $Arrow . $Node->{value}, Class => $Attr->{Class} }); } sub Select { my ($Self, $Attr) = @_; my $HTML = qq! <select name="$Attr->{Name}" ! . ($Attr->{OnChangeSubmit} ? qq! onchange="document.getElementById('$Self->{FormID}').submit();"! : '') . qq!> <option value="$Attr->{DefaultValue}">$Attr->{DefaultText}</option> !; foreach my $Value (@{$Attr->{Options}}) { if ($Attr->{SelectedValue} eq $Value) { $HTML .= qq!<option selected="selected">$Value</option>\n!; } else { $HTML .= qq!<option>$Value</option>\n!; } } $HTML .= qq!</select>\n!; return $HTML; } sub Input { my ($Self, $Attr) = @_; my $HTML = ''; my $Dec; my $Inc; if (defined($Attr->{Increment}) && $Attr->{Value} =~ m/^\d+$/) { $Dec = ($Attr->{Value} - $Attr->{Increment}); if (defined($Attr->{Min}) && $Dec < $Attr->{Min}) { $Dec = undef; } $Inc = ($Attr->{Value} + $Attr->{Increment}); if (defined($Attr->{Max}) && $Inc > $Attr->{Max}) { $Inc = undef; } } if (defined($Dec)) { $HTML .= qq!<input type="button" onClick="document.getElementById('$Attr->{Name}').value = '$Dec'; document.getElementById('$Self->{FormID}').submit();" value="$Dec"/>\n!; } $HTML .= qq!<input id="$Attr->{Name}" name="$Attr->{Name}" value="$Attr->{Value}"/>\n!; if (defined($Inc)) { $HTML .= qq!<input type="button" onClick="document.getElementById('$Attr->{Name}').value = '$Inc'; document.getElementById('$Self->{FormID}').submit();" value="$Inc"/>\n!; } return $HTML; } sub Table { my ($Self, $Rows) = @_; my $HTML = ''; $HTML .= qq!<div class="table">\n!; my $HeaderRow = shift @$Rows; $HTML .= $Self->RowHeader(join('',@$HeaderRow)); foreach my $Row (@$Rows) { $HTML .= $Self->Row(join('',@$Row)); } $HTML .= qq!</div>\n!; return $HTML; } sub Row { my ($Self, $InnerHTML) = @_; return qq!<div class="row">$InnerHTML</div>\n!; } sub RowHeader { my ($Self, $InnerHTML) = @_; return qq!<div class="row header blue">$InnerHTML</div>\n!; } sub Cell { my ($Self, $Attr, $Classes) = @_; my $Column = $Attr->{Column}; my $Value = $Attr->{Value}; my $Label = $Attr->{Label}; my $InnerHTML = $Attr->{InnerHTML}; my $Classes = $Attr->{Classes} || []; my $HTML = ''; my $ID; if (!defined($Self->{CellIDs}->{$Column})) { $Self->{CellIDs}->{$Column} = 0; $ID = "column-$Column"; if ($Self->{Params}->{FilterColumn} eq $Column && defined($Self->{Params}->{FilterValue})) { push @$Classes, 'blink_me'; } } else { $Self->{CellIDs}->{$Column}++; $ID = "column-$Column-row-$Self->{CellIDs}->{$Column}"; } if ($Attr->{Collapse}) { push @$Classes, 'collapse'; push @$Classes, 'link'; my $ID = ++$Self->{CollapseCellID}; $HTML .= qq!<div id="$ID" class="cell">\n!; $HTML .= qq!<label class="! . join(' ',@$Classes) . qq!" for="cell-$ID">$Label</label>\n!; $HTML .= qq!<input id="cell-$ID" type="checkbox" checked/>\n!; $HTML .= qq!<div>\n$InnerHTML\n</div>\n!; $HTML .= qq!</div>\n!; } else { unshift @$Classes, 'cell'; $HTML .= qq!<div id="$ID" class="! . join(' ',@$Classes) . qq!">$InnerHTML</div>\n!; } return $HTML; } sub TextCell { my ($Self, $Attr) = @_; my $Text = $Attr->{Value}; my $Classes = []; if (!defined($Text)) { push @$Classes, 'null'; $Text = 'NULL'; } elsif (length($Text) > 80) { $Text =~ s!^(.{40}).*?(.{40})$!$1...$2!s; push @$Classes, 'truncated'; } return $Self->Cell({Column => $Attr->{Column}, Value => $Attr->{Value}, InnerHTML => $Text, Classes => $Classes}); } sub Cells { my ($Self, $Values) = @_; my $Cells = []; foreach my $Value (@$Values) { push @$Cells, $Self->Cell({Column => $Value, Value => $Value, InnerHTML => $Value}); } return $Cells; } sub Submit { my ($Self, $Attr) = @_; return qq!<input type="submit" value="$Attr->{Value}"/>\n!; } sub Body { my ($Self, $InnerHTML) = @_; return qq!<body translate="no" onload="OnLoadHandler();">$InnerHTML</form>\n!; } sub Head { my ($Self, $Attr) = @_; return qq! <head> <meta charset="UTF-8" /> <meta http-equiv="Content-language" content="en"> <style type="text/css">$Attr->{CSS}</style> </head> !; } sub HTML { my ($Self, $InnerHTML) = @_; return qq!<html>\n$InnerHTML\n</html>!; } sub Form { my ($Self, $InnerHTML) = @_; return qq!<form id="$Self->{FormID}">\n$InnerHTML\n</form>\n!; } sub SetValueButton { my ($Self, $Attr) = @_; my $HTML = ''; $HTML .= qq!<input type="button" onClick="document.getElementById('$Attr->{Name}').value = '$Attr->{Value}'; document.getElementById('$Self->{FormID}').submit();" value="$Attr->{Text}"/>\n!; } sub ToggleButton { my ($Self, $Attr) = @_; my $HTML = ''; my $CurValue = $Self->{Params}->{$Attr->{Name}} || '0'; my $InvValue = $CurValue eq '1' ? '0' : '1'; my $ButtonText = $CurValue eq '1' ? $Attr->{OnButton} : $Attr->{OffButton}; $HTML .= qq!<input type="hidden" name="$Attr->{Name}" id="$Attr->{Name}" value="$CurValue" />\n!; $HTML .= qq!<input type="button" onClick="document.getElementById('$Attr->{Name}').value = '$InvValue'; document.getElementById('$Self->{FormID}').submit();" value="$ButtonText"/>\n!; return $HTML; } sub Menu { my ($Self, $Elements) = @_; my $HTML = ''; $HTML .= qq!<div class="menu">\n!; foreach my $InnerHTML (@$Elements) { $HTML .= qq!<div class="cell">\n$InnerHTML\n</div>\n!; } $HTML .= qq!</div>\n!; return $HTML; } 1;
joelonsql/pgselector
HTML.pm
Perl
mit
7,768
:- use_module(library(clpfd)). rainhas([], []). % Predicado para caso geral rainhas(A, B) :- append([], A, Bcp), length(A, T), foreach(member(X, A), X =< T) -> % Testa se todas as posições passadas por parâmtro respeita o tamanho do tabuleiro. ( salvo(Bcp) -> ( length(A, X), write('Posições Válidas!'), nl, tabuleiro(A, X, A) ); ( length(A, X), write('Posições Inválidas! (C - Rainha em conflito com outra, R - Rainha sem confilto)'),nl, tabuleiro(A, X, A) ) -> ( nl, write("POSSÍVEIS SOLUÇÕES:"), nl, procura_solucao(X, B) ) ); write("As posições das Rainhas no tabuleiro devem ser menor ou igual a "), length(A, T), write(T), nl. rainhas([]). % Predicado para 10 rainhas rainhas(S) :- length(S, T), T = 10 -> ( foreach(member(X, S), X =< T) -> % Testa se todas as posições passadas por parâmtro respeita o tamanho do tabuleiro. ( salvo(S) -> ( write('Posições Válidas!'), nl, tabuleiro(S, 10, S) ); ( write('Posições Inválidas! (C - Rainha em conflito com outra, R - Rainha sem confilto)'), nl, tabuleiro(S, 10, S), nl, write("POSSÍVEIS SOLUÇÕES:"), nl, procura_10() ) ); write("As posições das Rainhas no tabuleiro devem ser menor ou igual a "), length(S, T), write(T), nl ); write("Predicado válido somente para 10 rainhas. Você passou como parâmetro uma lista com "), length(S, T), write(T), write(' rainhas!'), nl. procura_solucao(N, L) :- % Procura solução para o predicado geral quando falha, utilizando a abordagem CLP(FD) length(L, N), L ins 1..N, %domain(L, 1, N), salvo(L), labeling([], L), nl, write('Representação em Tabuleiro:'), nl, tabuleiro(L, N), write('Representação em Lista:'). procura_10() :- % Procura solução para o predicado de 10 rainhas quando falha, utilizando a abordagem CLP(FD) length(L, 10), L ins 1..10, %domain(L, 1, N), salvo(L), labeling([], L), nl, write('Representação em Tabuleiro:'), nl, tabuleiro(L, 10), write('Representação em Lista:'), nl, write('Rainhas = '), write(L). salvo([]). salvo([X|Xs]) :- salvo_entre(X, Xs, 1), salvo(Xs). salvo_entre(X, [], M). salvo_entre(X, [Y|Ys], M) :- teste_ataque(X, Y, M), M1 is M+1, salvo_entre(X, Ys, M1). teste_ataque(X, Y, N) :- % Verifica o conflito entre as rainhas na mesma coluna e nas Diagonais X #\= Y, % Coluna X+N #\= Y, % Diagonal X-N #\= Y. % Diagonal tabuleiro([], _, []). % Predicado utilizado para imprimir o tabuleiro no caso de conflito. tabuleiro([L|List], Number, Bcp):- append(R, List, Bcp), reverso(R, Reverse, []), % Reverse contém a lista Complemento de List de trás para frente [H|T] = Reverse, % H é o primeiro elemento de Reverse, e T é o resto da lista salvo_entre(L, List, 1), salvo_entre(H, T, 1) -> ( % Verifica Conflitos da coluna pra cima e da coluna pra baixo imprime_comeco(L, Number, 0), nl, tabuleiro(List, Number, Bcp) ); ( imprime_comeco(L, Number, 1), nl, tabuleiro(List, Number, Bcp) ); true. tabuleiro([], _). % Predicado utilizado para imprimir o tabuleiro no caso sem conflitos. tabuleiro([L|List], Number):- imprime_comeco(L, Number, 0), nl, tabuleiro(List, Number). imprime_comeco(Num, Control, Type):- % Função que imprime uma fileira do tabuleiro de Xadrez até a posição da Rainha decx(Var, Num), tab(4), foreach(between(1, Var, _), write(' - ')), Type =:= 0 -> ( write(' R '), imprime_fim(Num, Control) ); ( write(' C '), imprime_fim(Num, Control) ). imprime_fim(Num, Control):- % Função que imprime uma fileira do tabuleiro de Xadrez da posição da Rainha até a posição final incx(Var, Num), foreach(between(Var, Control, _), write(' - ')). incx(X1, X):- % Predicado para incrementar uma variável X1 is X+1. decx(X1, X):- % Predicado para decrementar uma variável X1 is X-1. reverso([], R, R). % Predicado para inverter uma lista uma variável reverso([H|T], R, Acc):- reverso(T, R, [H|Acc]). /* TESTES: CASO GERAL: ?- rainhas([1,2,3,4], Rainhas). ?- rainhas([1,4,2,5,3], Rainhas). ?- rainhas([2,4,6,1,3,5], Rainhas). ?- rainhas([1,6,2,3,5,4], Rainhas). ?- rainhas([1,6,2,3,5,9], Rainhas). 10-Rainhas: ?- rainhas([5,7,10,6,3,1,8,4,2,9]). ?- rainhas([5,7,10,6,3,1,8,4,2,8]). ?- rainhas([5,7,15,6,3,1,8,4,2,8]). ?- rainhas([5,7,7,6,3,1,8,4,2]). ?- rainhas([5,7,10,6,3,1,8,4,2,9,1]). ?- rainhas([5,7,10,6,10,1,8,4,2,9]). ?- rainhas([1,2,3,4,5,6,7,8,9,10]). ?- rainhas([10,9,8,7,6,5,4,3,2,1]). ?- rainhas([5,5,5,5,5,5,5,5,5,5]). */
pauloapanucci/n-queen-prolog
nqueens.pl
Perl
mit
4,830
sub showtime { print "Time 2: ", time, "\n"; } sub sum { print "(Sum 2) $_[0] + $_[1]\n"; return $_[0] + $_[1]; } sub distArg { print "DistArgs 2\n"; foreach(@_){ print "Arg: $_ \n"; } } sub squareAll { print "square all! (2)\n"; my @ret; foreach(@_){ print "$_ "; push (@ret, $_*$_); } print "\n"; return @ret; } #showtime #print soma(2,3), "\n"; #distArg(1,2,3);
hugombarreto/CPlusPerl
docs/example1Perl2.pl
Perl
mit
391
# slimrat - Magaupload plugin # # Copyright (c) 2009 Přemek Vyhnal # # This file is part of slimrat, an open-source Perl scripted # command line and GUI utility for downloading files from # several download providers. # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, # copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following # conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # # Authors: # Přemek Vyhnal <premysl.vyhnal gmail com> # # # Configuration # # Package name package Megaupload; # Extend Plugin @ISA = qw(Plugin); # Packages use WWW::Mechanize; # Custom packages use Log; use Toolbox; use Configuration; # Write nicely use strict; use warnings; # # Routines # # Constructor sub new { my $self = {}; $self->{CONF} = $_[1]; $self->{URL} = $_[2]; $self->{MECH} = $_[3]; bless($self); $self->{CONF}->set_default("username", undef); $self->{CONF}->set_default("password", undef); $self->{PRIMARY} = $self->{MECH}->get($self->{URL}); die("primary page error, ", $self->{PRIMARY}->status_line) unless ($self->{PRIMARY}->is_success); dump_add(data => $self->{MECH}->content()); if(defined($self->{CONF}->get("username")) and defined($self->{CONF}->get("password"))) { debug("login as ", $self->{CONF}->get("username")); $self->{MECH}->post('http://www.megaupload.com', {'login'=>1, 'username'=> $self->{CONF}->get("username"), 'password'=> $self->{CONF}->get("password") }); } return $self; } # Plugin name sub get_name { return "MegaUpload"; } # Filename sub get_filename { my $self = shift; return $1 if ($self->{PRIMARY}->decoded_content =~ m/"down_txt2">([^<]+)/); } # Filesize sub get_filesize { my $self = shift; return readable2bytes($1) if ($self->{PRIMARY}->decoded_content =~ m/File size:<\/strong>\s*([^<]+)/); } # Check if the link is alive sub check { my $self = shift; $_ = $self->{PRIMARY}->decoded_content; return -1 if (m#link you have clicked is not available|This file has expired#); return 1 if(m#id="downloadlink"|filepassword#); return 0; } # Download data sub get_data_loop { # Input data my $self = shift; my $data_processor = shift; my $captcha_processor = shift; my $message_processor = shift; my $headers = shift; # Unavailable if ($self->{MECH}->content() =~ m/temporarily unavailable/) { &$message_processor("The file you are trying to access is temporarily unavailable"); wait(60); $self->reload(); return 1; } # Get download url if ($self->{MECH}->content() =~ m#(?<=href=")([^"]+)(?=" class="down_butt1")#) { my $download = $1; return $self->{MECH}->request(HTTP::Request->new(GET => $download, $headers), $data_processor); } return; } # Amount of resources Plugin::provide(1); # Register the plugin Plugin::register("^[^/]+//((.*?)\.)?mega(upload|rotic|porn).com/"); 1;
pmcenery/slimrat-debian
src/plugins/Megaupload.pm
Perl
mit
3,720
package Syntax::Highlight::Engine::Simple::Perl; use strict; use warnings; use base qw(Syntax::Highlight::Engine::Simple); #use version; our $VERSION = '0.02'; ### ---------------------------------------------------------------------------- ### set syntax ### ---------------------------------------------------------------------------- sub setSyntax { shift->{syntax} = [ { class => 'quote', regexp => '(?<!\w)qw\(.*?(?<!\\\\)\)', }, { class => 'quote', regexp => '(?<!\w)q(\W).*?(?<!\\\\)\1', }, { class => 'quote', regexp => q@'.*?(?<!\\\\)'@, }, { class => 'wquote', regexp => '(?<!\w)qq(\W).*?(?<!\\\\)\1', }, { class => 'wquote', regexp => q@".*?(?<!\\\\)"@, }, { class => 'comment', regexp => '(?m)#+.*?$', }, { class => 'variable', regexp => '[\$\@\%][\w\d:]+', }, { class => 'function', regexp => '\&[\w\d:]+', }, { class => 'method', regexp => '(?<=->)[\w\d:]+', }, { class => 'number', regexp => '\b\d+\b', }, { class => 'keyword', regexp => __PACKAGE__->array2regexp(&getStatementKeywords()), }, { class => 'keyword', regexp => __PACKAGE__->array2regexp(&getKeywords()), }, { class => 'regexp_statement', regexp => '(?<=(?<![\w$&])(?:s|m|y))([^\w\d\s]).+?\1.+\1', }, { class => 'regexp_statement', regexp => '(?<=(?<![\w$&])(?:tr))([^\w\d\s]).+?\1.+\1', }, { class => 'regexp_statement', regexp => '/.+?/', }, { class => 'perlpod', regexp => '(?sm)^=.+?(^=cut$)', }, { class => 'keyword2', regexp => '(?m)^=.+$', container => 'perlpod', }, { class => 'statement', regexp => '(?m)^=\w+', container => 'keyword2', }, ]; } sub getStatementKeywords { return ( 'continue', 'foreach', 'require', 'package', 'scalar', 'format', 'unless', 'local', 'until', 'while', 'elsif', 'next', 'last', 'goto', 'else', 'redo', 'sub', 'for', 'use', 'our', 'no', 'if', 'my', 'qr', 'qx', # 'qq', # 'qw', # 'tr', # 'm', # 'q', # 's', # 'y' ); } sub getKeywords { return ( 'getprotobynumber', 'getprotobyname', 'gethostbyaddr', 'gethostbyname', 'getservbyname', 'getservbyport', 'getnetbyaddr', 'getnetbyname', 'endprotoent', 'getpeername', 'getpriority', 'getprotoent', 'getsockname', 'setpriority', 'setprotoent', 'endhostent', 'endservent', 'gethostent', 'getservent', 'getsockopt', 'sethostent', 'setservent', 'setsockopt', 'socketpair', 'endnetent', 'getnetent', 'localtime', 'prototype', 'quotemeta', 'rewinddir', 'setnetent', 'wantarray', 'closedir', 'dbmclose', 'endgrent', 'endpwent', 'formline', 'getgrent', 'getgrgid', 'getgrnam', 'getlogin', 'getpwent', 'getpwnam', 'getpwuid', 'readline', 'readlink', 'readpipe', 'setgrent', 'setpwent', 'shmwrite', 'shutdown', 'syswrite', 'truncate', 'binmode', 'connect', 'dbmopen', 'defined', 'getpgrp', 'getppid', 'lcfirst', 'opendir', 'readdir', 'reverse', 'seekdir', 'setpgrp', 'shmread', 'sprintf', 'symlink', 'syscall', 'sysopen', 'sysread', 'sysseek', 'telldir', 'ucfirst', 'unshift', 'waitpid', 'accept', 'caller', 'chroot', 'delete', 'exists', 'fileno', 'gmtime', 'import', 'length', 'listen', 'msgctl', 'msgget', 'msgrcv', 'msgsnd', 'printf', 'rename', 'return', 'rindex', 'select', 'semctl', 'semget', 'shmctl', 'shmget', 'socket', 'splice', 'substr', 'system', 'unlink', 'unpack', 'values', 'alarm', 'atan2', 'bless', 'break', 'chdir', 'chmod', 'chomp', 'chown', 'close', 'crypt', 'fcntl', 'flock', 'index', 'ioctl', 'lstat', 'mkdir', 'print', 'reset', 'rmdir', 'semop', 'shift', 'sleep', 'split', 'srand', 'study', 'times', 'umask', 'undef', 'untie', 'utime', 'write', 'bind', 'chop', 'dump', 'each', 'eval', 'exec', 'exit', 'fork', 'getc', 'glob', 'grep', 'join', 'keys', 'kill', 'link', 'open', 'pack', 'pipe', 'push', 'rand', 'read', 'recv', 'seek', 'send', 'sort', 'sqrt', 'stat', 'tell', 'tied', 'time', 'wait', 'warn', 'abs', 'chr', 'cos', 'die', 'eof', 'exp', 'hex', 'int', 'log', 'map', 'oct', 'ord', 'pop', 'pos', 'ref', 'sin', 'tie', 'do', 'vec', 'lc', 'uc', ); } return 1; __END__ =head1 NAME Syntax::Highlight::Engine::Simple::Perl - (EXPERIMENTAL) Perl code highlighting class =head1 VERSION This document describes Syntax::Highlight::Engine::Simple::Perl version 0.0.1 =head1 SYNOPSIS Constractor use Syntax::Highlight::Engine::Simple::Perl; $highlighter = Syntax::Highlight::Engine::Simple::Perl->new(); or use Syntax::Highlight::Engine::Simple; $highlighter = Syntax::Highlight::Engine::Simple->new(type => 'Perl'); Highlighting stage $highlighter->doStr( str => $str, tab_width => 4); $highlighter->doFile( str => $str, tab_width => 4, encode => 'utf8'); =head1 DESCRIPTION This is a sub class of Syntax::Highlight::Engine::Simple. A working example of This module is at bellow. http://jamadam.com/dev/cpan/demo/Syntax/Highlight/Engine/Simple/ =head1 INTERFACE =head2 new =over =item type File type. This argument causes specific sub class to be loaded. =back =head2 setParams =over =item html_escape_code_ref HTML escape code ref. Default subroutine escapes 3 charactors '&', '<' and '>'. =back =head2 appendSyntax Append syntax by giving a hash. =over $highlighter->setSyntax( syntax => { class => 'quote', regexp => "'.*?'", container => 'comment', } ); =back =head2 doStr Highlighting strings. $highlighter->doStr( str => $str, tab_width => 4 ); =over =item str String. =item tab_width Tab width for tab-space conversion. -1 for disable it. -1 is the defult. =back =head2 doFile Highlighting files. $highlighter->doStr( str => $str, tab_width => 4, encode => 'utf8' ); =over =item file File name. =item tab_width Tab width for tab-space conversion. -1 for disable it. -1 is the defult. =item encode Set the encode of file. utf8 is the default. =back =head2 array2regexp This is a utility method for converting string array to regular expression. =over =back =head2 getClassNames Returns the class names in array. =over =back =head2 setSyntax This is a method for initializing the syntax. It is called by constractor so you may not have to call it manually. =head2 getKeywords Returns Keyword array. =head2 getStatementKeywords Returns Perl Statement Keyword array. =head1 Example Here is a sample of CSS. pre.program_code span.keyword {color: #00f} pre.program_code span.keyword2 {color: #808} pre.program_code span.number {color: #f00} pre.program_code span.identifier {color: #a66} pre.program_code span.function {color: #a66; text-decoration: underline} pre.program_code span.method {color: #a66; text-decoration: underline} pre.program_code span.variable {color: #f80} pre.program_code span.statement {color: #00f} pre.program_code span.comment {color: #080} pre.program_code span.perlpod {color: #080} pre.program_code span.quote {color: #a66} pre.program_code span.wquote {color: #600} pre.program_code span.value {color: #a66} pre.program_code span.regexp_statement {background: #ffa} pre.program_code span.tag {color: #00f} pre.program_code span.url {color: #00f; text-decoration: underline} =head1 DIAGNOSTICS =over =item C<< doStr method got undefined value >> =item C<< File open failed >> =back =head1 CONFIGURATION AND ENVIRONMENT Syntax::Highlight::Engine::Simple::Perl requires no configuration files or environment variables. Specific language syntax can be defined with sub classes and loaded in constractor if you give it the type argument. =head1 DEPENDENCIES =over =item UNIVERSAL::require =item Syntax::Highlight::Engine::Simple =back =head1 INCOMPATIBILITIES None reported. =head1 BUGS AND LIMITATIONS No bugs have been reported. Please report any bugs or feature requests to C<bug-syntax-highlight-engine-Simple@rt.cpan.org>, or through the web interface at L<http://rt.cpan.org>. =head1 SEE ALSO =over =item L<Syntax::Highlight::Engine::Simple> =back =head1 AUTHOR Sugama Keita C<< <sugama@jamadam.com> >> =head1 LICENCE AND COPYRIGHT Copyright (c) 2008, Sugama Keita C<< <sugama@jamadam.com> >>. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See I<perlartistic>. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =cut
haakonsk/O2-Framework
lib/O2/Util/ExternalModule/lib/Syntax/Highlight/Engine/Simple/Perl.pm
Perl
mit
10,056
#!/usr/bin/perl use warnings; use strict; use v5.14; use File::Copy; use Test::More; use IsKernel::CandyAntivirus::Configuration; use constant DEFAULT_VIRUS_SIGNATURES_PATH => "../../TestFiles/test_xvirsig.cfg"; use constant DEFAULT_QUARANTINE_PATH => "../../TestFiles/TestQuarantine/"; use constant DEFAULT_WORKING_DIRECTORY_PATH => "../../TestFiles/"; use constant DEFAULT_PATH_TO_LOG => "../../TestFiles/test_log"; use constant DEFAULT_PATH_TO_QUARANTINE_LOG => "../../TestFiles/test_qlog"; use constant DEFAULT_EXTENSIONS => "all"; use constant DEFAULT_VIRUS_DETECTED_OPTION => "AskUser"; use constant DEFAULT_LINK_TO_WWW_DATABASE => "http://www.nlnetlabs.nl/downloads/antivirus/antivirus/virussignatures.strings"; use constant DEFAULT_NEW_VALUE => "default_new_value"; copy("../../TestFiles/default_test_config.cfg","../../TestFiles/test_config.cfg") or die "Copy failed: $!"; my $configuration = IsKernel::CandyAntivirus::Configuration->new("../../TestFiles/test_config.cfg"); ok($configuration->get_default_working_directory_path() eq DEFAULT_WORKING_DIRECTORY_PATH, "Configuration_GetDefaultWorkingDirectory_InitialConfiguration_IsRead"); ok($configuration->get_extensions_option() eq DEFAULT_EXTENSIONS, "Configuration_GetExtensionOption_InitialConfiguration_IsRead"); ok($configuration->get_path_to_log() eq DEFAULT_PATH_TO_LOG, "Configuration_GetPathToLog_InitialConfiguration_IsRead"); ok($configuration->get_path_to_quarantine_log() eq DEFAULT_PATH_TO_QUARANTINE_LOG, "Configuration_GetDefaultPathToQuarantineLog_InitialConfiguration_IsRead"); ok($configuration->get_path_to_www_database() eq DEFAULT_LINK_TO_WWW_DATABASE, "Configuration_GetPathToWwwDatabase_InitialConfiguration_IsRead"); ok($configuration->get_quarantine_path() eq DEFAULT_QUARANTINE_PATH, "Configuraton_GetQuarantinePath_InitialConfiguration_IsRead"); ok($configuration->get_virus_detected_option() eq DEFAULT_VIRUS_DETECTED_OPTION, "Configuration_GetVirusDetectedOption_InitialConfiguration_IsRead"); # $configuration->set_default_working_drectory(DEFAULT_NEW_VALUE); ok($configuration->get_default_working_directory_path() eq DEFAULT_NEW_VALUE, "Configuration_SetDefaultWorkingDirectory_NewConfiguration_IsSet"); $configuration->set_extension_option(DEFAULT_NEW_VALUE); ok($configuration->get_extensions_option() eq DEFAULT_NEW_VALUE, "Configuration_SetExtensionOption_NewConfiguration_IsSet"); $configuration->set_path_to_log(DEFAULT_NEW_VALUE); ok($configuration->get_path_to_log() eq DEFAULT_NEW_VALUE, "Configuration_SetPathToLog_NewConfiguration_IsSet"); $configuration->set_path_to_quarantine_log(DEFAULT_NEW_VALUE); ok($configuration->get_path_to_quarantine_log() eq DEFAULT_NEW_VALUE, "Configuration_SetPathToQuarantineLog_NewConfiguration_IsSet"); $configuration->set_path_to_www_database(DEFAULT_NEW_VALUE); ok($configuration->get_path_to_www_database() eq DEFAULT_NEW_VALUE, "Configuration_SetPathToWwwDatabase_NewConfiguration_IsSet"); $configuration->set_quarantine_path(DEFAULT_NEW_VALUE); ok($configuration->get_quarantine_path() eq DEFAULT_NEW_VALUE, "Configuraton_SetQuarantinePath_InitialConfiguration_IsSet"); $configuration->set_virus_detected_option(DEFAULT_NEW_VALUE); ok($configuration->get_virus_detected_option() eq DEFAULT_NEW_VALUE, "Configuration_SetVirusDetectedOption_NewConfiguration_IsSet"); $configuration->set_virus_database_path(DEFAULT_NEW_VALUE); ok($configuration->get_virus_database_path() eq DEFAULT_NEW_VALUE, "Configuration_SetVirusDatabasePath_NewConfiguration_IsSet"); $configuration->save_settings(); $configuration->load(); my $condition = (($configuration->get_default_working_directory_path() eq DEFAULT_NEW_VALUE) && ($configuration->get_extensions_option() eq DEFAULT_NEW_VALUE) && ($configuration->get_path_to_log() eq DEFAULT_NEW_VALUE) && ($configuration->get_path_to_quarantine_log() eq DEFAULT_NEW_VALUE) && ($configuration->get_path_to_www_database() eq DEFAULT_NEW_VALUE) && ($configuration->get_quarantine_path() eq DEFAULT_NEW_VALUE) && ($configuration->get_virus_detected_option() eq DEFAULT_NEW_VALUE) && ($configuration->get_virus_database_path() eq DEFAULT_NEW_VALUE)); ok($condition == 1, "Configuration_SaveSettings_NewConfiguration_WasSaved"); done_testing();
iskernel/candy-antivirus
test/IsKernel/CandyAntivirus/ConfigurationTests.pl
Perl
mit
4,330
# vi:sw=2 package # Hide from PAUSE types; use strictures 2; use base 'Exporter'; our @EXPORT_OK = qw( types_test ); use DDP; use Test2::V0 qw( subtest like cmp_ok ); # E item object array bag hash subtest skip_all number is match call field # end use DBIx::Class::Sims::Runner; use DBIx::Class::Sims::Types; sub types_test ($$) { my ($name, $opts) = @_; $opts->{type} //= $name; my $sub = DBIx::Class::Sims::Types->can($opts->{type}); subtest $name => sub { my $spec = {}; my $iters = 100; my $tries = 10; foreach my $test ( @{$opts->{tests}} ) { # q.v. the comment in DBIx::Class::Sims::Column where ::Random is imported # for why this test helper creates a fake $column object. my $column = bless { predictable_values => 0 }, 'DBIx::Class::Sims::Column'; $test->[0]{sim} = { type => $opts->{type} }; for (1 .. $iters) { my $v = $sub->($test->[0], $spec, $column); next unless like( $v, $test->[1] ); $spec->{addl_check}->($v) if exists $spec->{addl_check}; } next unless $test->[2]; my $successes = 0; for ( 1.. $tries ) { my $v = $sub->($test->[0], $spec, $column); $successes += 1 if $v eq $test->[2]; } cmp_ok( $successes, '<', $tries, "if predictable_values is not set, don't get the same value" ); $column->{predictable_values} = 1; for ( 1 .. $tries ) { cmp_ok( $sub->($test->[0], $spec, $column), 'eq', $test->[2], "Test $_ for predictable_values", ); } } }; } 1;
robkinyon/dbix-class-sims
t/lib/types.pm
Perl
mit
1,601
=pod =head1 NAME X509_STORE_set_verify_cb_func, X509_STORE_set_verify_cb - set verification callback =head1 SYNOPSIS #include <openssl/x509_vfy.h> void X509_STORE_set_verify_cb(X509_STORE *st, int (*verify_cb)(int ok, X509_STORE_CTX *ctx)); void X509_STORE_set_verify_cb_func(X509_STORE *st, int (*verify_cb)(int ok, X509_STORE_CTX *ctx)); =head1 DESCRIPTION X509_STORE_set_verify_cb() sets the verification callback of B<ctx> to B<verify_cb> overwriting any existing callback. X509_STORE_set_verify_cb_func() also sets the verification callback but it is implemented as a macro. =head1 NOTES The verification callback from an B<X509_STORE> is inherited by the corresponding B<X509_STORE_CTX> structure when it is initialized. This can be used to set the verification callback when the B<X509_STORE_CTX> is otherwise inaccessible (for example during S/MIME verification). =head1 BUGS The macro version of this function was the only one available before OpenSSL 1.0.0. =head1 RETURN VALUES X509_STORE_set_verify_cb() and X509_STORE_set_verify_cb_func() do not return a value. =head1 SEE ALSO L<X509_STORE_CTX_set_verify_cb(3)> L<CMS_verify(3)> =head1 HISTORY X509_STORE_set_verify_cb_func() is available in all versions of SSLeay and OpenSSL. X509_STORE_set_verify_cb() was added to OpenSSL 1.0.0. =cut
vbloodv/blood
extern/openssl.orig/doc/crypto/X509_STORE_set_verify_cb_func.pod
Perl
mit
1,337
#!/usr/bin/perl -w use strict; use DBI; my $driver = "mysql"; my $dsn = "database=eveindustry"; my $username = "admin"; my $passwd = <stdin>; chomp $passwd; my $dbh = DBI->connect("dbi:$driver:$dsn", $username, $passwd, { AutoCommit => 1 }) or die "Failed to connect to database: $DBI::errstr"; my $getkey = $dbh -> prepare("SHOW TABLES") or die ("SHOW TABLES failed: $DBI::errstr\n"); $getkey -> execute or die ("execute failed: $DBI::errstr\n"); print ("Tables in test database on localhost,\n"); while (my @row = $getkey->fetchrow) { print "@row\n"; }
Aidansavage/EVE-PI-tool
datatest.pl
Perl
mit
605
package test_BuildArea; use strict; use DevOps::BuildArea; use Paf::File::TempDir; use Paf::Platform::TestHost; use Paf::Platform::Task; use Paf::Platform::TaskSeries; 1; sub new { my $class=shift; my $self={}; bless $self, $class; $self->{tmpdir}=Paf::File::TempDir->new(); return $self; } sub tests { return qw(test_new_undef test_construct test_execute test_execute_sequence); } sub test_new_undef { my $self=shift; Paf::TestSuite::assert_throw("DevOps::BuildArea->new()"); Paf::TestSuite::assert_throw("DevOps::BuildArea->new(undef)"); Paf::TestSuite::assert_throw("DevOps::BuildArea->new('')"); } sub test_construct { my $self=shift; my $tmpdir=$self->{tmpdir}; my $build_area=DevOps::BuildArea->new($tmpdir->dir()); # -- check the build area is constructed my $dir=$tmpdir->dir()."/info"; die("expecting to find $dir"), unless ( -d $dir ); $dir=$tmpdir->dir()."/work"; die("expecting to find $dir"), unless ( -d $dir ); # -- check build location my $loc=$build_area->work_location(); die("expecting $dir, got ", $loc), if( $loc ne $dir ); # -- check install location $loc=$build_area->install_location(); $dir=$tmpdir->dir()."/install"; die("expecting $dir, got ", $loc), if( $loc ne $dir ); # -- last_task on new area die("expecting undef"), if($build_area->last_task()); } sub test_execute { my $self=shift; my $tmpdir=$self->{tmpdir}; my $platform=new Paf::Platform::TestHost; my $task_name="good_task"; { my $build_area=DevOps::BuildArea->new($tmpdir->dir()); # -- good task my $task=new Paf::Platform::Task($platform); $task->add("hello world"); my $report=$build_area->execute($task_name, $task); die("not expecting has_failed"), if($report->has_failed()); die("expecting good return value"), unless( $report->return_value()==0 ); die("expecting last_task=good_task"), unless( $build_area->last_task() eq $task_name ); # -- repeat the task, this time errors out my $error_msg="I dies horribly"; $platform->error(3, $error_msg); $report=$build_area->execute($task_name, $task); die("expecting has_failed"), unless( $report->has_failed() ); die("expecting return value = 3"), unless( $report->return_value()==3 ); die("expecting last_task=good_task"), unless( $build_area->last_task() eq $task_name ); my $msg=join("", $report->error_messages()); die("expecting message = $error_msg, got ", $msg), unless( $msg eq $error_msg ); } # -- persistency test my $build_area=DevOps::BuildArea->new($tmpdir->dir()); die("expecting last_task=good_task"), unless( $build_area->last_task() eq $task_name ); my $report=$build_area->report($task_name); die("expecting report"), unless( defined $report ); die("expecting return value = 3"), unless( $report->return_value()==3 ); my $log_file=$build_area->log_file($task_name); die("expecting to find $log_file"), unless ( -f $log_file ); } sub test_execute_sequence { my $self=shift; my $tmpdir=$self->{tmpdir}; my $platform=new Paf::Platform::TestHost; my $task_name="good_task"; my $task=new Paf::Platform::Task($platform); my $cmd="hello world"; $task->add($cmd); { my $build_area=DevOps::BuildArea->new($tmpdir->dir()); my $ts=Paf::Platform::TaskSeries->new(); $ts->add_task("task_name",$task); my $report=$build_area->execute_sequence("test", $ts); die("not expecting has_failed"), if($report->has_failed()); die("expecting good return value"), unless( $report->return_value()==0 ); my $executed=join("",$platform->executed_commands()); die("expecting $cmd got $executed"), unless $cmd eq $executed; } # persistency between calls my $build_area=DevOps::BuildArea->new($tmpdir->dir()); my $ts=Paf::Platform::TaskSeries->new(); $ts->add_task("task_name",$task); my $report=$build_area->execute_sequence("test", $ts); die("not expecting has_failed"), if($report->has_failed()); die("expecting good return value"), unless( $report->return_value()==0 ); }
chrisjwilliams/devops
DevOps/test/test_BuildArea.pm
Perl
mit
4,250
package App::Settings::Test; use Prophet::Util; use warnings; use strict; use base qw(Prophet::Test Exporter); use lib 't/Settings/lib'; use App::Settings::CLI; our @EXPORT = qw/as_alice as_bob diag run_command like ok repo_uri_for replica_uuid/; Prophet::Test->import; $Prophet::Test::CLI_CLASS = 'App::Settings::CLI'; 1;
gitpan/Prophet
t/Settings/lib/App/Settings/Test.pm
Perl
mit
332
#!/usr/bin/perl use strict; use warnings; use Getopt::Long; my $ram = 20; my $ncore = 25; my $config = '/home/biotools/tri-scripts/pipeline_general_config.pl'; my ($BASE_NAME, $GVCF_LIST); my $FOLDER = ''; our $logfile = 'log.txt'; # Get command line arguments GetOptions('conf=s' => \$config, 'log=s' => \$logfile, 'mem=s' => \$ram, 'thread=s' => \$ncore, 'gvcflist=s' => \$GVCF_LIST, 'outfolder=s' => \$FOLDER, 'prefix=s' => \$BASE_NAME); if (not defined $BASE_NAME) { die("Please supply a case annotation prefix (example: GC001-PPROJECT-ALPHA)"); } if (not defined $GVCF_LIST) { die("Please supply a file that contains all resulting .g.vcf files"); } my ($strand_1, $strand_2) = @ARGV; # Load config file require $config; our ($SAMTOOLS, $PICARD, $GATK, $BWA, $VEP, $MAF_SELECTOR, $MAF_EXTRACTOR, $MAPQLASSIFY); our ($HG_REF, $MSE_REF, $SNP1000, $DBSNP, $MILLS, $INDEL1000, $VEP_CACHE, $TARGET_REGIONS_CHR); our (@mouse_chrs, @human_chrs); # Variables my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); my $DTST = sprintf("%04d%02d%02d", $year, $mon, $mday); my $RG = "\@RG\\tID:0\\tLB:Nextera_Rapid_Capture_Enrichment\\tPL:ILLUMINA-NextSeq500\\tPU:\@NS500768\\tSM:$BASE_NAME\\tCN:CTRAD-CSI_Singapore\\tDS:NIL\\tDT:$DTST"; $BASE_NAME = $FOLDER . $BASE_NAME; my $HU_BAMFILE = $BASE_NAME . ".human.bam"; my $HU_BAMFILE_IDX = $BASE_NAME . ".human.bam.bai"; my $HU_SORTED = $BASE_NAME . ".human.sorted.bam"; my $HU_METRICS_FILE = $BASE_NAME . ".human.metric"; my $HU_UNALNED = $BASE_NAME . ".human.unaligned.bam"; my $HU_REALGN = $BASE_NAME . ".human.realigned.bam"; my $HU_REC_TABLE = $BASE_NAME . ".human.recal.table"; my $HU_RECAL = $BASE_NAME . ".human.recalibrated.bam"; my $HU_RECAL_IDX = $BASE_NAME . ".human.recalibrated.bai"; my $HU_NAMESORTED = $BASE_NAME . ".human.namesorted.bam"; my $HU_SUBTRACTED_SAM = $BASE_NAME . ".human.subtracted.sam"; my $HU_SUBTRACTED_BAM = $BASE_NAME . ".human.subtracted.bam"; my $MSE_BAMFILE = $BASE_NAME . ".mouse.bam"; my $MSE_BAMFILE_IDX = $BASE_NAME . ".mouse.bam.bai"; my $MSE_SORTED = $BASE_NAME . ".mouse.sorted.bam"; my $MSE_METRICS_FILE = $BASE_NAME . ".mouse.metric"; my $MSE_UNALNED = $BASE_NAME . ".mouse.unaligned.bam"; my $MSE_REALGN = $BASE_NAME . ".mouse.realigned.bam"; my $MSE_REC_TABLE = $BASE_NAME . ".mouse.recal.table"; my $MSE_RECAL = $BASE_NAME . ".mouse.recalibrated.bam"; my $MSE_RECAL_IDX = $BASE_NAME . ".mouse.recalibrated.bai"; my $MSE_NAMESORTED = $BASE_NAME . ".mouse.namesorted.bam"; my $gvcf = $BASE_NAME . ".g.vcf"; my $forks = 0; my $smallbams = ""; my $smallidx = ""; my $tgtfiles = ""; # Pipeline starts here ########################################### # Align to HUMAN genome ########################################### printJobTitle("Alignment to Human genome"); system ( printJobTitle("$BWA mem -Mt$ncore -R '$RG' $HG_REF $strand_1 $strand_2 | samtools view -@ $ncore -Sb - > $HU_BAMFILE") ); system ( printJobTitle("$SAMTOOLS sort -T tmp -@ $ncore $HU_BAMFILE -o $HU_SORTED") ); system ( printJobTitle("java -Djava.io.tmpdir=\"/tmp\" -Xmx$ram" . "g -jar $PICARD MarkDuplicates I=$HU_SORTED O=$HU_BAMFILE METRICS_FILE=$HU_METRICS_FILE") ); system ( printJobTitle("$SAMTOOLS index $HU_BAMFILE && rm $HU_SORTED $HU_METRICS_FILE") ); printJobTitle("GATK Indel realignment"); system ( printJobTitle("$SAMTOOLS view -bf 4 $HU_BAMFILE > $HU_UNALNED") ); for my $chr ( @human_chrs ) { my $target_int = "${BASE_NAME}_chr$chr" . ".intervals "; my $realn_file = "${BASE_NAME}_chr$chr" . "_realigned.bam "; my $realn_idx = "${BASE_NAME}_chr$chr" . "_realigned.bai "; $smallbams .= $realn_file . " "; $smallidx .= $realn_idx . " "; $tgtfiles .= $target_int . " "; my $pid = fork; if (not defined $pid) { printJobTitle("Unable to run parallel, exiting..."); exit(1); } my $command = "java -Djava.io.tmpdir=\"/tmp\" -Xmx$ram" . "g -jar $GATK -T RealignerTargetCreator -R $HG_REF -I $HU_BAMFILE " . "-known $MILLS -known $INDEL1000 " . "-o $target_int -L chr$chr && " . "java -Djava.io.tmpdir=\"/tmp\" -Xmx$ram" . "g -jar $GATK -T IndelRealigner -R $HG_REF -I $HU_BAMFILE " . "-known $MILLS -known $INDEL1000 " . "-o $realn_file -L chr$chr -targetIntervals $target_int"; if ($pid) { printJobTitle( $command ); $forks++; } else { system ( $command ); exit; } } for (1 .. $forks) { wait(); } system( printJobTitle("$SAMTOOLS cat $smallbams $HU_UNALNED -o $HU_REALGN && " . "rm $HU_UNALNED $smallbams $tgtfiles $smallidx") ); system( printJobTitle("$SAMTOOLS sort -T tmp -@ $ncore $HU_REALGN -o $HU_BAMFILE && " . "rm $HU_REALGN") ); system( printJobTitle("$SAMTOOLS index $HU_BAMFILE") ); printJobTitle("Running Base Recalibration (BQSR)"); system( printJobTitle("java -Djava.io.tmpdir=\"/tmp\" -Xmx$ram" . "g -jar $GATK -T BaseRecalibrator -nct $ncore -R $HG_REF -I $HU_BAMFILE " . "-knownSites $MILLS -knownSites $INDEL1000 -knownSites $DBSNP " . "-o $HU_REC_TABLE ") ); system( printJobTitle("java -Djava.io.tmpdir=\"/tmp\" -Xmx$ram" . "g -jar $GATK -T PrintReads -nct $ncore -R $HG_REF -I $HU_BAMFILE " . "-BQSR $HU_REC_TABLE -o $HU_RECAL") ); printJobTitle("Sort by name for Mapqlassify"); system( printJobTitle("$SAMTOOLS sort -@ $ncore -nT tmp $HU_RECAL -o $HU_NAMESORTED") ); system( printJobTitle("$SAMTOOLS view -H $HU_RECAL > $HU_SUBTRACTED_SAM") ); system( printJobTitle("rm $HU_BAMFILE $HU_BAMFILE_IDX $HU_RECAL $HU_RECAL_IDX $HU_REC_TABLE") ); ########################################### # Align to MOUSE genome ########################################### printJobTitle("Alignment to Mouse genome"); system ( printJobTitle("$BWA mem -Mt$ncore -R '$RG' $MSE_REF $strand_1 $strand_2 | samtools view -@ $ncore -Sb - > $MSE_BAMFILE") ); system ( printJobTitle("$SAMTOOLS sort -T tmp -@ $ncore $MSE_BAMFILE -o $MSE_SORTED") ); system ( printJobTitle("java -Djava.io.tmpdir=\"/tmp\" -Xmx$ram" . "g -jar $PICARD MarkDuplicates I=$MSE_SORTED O=$MSE_BAMFILE METRICS_FILE=$MSE_METRICS_FILE") ); system ( printJobTitle("$SAMTOOLS index $MSE_BAMFILE") ); printJobTitle("GATK Indel realignment"); system ( printJobTitle("$SAMTOOLS view -bf 4 $MSE_BAMFILE > $MSE_UNALNED") ); $forks = 0; $smallbams = ""; $smallidx = ""; $tgtfiles = ""; for my $chr ( @mouse_chrs ) { my $target_int = "${BASE_NAME}_chr$chr" . ".intervals "; my $realn_file = "${BASE_NAME}_chr$chr" . "_realigned.bam "; my $realn_idx = "${BASE_NAME}_chr$chr" . "_realigned.bai "; $smallbams .= $realn_file . " "; $smallidx .= $realn_idx . " "; $tgtfiles .= $target_int . " "; my $pid = fork; if (not defined $pid) { printJobTitle("Unable to run parallel, exiting..."); exit(1); } my $command = "java -Djava.io.tmpdir=\"/tmp\" -Xmx$ram" . "g -jar $GATK -T RealignerTargetCreator -R $MSE_REF -I $MSE_BAMFILE " . "-o $target_int -L chr$chr && " . "java -Djava.io.tmpdir=\"/tmp\" -Xmx$ram" . "g -jar $GATK -T IndelRealigner -R $MSE_REF -I $MSE_BAMFILE " . "-o $realn_file -L chr$chr -targetIntervals $target_int"; if ($pid) { printJobTitle( $command ); $forks++; } else { system ( $command ); exit; } } for (1 .. $forks) { wait(); } system( printJobTitle("$SAMTOOLS cat $smallbams $MSE_UNALNED -o $MSE_REALGN && " . "rm $MSE_UNALNED $smallbams $tgtfiles $smallidx") ); system( printJobTitle("$SAMTOOLS sort -T tmp -@ $ncore $MSE_REALGN -o $MSE_BAMFILE && " . "rm $MSE_REALGN") ); system( printJobTitle("$SAMTOOLS index $MSE_BAMFILE") ); printJobTitle("Sort by name for Mapqlassify"); system( printJobTitle("$SAMTOOLS sort -@ $ncore -nT tmp $MSE_BAMFILE -o $MSE_NAMESORTED") ); system( printJobTitle("rm $MSE_BAMFILE $MSE_BAMFILE_IDX $MSE_METRICS_FILE $MSE_SORTED") ); ########################################### # Run MAPQLASSIFY ########################################### printJobTitle("Run MAPQLASSIFY on namesorted alignment files"); system( "bash -c '" . printJobTitle("$MAPQLASSIFY <($SAMTOOLS view $HU_NAMESORTED) <($SAMTOOLS view $MSE_NAMESORTED) -o $HU_SUBTRACTED_SAM ") . "'"); system ( printJobTitle("$SAMTOOLS sort -T tmp -@ $ncore $HU_SUBTRACTED_SAM -o $HU_SUBTRACTED_BAM") ); system ( printJobTitle("$SAMTOOLS index $HU_SUBTRACTED_BAM") ); ########################################### # Run HaplotypeCaller ########################################### printJobTitle("Running HaplotypeCaller by chromosomes"); my $allgvcfs = ""; my $alloutput = ""; my $alloutput_idx = ""; $forks = 0; for my $chr (@human_chrs) { my $target_reg = $TARGET_REGIONS_CHR . $chr . ".bed"; my $output = "haplotype.chr$chr" . ".g.vcf"; my $output_idx = "haplotype.chr$chr" . ".g.vcf.idx"; $allgvcfs .= " -V $output "; $alloutput .= " $output "; $alloutput_idx .= " $output_idx "; my $pid = fork; if (not defined $pid) { printJobTitle("Unable to run parallel, exiting..."); exit(1); } my $command = "java -Djava.io.tmpdir=\"/tmp\" -Xmx$ram" . "g -jar $GATK -T HaplotypeCaller -R $HG_REF -I $HU_SUBTRACTED_BAM -o $output -L $target_reg -ERC GVCF"; if ($pid) { printJobTitle( $command ); $forks++; } else { system ( $command ); exit; } } for (1 .. $forks) { wait(); } printJobTitle("Combining g.vcf files..."); system( printJobTitle("java -Djava.io.tmpdir=\"/tmp\" -Xmx$ram" . "g -cp $GATK org.broadinstitute.gatk.tools.CatVariants -R $HG_REF $allgvcfs -out $gvcf -assumeSorted") ); system( printJobTitle("rm $alloutput $alloutput_idx") ); open( OFILE, ">>$GVCF_LIST" ); print OFILE "$gvcf\n"; close( OFILE ); printJobTitle("Finished processing case $BASE_NAME");
tri-CSI/Bioinfo
projects/xenograft/pdx_mapqlassify.pl
Perl
cc0-1.0
10,018
package Paws::SSM::CommandInvocation; use Moose; has CommandId => (is => 'ro', isa => 'Str'); has CommandPlugins => (is => 'ro', isa => 'ArrayRef[Paws::SSM::CommandPlugin]'); has Comment => (is => 'ro', isa => 'Str'); has DocumentName => (is => 'ro', isa => 'Str'); has InstanceId => (is => 'ro', isa => 'Str'); has InstanceName => (is => 'ro', isa => 'Str'); has NotificationConfig => (is => 'ro', isa => 'Paws::SSM::NotificationConfig'); has RequestedDateTime => (is => 'ro', isa => 'Str'); has ServiceRole => (is => 'ro', isa => 'Str'); has StandardErrorUrl => (is => 'ro', isa => 'Str'); has StandardOutputUrl => (is => 'ro', isa => 'Str'); has Status => (is => 'ro', isa => 'Str'); has StatusDetails => (is => 'ro', isa => 'Str'); has TraceOutput => (is => 'ro', isa => 'Str'); 1; ### main pod documentation begin ### =head1 NAME Paws::SSM::CommandInvocation =head1 USAGE This class represents one of two things: =head3 Arguments in a call to a service Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. Each attribute should be used as a named argument in the calls that expect this type of object. As an example, if Att1 is expected to be a Paws::SSM::CommandInvocation object: $service_obj->Method(Att1 => { CommandId => $value, ..., TraceOutput => $value }); =head3 Results returned from an API call Use accessors for each attribute. If Att1 is expected to be an Paws::SSM::CommandInvocation object: $result = $service_obj->Method(...); $result->Att1->CommandId =head1 DESCRIPTION An invocation is copy of a command sent to a specific instance. A command can apply to one or more instances. A command invocation applies to one instance. For example, if a user executes SendCommand against three instances, then a command invocation is created for each requested instance ID. A command invocation returns status and detail information about a command you executed. =head1 ATTRIBUTES =head2 CommandId => Str The command against which this invocation was requested. =head2 CommandPlugins => ArrayRef[L<Paws::SSM::CommandPlugin>] =head2 Comment => Str User-specified information about the command, such as a brief description of what the command should do. =head2 DocumentName => Str The document name that was requested for execution. =head2 InstanceId => Str The instance ID in which this invocation was requested. =head2 InstanceName => Str The name of the invocation target. For Amazon EC2 instances this is the value for the aws:Name tag. For on-premises instances, this is the name of the instance. =head2 NotificationConfig => L<Paws::SSM::NotificationConfig> Configurations for sending notifications about command status changes on a per instance basis. =head2 RequestedDateTime => Str The time and date the request was sent to this instance. =head2 ServiceRole => Str The IAM service role that Run Command uses to act on your behalf when sending notifications about command status changes on a per instance basis. =head2 StandardErrorUrl => Str The URL to the plugin's StdErr file in Amazon S3, if the Amazon S3 bucket was defined for the parent command. For an invocation, StandardErrorUrl is populated if there is just one plugin defined for the command, and the Amazon S3 bucket was defined for the command. =head2 StandardOutputUrl => Str The URL to the plugin's StdOut file in Amazon S3, if the Amazon S3 bucket was defined for the parent command. For an invocation, StandardOutputUrl is populated if there is just one plugin defined for the command, and the Amazon S3 bucket was defined for the command. =head2 Status => Str Whether or not the invocation succeeded, failed, or is pending. =head2 StatusDetails => Str A detailed status of the command execution for each invocation (each instance targeted by the command). StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see Run Command Status. StatusDetails can be one of the following values: =over =item * Pending: The command has not been sent to the instance. =item * In Progress: The command has been sent to the instance but has not reached a terminal state. =item * Success: The execution of the command or plugin was successfully completed. This is a terminal state. =item * Delivery Timed Out: The command was not delivered to the instance before the delivery timeout expired. Delivery timeouts do not count against the parent command's MaxErrors limit, but they do contribute to whether the parent command status is Success or Incomplete. This is a terminal state. =item * Execution Timed Out: Command execution started on the instance, but the execution was not complete before the execution timeout expired. Execution timeouts count against the MaxErrors limit of the parent command. This is a terminal state. =item * Failed: The command was not successful on the instance. For a plugin, this indicates that the result code was not zero. For a command invocation, this indicates that the result code for one or more plugins was not zero. Invocation failures count against the MaxErrors limit of the parent command. This is a terminal state. =item * Canceled: The command was terminated before it was completed. This is a terminal state. =item * Undeliverable: The command can't be delivered to the instance. The instance might not exist or might not be responding. Undeliverable invocations don't count against the parent command's MaxErrors limit and don't contribute to whether the parent command status is Success or Incomplete. This is a terminal state. =item * Terminated: The parent command exceeded its MaxErrors limit and subsequent command invocations were canceled by the system. This is a terminal state. =back =head2 TraceOutput => Str Gets the trace output sent by the agent. =head1 SEE ALSO This class forms part of L<Paws>, describing an object used in L<Paws::SSM> =head1 BUGS and CONTRIBUTIONS The source code is located here: https://github.com/pplu/aws-sdk-perl Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues =cut
ioanrogers/aws-sdk-perl
auto-lib/Paws/SSM/CommandInvocation.pm
Perl
apache-2.0
6,324
package Google::Ads::AdWords::v201402::ConstantDataService::getMobileDeviceCriterionResponse; use strict; use warnings; { # BLOCK to scope variables sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201402' } __PACKAGE__->__set_name('getMobileDeviceCriterionResponse'); __PACKAGE__->__set_nillable(); __PACKAGE__->__set_minOccurs(); __PACKAGE__->__set_maxOccurs(); __PACKAGE__->__set_ref(); use base qw( SOAP::WSDL::XSD::Typelib::Element Google::Ads::SOAP::Typelib::ComplexType ); our $XML_ATTRIBUTE_CLASS; undef $XML_ATTRIBUTE_CLASS; sub __get_attr_class { return $XML_ATTRIBUTE_CLASS; } use Class::Std::Fast::Storable constructor => 'none'; use base qw(Google::Ads::SOAP::Typelib::ComplexType); { # BLOCK to scope variables my %rval_of :ATTR(:get<rval>); __PACKAGE__->_factory( [ qw( rval ) ], { 'rval' => \%rval_of, }, { 'rval' => 'Google::Ads::AdWords::v201402::MobileDevice', }, { 'rval' => 'rval', } ); } # end BLOCK } # end of BLOCK 1; =pod =head1 NAME Google::Ads::AdWords::v201402::ConstantDataService::getMobileDeviceCriterionResponse =head1 DESCRIPTION Perl data type class for the XML Schema defined element getMobileDeviceCriterionResponse from the namespace https://adwords.google.com/api/adwords/cm/v201402. =head1 PROPERTIES The following properties may be accessed using get_PROPERTY / set_PROPERTY methods: =over =item * rval $element->set_rval($data); $element->get_rval(); =back =head1 METHODS =head2 new my $element = Google::Ads::AdWords::v201402::ConstantDataService::getMobileDeviceCriterionResponse->new($data); Constructor. The following data structure may be passed to new(): { rval => $a_reference_to, # see Google::Ads::AdWords::v201402::MobileDevice }, =head1 AUTHOR Generated by SOAP::WSDL =cut
gitpan/GOOGLE-ADWORDS-PERL-CLIENT
lib/Google/Ads/AdWords/v201402/ConstantDataService/getMobileDeviceCriterionResponse.pm
Perl
apache-2.0
1,875
#!/usr/bin/perl use strict; use warnings; package DB::Replenishment; sub new { my $class = shift; my $self = { dbh => shift, replen_id => shift }; bless $self, $class; return $self; } sub get_beginning_datetime { my $self = shift; my $dbh = $self->{dbh}; my $replen_id = $self->{replen_id}; my $sth = $dbh->prepare("SELECT begin_datetime FROM Replenishments WHERE id = ?"); $sth->bind_param(1, $replen_id); if (!$sth->execute()) { die "get_beginning_datetime failed at execute!\n"; } my $beginning_datetime_str; my $beginning_datetime; ($beginning_datetime_str) = $sth->fetchrow_array(); if (!defined($beginning_datetime_str)) { return undef; } my $db_parser = DateTime::Format::DBI->new($dbh); $beginning_datetime = $db_parser->parse_datetime($beginning_datetime_str); return $beginning_datetime; } sub get_ending_datetime { my $self = shift; my $dbh = $self->{dbh}; my $replen_id = $self->{replen_id}; my $sth = $dbh->prepare("SELECT end_datetime FROM Replenishments WHERE id = ?"); $sth->bind_param(1, $replen_id); if (!$sth->execute()) { die "get_beginning_datetime failed at execute!\n"; } my $ending_datetime_str; my $ending_datetime; ($ending_datetime_str) = $sth->fetchrow_array(); if (!defined($ending_datetime_str)) { return undef; } my $db_parser = DateTime::Format::DBI->new($dbh); $ending_datetime = $db_parser->parse_datetime($ending_datetime_str); return $ending_datetime; } 1
nrusin/inventory
Source/DB/Replenishment.pm
Perl
apache-2.0
1,722
package Google::Ads::AdWords::v201809::UserStatus; use strict; use warnings; sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201809'}; # derivation by restriction use base qw( SOAP::WSDL::XSD::Typelib::Builtin::string); 1; __END__ =pod =head1 NAME =head1 DESCRIPTION Perl data type class for the XML Schema defined simpleType UserStatus from the namespace https://adwords.google.com/api/adwords/cm/v201809. Specified by user to pause or unpause a criterion. This clase is derived from SOAP::WSDL::XSD::Typelib::Builtin::string . SOAP::WSDL's schema implementation does not validate data, so you can use it exactly like it's base type. # Description of restrictions not implemented yet. =head1 METHODS =head2 new Constructor. =head2 get_value / set_value Getter and setter for the simpleType's value. =head1 OVERLOADING Depending on the simple type's base type, the following operations are overloaded Stringification Numerification Boolification Check L<SOAP::WSDL::XSD::Typelib::Builtin> for more information. =head1 AUTHOR Generated by SOAP::WSDL =cut
googleads/googleads-perl-lib
lib/Google/Ads/AdWords/v201809/UserStatus.pm
Perl
apache-2.0
1,109
# # Copyright 2019 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package centreon::common::powershell::wsus::synchronisationstatus; use strict; use warnings; use centreon::common::powershell::functions; sub get_powershell { my (%options) = @_; my $no_ps = (defined($options{no_ps})) ? 1 : 0; return '' if ($no_ps == 1); my $ps = ' $culture = new-object "System.Globalization.CultureInfo" "en-us" [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture '; $ps .= centreon::common::powershell::functions::escape_jsonstring(%options); $ps .= centreon::common::powershell::functions::convert_to_json(%options); $ps .= ' $wsusServer = "' . $options{wsus_server} . '" $useSsl = ' . $options{use_ssl} . ' $wsusPort = ' . $options{wsus_port} . ' Try { [void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") } Catch { Write-Host $Error[0].Exception exit 1 } $ProgressPreference = "SilentlyContinue" Try { $ErrorActionPreference = "Stop" $wsusObject = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer($wsusServer, $useSsl, $wsusPort) $syncStatus = $wsusObject.GetSubscription().GetSynchronizationStatus() $syncProgress = $wsusObject.GetSubscription().GetSynchronizationProgress() $lastSync = $wsusObject.GetSubscription().GetLastSynchronizationInfo() $returnObject = New-Object -TypeName PSObject Add-Member -InputObject $returnObject -MemberType NoteProperty -Name "SynchronizationStatus" -Value $syncStatus.ToString() Add-Member -InputObject $returnObject -MemberType NoteProperty -Name "TotalItems" -Value $syncProgress.TotalItems Add-Member -InputObject $returnObject -MemberType NoteProperty -Name "ProcessedItems" -Value $syncProgress.ProcessedItems Add-Member -InputObject $returnObject -MemberType NoteProperty -Name "LastSynchronizationResult" -Value $lastSync.Result.ToString() Add-Member -InputObject $returnObject -MemberType NoteProperty -Name "LastSynchronizationStartTime" -Value $lastSync.StartTime Add-Member -InputObject $returnObject -MemberType NoteProperty -Name "LastSynchronizationEndTime" -Value $lastSync.EndTime $jsonString = $returnObject | ConvertTo-JSON-20 Write-Host $jsonString } Catch { Write-Host $Error[0].Exception exit 1 } exit 0 '; return centreon::plugins::misc::powershell_encoded($ps); } 1; __END__ =head1 DESCRIPTION Method to get WSUS synchronisation informations. =cut
Sims24/centreon-plugins
centreon/common/powershell/wsus/synchronisationstatus.pm
Perl
apache-2.0
3,217
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2018] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut package EnsEMBL::Web::Component::Tools::Blast::Alignment; use strict; use parent qw(EnsEMBL::Web::Component::Tools::Blast::TextSequence); use EnsEMBL::Web::TextSequence::View::Alignment; use Bio::EnsEMBL::CoordSystem; use Bio::EnsEMBL::MappedSlice; use Bio::EnsEMBL::MappedSliceContainer; use Bio::EnsEMBL::Mapper; use Bio::EnsEMBL::Slice; use Bio::Seq; use EnsEMBL::Web::TextSequence::View::Alignment; sub initialize_new { my ($self, $slices) = @_; my $hub = $self->hub; my $config = { display_width => $hub->param('display_width') || 60, species => $self->hit->{'species'}, maintain_colour => 1, comparison => 1, query_seq => 'on', }; for (qw(align_display exon_display snp_display hide_long_snps line_numbering title_display)) { $config->{$_} = $hub->param($_) unless $hub->param($_) =~ /^(off|no)$/; } $config->{'slices'} = $slices || $self->get_slice($config); $config->{'number'} = 1 if $config->{'line_numbering'}; if (!$config->{'align_display'}) { splice @{$config->{'slices'}}, 1, 1; } elsif ($config->{'align_display'} eq 'dot') { $config->{'slices'}[1]{'seq'} =~ s/\|/\./g; } my ($sequence, $markup) = $self->get_sequence_data($config->{'slices'},$config); $self->view->markup($sequence,$markup,$config); return ($sequence, $config); } sub get_sequence_data { ## @override ## Add HSPs to the sequence data my ($self, $slices, $config) = @_; $config->{'hit'} = $self->hit; $config->{'job'} = $self->job; $config->{'object'} = $self->object; $config->{'slice_type'} = ref($self) =~ /QuerySeq$/ ? 'q' : 'g'; my ($sequence, $markup) = $self->SUPER::get_sequence_data($slices, $config); return ($sequence, $markup); } sub content { my $self = shift; return '' unless $self->job; my ($sequence, $config) = $self->initialize_new; return sprintf $self->build_sequence($sequence, $config); } sub get_slice { my ($self, $config) = @_; my $object = $self->object; my $job = $self->job; my $hit = $self->hit; my $blast_method = $self->blast_method; my $query_seq = $self->query_sequence($job, $hit, $blast_method); my $hit_seq = $query_seq; my $hit_length = $hit->{'len'}; my $aln_summary = $hit->{'aln'} =~ s/\s+//rg; my $homology_string = '|' x $hit_length; # take into account alignments that do not start with a match $aln_summary = $aln_summary =~ /^\d+/ ? $aln_summary : "0$aln_summary"; if ($aln_summary =~ /\D/) { # process BTOP alignment to allow for gaps and missmatches $aln_summary =~ s/(\d+)/:$1:/g; $aln_summary =~ s/^:|:$//g; my @alignment_features = split ':', $aln_summary; my $index = 0; while (scalar @alignment_features > 1) { my $seq_index = shift @alignment_features; my $edit_string = shift @alignment_features; my @edits = split '', $edit_string; $index += $seq_index; while (@edits) { my $query_edit = shift @edits; my $hit_edit = shift @edits; my $length = $query_edit eq '-' ? 0 : 1; $length = $hit_edit eq '-' ? 0 : 1 if $blast_method =~ /blastx/ && $hit->{'qori'} == -1; substr($query_seq, $index, $length) = $query_edit; substr($hit_seq, $index, $length) = $hit_edit; substr($homology_string, $index, 1) = ' '; $index++; } } } # chop extra sequence strings on the right grown due to insertion of hyphens (gaps) into the original query sequence $query_seq = substr $query_seq, 0, $hit_length; $hit_seq = substr $hit_seq, 0, $hit_length; my $query_slice = $self->create_slice($hit->{'qid'}, $hit->{'qstart'}, $hit->{'qori'}, $query_seq); my $hit_slice = $self->create_slice($hit->{'tid'}, $hit->{'tstart'}, $hit->{'tori'}, $hit_seq); my @slices; if ($self->is_protein) { @slices = ( { name => 'Query', slice => $query_slice, no_markup => 1 }, { name => '', seq => $homology_string, no_markup => 1 }, { name => 'Subject', slice => $hit_slice }, ); } else { my $ref_slice = $object->get_hit_genomic_slice($hit); my $target_object = $object->get_target_object($hit, $job->job_data->{'source'}); my $orientation = $hit->{'gori'}; if ($target_object) { my $object_strand = $target_object->isa('Bio::EnsEMBL::Translation') ? $target_object->start_Exon->strand : $target_object->strand; $orientation = $hit->{'tori'} eq $object_strand ? 1 : -1; } my $mapped_slice_container = $self->get_mapped_slice($hit_slice, $hit_seq, $ref_slice, $orientation); my $mapped_slices = shift @{$mapped_slice_container->get_all_MappedSlices}; my ($slice, $mapper) = @{$mapped_slices->get_all_Slice_Mapper_pairs->[0]}; @slices = ( { name => 'Query', slice => $query_slice, no_markup => 1 }, { name => '', seq => $homology_string, no_markup => 1 }, { name => 'Subject', slice => $slice, seq => $hit_slice->seq }, ); $config->{'mapper'} = $mapper; $config->{'ref_slice_start'} = $ref_slice->start; $config->{'ref_slice_end'} = $ref_slice->end; } return \@slices; } sub get_mapped_slice { my ($self, $hit_slice, $hit_seq, $reference_slice, $mapping_orientation) = @_; my $object = $self->object; my $hub = $self->hub; my $hit = $self->hit; my $job = $self->job; my $sr_name = $reference_slice->seq_region_name; my $msc = Bio::EnsEMBL::MappedSliceContainer->new(-SLICE => $reference_slice, -EXPANDED => 1); my $ms = Bio::EnsEMBL::MappedSlice->new(-adaptor => $reference_slice->adaptor, -name => 'test_map', -container => $msc); my $mapper = Bio::EnsEMBL::Mapper->new('mapped_slice', 'ref_slice'); my $end = $reference_slice->end; my $indel_flag = 0; my $total_length_diff = 0; # Process genomic btop string to map coordiniates my $aln = $object->map_btop_to_genomic_coords($hit, $job); $aln =~ s/(\d+)/:$1:/g; $aln =~ s/^:|:$//g; my @alignment_features = split /:/, $aln; my $rev_flag = $hit->{'gori'} ne $hit->{'tori'} ? 1 : undef; $rev_flag = 1 if $hit->{'gori'} ne '1' && $hit->{'source'} =~ /latest/i; # Try thinking about this another way, the only bits of the btop we need to consider are # where we have a gap inserted into the hit sequence relative to the reference sequence # we know where this is due to having the hit sequence already. my @aln_features = @alignment_features; my $seq_index = 0; my $last_edit_pos = 0; my %edits; while (scalar @aln_features) { my $matching_bp = shift @aln_features; my $edit_string = shift @aln_features; $seq_index += $matching_bp; last unless $edit_string; my $edit_len = length($edit_string) / 2; my ($type, $diffs); if ($edit_string =~ /^\-+$/) { $edits{$seq_index} = [ $seq_index - $last_edit_pos, 'gap', $edit_len ]; $seq_index++; $last_edit_pos = $seq_index; next; } if ($edit_len > 1) { my @base_edits = split //, $edit_string; my $count = 0; my $previous_state; while (my $query_base = $rev_flag ? pop @base_edits : shift @base_edits) { my $target_base = $rev_flag ? pop @base_edits : shift @base_edits; ($target_base, $query_base) = ($query_base, $target_base) if $rev_flag; my @bases = ($query_base, $target_base); my $state = $target_base eq '-' && $query_base ne '-' ? 'insert_query' : $query_base eq '-' && $target_base ne '-' ? 'insert_hit' : $query_base =~ /[ACTG]/i && $target_base =~ /[ACTG]/i ? 'missmatch' : 'gap'; if (!$previous_state) { $diffs->[0] = \@bases; } elsif ($state eq $previous_state) { $diffs->[$count] = [ @{$diffs->[$count]}, @bases ]; } else { $count++; $diffs->[$count] = \@bases; } $previous_state = $state; } } else { my @differences = split '', $edit_string; $diffs->[0] = \@differences; } my @edit_info = [ $seq_index ]; foreach my $d (@$diffs) { my @differences = @{$d}; my $length = scalar @differences / 2; my $query_base = shift @differences; my $target_base = shift @differences; my $type = $target_base eq '-' && $query_base ne '-' ? 'insert_query' : $query_base eq '-' && $target_base ne '-' ? 'insert_hit' : ($query_base =~ /[ACTG]/i && $target_base =~ /[ACTG]/i) ? 'missmatch' : 'gap'; if ($type ne 'missmatch') { my $pos = $seq_index - $last_edit_pos; $edits{$seq_index} = [ $pos, $type, $length ]; $last_edit_pos = $seq_index; $last_edit_pos = $type ne 'gap' ? $last_edit_pos += $length : $last_edit_pos + 1; } $seq_index = $type eq 'gap' ? $seq_index + 1 : $seq_index + $length; } } my $ref_start = $hit->{'gstart'}; my $ref_strand = $hit->{'gori'}; my $ms_start = $rev_flag ? $hit->{'len'} : 1; my $total_insert_size = 0; foreach my $edit_position (sort { $a <=> $b } keys %edits) { my $num_matching_bp = $edits{$edit_position}->[0]; my $edit_type = $edits{$edit_position}->[1]; my $edit_length = $edits{$edit_position}->[2]; my $ms_end = $rev_flag ? $ms_start - $num_matching_bp + 1 : $ms_start + $num_matching_bp - 1; my $ref_end = $ref_start + $num_matching_bp -1; if ($edit_type eq 'insert_hit') { $ms_end = $rev_flag ? $ms_end - $edit_length : $ms_end + $edit_length; $ref_end += $edit_length; } ($ms_start, $ms_end) = ($ms_end, $ms_start) if $ms_start > $ms_end; # first add match block $mapper->add_map_coordinates( 'mapped_slice', $ms_start, $ms_end, $mapping_orientation, $sr_name, $ref_start, $ref_end, ); if ($edit_type eq 'insert_query') { $ms_start = $rev_flag ? $ms_start - 1 - $edit_length : $ms_end + 1 + $edit_length; $ref_start = $ref_end + 1; } elsif ($edit_type eq 'insert_hit') { $ms_start = $rev_flag ? $ms_start - 1 : $ms_end + 1; $ref_start = $ref_end + 1; $total_insert_size += $edit_length; } else { $ms_start = $rev_flag ? $ms_start - 1 : $ms_end + 1; $ref_start = $ref_end + $edit_length + 1; } } # if (($mapping_orientation == 1 && $ms_start < $seq_index) || ($mapping_orientation != 1 && $ms_start > 0)) { # my $ms_end = $rev_flag ? 1 : $end - $ref_start + $ms_start; # # ($ms_start, $ms_end) = ($ms_end, $ms_start) if $ms_start > $ms_end; # # $mapper->add_map_coordinates( # 'mapped_slice', # $ms_start, # $ms_end, # $mapping_orientation,, # $sr_name, # $ref_start, # $end, # ); # } $reference_slice = $reference_slice->expand(undef, $total_insert_size, 1); $ms->add_Slice_Mapper_pair($reference_slice, $mapper); $msc->{'mapped_slices'} = [ $ms ]; return $msc; } sub create_slice { my ($self, $name, $start, $strand, $seq) = @_; return Bio::EnsEMBL::Slice->new( -seq_region_name => $name, -start => $start, -end => $start + length($seq) - 1, -strand => $strand, -seq => $seq, -coord_system => Bio::EnsEMBL::CoordSystem->new( -name => 'chromosome', -rank => 1, ), ); } sub query_sequence { my ($self, $job, $hit, $blast_method) = @_; my $sequence = $self->object->get_input_sequence_for_job($job)->{'sequence'}; my $seq_len = length $sequence; my $offset = $hit->{'qori'} == 1 ? $hit->{'qstart'} - 1 : $seq_len - $hit->{'qstart'}; # translate sequence if needed if ($blast_method =~ /blastx/i) { # take reverse complement if query orientation is reverse if ($hit->{'qori'} == -1) { my $map = {qw(A T T A G C C G)}; $sequence = join '', map { $map->{$_} } reverse split '', uc $sequence; } my $frame = abs($hit->{'qframe'}) - 1; my $peptide = Bio::Seq->new(-seq => $sequence, -moltype => 'dna', -alphabet => 'dna', -id => 'sequence'); $sequence = $peptide->translate(undef, undef, $frame, 1)->seq; $offset = ($offset - $frame) / 3; } return substr $sequence, $offset; } sub make_view { my $self = shift; return EnsEMBL::Web::TextSequence::View::Alignment->new(@_); } sub make_view { my ($self) = @_; return EnsEMBL::Web::TextSequence::View::Alignment->new($self->hub); } 1;
muffato/public-plugins
tools/modules/EnsEMBL/Web/Component/Tools/Blast/Alignment.pm
Perl
apache-2.0
13,516
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2021] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =cut =head1 CONTACT Please email comments or questions to the public Ensembl developers list at <http://lists.ensembl.org/mailman/listinfo/dev>. Questions may also be sent to the Ensembl help desk at <http://www.ensembl.org/Help/Contact>. =cut =head1 NAME Bio::EnsEMBL::DBSQL::MetaContainer - Encapsulates all access to core database meta information =head1 SYNOPSIS my $meta_container = $registry->get_adaptor( 'Human', 'Core', 'MetaContainer' ); my @mapping_info = @{ $meta_container->list_value_by_key('assembly.mapping') }; my $scientific_name = $meta_container->get_scientific_name(); =head1 DESCRIPTION An object that encapsulates specific access to core db meta data =head1 METHODS =cut package Bio::EnsEMBL::DBSQL::MetaContainer; use strict; use warnings; use Bio::Species; use base qw/Bio::EnsEMBL::DBSQL::BaseMetaContainer/; # add well known meta info get-functions below =head2 get_production_name Args : none Example : $species = $meta_container->get_production_name(); Description : Obtains the name of the species in a form usable as, for example, a table name, file name etc. Returntype : string Exceptions : none Status : Stable =cut sub get_production_name { my ($self) = @_; return $self->single_value_by_key('species.production_name'); } =head2 get_display_name Args : none Example : $species = $meta_container->get_display_name(); Description : Obtains the name of the species in a form usable as, for example, a short label in a GUI. Returntype : string Exceptions : none Status : Stable =cut sub get_display_name { my ($self) = @_; return $self->single_value_by_key('species.display_name'); } =head2 get_common_name Args : none Example : $species = $meta_container->get_common_name(); Description : Obtains the common name of the species. Returntype : string Exceptions : none Status : Stable =cut sub get_common_name { my ($self) = @_; return $self->single_value_by_key('species.common_name'); } =head2 get_scientific_name Args : none Example : $species = $meta_container->get_scientific_name(); Description : Obtains the full scientific name of the species. Returntype : string Exceptions : none Status : Stable =cut sub get_scientific_name { my ($self) = @_; return $self->single_value_by_key('species.scientific_name'); } =head2 get_division Args : none Example : $div = $meta_container->get_division(); Description : Obtains the Ensembl Genomes division to which the species belongs. Returntype : string Exceptions : none Status : Stable =cut sub get_division { my ($self) = @_; return $self->single_value_by_key('species.division'); } =head2 get_taxonomy_id Arg [1] : none Example : $tax_id = $meta_container->get_taxonomy_id(); Description: Retrieves the taxonomy id from the database meta table Returntype : string Exceptions : none Caller : ? Status : Stable =cut sub get_taxonomy_id { my ($self) = @_; return $self->single_value_by_key('species.taxonomy_id', 1); } =head2 get_genebuild Arg [1] : none Example : $tax_id = $meta_container->get_genebuild(); Description: Retrieves the genebuild from the database meta table Returntype : string Exceptions : none Caller : ? Status : Stable =cut sub get_genebuild { my ($self) = @_; return $self->single_value_by_key('genebuild.start_date', 1); } =head2 get_genebuild Example : $classification = $meta_container->get_classification(); Description: Retrieves the classification held in the backing database minus any species specific levels. This means that the first element in the array will be subfamily/family level ascending to superkingdom Returntype : ArrayRef[String] Exceptions : none Caller : ? Status : Stable =cut sub get_classification { my ($self) = @_; my $classification = $self->list_value_by_key('species.classification'); my $copy = [@{$classification}]; splice(@{$copy}, 0, 1); # remove the Homo sapiens return $copy; } 1;
Ensembl/ensembl
modules/Bio/EnsEMBL/DBSQL/MetaContainer.pm
Perl
apache-2.0
5,012