openssl RSA Keys and Certificate
RSA Keys
Generate RSA Key
To generate an RSA key, use the genrsa
command:
$ openssl genrsa -out rsa.key 2048
Generating RSA private key, 2048 bit long modulus
..................................+++
...................................................................................................+++
e is 65537 (0x10001)
The e
value that you see in the output refers to the public exponent,
which is set to 65,537
by default.
This is what's known as a short public exponent, and it significantly improves the performance of RSA verification.
Using the -3
switch, you can choose 3 as your public exponent and make verification even faster.
However, there are some unpleasant historical weaknesses associated with the use of 3 as a public exponent,
which is why generally everyone recommends that you stick with 65,537
.
The latter choice provides a safety margin that's been proven effective in the past.
Private keys are stored in the so-called PEM format, which is just text:
$ cat rsa.key
-----BEGIN RSA PRIVATE KEY-----
MIIEpgIBAAKCAQEA8FMT3L4LZGQsWAJ7O1KxSyzQgLPZJTjbMgkf+JK69GahZ1qE
YplW90z9DEU/hmGIF1FwcP9PvgcVJ42IQkUpJ8GTKKoRUe+nESLboggIZe1QUkVG
DFv3gAnkQQp2Xb7jvc1zTyBiIY03hoFlOCoh5osLl8AuNh/lUeiblAifEtG+oC1m
HjCy/M9r0pgHsQ/tZmdAtYdMybdVMn7vNXlRgxOY+JApbUGBEqXXc9R+7nP+T8f7
gJk6KxIfgAoqmY6HSLVyj1SPYKtpBTn9PAj0Tp2ZvGTLhYji2IQsocRq9sPTV/os
7hSdAmMyrhUckLYdXuTUaEkeYCHrs/nzuHy3iQIDAQABAoIBAQC0KANGwmy12GZp
n4qT4RypVzICmVAaGDIxoyeFZzGhT2KFoRSG+Z55CwzTawIBEhI8ML/S5YH42URh
fzb7Pu9oLzPLExqiyr36GaB+Kflpt2o0Elw9nZ+/KysiGt66zgPZ4C8lzQfjUQKj
4VJotSTut6N8IgRCbMyzB2XBpmjhaEi9y0MiuRjmVUHGbZs9r5cYL7tBE7hCMnjD
IZtI0ExujtuipeU+eQKrgkSw1KcAmo24oXGq/BTW96IowSCAOp3tfd1V/I6otQ8b
Dn6nTtELRbQjOLonH5KncfqcCw1PCM5LraBhVf1ZQY0xDTz9RrCg6yklgqvxjLvt
um28fzcBAoGBAP2jfAxP1oAEm/b5KZMUSISo8VYPWCvPLohrDNJC468CL25b+n9l
8gfY1KB40qdi7H4YMkBES+zsNqh8PqNxlzwQF6z84ezzGGxI0A3Nh5/bu77VCmu1
xofHDOBBiBf8pUsvbNEXinWPN5ZuH2YvnWnbiBBaFqw0MRcMUi5vo1JhAoGBAPKP
3E8Lv+j9bopzGwW5xcYrngLdVxqnOIM3Kau3IGbMmNlU1wdV/zoW5R0ZG6gxg/oH
Q7kDdtPJk3ONh6VZxm/ThfBHwynhcpPFBNUKRgeK4mZsKnboDvc1esS39J3q+zt9
Y6AYGYO15RHelCP4NJBPqtqoAnJ7rtAb0+CdjkYpAoGBAOYJ02UbN/EtvQK3IrTJ
rafbzd5+1joNkyeY56z/i57bfYc7FqtbG7NwPhA45N15hAItEc5l4vLDniMbZHg6
eq637bEwPfv40srLEx+hrAMZeGLwt53O5Hua1ZvC85rFwmi5X5kYH7TVqtXdlM7K
Gpu6xuIFwxB12ZwMybBiAh+hAoGBALxLty9ZpKm+iuBJSLHiK8iRtYDtyB91rmYW
HXAiobGLpCAaPy5/sLisa0Fya0je31/p4cWvDcCM2705IhLXJTdMEc6cNsG9NI/H
wt+KsSBLzULLNw/FR1DaoCozz14DuvHMfdkavDvFqUR8760Ykd1xKuXAxN2Qa/07
jPfx9y85AoGBAOSoe7sp9P1FCinzB8knzMo5CMYHceK9/49SllCz+oQnmBeUfLuT
WI946nBeCudrxGtdZzmzK7gAr/PhH6uP1ZEJxUvIxJk9giOxrBRDlu0rRJ1FilCI
6y2Em7FVIVfPvh0skOiRXmQxnRjej37YCflO9rrTrc/S4U6oPlxmTGVE
-----END RSA PRIVATE KEY-----
Examine RSA Key
A private key isn't just a blob of random data, even though that's what it looks like at a glance.
You can see a key's structure using the following rsa
command:
$ openssl rsa -text -in rsa.key
Private-Key: (2048 bit)
modulus:
00:f0:53:13:dc:be:0b:64:64:2c:58:02:7b:3b:52:
b1:4b:2c:d0:80:b3:d9:25:38:db:32:09:1f:f8:92:
ba:f4:66:a1:67:5a:84:62:99:56:f7:4c:fd:0c:45:
3f:86:61:88:17:51:70:70:ff:4f:be:07:15:27:8d:
88:42:45:29:27:c1:93:28:aa:11:51:ef:a7:11:22:
db:a2:08:08:65:ed:50:52:45:46:0c:5b:f7:80:09:
e4:41:0a:76:5d:be:e3:bd:cd:73:4f:20:62:21:8d:
37:86:81:65:38:2a:21:e6:8b:0b:97:c0:2e:36:1f:
e5:51:e8:9b:94:08:9f:12:d1:be:a0:2d:66:1e:30:
b2:fc:cf:6b:d2:98:07:b1:0f:ed:66:67:40:b5:87:
4c:c9:b7:55:32:7e:ef:35:79:51:83:13:98:f8:90:
29:6d:41:81:12:a5:d7:73:d4:7e:ee:73:fe:4f:c7:
fb:80:99:3a:2b:12:1f:80:0a:2a:99:8e:87:48:b5:
72:8f:54:8f:60:ab:69:05:39:fd:3c:08:f4:4e:9d:
99:bc:64:cb:85:88:e2:d8:84:2c:a1:c4:6a:f6:c3:
d3:57:fa:2c:ee:14:9d:02:63:32:ae:15:1c:90:b6:
1d:5e:e4:d4:68:49:1e:60:21:eb:b3:f9:f3:b8:7c:
b7:89
publicExponent: 65537 (0x10001)
privateExponent:
00:b4:28:03:46:c2:6c:b5:d8:66:69:9f:8a:93:e1:
1c:a9:57:32:02:99:50:1a:18:32:31:a3:27:85:67:
31:a1:4f:62:85:a1:14:86:f9:9e:79:0b:0c:d3:6b:
02:01:12:12:3c:30:bf:d2:e5:81:f8:d9:44:61:7f:
36:fb:3e:ef:68:2f:33:cb:13:1a:a2:ca:bd:fa:19:
a0:7e:29:f9:69:b7:6a:34:12:5c:3d:9d:9f:bf:2b:
2b:22:1a:de:ba:ce:03:d9:e0:2f:25:cd:07:e3:51:
02:a3:e1:52:68:b5:24:ee:b7:a3:7c:22:04:42:6c:
cc:b3:07:65:c1:a6:68:e1:68:48:bd:cb:43:22:b9:
18:e6:55:41:c6:6d:9b:3d:af:97:18:2f:bb:41:13:
b8:42:32:78:c3:21:9b:48:d0:4c:6e:8e:db:a2:a5:
e5:3e:79:02:ab:82:44:b0:d4:a7:00:9a:8d:b8:a1:
71:aa:fc:14:d6:f7:a2:28:c1:20:80:3a:9d:ed:7d:
dd:55:fc:8e:a8:b5:0f:1b:0e:7e:a7:4e:d1:0b:45:
b4:23:38:ba:27:1f:92:a7:71:fa:9c:0b:0d:4f:08:
ce:4b:ad:a0:61:55:fd:59:41:8d:31:0d:3c:fd:46:
b0:a0:eb:29:25:82:ab:f1:8c:bb:ed:ba:6d:bc:7f:
37:01
prime1:
00:fd:a3:7c:0c:4f:d6:80:04:9b:f6:f9:29:93:14:
48:84:a8:f1:56:0f:58:2b:cf:2e:88:6b:0c:d2:42:
e3:af:02:2f:6e:5b:fa:7f:65:f2:07:d8:d4:a0:78:
d2:a7:62:ec:7e:18:32:40:44:4b:ec:ec:36:a8:7c:
3e:a3:71:97:3c:10:17:ac:fc:e1:ec:f3:18:6c:48:
d0:0d:cd:87:9f:db:bb:be:d5:0a:6b:b5:c6:87:c7:
0c:e0:41:88:17:fc:a5:4b:2f:6c:d1:17:8a:75:8f:
37:96:6e:1f:66:2f:9d:69:db:88:10:5a:16:ac:34:
31:17:0c:52:2e:6f:a3:52:61
prime2:
00:f2:8f:dc:4f:0b:bf:e8:fd:6e:8a:73:1b:05:b9:
c5:c6:2b:9e:02:dd:57:1a:a7:38:83:37:29:ab:b7:
20:66:cc:98:d9:54:d7:07:55:ff:3a:16:e5:1d:19:
1b:a8:31:83:fa:07:43:b9:03:76:d3:c9:93:73:8d:
87:a5:59:c6:6f:d3:85:f0:47:c3:29:e1:72:93:c5:
04:d5:0a:46:07:8a:e2:66:6c:2a:76:e8:0e:f7:35:
7a:c4:b7:f4:9d:ea:fb:3b:7d:63:a0:18:19:83:b5:
e5:11:de:94:23:f8:34:90:4f:aa:da:a8:02:72:7b:
ae:d0:1b:d3:e0:9d:8e:46:29
exponent1:
00:e6:09:d3:65:1b:37:f1:2d:bd:02:b7:22:b4:c9:
ad:a7:db:cd:de:7e:d6:3a:0d:93:27:98:e7:ac:ff:
8b:9e:db:7d:87:3b:16:ab:5b:1b:b3:70:3e:10:38:
e4:dd:79:84:02:2d:11:ce:65:e2:f2:c3:9e:23:1b:
64:78:3a:7a:ae:b7:ed:b1:30:3d:fb:f8:d2:ca:cb:
13:1f:a1:ac:03:19:78:62:f0:b7:9d:ce:e4:7b:9a:
d5:9b:c2:f3:9a:c5:c2:68:b9:5f:99:18:1f:b4:d5:
aa:d5:dd:94:ce:ca:1a:9b:ba:c6:e2:05:c3:10:75:
d9:9c:0c:c9:b0:62:02:1f:a1
exponent2:
00:bc:4b:b7:2f:59:a4:a9:be:8a:e0:49:48:b1:e2:
2b:c8:91:b5:80:ed:c8:1f:75:ae:66:16:1d:70:22:
a1:b1:8b:a4:20:1a:3f:2e:7f:b0:b8:ac:6b:41:72:
6b:48:de:df:5f:e9:e1:c5:af:0d:c0:8c:db:bd:39:
22:12:d7:25:37:4c:11:ce:9c:36:c1:bd:34:8f:c7:
c2:df:8a:b1:20:4b:cd:42:cb:37:0f:c5:47:50:da:
a0:2a:33:cf:5e:03:ba:f1:cc:7d:d9:1a:bc:3b:c5:
a9:44:7c:ef:ad:18:91:dd:71:2a:e5:c0:c4:dd:90:
6b:fd:3b:8c:f7:f1:f7:2f:39
coefficient:
00:e4:a8:7b:bb:29:f4:fd:45:0a:29:f3:07:c9:27:
cc:ca:39:08:c6:07:71:e2:bd:ff:8f:52:96:50:b3:
fa:84:27:98:17:94:7c:bb:93:58:8f:78:ea:70:5e:
0a:e7:6b:c4:6b:5d:67:39:b3:2b:b8:00:af:f3:e1:
1f:ab:8f:d5:91:09:c5:4b:c8:c4:99:3d:82:23:b1:
ac:14:43:96:ed:2b:44:9d:45:8a:50:88:eb:2d:84:
9b:b1:55:21:57:cf:be:1d:2c:90:e8:91:5e:64:31:
9d:18:de:8f:7e:d8:09:f9:4e:f6:ba:d3:ad:cf:d2:
e1:4e:a8:3e:5c:66:4c:65:44
writing RSA key
-----BEGIN RSA PRIVATE KEY-----
MIIEpgIBAAKCAQEA8FMT3L4LZGQsWAJ7O1KxSyzQgLPZJTjbMgkf+JK69GahZ1qE
YplW90z9DEU/hmGIF1FwcP9PvgcVJ42IQkUpJ8GTKKoRUe+nESLboggIZe1QUkVG
DFv3gAnkQQp2Xb7jvc1zTyBiIY03hoFlOCoh5osLl8AuNh/lUeiblAifEtG+oC1m
HjCy/M9r0pgHsQ/tZmdAtYdMybdVMn7vNXlRgxOY+JApbUGBEqXXc9R+7nP+T8f7
gJk6KxIfgAoqmY6HSLVyj1SPYKtpBTn9PAj0Tp2ZvGTLhYji2IQsocRq9sPTV/os
7hSdAmMyrhUckLYdXuTUaEkeYCHrs/nzuHy3iQIDAQABAoIBAQC0KANGwmy12GZp
n4qT4RypVzICmVAaGDIxoyeFZzGhT2KFoRSG+Z55CwzTawIBEhI8ML/S5YH42URh
fzb7Pu9oLzPLExqiyr36GaB+Kflpt2o0Elw9nZ+/KysiGt66zgPZ4C8lzQfjUQKj
4VJotSTut6N8IgRCbMyzB2XBpmjhaEi9y0MiuRjmVUHGbZs9r5cYL7tBE7hCMnjD
IZtI0ExujtuipeU+eQKrgkSw1KcAmo24oXGq/BTW96IowSCAOp3tfd1V/I6otQ8b
Dn6nTtELRbQjOLonH5KncfqcCw1PCM5LraBhVf1ZQY0xDTz9RrCg6yklgqvxjLvt
um28fzcBAoGBAP2jfAxP1oAEm/b5KZMUSISo8VYPWCvPLohrDNJC468CL25b+n9l
8gfY1KB40qdi7H4YMkBES+zsNqh8PqNxlzwQF6z84ezzGGxI0A3Nh5/bu77VCmu1
xofHDOBBiBf8pUsvbNEXinWPN5ZuH2YvnWnbiBBaFqw0MRcMUi5vo1JhAoGBAPKP
3E8Lv+j9bopzGwW5xcYrngLdVxqnOIM3Kau3IGbMmNlU1wdV/zoW5R0ZG6gxg/oH
Q7kDdtPJk3ONh6VZxm/ThfBHwynhcpPFBNUKRgeK4mZsKnboDvc1esS39J3q+zt9
Y6AYGYO15RHelCP4NJBPqtqoAnJ7rtAb0+CdjkYpAoGBAOYJ02UbN/EtvQK3IrTJ
rafbzd5+1joNkyeY56z/i57bfYc7FqtbG7NwPhA45N15hAItEc5l4vLDniMbZHg6
eq637bEwPfv40srLEx+hrAMZeGLwt53O5Hua1ZvC85rFwmi5X5kYH7TVqtXdlM7K
Gpu6xuIFwxB12ZwMybBiAh+hAoGBALxLty9ZpKm+iuBJSLHiK8iRtYDtyB91rmYW
HXAiobGLpCAaPy5/sLisa0Fya0je31/p4cWvDcCM2705IhLXJTdMEc6cNsG9NI/H
wt+KsSBLzULLNw/FR1DaoCozz14DuvHMfdkavDvFqUR8760Ykd1xKuXAxN2Qa/07
jPfx9y85AoGBAOSoe7sp9P1FCinzB8knzMo5CMYHceK9/49SllCz+oQnmBeUfLuT
WI946nBeCudrxGtdZzmzK7gAr/PhH6uP1ZEJxUvIxJk9giOxrBRDlu0rRJ1FilCI
6y2Em7FVIVfPvh0skOiRXmQxnRjej37YCflO9rrTrc/S4U6oPlxmTGVE
-----END RSA PRIVATE KEY-----
Export Public Key
If you need to have just the public part of a key separately, you can do that with the following rsa
command:
$ openssl rsa -in rsa.key -pubout -out rsa-public.key
writing RSA key
$ cat rsa-public.key
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8FMT3L4LZGQsWAJ7O1Kx
SyzQgLPZJTjbMgkf+JK69GahZ1qEYplW90z9DEU/hmGIF1FwcP9PvgcVJ42IQkUp
J8GTKKoRUe+nESLboggIZe1QUkVGDFv3gAnkQQp2Xb7jvc1zTyBiIY03hoFlOCoh
5osLl8AuNh/lUeiblAifEtG+oC1mHjCy/M9r0pgHsQ/tZmdAtYdMybdVMn7vNXlR
gxOY+JApbUGBEqXXc9R+7nP+T8f7gJk6KxIfgAoqmY6HSLVyj1SPYKtpBTn9PAj0
Tp2ZvGTLhYji2IQsocRq9sPTV/os7hSdAmMyrhUckLYdXuTUaEkeYCHrs/nzuHy3
iQIDAQAB
-----END PUBLIC KEY-----
Examine Public Key
$ openssl rsa -text -pubin -in rsa-public.key -noout
Public-Key: (2048 bit)
Modulus:
00:f0:53:13:dc:be:0b:64:64:2c:58:02:7b:3b:52:
b1:4b:2c:d0:80:b3:d9:25:38:db:32:09:1f:f8:92:
ba:f4:66:a1:67:5a:84:62:99:56:f7:4c:fd:0c:45:
3f:86:61:88:17:51:70:70:ff:4f:be:07:15:27:8d:
88:42:45:29:27:c1:93:28:aa:11:51:ef:a7:11:22:
db:a2:08:08:65:ed:50:52:45:46:0c:5b:f7:80:09:
e4:41:0a:76:5d:be:e3:bd:cd:73:4f:20:62:21:8d:
37:86:81:65:38:2a:21:e6:8b:0b:97:c0:2e:36:1f:
e5:51:e8:9b:94:08:9f:12:d1:be:a0:2d:66:1e:30:
b2:fc:cf:6b:d2:98:07:b1:0f:ed:66:67:40:b5:87:
4c:c9:b7:55:32:7e:ef:35:79:51:83:13:98:f8:90:
29:6d:41:81:12:a5:d7:73:d4:7e:ee:73:fe:4f:c7:
fb:80:99:3a:2b:12:1f:80:0a:2a:99:8e:87:48:b5:
72:8f:54:8f:60:ab:69:05:39:fd:3c:08:f4:4e:9d:
99:bc:64:cb:85:88:e2:d8:84:2c:a1:c4:6a:f6:c3:
d3:57:fa:2c:ee:14:9d:02:63:32:ae:15:1c:90:b6:
1d:5e:e4:d4:68:49:1e:60:21:eb:b3:f9:f3:b8:7c:
b7:89
Exponent: 65537 (0x10001)
Export private key
If you forget to include the -pubout
switch on the command line,
the output will contain your private key instead of the public key.
$ openssl rsa -in rsa.key -out rsa-private.key
writing RSA key
事实上，rsa-private.key 和 rsa.key 的内容是一模一样的。
Certificate
Create Certificate Signing Requests
Once you have a private key, you can proceed to create a Certificate Signing Request (CSR).
This is a formal request asking a CA to sign a certificate, and it contains the public key of the entity
requesting the certificate and some information about the entity. This data will all be part of the certificate.
A CSR is always signed with the private key corresponding to the public key it carries.
CSR creation is usually an interactive process,
during which you'll be providing the elements of the certificate distinguished name.
Read the instructions given by the openssl tool carefully; if you want a field to be empty,
you must enter a single dot (.) on the line, rather than just hit Return.
If you do the latter, OpenSSL will populate the corresponding CSR field with the default value.
(This behavior doesn't make any sense when used with the default OpenSSL configuration, which is what virtually everyone does.
It does make sense once you realize you can actually change the defaults,
either by modifying the OpenSSL configuration or by providing your own configuration files.)
$ openssl req -new -key rsa.key -out certificate_signing_request.pem
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:HeBei
Locality Name (eg, city) []:BaoDing
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Fruit Ltd
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. server FQDN or YOUR name) []:www.fruit.com
Email Address<EMAIL_ADDRESS>Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
$ cat certificate_signing_request.pem
-----BEGIN CERTIFICATE REQUEST-----
MIICzjCCAbYCAQAwgYgxCzAJBgNVBAYTAkNOMQ4wDAYDVQQIDAVIZUJlaTEQMA4G
A1UEBwwHQmFvRGluZzESMBAGA1UECgwJRnJ1aXQgTHRkMQswCQYDVQQLDAJJVDEW
MBQGA1UEAwwNd3d3LmZydWl0LmNvbTEeMBwGCSqGSIb3DQEJARYPYWRtaW5AZnJ1
aXQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8FMT3L4LZGQs
WAJ7O1KxSyzQgLPZJTjbMgkf+JK69GahZ1qEYplW90z9DEU/hmGIF1FwcP9PvgcV
J42IQkUpJ8GTKKoRUe+nESLboggIZe1QUkVGDFv3gAnkQQp2Xb7jvc1zTyBiIY03
hoFlOCoh5osLl8AuNh/lUeiblAifEtG+oC1mHjCy/M9r0pgHsQ/tZmdAtYdMybdV
Mn7vNXlRgxOY+JApbUGBEqXXc9R+7nP+T8f7gJk6KxIfgAoqmY6HSLVyj1SPYKtp
BTn9PAj0Tp2ZvGTLhYji2IQsocRq9sPTV/os7hSdAmMyrhUckLYdXuTUaEkeYCHr
s/nzuHy3iQIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAFUSU+9SPqOhE7vcygpf
xigMgFHa0OMFZrpw4n2wQw0VxQPLktRFDVOUPneZKCdDDyctvFEdJ8hjg3+uzt70
V7/DIj+cw2vWtFvHkWm/JaJmzhjp77Yy1VreG2PUTZwEBNIiHHUe1cY0OOzPXwo7
9C//WQQB3SCqfXwWKvfw7E8Dm0efoU0vCbgcSBY28rZqBkIBLQ+Q1wKJgHohBnFL
2bvNVWZflCyOo93TEDOmX5TGSdc9/bzoFp4RJzP+X6o7FIbGt8EUFOHYdV0h501a
/ITIfgo+QrzgHxVw9EXOpQ675o498wk71su+sv0+9TtJUl45+jUwinsrpvBduGJg
FYQ=
-----END CERTIFICATE REQUEST-----
An Expanded X.509 Distinguished Name
| TWO-LETTER CODE |
LONG NAME |
VALUE |
| CN |
Common Name |
www.fruit.com |
| OU |
Organizational Unit |
IT |
| O |
Organization |
Fruit Ltd |
| L |
Locality, usually a city name |
BaoDing |
| ST |
State |
HeBei |
| C |
Country |
CN |
Examine Certificate Signing Requests
After a CSR is generated, use it to sign your own certificate and/or send it to a public CA and ask him or her to sign the certificate.
But before you do that, it's a good idea to double-check that the CSR is correct.
It's much easier to sign your own.
The fastest way to do this is to generate a self-signed certificate.
If you already have a CSR, create a certificate using the following command:
$ openssl x509 -req -days 365 -in certificate_signing_request.pem -signkey rsa.key -out signed_certificate.pem
Signature ok
subject=/C=CN/ST=HeBei/L=BaoDing/O=Fruit<EMAIL_ADDRESS>Getting Private key
$ cat signed_certificate.pem
-----BEGIN CERTIFICATE-----
MIIDjjCCAnYCCQDHrg3yLdDsLjANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMC
Q04xDjAMBgNVBAgMBUhlQmVpMRAwDgYDVQQHDAdCYW9EaW5nMRIwEAYDVQQKDAlG
cnVpdCBMdGQxCzAJBgNVBAsMAklUMRYwFAYDVQQDDA13d3cuZnJ1aXQuY29tMR4w
HAYJKoZIhvcNAQkBFg9hZG1pbkBmcnVpdC5jb20wHhcNMjAwNjI5MDI1MjExWhcN
MjEwNjI5MDI1MjExWjCBiDELMAkGA1UEBhMCQ04xDjAMBgNVBAgMBUhlQmVpMRAw
DgYDVQQHDAdCYW9EaW5nMRIwEAYDVQQKDAlGcnVpdCBMdGQxCzAJBgNVBAsMAklU
MRYwFAYDVQQDDA13d3cuZnJ1aXQuY29tMR4wHAYJKoZIhvcNAQkBFg9hZG1pbkBm
cnVpdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDwUxPcvgtk
ZCxYAns7UrFLLNCAs9klONsyCR/4krr0ZqFnWoRimVb3TP0MRT+GYYgXUXBw/0++
BxUnjYhCRSknwZMoqhFR76cRItuiCAhl7VBSRUYMW/eACeRBCnZdvuO9zXNPIGIh
jTeGgWU4KiHmiwuXwC42H+VR6JuUCJ8S0b6gLWYeMLL8z2vSmAexD+1mZ0C1h0zJ
t1Uyfu81eVGDE5j4kCltQYESpddz1H7uc/5Px/uAmTorEh+ACiqZjodItXKPVI9g
q2kFOf08CPROnZm8ZMuFiOLYhCyhxGr2w9NX+izuFJ0CYzKuFRyQth1e5NRoSR5g
Ieuz+fO4fLeJAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAMaj+5OhouW4hU8NYgH/
k4yI8j3mhwAmjDaP2JoRPrmROqY3gnuVXzFTkXB6HEV+E1vykAkSBdu2D+mWvqgB
rx+EIqZr2h4RB2SS4G3+bVDGQ3o1gPAFiZeUSyuADifdExmuroaCH6HfHdZ9K46b
Luunmd4qW1HRFSdelwJyXbfOMfcA9WsQkYsGLqeJZpnKPy8dwTyqJCKYz7QCPNGu
rXPCelB5YQBK90i8Dq0pUNvd/7ka6D1km41xhhUfJDS5ELZriwk4QQiAqE8UdJLf
whxQtilWv1rSs+rCLvbyarqT4tCnzALQEGBo9Xp435aDnJpa+/jRrXF+nJjTTk9X
Gxs=
-----END CERTIFICATE-----
Examine Signed Certificate
Certificates might look a lot like random data at first glance, but they contain a great deal of information;
you just need to know how to unpack it.
The x509
command does just that, so use it to look at the self-signed certificates you generated.
In the following example,
I use the -text
switch to print certificate contents and -noout
to reduce clutter
by not printing the encoded certificate itself (which is the default behavior):
$ openssl x509 -text -in signed_certificate.pem -noout
Certificate:
Data:
Version: 1 (0x0)
Serial Number:
c7:ae:0d:f2:2d:d0:ec:2e
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=CN, ST=HeBei, L=BaoDing, O=Fruit Ltd, OU=IT<EMAIL_ADDRESS>Validity
Not Before: Jun 29 02:52:11 2020 GMT
Not After : Jun 29 02:52:11 2021 GMT
Subject: C=CN, ST=HeBei, L=BaoDing, O=Fruit Ltd, OU=IT<EMAIL_ADDRESS>Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:f0:53:13:dc:be:0b:64:64:2c:58:02:7b:3b:52:
b1:4b:2c:d0:80:b3:d9:25:38:db:32:09:1f:f8:92:
ba:f4:66:a1:67:5a:84:62:99:56:f7:4c:fd:0c:45:
3f:86:61:88:17:51:70:70:ff:4f:be:07:15:27:8d:
88:42:45:29:27:c1:93:28:aa:11:51:ef:a7:11:22:
db:a2:08:08:65:ed:50:52:45:46:0c:5b:f7:80:09:
e4:41:0a:76:5d:be:e3:bd:cd:73:4f:20:62:21:8d:
37:86:81:65:38:2a:21:e6:8b:0b:97:c0:2e:36:1f:
e5:51:e8:9b:94:08:9f:12:d1:be:a0:2d:66:1e:30:
b2:fc:cf:6b:d2:98:07:b1:0f:ed:66:67:40:b5:87:
4c:c9:b7:55:32:7e:ef:35:79:51:83:13:98:f8:90:
29:6d:41:81:12:a5:d7:73:d4:7e:ee:73:fe:4f:c7:
fb:80:99:3a:2b:12:1f:80:0a:2a:99:8e:87:48:b5:
72:8f:54:8f:60:ab:69:05:39:fd:3c:08:f4:4e:9d:
99:bc:64:cb:85:88:e2:d8:84:2c:a1:c4:6a:f6:c3:
d3:57:fa:2c:ee:14:9d:02:63:32:ae:15:1c:90:b6:
1d:5e:e4:d4:68:49:1e:60:21:eb:b3:f9:f3:b8:7c:
b7:89
Exponent: 65537 (0x10001)
Signature Algorithm: sha256WithRSAEncryption
c6:a3:fb:93:a1:a2:e5:b8:85:4f:0d:62:01:ff:93:8c:88:f2:
3d:e6:87:00:26:8c:36:8f:d8:9a:11:3e:b9:91:3a:a6:37:82:
7b:95:5f:31:53:91:70:7a:1c:45:7e:13:5b:f2:90:09:12:05:
db:b6:0f:e9:96:be:a8:01:af:1f:84:22:a6:6b:da:1e:11:07:
64:92:e0:6d:fe:6d:50:c6:43:7a:35:80:f0:05:89:97:94:4b:
2b:80:0e:27:dd:13:19:ae:ae:86:82:1f:a1:df:1d:d6:7d:2b:
8e:9b:2e:eb:a7:99:de:2a:5b:51:d1:15:27:5e:97:02:72:5d:
b7:ce:31:f7:00:f5:6b:10:91:8b:06:2e:a7:89:66:99:ca:3f:
2f:1d:c1:3c:aa:24:22:98:cf:b4:02:3c:d1:ae:ad:73:c2:7a:
50:79:61:00:4a:f7:48:bc:0e:ad:29:50:db:dd:ff:b9:1a:e8:
3d:64:9b:8d:71:86:15:1f:24:34:b9:10:b6:6b:8b:09:38:41:
08:80:a8:4f:14:74:92:df:c2:1c:50:b6:29:56:bf:5a:d2:b3:
ea:c2:2e:f6:f2:6a:ba:93:e2:d0:a7:cc:02:d0:10:60:68:f5:
7a:78:df:96:83:9c:9a:5a:fb:f8:d1:ad:71:7e:9c:98:d3:4e:
4f:57:1b:1b


Type in the number of random number that the program should produce. (limit 40)
This is used when we want to stop iterating based on a set of conditions.


Class Merchenta
Exposes all implemented Merchenta API functionality.
Namespace: Merchenta
Package: Merchenta
Author: Baptiste Pernet
Version: 0.0.1
Link: http://support.perfectaudience.com/knowledgebase/topics/35920-api-documentation
Located at Merchenta/Merchenta.php
Package: Merchenta
Author: Baptiste Pernet
Version: 0.0.1
Link: http://support.perfectaudience.com/knowledgebase/topics/35920-api-documentation
Located at Merchenta/Merchenta.php
public
|
#
__construct( string $clientId, string $clientSecret, mixed $endpoint )
Class constructor Get the authentication service and initiate all the service objects. |
public
string
|
#
getCampaigns( mixed $dataType )
Get the status of the reporting. Use the data status service to check when new performance data is available. |
protected
|
$campaignService |
|
#
Handles interaction with the reporting. |


Ninja Money
Visit locations to earn money. Beware, you may lose big at the casino!
Your Gold:
{{ session['gold']}}
Farm
(earn 10-20 gold pieces)
Cave
(earn 5-10 gold pieces)
House
(earn 2-5 gold pieces)
Casino
(earn or lose 0-50 gold pieces)
Activity Log:
{% for i in range(0, session['activity']|length) %} {% if session['sign'][i] == True %}
{{ session['activity'][i] }}
{% endif %} {% if session['sign'][i] == False %}
{{ session['activity'][i] }}
{% endif %} {% endfor%}
Click to start game over


Spawn a command block with an oak button on top
This code will spawn a command block with a command to give the nearest player an arrow with the custom name: Fuel.
Note the use of Face to force the button to be placed on the bottom (floor) of the location.


Tutorial: Using AWS Lambda with Amazon DynamoDB streams
In this tutorial, you create a Lambda function to consume events from an Amazon DynamoDB stream.
Prerequisites
This tutorial assumes that you have some knowledge of basic Lambda operations and the Lambda console. If you haven't already, follow the instructions in Getting started with Lambda to create your first Lambda function.
To complete the following steps, you need a command line terminal or shell to run commands. Commands and the expected output are listed in separate blocks:
this is a command
You should see the following output:
this is output
For long commands, an escape character (\
) is used to split a command over multiple lines.
On Linux and macOS, use your preferred shell and package manager. On Windows 10, you
can install the Windows Subsystem for Linux
Create the execution role
Create the execution role that gives your function permission to access AWS resources.
To create an execution role
-
Open the roles page
in the IAM console. -
Choose Create role.
-
Create a role with the following properties.
-
Trusted entity – Lambda.
-
Permissions – AWSLambdaDynamoDBExecutionRole.
-
Role name –
lambda-dynamodb-role
.
-
The AWSLambdaDynamoDBExecutionRole has the permissions that the function needs to read items from DynamoDB and write logs to CloudWatch Logs.
Create the function
The following example code receives a DynamoDB event input and processes the messages that it contains. For illustration, the code writes some of the incoming event data to CloudWatch Logs.
For sample code in other languages, see Sample function code.
Example index.js
console.log('Loading function'); exports.handler = function(event, context, callback) { console.log(JSON.stringify(event, null, 2)); event.Records.forEach(function(record) { console.log(record.eventID); console.log(record.eventName); console.log('DynamoDB Record: %j', record.dynamodb); }); callback(null, "message"); };
To create the function
-
Copy the sample code into a file named
index.js
. -
Create a deployment package.
zip function.zip index.js
-
Create a Lambda function with the
create-function
command.aws lambda create-function --function-name ProcessDynamoDBRecords \ --zip-file fileb://function.zip --handler index.handler --runtime nodejs12.x \ --role arn:aws:iam::
123456789012
:role/lambda-dynamodb-role
Test the Lambda function
In this step, you invoke your Lambda function manually using the invoke
AWS Lambda CLI command and
the following sample DynamoDB event.
Example input.txt
{ "Records":[ { "eventID":"1", "eventName":"INSERT", "eventVersion":"1.0", "eventSource":"aws:dynamodb", "awsRegion":"us-east-1", "dynamodb":{ "Keys":{ "Id":{ "N":"101" } }, "NewImage":{ "Message":{ "S":"New item!" }, "Id":{ "N":"101" } }, "SequenceNumber":"111", "SizeBytes":26, "StreamViewType":"NEW_AND_OLD_IMAGES" }, "eventSourceARN":"stream-ARN" }, { "eventID":"2", "eventName":"MODIFY", "eventVersion":"1.0", "eventSource":"aws:dynamodb", "awsRegion":"us-east-1", "dynamodb":{ "Keys":{ "Id":{ "N":"101" } }, "NewImage":{ "Message":{ "S":"This item has changed" }, "Id":{ "N":"101" } }, "OldImage":{ "Message":{ "S":"New item!" }, "Id":{ "N":"101" } }, "SequenceNumber":"222", "SizeBytes":59, "StreamViewType":"NEW_AND_OLD_IMAGES" }, "eventSourceARN":"stream-ARN" }, { "eventID":"3", "eventName":"REMOVE", "eventVersion":"1.0", "eventSource":"aws:dynamodb", "awsRegion":"us-east-1", "dynamodb":{ "Keys":{ "Id":{ "N":"101" } }, "OldImage":{ "Message":{ "S":"This item has changed" }, "Id":{ "N":"101" } }, "SequenceNumber":"333", "SizeBytes":38, "StreamViewType":"NEW_AND_OLD_IMAGES" }, "eventSourceARN":"stream-ARN" } ] }
Run the following invoke
command.
aws lambda invoke --function-name ProcessDynamoDBRecords --payload file://input.txt outputfile.txt
The function returns the string message
in the response body.
Verify the output in the outputfile.txt
file.
Create a DynamoDB table with a stream enabled
Create an Amazon DynamoDB table with a stream enabled.
To create a DynamoDB table
-
Open the DynamoDB console
. -
Choose Create table.
-
Create a table with the following settings.
-
Table name –
lambda-dynamodb-stream
-
Primary key –
id
(string)
-
-
Choose Create.
To enable streams
-
Open the DynamoDB console
. -
Choose Tables.
-
Choose the lambda-dynamodb-stream table.
-
Under Overview, choose Manage stream.
-
Choose Enable.
Write down the stream ARN. You need this in the next step when you associate the stream with your Lambda function. For more information on enabling streams, see Capturing table activity with DynamoDB Streams.
Add an event source in AWS Lambda
Create an event source mapping in AWS Lambda. This event source mapping associates the DynamoDB stream with your Lambda function. After you create this event source mapping, AWS Lambda starts polling the stream.
Run the following AWS CLI create-event-source-mapping
command. After the command runs, note
down the UUID. You'll need this UUID to refer to the event source mapping in any commands,
for example, when
deleting the event source mapping.
aws lambda create-event-source-mapping --function-name ProcessDynamoDBRecords \ --batch-size 100 --starting-position LATEST --event-source
DynamoDB-stream-arn
This creates a mapping between the specified DynamoDB stream and the Lambda function. You can associate a DynamoDB stream with multiple Lambda functions, and associate the same Lambda function with multiple streams. However, the Lambda functions will share the read throughput for the stream they share.
You can get the list of event source mappings by running the following command.
aws lambda list-event-source-mappings
The list returns all of the event source mappings you created, and for each mapping
it shows the
LastProcessingResult
, among other things. This field is used to provide an informative message if
there are any problems. Values such as No records processed
(indicates that AWS Lambda has not started
polling or that there are no records in the stream) and OK
(indicates AWS Lambda successfully read
records from the stream and invoked your Lambda function) indicate that there are
no issues. If there are issues,
you receive an error message.
If you have a lot of event source mappings, use the function name parameter to narrow down the results.
aws lambda list-event-source-mappings --function-name ProcessDynamoDBRecords
Test the setup
Test the end-to-end experience. As you perform table updates, DynamoDB writes event records to the stream. As AWS Lambda polls the stream, it detects new records in the stream and invokes your Lambda function on your behalf by passing events to the function.
-
In the DynamoDB console, add, update, and delete items to the table. DynamoDB writes records of these actions to the stream.
-
AWS Lambda polls the stream and when it detects updates to the stream, it invokes your Lambda function by passing in the event data it finds in the stream.
-
Your function runs and creates logs in Amazon CloudWatch. You can verify the logs reported in the Amazon CloudWatch console.
Clean up your resources
You can now delete the resources that you created for this tutorial, unless you want to retain them. By deleting AWS resources that you are no longer using, you prevent unnecessary charges to your AWS account.
To delete the Lambda function
-
Open the Functions page
of the Lambda console. -
Select the function that you created.
-
Choose Actions, Delete.
-
Choose Delete.
To delete the execution role
-
Open the Roles page
of the IAM console. -
Select the execution role that you created.
-
Choose Delete role.
-
Choose Yes, delete.
To delete the DynamoDB table
-
Open the Tables page
of the DynamoDB console. -
Select the table you created.
-
Choose Delete.
-
Enter
delete
in the text box. -
Choose Delete.


Isar735.github.io
Ordinary Differential Equation -- from Wolfram MathWorld.
Buy Schaum's Outline of Differential Equations, 4th Edition (Schaum's Outlines) on Amazon.com FREE SHIPPING on qualified orders. Differential equations homework. Assignment help services provided by assignmenthelp.net have quality solutions for student in Differential Equations Engineering Differential Equations.
Differential Equations Matlab Help, Matlab Assignment.
48 thoughts on “ A Comparison Between Differential Equation Solver Suites In MATLAB, R, Julia, Python, C, Mathematica, Maple, and Fortran. Stewart Calculus Textbooks and Online Course Materials.
Tutoring homework help for math, chemistry, physics. Homework exam help by email, Skype, Whatsapp. I can help with your online class. Free study guides, cheat.
Differential Equations - Linear Equations. A differential equation is an equation that involves the derivatives of a function as well as the function itself. If partial derivatives are involved, the equation. Professional differential equations homework help and assignment solutions. Your differential equations assignment does not have to be the worst experience Test and improve your knowledge of Differential Equations: Homework Help with fun multiple choice exams you can take online with Study.com. The Differential Equations chapter of this Calculus Homework Help course helps students complete their differential equations homework A Comparison Between Differential Equation Solver Suites. Access everything you need for James Stewart Calculus—from textbook supplements, to web resources and homework hints. An ordinary differential equation (frequently called an "ODE," "diff eq," or "diffy Q") is an equality involving a function and its derivatives.
Step-by-step solutions to all your Differential Equations homework questions - Slader. Differential Equations: Homework Help - Videos Lessons. Differential Equation -- from Wolfram MathWorld. In this section we solve linear first order differential equations, i.e. differential equations in the form y' + p(t) y = g(t). We give an in depth overview Differential Equations Homework Help Differential. Differential Equations: Volume 1 - 10 Hour Course.
Equations are mathematical statements that are used to estimate a value and contain one or more unknowns. Equations can use any mathematical operations
Differential Equations Matlab Help, Matlab Assignment Homework Help, Matlab Tutor Differential Equations A first-order ordinary differential equation (ODE).
Differential Equations Assignment Help - Homework.
Math Tutor DVD provides math help online and on DVD in Basic Math, all levels of Algebra, Trig, Calculus, Probability, and Physics. Tutor-Homework.com - Tutoring Homework Here is a set of notes used by Paul Dawkins to teach his Differential Equations course at Lamar University. Included are most of the standard topics Schaum's Outline of Differential Equations, 4th Edition.
Online Differential Equations Homework Help Services. Sunday October 28, 2018 S.O.S. MATHematics is your free resource for math review material from Algebra to Differential Equations! The perfect study Yo :: Homework Help and Answers :: Slader. Differential Equations Homework Help - Differential. Differential Equations: Homework Help - Study.com. Welcome to Online College homework help, Our Expert Differential Equations Tutors are available for Differential Equations Homework Help and assignment. Incorporating an innovative modeling approach, this book for a one-semester differential equations course emphasizes conceptual understanding to help users relate. Differential Equations Textbooks :: Homework
Free step-by-step solutions to millions of textbook and homework questions! - Slader. Differential equations help and answers. Differential equation is a type of mathematical equation for some unknown functions of one variable or several different.


--- title: "Forum" linkTitle: "Forum" menu: main: weight: 4 --- {{< blocks/cover title="You need help?" height="slim" color="white">}} {{< /blocks/cover >}} {{% blocks/lead %}} Ask your question under the following link: Issues {{% /blocks/lead %}}


The Col
object defines the single instance of the cols
collection property used in the Table Object schema.
Two instance types for the Col
object are used internally.
The first, the static object definition, refers to the static Javascript definition.
The second, refers to a Javascript Col
object which is created as part of the static Table Object migration process.
This instance allows the HTML code to directly access methods defined
for the Col object.
The migration process copies all of the static properties to the dynamic version. In addition, each Col
object is assigned a cid
property that represents
a unique system wide ID for that 'Col' object.
It is possible to specify sub-schemas. If one is found the static col
objects specified in the sub-schema are also migrated.
The Col
object definition is found in the cols
property of the Table Object oTabProp
object.
That is the cols
property is an array of one or more 'Col` object definitions. Each definition has one or more of the following properties. Some properties are
interdependent.
Note that the order the columns are in this definition is the order they appear in both the List Controller display and the Edit Controller field display.
The 'Chqs.js' file shows an example of using custHTML
to define a custom HTML file to define the Edit Controller fields and layout. This will override
the sequence of the fields in the definition.
addDefault:
For type
'actions', if false
is specified causes the default 'edit' and 'drop' actions to
not be inserted. If unspecified, the defualt value for addDefault
is true
.
col:
If a literal value is specified it names a reference to a Table
field (the key of a JSON key/value pair).
A non-literal value is assumed to name a locally defined function which makes the value a computed value. The function will be called with the signature
func-name(oObj,scope,oCol)
where oObj
references the Data Object, scope
is the current controller scope and oCol
references the
dynamic Col
instance. It should return a string value. If the computation is extensive the returned value should be cached using the AngularJS $$hash
object for
change detection.
The latter format will cause the type
property to be set to 'virt' while the former will cause the type to be set to 'field'.
cssid:
For type
'panel' and 'cust', causes the HTML element manufactured on behalf of the column to have an 'id' tag of the value specified.
field:
Causes the Col getField
function to return this value other than the computed value.
hideLabel:
Setting this value to false
causes the Triangular system to not generate
the column name label in the edit panel. This is used primarily to improve the format for the 'panel' type
displays.
hint:
Causes col.getHint to be invoked
when Edit Controller displays the column.
html????:
Used to override the automatically manufactured HTML to process a field. This names a standard or custom
template that is injected into the HTML page. The ????
value should be substituted with the mode= HTML parameter on the macro
statement that
is generating the array of columns (They are nested). In most cases the mode is 'Edit' but it can also be 'List' (the default) or 'Cust'.
<macro col='oSubC' objref=oCol.objName mode='Edit' marker=mark-2a></macro>
is an example in 'AppsBase.htm' of how a sub-template is injected.
legend:
For type
'panel', causes the HTML element manufactured on behalf of the column to insert
this value into the <fieldset>
element.
listHint:
Causes col.getListHint to be invoked
when List Controller displays the column.
many:
Setting this property to 'false' causes the Triangular system to
ensure the value of a field is unique across all rows of the Table
. The default for this is true
. This property only has meaning when the type
property is 'field'.
mask:
Setting this property to a quoted Regular Expression causes the
Editor to ensure the field contents matches the mask as part of its validation cycle.
eg. ,mask: '[A-Za-z\\s\.\-]'
meth????:
Used to reference a local function that is to be called by a template function.
The Triangular system will ensure the method pointer is moved to the current scope.
The sample syntax in the template
to reference the function is
<span ng-show='isTrue(oSubC.methHasSubcodes(this,$MODOBJ$,nRow))'>
Refer to macro to see how this is parsed.
place:
Causes col.getPlace to be invoked
when Edit Controller displays the column. The result is inserted into the <input ...> field as a
placeholder
attrribute.
readonly:
Setting this property to 'true' causes the Edit Controller
to prevent input into the field. The default for this is false
.
Setting this value to a local function name means the function will be called with a signature of
fn($scope,oCol)
which expects the value of true
or false
to be returned. The object being edited is located at $scope.oObj
.
This property only has meaning when the type
property is 'field'. Virtual fields (type
== 'virt') automatically
have a readonly
status if the showEdit:true
setting is applied to them.
reqd:
Setting this value to false
makes an input field optional. Setting this property to true
(the default if
not specified) causes the Triangular system to ensure the field contains non-white space data during the validation cycle. ie. The field is "required".
Setting this value to a numeric n
where n
> 0 causes Triangular to ensure the field contains at least n
characters.
schema:
Used in conjunction with type
'panel' or 'list', this value points at a locally referenced
sub-schema that defines properties base
and cols
. The latter defines an array of columns according to this syntax specification. Refer to 'Deps.js' as an example.
showEdit:
Specify a value of true
or false
. A true
setting will cause the field to be shown on the
Edit Controller display.
If not specified only Col.type
values of 'field' are shown.
For type
'panel' this property points to a routine called when a sub-object is edited. See 'Deps.js'
showList:
Specify a value of true
or false
. A true
setting will cause the field to be shown on the
List Controller display.
If not specified only Col.type
values of 'field' or 'virt' or 'actions' are shown.
title:
A literal containing the string to display where the field name is to be shown.
Typically this is List Controller heading or field name in the Edit Controller
If not specified Triangular will insert the function name or referenced field name.
type:
This
property defines the type of column. Many internal routines use this type
to alter their processing paths. The possible value are:
'actions' The actions
property names an array of Action Objects. Refer there to the meaning of the fields within the actions
property.
It is used to add 'actions' to the List Controller display.
Typically the showEdit:false
accompanies this value. The addDefault:false
prevents Triangular from adding the default 'edit' and 'drop' actions.
'field' The col
property references a field in the Data Object. If not defined, the type
property is set to 'field' when col
is a literal.
'list' The editor will show a sub-list of fields using the col
referenced field as the array of sub-objects to list. The schema
property points at another
array of Col
definitions that define the sub-objects. Typically showEdit:true
and showList:false
accompany this type
value.
'panel' The editor will show display an internal panel used to edit a sub-object identified in the a sub-list of fields using the col
referenced field as the array of sub-objects to list. The schema
property points at another
array of Col
definitions that define the sub-objects.
Typically showEdit:true
and showList:false
accompany this type
value and showEdit
names a function
called at the initiation of the sub-edit. In addition the properties htmlCSS
, cssid
and legend
are inspected for values.
'property' The named col
is a collection of properties such as those used in the User record.
'virt' The col
property references a local function that computes the column value. If not defined, the type
property is set to 'virt' when col
is a function reference.


| PostgreSQL Tcl Interface Documentation | ||||
|---|---|---|---|---|
| Prev | Fast Backward | Fast Forward | Next |
pg_on_connection_loss
creates, changes, or cancels a request to execute a callback command if an unexpected loss of connection to the database occurs. With a callbackCommand
parameter, the request is established, or the command string of an already existing request is replaced. With no callbackCommand
parameter, a prior request is canceled.
The callback command string is executed from the Tcl idle loop. That is the normal idle state of an application written with Tk. In non-Tk Tcl shells, you can execute update
or vwait
to cause the idle loop to be entered.


Allocates array of 20 integers and initializes each element by its index multiplied by 5.
A script that compares two char arrays lexicographically (letter by letter).
A script that finds the maximal sequence of equal elements in an array.
A script that finds the maximal increasing sequence in an array.
A script to sort an array using the "selection sort" algorithm.
A script that finds the most frequent number in an array.
A program that finds the index of given element in a sorted array of integers by using the binary search algorithm.


16 GEE, Binary Outcome: Respiratory Illness
16.1 Packages
16.1.1 CRAN
library(tidyverse) # all things tidy
library(pander) # nice looking genderal tabulations
library(furniture) # nice table1() descriptives
library(texreg) # Convert Regression Output to LaTeX or HTML Tables
library(psych) # contains some useful functions, like headTail
library(interactions)
library(performance)
library(lme4) # Linear, generalized linear, & nonlinear mixed models
library(corrplot) # Vizualize correlation matrix
library(gee) # Genderalized Estimation Equation Solver
library(geepack) # Genderalized Estimation Equation Package
library(MuMIn) # Multi-Model Inference (caluclate QIC)
library(HSAUR) # package with the dataset
16.2 Background
This dataset was used as an example in Chapter 11 of “A Handbook of Statistical Analysis using R” by Brian S. Everitt and Torsten Hothorn. The authors include this data set in their HSAUR package on
CRAN
.
The Background
In each of two centers, eligible patients were randomly assigned to active treatment or placebo. During the treatment, the respiratory status (categorized poor or good) was determined at each of four, monthly visits. The trial recruited 111 participants (54 in the active group, 57 in the placebo group) and there were no missing data for either the responses or the covariates.
The Research Question
The question of interest is to assess whether the treatment is effective and to estimate its effect.
Note: We are NOT interested in change over time, but rather mean differences in the treatment group compared to the placebo group, net of any potential confounding due to age, sex, and site.
The Data
Note that the data (555 observations on the following 7 variables) are in long form, i.e, repeated measurements are stored as additional rows in the data frame.
Indicators
subject
the patient ID, a factor with levels 1 to 111centre
the study center, a factor with levels 1 and 2
month
the month, each patient was examined at months 0, 1, 2, 3 and 4
Outcome or dependent variable
status
the respiratory status (response variable), a factor with levels poor and good
Main predictor or independent variable of interest
treatment
the treatment arm, a factor with levels placebo and treatment
Time-invariant Covariates to control for
sex
a factor with levels female and male
age
the age of the patient
16.2.1 Read in the data
data("respiratory", package = "HSAUR")
str(respiratory)
'data.frame': 555 obs. of 7 variables:
$ centre : Factor w/ 2 levels "1","2": 1 1 1 1 1 1 1 1 1 1 ...
$ treatment: Factor w/ 2 levels "placebo","treatment": 1 1 1 1 1 1 1 1 1 1 ...
$ sex : Factor w/ 2 levels "female","male": 1 1 1 1 1 1 1 1 1 1 ...
$ age : num 46 46 46 46 46 28 28 28 28 28 ...
$ status : Factor w/ 2 levels "poor","good": 1 1 1 1 1 1 1 1 1 1 ...
$ month : Ord.factor w/ 5 levels "0"<"1"<"2"<"3"<..: 1 2 3 4 5 1 2 3 4 5 ...
$ subject : Factor w/ 111 levels "1","2","3","4",..: 1 1 1 1 1 2 2 2 2 2 ...
::headTail(respiratory) psych
centre treatment sex age status month subject
1 1 placebo female 46 poor 0 1
112 1 placebo female 46 poor 1 1
223 1 placebo female 46 poor 2 1
334 1 placebo female 46 poor 3 1
... <NA> <NA> <NA> ... <NA> <NA> <NA>
222 2 treatment female 31 good 1 111
333 2 treatment female 31 good 2 111
444 2 treatment female 31 good 3 111
555 2 treatment female 31 good 4 111
16.2.2 Wide Format
Wide format has one line per participant.
<- respiratory %>%
data_wide ::spread(key = month,
tidyrvalue = status,
sep = "_") %>%
::rename("BL_status" = "month_0") %>%
dplyr::arrange(subject) %>%
dplyr::select(subject, centre,
dplyr
sex, age, treatment, starts_with("month"))
BL_status,
::glimpse(data_wide) tibble
Rows: 111
Columns: 10
$ subject <fct> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1…
$ centre <fct> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
$ sex <fct> female, female, female, female, male, female, female, female…
$ age <dbl> 46, 28, 23, 44, 13, 34, 43, 28, 31, 37, 30, 14, 23, 30, 20, …
$ treatment <fct> placebo, placebo, treatment, placebo, placebo, treatment, pl…
$ BL_status <fct> poor, poor, good, good, good, poor, poor, poor, good, good, …
$ month_1 <fct> poor, poor, good, good, good, poor, good, poor, good, poor, …
$ month_2 <fct> poor, poor, good, good, good, poor, poor, poor, good, good, …
$ month_3 <fct> poor, poor, good, good, good, poor, good, poor, good, good, …
$ month_4 <fct> poor, poor, good, poor, good, poor, good, poor, good, poor, …
::headTail(data_wide) psych
subject centre sex age treatment BL_status month_1 month_2 month_3
1 1 1 female 46 placebo poor poor poor poor
2 2 1 female 28 placebo poor poor poor poor
3 3 1 female 23 treatment good good good good
4 4 1 female 44 placebo good good good good
... <NA> <NA> <NA> ... <NA> <NA> <NA> <NA> <NA>
108 108 2 male 39 treatment poor good good good
109 109 2 female 68 treatment poor good good good
110 110 2 male 63 treatment good good good good
111 111 2 female 31 treatment good good good good
month_4
1 poor
2 poor
3 good
4 poor
... <NA>
108 good
109 good
110 good
111 good
16.2.3 Long Format
Long format has one line per observation.
<- data_wide%>%
data_long ::gather(key = month,
tidyrvalue = status,
starts_with("month")) %>%
::mutate(month = str_sub(month, start = -1) %>% as.numeric) %>%
dplyr::mutate(status = case_when(status == "poor" ~ 0,
dplyr== "good" ~ 1)) %>%
status ::arrange(subject, month) %>%
dplyr::select(subject, centre, sex, age, treatment, BL_status, month, status)
dplyr
::glimpse(data_long) tibble
Rows: 444
Columns: 8
$ subject <fct> 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, …
$ centre <fct> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
$ sex <fct> female, female, female, female, female, female, female, fema…
$ age <dbl> 46, 46, 46, 46, 28, 28, 28, 28, 23, 23, 23, 23, 44, 44, 44, …
$ treatment <fct> placebo, placebo, placebo, placebo, placebo, placebo, placeb…
$ BL_status <fct> poor, poor, poor, poor, poor, poor, poor, poor, good, good, …
$ month <dbl> 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, …
$ status <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, …
::headTail(data_long) psych
subject centre sex age treatment BL_status month status
1 1 1 female 46 placebo poor 1 0
2 1 1 female 46 placebo poor 2 0
3 1 1 female 46 placebo poor 3 0
4 1 1 female 46 placebo poor 4 0
... <NA> <NA> <NA> ... <NA> <NA> ... ...
441 111 2 female 31 treatment good 1 1
442 111 2 female 31 treatment good 2 1
443 111 2 female 31 treatment good 3 1
444 111 2 female 31 treatment good 4 1
16.3 Exploratory Data Analysis
16.3.1 Summary Statistics
<IP_ADDRESS> Demographics and Baseline Measure
Notice that numerical summaries are computed for all variables, even the categorical variables (i.e. factors). The have an *
after the variable name to remind you that the mean
, sd
, and se
are of limited use.
Notice: the mean age is 33
%>%
data_wide ::describe(skew = FALSE) psych
vars n mean sd min max range se
subject* 1 111 56.00 32.19 1 111 110 3.06
centre* 2 111 1.50 0.50 1 2 1 0.05
sex* 3 111 1.21 0.41 1 2 1 0.04
age 4 111 33.28 13.65 11 68 57 1.30
treatment* 5 111 1.49 0.50 1 2 1 0.05
BL_status* 6 111 1.45 0.50 1 2 1 0.05
month_1* 7 111 1.59 0.49 1 2 1 0.05
month_2* 8 111 1.54 0.50 1 2 1 0.05
month_3* 9 111 1.59 0.49 1 2 1 0.05
month_4* 10 111 1.53 0.50 1 2 1 0.05
%>%
data_wide ::group_by(treatment) %>%
dplyr::table1("Center" = centre,
furniture"Sex" = sex,
"Age" = age,
"Baseline Status" = BL_status,
caption = "Participant Demographics",
output = "markdown",
na.rm = FALSE,
total = TRUE,
test = TRUE)
| Total | placebo | treatment | P-Value | |
|---|---|---|---|---|
| n = 111 | n = 57 | n = 54 | ||
| Center | 1 | |||
| 1 | 56 (50.5%) | 29 (50.9%) | 27 (50%) | |
| 2 | 55 (49.5%) | 28 (49.1%) | 27 (50%) | |
| NA | 0 (0%) | 0 (0%) | 0 (0%) | |
| Sex | 0.028 | |||
| female | 88 (79.3%) | 40 (70.2%) | 48 (88.9%) | |
| male | 23 (20.7%) | 17 (29.8%) | 6 (11.1%) | |
| NA | 0 (0%) | 0 (0%) | 0 (0%) | |
| Age | 0.771 | |||
| 33.3 (13.7) | 33.6 (13.4) | 32.9 (14.0) | ||
| Baseline Status | 1 | |||
| poor | 61 (55%) | 31 (54.4%) | 30 (55.6%) | |
| good | 50 (45%) | 26 (45.6%) | 24 (44.4%) | |
| NA | 0 (0%) | 0 (0%) | 0 (0%) |
<IP_ADDRESS> Status Over Time
%>%
data_wide ::group_by(treatment) %>%
dplyr::table1("Month One" = month_1,
furniture"Month Two" = month_2,
"Month Three" = month_3,
"Month Four" = month_4,
caption = "Respiratory Status Over Time",
output = "markdown",
na.rm = FALSE,
total = TRUE,
test = TRUE)
| Total | placebo | treatment | P-Value | |
|---|---|---|---|---|
| n = 111 | n = 57 | n = 54 | ||
| Month One | 0.06 | |||
| poor | 46 (41.4%) | 29 (50.9%) | 17 (31.5%) | |
| good | 65 (58.6%) | 28 (49.1%) | 37 (68.5%) | |
| NA | 0 (0%) | 0 (0%) | 0 (0%) | |
| Month Two | 0.002 | |||
| poor | 51 (45.9%) | 35 (61.4%) | 16 (29.6%) | |
| good | 60 (54.1%) | 22 (38.6%) | 38 (70.4%) | |
| NA | 0 (0%) | 0 (0%) | 0 (0%) | |
| Month Three | 0.008 | |||
| poor | 46 (41.4%) | 31 (54.4%) | 15 (27.8%) | |
| good | 65 (58.6%) | 26 (45.6%) | 39 (72.2%) | |
| NA | 0 (0%) | 0 (0%) | 0 (0%) | |
| Month Four | 0.068 | |||
| poor | 52 (46.8%) | 32 (56.1%) | 20 (37%) | |
| good | 59 (53.2%) | 25 (43.9%) | 34 (63%) | |
| NA | 0 (0%) | 0 (0%) | 0 (0%) |
Correlation between repeated observations:
%>%
data_wide ::select(starts_with("month")) %>%
dplyr::mutate_all(function(x) x == "good") %>%
dplyrcor() %>%
::corrplot.mixed() corrplot
<- data_long %>%
data_month_trt_prop ::group_by(treatment, month) %>%
dplyr::summarise(n = n(),
dplyrprop_good = mean(status),
prop_sd = sd(status),
prop_se = prop_sd/sqrt(n))
data_month_trt_prop
# A tibble: 8 × 6
# Groups: treatment [2]
treatment month n prop_good prop_sd prop_se
<fct> <dbl> <int> <dbl> <dbl> <dbl>
1 placebo 1 57 0.491 0.504 0.0668
2 placebo 2 57 0.386 0.491 0.0651
3 placebo 3 57 0.456 0.503 0.0666
4 placebo 4 57 0.439 0.501 0.0663
5 treatment 1 54 0.685 0.469 0.0638
6 treatment 2 54 0.704 0.461 0.0627
7 treatment 3 54 0.722 0.452 0.0615
8 treatment 4 54 0.630 0.487 0.0663
16.3.2 Visualization
<IP_ADDRESS> Age
%>%
data_wide ggplot(aes(age)) +
geom_histogram(binwidth = 5,
color = "black",
alpha = .3) +
geom_vline(xintercept = c(20, 35, 45),
color = "red") +
theme_bw() +
facet_grid(treatment ~ .)
<IP_ADDRESS> Status by Age
%>%
data_wide ::mutate(n_good = furniture::rowsums(month_1 == "good",
dplyr== "good",
month_2 == "good",
month_3 == "good")) %>%
month_4 ggplot(aes(x = age,
y = n_good)) +
geom_count() +
geom_smooth() +
theme_bw() +
labs(x = "Age in Years",
y = "Number of Visits out of Four, with 'Good' Respiration")
<IP_ADDRESS> Status Over Time
It apears that status is fairly constant over time.
%>%
data_month_trt_prop ggplot(aes(x = month,
y = prop_good,
group = treatment,
color = treatment)) +
geom_errorbar(aes(ymin = prop_good - prop_se,
ymax = prop_good + prop_se),
width = .25) +
geom_point() +
geom_line() +
theme_bw() +
labs(x = "Time, months",
y = "Proportion of Participants\nwith 'Good' Respiratory Status") +
theme(legend.position = "bottom",
legend.key.width = unit(1.5, "cm"))
It is NOT the purpose of this analysis to investigate change over time!
Since status is largely stable over time, no linear (or even
quadratic) effect of the month
variable will be
modeled.
 THIS IS DONE FOR ILLUSTRATION PURPOSES ONLY!
Since participants in the middle ages seem to do worse than either extreme, the potential quadratic effect of age will be included. Age is also being grand-mean centered to make the intercept more meaningful.
16.4.1 Fit the Model
<- glm(status ~ centre + treatment + sex + BL_status +
resp_glm I(age-33) + I((age-33)^2),
data = data_long,
family = binomial(link = "logit"))
summary(resp_glm)
Call:
glm(formula = status ~ centre + treatment + sex + BL_status +
I(age - 33) + I((age - 33)^2), family = binomial(link = "logit"),
data = data_long)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.5965 -0.9178 0.3985 0.8388 2.0988
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.9685725 0.2733549 -7.202 5.95e-13 ***
centre2 0.5347938 0.2464412 2.170 0.030002 *
treatmenttreatment 1.3561814 0.2447533 5.541 3.01e-08 ***
sexmale 0.4263433 0.3175081 1.343 0.179343
BL_statusgood 1.9193401 0.2500033 7.677 1.63e-14 ***
I(age - 33) -0.0368535 0.0106382 -3.464 0.000532 ***
I((age - 33)^2) 0.0025169 0.0006352 3.963 7.41e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 608.93 on 443 degrees of freedom
Residual deviance: 465.25 on 437 degrees of freedom
AIC: 479.25
Number of Fisher Scoring iterations: 4
16.4.2 Tabulate the Model Parameters
::knitreg(list(resp_glm,
texreg::extract_glm_exp(resp_glm,
texreghelprinclude.any = FALSE)),
custom.model.names = c("b (SE)", "OR [95 CI]"),
caption = "Logistic Generalized Linear Regression (GLM)",
single.row = TRUE,
digits = 3,
ci.test = 1)
| b (SE) | OR [95 CI] | |
|---|---|---|
| (Intercept) | -1.969 (0.273)*** | 0.140 [0.080; 0.234]* |
| centre2 | 0.535 (0.246)* | 1.707 [1.054; 2.775]* |
| treatmenttreatment | 1.356 (0.245)*** | 3.881 [2.422; 6.334]* |
| sexmale | 0.426 (0.318) | 1.532 [0.826; 2.875] |
| BL_statusgood | 1.919 (0.250)*** | 6.816 [4.221; 11.271]* |
| age - 33 | -0.037 (0.011)*** | 0.964 [0.943; 0.984]* |
| (age - 33)^2 | 0.003 (0.001)*** | 1.003 [1.001; 1.004]* |
| AIC | 479.253 | |
| BIC | 507.924 | |
| Log Likelihood | -232.626 | |
| Deviance | 465.253 | |
| Num. obs. | 444 | |
| ***p < 0.001; **p < 0.01; *p < 0.05 (or Null hypothesis value outside the confidence interval). |
16.5 Generalized Estimating Equations (GEE)
Again, since participants age is likely to be a risk at either end of the spectrum, the potential quadratic effect of age will be modeled. Age is also being grand-mean centered to make the intercept more meaningful.
16.5.1 Indepdendence
Using an "independence"
correlation structure is equivalent to using a GLM analysis (logistic regression in this case) and is never appropriate for repeated measures data. It is only being done here for comparison purposes.
<- gee::gee(status ~ centre + treatment + sex + BL_status +
resp_gee_in I(age-33) + I((age-33)^2),
data = data_long,
family = binomial(link = "logit"),
id = subject,
corstr = "independence",
scale.fix = TRUE,
scale.value = 1)
(Intercept) centre2 treatmenttreatment sexmale
-1.968572485 0.534793799 1.356181372 0.426343291
BL_statusgood I(age - 33) I((age - 33)^2)
1.919340141 -0.036853528 0.002516859
summary(resp_gee_in)
GEE: GENERALIZED LINEAR MODELS FOR DEPENDENT DATA
gee S-function, version 4.13 modified 98/01/27 (1998)
Model:
Link: Logit
Variance to Mean Relation: Binomial
Correlation Structure: Independent
Call:
gee::gee(formula = status ~ centre + treatment + sex + BL_status +
I(age - 33) + I((age - 33)^2), id = subject, data = data_long,
family = binomial(link = "logit"), corstr = "independence",
scale.fix = TRUE, scale.value = 1)
Summary of Residuals:
Min 1Q Median 3Q Max
-0.96563962 -0.34372730 0.07631922 0.29658264 0.88947816
Coefficients:
Estimate Naive S.E. Naive z Robust S.E. Robust z
(Intercept) -1.968572493 0.2733635751 -7.201298 0.4457014141 -4.4167966
centre2 0.534793799 0.2464443046 2.170039 0.3795759846 1.4089242
treatmenttreatment 1.356181377 0.2447584751 5.540896 0.3777998909 3.5896818
sexmale 0.426343293 0.3175134753 1.342757 0.4832336627 0.8822715
BL_statusgood 1.919340146 0.2500092510 7.677077 0.3772812271 5.0872930
I(age - 33) -0.036853528 0.0106384086 -3.464196 0.0150120266 -2.4549336
I((age - 33)^2) 0.002516859 0.0006351834 3.962414 0.0007592432 3.3149582
Estimated Scale Parameter: 1
Number of Iterations: 1
Working Correlation
[,1] [,2] [,3] [,4]
[1,] 1 0 0 0
[2,] 0 1 0 0
[3,] 0 0 1 0
[4,] 0 0 0 1
The results for GEE fit with the independence correlation structure produces results that are nearly identical to the GLM model.
The robust (sandwich) standard errors are however much larger than the naive standard errors.
16.5.2 Exchangeable
<- gee::gee(status ~ centre + treatment + sex + BL_status +
resp_gee_ex I(age-33) + I((age-33)^2),
data = data_long,
family = binomial(link = "logit"),
id = subject,
corstr = "exchangeable",
scale.fix = TRUE,
scale.value = 1)
(Intercept) centre2 treatmenttreatment sexmale
-1.968572485 0.534793799 1.356181372 0.426343291
BL_statusgood I(age - 33) I((age - 33)^2)
1.919340141 -0.036853528 0.002516859
summary(resp_gee_ex)
GEE: GENERALIZED LINEAR MODELS FOR DEPENDENT DATA
gee S-function, version 4.13 modified 98/01/27 (1998)
Model:
Link: Logit
Variance to Mean Relation: Binomial
Correlation Structure: Exchangeable
Call:
gee::gee(formula = status ~ centre + treatment + sex + BL_status +
I(age - 33) + I((age - 33)^2), id = subject, data = data_long,
family = binomial(link = "logit"), corstr = "exchangeable",
scale.fix = TRUE, scale.value = 1)
Summary of Residuals:
Min 1Q Median 3Q Max
-0.96563962 -0.34372730 0.07631922 0.29658264 0.88947816
Coefficients:
Estimate Naive S.E. Naive z Robust S.E. Robust z
(Intercept) -1.968572493 0.379830796 -5.1827617 0.4457014141 -4.4167966
centre2 0.534793799 0.342427246 1.5617735 0.3795759846 1.4089242
treatmenttreatment 1.356181377 0.340084835 3.9877737 0.3777998909 3.5896818
sexmale 0.426343293 0.441175807 0.9663796 0.4832336627 0.8822715
BL_statusgood 1.919340146 0.347380636 5.5251789 0.3772812271 5.0872930
I(age - 33) -0.036853528 0.014781762 -2.4931757 0.0150120266 -2.4549336
I((age - 33)^2) 0.002516859 0.000882569 2.8517424 0.0007592432 3.3149582
Estimated Scale Parameter: 1
Number of Iterations: 1
Working Correlation
[,1] [,2] [,3] [,4]
[1,] 1.00000 0.31021 0.31021 0.31021
[2,] 0.31021 1.00000 0.31021 0.31021
[3,] 0.31021 0.31021 1.00000 0.31021
[4,] 0.31021 0.31021 0.31021 1.00000
Notice that the naive standard errors are more similar to the robust (sandwich) standard errors, supporting that this is a better fitting model
16.5.3 Paramgeter Estimates Table
The GEE models display the robust (sandwich) standard errors.
<IP_ADDRESS> Raw Estimates (Logit Scale)
::knitreg(list(resp_glm,
texreg
resp_gee_in,
resp_gee_ex),custom.model.names = c("GLM",
"GEE-INDEP",
"GEE-EXCH"),
caption = "Estimates on Logit Scale",
single.row = TRUE,
digits = 4)
| GLM | GEE-INDEP | GEE-EXCH | |
|---|---|---|---|
| (Intercept) | -1.9686 (0.2734)*** | -1.9686 (0.4457)*** | -1.9686 (0.4457)*** |
| centre2 | 0.5348 (0.2464)* | 0.5348 (0.3796) | 0.5348 (0.3796) |
| treatmenttreatment | 1.3562 (0.2448)*** | 1.3562 (0.3778)*** | 1.3562 (0.3778)*** |
| sexmale | 0.4263 (0.3175) | 0.4263 (0.4832) | 0.4263 (0.4832) |
| BL_statusgood | 1.9193 (0.2500)*** | 1.9193 (0.3773)*** | 1.9193 (0.3773)*** |
| age - 33 | -0.0369 (0.0106)*** | -0.0369 (0.0150)* | -0.0369 (0.0150)* |
| (age - 33)^2 | 0.0025 (0.0006)*** | 0.0025 (0.0008)*** | 0.0025 (0.0008)*** |
| AIC | 479.2530 | ||
| BIC | 507.9238 | ||
| Log Likelihood | -232.6265 | ||
| Deviance | 465.2530 | ||
| Num. obs. | 444 | 444 | 444 |
| Scale | 1.0000 | 1.0000 | |
| ***p < 0.001; **p < 0.01; *p < 0.05 |
Comparing the two GEE models: parameters are identical and so are the robust (sandwich) standard errors.
<IP_ADDRESS> Exponentiate the Estimates (odds ratio scale)
::knitreg(list(extract_glm_exp(resp_glm),
texregextract_gee_exp(resp_gee_in),
extract_gee_exp(resp_gee_ex)),
custom.model.names = c("GLM",
"GEE-INDEP",
"GEE-EXCH"),
caption = "Estimates on Odds-Ratio Scale",
single.row = TRUE,
ci.test = 1,
digits = 3)
| GLM | GEE-INDEP | GEE-EXCH | |
|---|---|---|---|
| (Intercept) | 0.140 [0.080; 0.234]* | 0.140 [0.058; 0.335]* | 0.140 [0.058; 0.335]* |
| centre2 | 1.707 [1.054; 2.775]* | 1.707 [0.811; 3.592] | 1.707 [0.811; 3.592] |
| treatmenttreatment | 3.881 [2.422; 6.334]* | 3.881 [1.851; 8.139]* | 3.881 [1.851; 8.139]* |
| sexmale | 1.532 [0.826; 2.875] | 1.532 [0.594; 3.949] | 1.532 [0.594; 3.949] |
| BL_statusgood | 6.816 [4.221; 11.271]* | 6.816 [3.254; 14.279]* | 6.816 [3.254; 14.279]* |
| age - 33 | 0.964 [0.943; 0.984]* | 0.964 [0.936; 0.993]* | 0.964 [0.936; 0.993]* |
| (age - 33)^2 | 1.003 [1.001; 1.004]* | 1.003 [1.001; 1.004]* | 1.003 [1.001; 1.004]* |
| Dispersion | 1.000 | 1.000 | |
| * Null hypothesis value outside the confidence interval. |
<IP_ADDRESS> Manual Extraction
%>% coef() %>% exp() resp_gee_ex
(Intercept) centre2 treatmenttreatment sexmale
0.1396561 1.7070962 3.8813436 1.5316465
BL_statusgood I(age - 33) I((age - 33)^2)
6.8164591 0.9638173 1.0025200
<- summary(resp_gee_ex)$coeff["treatmenttreatment", "Estimate"]
trt_EST trt_EST
[1] 1.356181
exp(trt_EST)
[1] 3.881344
<- summary(resp_gee_ex)$coeff["treatmenttreatment", "Robust S.E."]
Trt_SE Trt_SE
[1] 0.3777999
<- trt_EST + c(-1, +1)*1.96*Trt_SE
trt_95ci trt_95ci
[1] 0.6156936 2.0966692
exp(trt_95ci)
[1] 1.850940 8.139015
16.5.4 Final Model
<IP_ADDRESS> Estimates on both the logit and odds-ratio scales
::knitreg(list(resp_gee_ex,
texreg::extract_gee_exp(resp_gee_ex,
texreghelprinclude.any = FALSE)),
custom.model.names = c("b (SE)",
"OR [95 CI]"),
custom.coef.map = list("(Intercept)" = "(Intercept)",
centre2 = "Center 2 vs. 1",
sexmale = "Male vs. Female",
BL_statusgood = "BL Good vs. Poor",
"I(age - 33)" = "Age (Yrs post 33)",
"I((age - 33)^2)" = "Age-Squared",
treatmenttreatment = "Treatment"),
caption = "GEE: Final Model (exchangable)",
ci.test = 1,
single.row = TRUE,
digits = 3)
| b (SE) | OR [95 CI] | |
|---|---|---|
| (Intercept) | -1.969 (0.446)*** | 0.140 [0.058; 0.335]* |
| Center 2 vs. 1 | 0.535 (0.380) | 1.707 [0.811; 3.592] |
| Male vs. Female | 0.426 (0.483) | 1.532 [0.594; 3.949] |
| BL Good vs. Poor | 1.919 (0.377)*** | 6.816 [3.254; 14.279]* |
| Age (Yrs post 33) | -0.037 (0.015)* | 0.964 [0.936; 0.993]* |
| Age-Squared | 0.003 (0.001)*** | 1.003 [1.001; 1.004]* |
| Treatment | 1.356 (0.378)*** | 3.881 [1.851; 8.139]* |
| Scale | 1.000 | |
| Num. obs. | 444 | |
| Dispersion | 1.000 | |
| ***p < 0.001; **p < 0.01; *p < 0.05 (or Null hypothesis value outside the confidence interval). |
<IP_ADDRESS> Interpretation
centre
: Controlling for baseline status, sex, age, and treatment, participants at the two centers did not significantly differ in respiratory status during the interventionsex
: Controlling for baseline status, center, age, and treatment, a participant’s respiratory status did not differ between the two sexes.BL_status
: Controlling for sex, center, age, and treatment, those with good baseline status had nearly 7 times higher odds of having a good respiratory status, compared to participants that starts out poor.age
: Controlling for baseline status, sex, center, and treatment, the role of age was non-linear, such that the odds of a good respiratory status was lowest for patients age 40 and better for those that were either younger or older.
Most importantly:
treatment
: Controlling for baseline status, sex, age, and center, those on the treatment had 3.88 time higher odds of having a good respiratory status, compared to similar participants that were randomized to the placebo.
16.5.5 Predicted Probabilities
<IP_ADDRESS> Refit with the geepack
package
This package lets you plot, but not put the results in a table.
<- geepack::geeglm(status ~ centre + treatment + sex + BL_status +
resp_geeglm_ex I(age-33) + I((age-33)^2),
data = data_long,
family = binomial(link = "logit"),
id = subject,
waves = month,
corstr = "exchangeable")
<IP_ADDRESS> Make predictions
What is the change a 40 year old man in poor condition at center 1 change of being rated as being in “Good” respiratory condition?
%>%
resp_geeglm_ex ::emmeans(pairwise ~ treatment,
emmeansat = list(centre = "1",
sex = "male",
age = 40,
BL_status = "poor"),
type = "response")
$emmeans
treatment prob SE df asymp.LCL asymp.UCL
placebo 0.158 0.0548 Inf 0.0768 0.296
treatment 0.421 0.1164 Inf 0.2215 0.649
Covariance estimate used: vbeta
Confidence level used: 0.95
Intervals are back-transformed from the logit scale
$contrasts
contrast odds.ratio SE df null z.ratio p.value
placebo / treatment 0.258 0.0973 Inf 1 -3.590 0.0003
Tests are performed on the log odds ratio scale
A 40 year old man in poor condition at center 1 has a 15.8% change of being rated as being in “Good” respiratory condition if he was randomized to placebo.
A 40 year old man in poor condition at center 1 has a 42.1% change of being rated as being in “Good” respiratory condition if he was randomized to placebo.
The odds ratio for treatment is:
421/(1 -.421) )/( .158/(1 - .158)) (.
[1] 3.874882
16.5.6 Marginal Plot to Visualize the Model
<IP_ADDRESS> Quickest Version
The interactions::interact_plot()
function can only investigate 3 variables at once:
pred
the x-axis (must be continuous)modx
different lines (may be categorical or continuous)mod2
side-by-side panels (may be categorical or continuous)
All other variables must be held constant.
::interact_plot(model = resp_geeglm_ex, # model name
interactionspred = age, # x-axis
modx = treatment, # lines
mod2 = sex, # panels
data = data_long,
at = list(centre = "1",
BL_status = "good"), # hold constant
type = "mean_subject") +
theme_bw()
<IP_ADDRESS> Full Version
Makes a dataset with all combinations
%>%
resp_geeglm_ex ::emmeans(~ centre + treatment + sex + age + BL_status,
emmeansat = list(age = c(20, 35, 50)),
type = "response") %>%
data.frame()
centre treatment sex age BL_status prob SE df asymp.LCL
1 1 placebo female 20 poor 0.2565215 0.06548740 Inf 0.14967845
2 2 placebo female 20 poor 0.3706723 0.12112814 Inf 0.17551296
3 1 treatment female 20 poor 0.5724989 0.07094442 Inf 0.43141390
4 2 treatment female 20 poor 0.6956880 0.09012479 Inf 0.49811941
5 1 placebo male 20 poor 0.3457476 0.10327449 Inf 0.17761271
6 2 placebo male 20 poor 0.4742752 0.11897826 Inf 0.26149005
7 1 treatment male 20 poor 0.6722540 0.13353316 Inf 0.38474268
8 2 treatment male 20 poor 0.7778518 0.09957372 Inf 0.53090485
9 1 placebo female 35 poor 0.1158621 0.04715858 Inf 0.05047400
10 2 placebo female 35 poor 0.1828109 0.09160156 Inf 0.06302045
11 1 treatment female 35 poor 0.3371478 0.06614826 Inf 0.22163454
12 2 treatment female 35 poor 0.4647493 0.11044788 Inf 0.26669467
13 1 placebo male 35 poor 0.1671630 0.05669685 Inf 0.08286363
14 2 placebo male 35 poor 0.2551987 0.08445543 Inf 0.12543357
15 1 treatment male 35 poor 0.4379004 0.11914059 Inf 0.23176597
16 2 treatment male 35 poor 0.5707977 0.11262714 Inf 0.35070552
17 1 placebo female 50 poor 0.1338069 0.05877875 Inf 0.05408046
18 2 placebo female 50 poor 0.2086774 0.10132831 Inf 0.07340015
19 1 treatment female 50 poor 0.3748352 0.08438493 Inf 0.22840791
20 2 treatment female 50 poor 0.5058160 0.11024112 Inf 0.30129761
21 1 placebo male 50 poor 0.1913338 0.06744244 Inf 0.09148083
22 2 placebo male 50 poor 0.2877016 0.08618754 Inf 0.15047521
23 1 treatment male 50 poor 0.4787165 0.12607341 Inf 0.25438187
24 2 treatment male 50 poor 0.6105461 0.10299001 Inf 0.40147684
25 1 placebo female 20 good 0.7016595 0.07358528 Inf 0.54146521
26 2 placebo female 20 good 0.8005933 0.06259978 Inf 0.65055094
27 1 treatment female 20 good 0.9012681 0.04083868 Inf 0.78782754
28 2 treatment female 20 good 0.9396977 0.02445873 Inf 0.86991509
29 1 placebo male 20 good 0.7827145 0.10216134 Inf 0.52603135
30 2 placebo male 20 good 0.8601276 0.06117585 Inf 0.69417730
31 1 treatment male 20 good 0.9332512 0.04985998 Inf 0.74440141
32 2 treatment male 20 good 0.9597874 0.02684720 Inf 0.85926193
33 1 placebo female 35 good 0.4718119 0.09433741 Inf 0.29842235
34 2 placebo female 35 good 0.6039430 0.10310876 Inf 0.39581143
35 1 treatment female 35 good 0.7761395 0.06499212 Inf 0.62484433
36 2 treatment female 35 good 0.8554625 0.04422313 Inf 0.74594602
37 1 placebo male 35 good 0.5777323 0.12049412 Inf 0.34195766
38 2 placebo male 35 good 0.7002031 0.08237976 Inf 0.51976564
39 1 treatment male 35 good 0.8415295 0.08778590 Inf 0.59374248
40 2 treatment male 35 good 0.9006481 0.04809252 Inf 0.75970156
41 1 placebo female 50 good 0.5129046 0.11084368 Inf 0.30619949
42 2 placebo female 50 good 0.6425442 0.10133622 Inf 0.43086572
43 1 treatment female 50 good 0.8034205 0.06889169 Inf 0.63480235
44 2 treatment female 50 good 0.8746381 0.04007282 Inf 0.77316863
45 1 placebo male 50 good 0.6172692 0.12419998 Inf 0.36530393
46 2 placebo male 50 good 0.7335613 0.07358316 Inf 0.56828932
47 1 treatment male 50 good 0.8622559 0.08077815 Inf 0.62272870
48 2 treatment male 50 good 0.9144286 0.04091477 Inf 0.79316718
asymp.UCL
1 0.4034454
2 0.6197250
3 0.7027009
4 0.8404014
5 0.5639080
6 0.6968321
7 0.8705984
8 0.9154912
9 0.2441759
10 0.4266250
11 0.4760446
12 0.6745823
13 0.3083856
14 0.4501170
15 0.6679641
16 0.7660522
17 0.2944776
18 0.4674867
19 0.5484142
20 0.7084063
21 0.3573127
22 0.4794448
23 0.7119772
24 0.7855878
25 0.8240720
26 0.8964652
27 0.9573405
28 0.9731995
29 0.9212093
30 0.9433731
31 0.9853203
32 0.9893963
33 0.6522803
34 0.7801931
35 0.8783030
36 0.9226636
37 0.7827093
38 0.8344399
39 0.9507268
40 0.9629541
41 0.7152881
42 0.8101781
43 0.9057445
44 0.9345587
45 0.8188185
46 0.8520359
47 0.9595797
48 0.9675094
In order to include all FIVE variables, we must do it the LONG way…
%>%
resp_geeglm_ex ::emmeans(~ centre + treatment + sex + age + BL_status,
emmeansat = list(age = seq(from = 11, to = 68, by = 1)),
type = "response",
level = .68) %>%
data.frame() %>%
ggplot(aes(x = age,
y = prob,
group = interaction(sex, treatment))) +
geom_ribbon(aes(ymin = asymp.LCL,
ymax = asymp.UCL,
fill = fct_rev(sex)),
alpha = .3) +
geom_line(aes(color = fct_rev(sex),
linetype = fct_rev(treatment))) +
theme_bw() +
facet_grid(centre ~ BL_status, labeller = label_both) +
labs(x = "Age, years",
y = "Predicted Probability of GOOD Respiratory Status",
color = "Sex:",
fill = "Sex:",
linetype = "Assignment:") +
theme(legend.position = "bottom")
<IP_ADDRESS> Females in Center 1
This example uses default settings.
::interact_plot(model = resp_geeglm_ex,
interactionspred = age,
modx = treatment,
mod2 = BL_status,
at = list(sex = "female",
centre = "1"))
<IP_ADDRESS> Males in Center 2
This example is more preped for publication.
::interact_plot(model = resp_geeglm_ex,
interactionspred = age,
modx = treatment,
mod2 = BL_status,
at = list(sex = "male",
centre = "2"),
x.label = "Age in Years",
y.label = "Predicted Probability of 'Good' Respiratory Status",
legend.main = "Intervention: ",
mod2.labels = c("Poor at Baseline",
"Good at Baseline"),
colors = rep("black", times = 2)) +
theme_bw() +
theme(legend.position = c(1, 0),
legend.justification = c(1.1, -0.1),
legend.background = element_rect(color = "black"),
legend.key.width = unit(1.5, "cm")) +
labs(caption = "Note: Probibilities shown are specific to males at center 2")
%>%
resp_geeglm_ex ::emmeans(~ centre + treatment + sex + age + BL_status,
emmeansat = list(age = seq(from = 11, to = 68, by = 1),
sex = "male",
centre = "2"),
type = "response",
level = .68) %>%
data.frame() %>%
ggplot(aes(x = age,
y = prob,
group = interaction(sex, treatment))) +
geom_ribbon(aes(ymin = asymp.LCL,
ymax = asymp.UCL),
alpha = .2) +
geom_line(aes(linetype = fct_rev(treatment))) +
theme_bw() +
facet_grid(~ BL_status) +
labs(x = "Age, years",
y = "Predicted Probability of\nGOOD Respiratory Status",
color = "Sex:",
fill = "Sex:",
linetype = "Assignment:") +
theme(legend.position = "bottom")
16.6 Conclusion
The Research Question
The question of interest is to assess whether the treatment is effective and to estimate its effect.
The Conclusion
After accounting for baseline status, age, sex and center, participants in the active treatment group had nearly four times higher odds of having ‘good’ respiratory status, when compared to the placebo, exp(b) = 3.881, p<.001, 95% CI [1.85, 8.14].


Secret Sharing Capstone¶
ThresTree¶
-
class
ThresTree.
ThresTree
[source]¶ Tree designed to be used with Adi Shamir’s (n, k)-thresholding scheme.
-
root
¶ TreeNode – The root node of the tree.
-
addChild
(addr)[source]¶ Add a child node to a node at a given address.
Parameters: addr (String) – Address of node that new node is being added to with the format ‘#:#:#:…’.
-
propagate
(data=None)[source]¶ Propogates the tree with data. If none is given a DSA key-pair will be generated by the Voter class.
Parameters: data (int) – The data to be propogated down the tree. (Usually None)
-
-
class
ThresTree.
TreeNode
(addr, parent=None)[source]¶ Nodes used by the Tree object
-
addr
¶ String – Address of this node.
-
parent
¶ TreeNode – Parent node.
-
documents
¶ list – Documents list.
-
voter
¶ Voter – Voter object.
-
finalized
¶ boolean – Keeps track of whether this node has been finalized.
-
current_vote
¶ String, String – The documents that is currently being voted on.
-
already_voted
¶ list – List of node address that have already voted.
Note
already_voted variable is only used if this node has child nodes.
-
finalize
(data=None)[source]¶ Creates a voter object for each non-leaf node and sets key data for each leaf.
Parameters: data (int, int) – key data from parent nodes Returns: True if the signature is correct, False otherwise. Return type: boolean
-
show_documents
(verified_only=False)[source]¶ Displays all of the documents for root.
Parameters: verified_only (boolean) – Flag to only print verified/signed documents Todo
Implement this for all levels of ducument sets. e.g. print documents for address 0:2. Requires implementing DSA signing on all levels.
-
split
(n, k)[source]¶ Split a node from being a leaf to having children.
Parameters: - n (int) – The number of key to generate for this voter.
- k (int) – The number of vote required to pass a vote.
-
vote
(doc, key=None)[source]¶ Votes on a given document
Parameters: - doc (String, String) – The document being voted on. First element is the file name. Second is the document’s text.
- key (int, int) – key data passed up from child nodes
Todo
Turn current_vote into a queue of documents waiting to be voted on.
-
Voter¶
-
class
Voter.
Voter
(node, n, k, prime_size=1024)[source]¶ - Voter implements a (n,k)-threshold scheme which is capable of submiting
- a signature.
-
prime_size
¶ int – Size of the prime number. (Default: 1024)
-
p
¶ int – The prime number.
-
n
¶ int – The number of keys to make with Shamir’s Scheme.
-
k
¶ int – The number of keys required to construct the data.
-
values
¶ list – The values for the active Asynchronous Neville’s Method.
-
pubKey
¶ PubKey – Public Key object for DSA.
-
node
¶ TreeNoe – The node this Voter belongs to.
Note
Digital Signature Specifications (DSS) specifies that the prime length should be 1024/2048 (Can’t Remember).
-
add_key_to_signature
(key, doc)[source]¶ Function implements the Asynchronous Neville’s Method and adds the given key to the in progress vote.
Parameters: - key (int, int) – The key being added to the LIP.
- doc – The document being voted on.
Todo
Ensure that the submitted key is actually valid. ie. It is from the set of keys originally generated for this voter.
Note
This function returns both a signature if there is one, and a boolean of whether or not a vote has finished.
-
generate_scheme
(data=None)[source]¶ Generates the private-public key pair, the polynomial, and the keys for this voter.
Parameters: data – The data to be used as the secret data. (Note: None means the voter is for root node.) Todo
Implement non-root DSA key pairs. This is to allow for signing of sub-root document sets. Problem consists of being given a private key and having to generate a public key.
-
sign
(doc, private_key)[source]¶ Function creates the digital signature for a given document with this voter’s private key.
Parameters: doc – The document that is being signed. Returns: A signature if this node has a public key, else None. Return type: (int, int) Todo
Right now the doc param is a string 2-tuple, this might be better as just a String since all that is needed is the document text and it would be more intuitive for future users.
-
verify
(doc, signature)[source]¶ Function verifies a digital signature. for a given document with this voter’s public key.
Parameters: - doc (String) – The document that is being signed.
- signature (int, int) – DSA signature being verified.
Returns: True if the voter has a public key and the signature is correct, False otherwise.
Return type: boolean
TreeMaker¶
-
class
TreeMaker.
TreeMaker
[source]¶ docstring for TreeMaker
-
help
(command=None)[source]¶ Prints help information.
Args: command (String): The command to print help information for.
Todo
The help documentation needs to finished.
-
VoteSession¶
-
class
VoteSession.
VoteSim
(tree)[source]¶ docstring for VoteSim
-
help
(command=None)[source]¶ Prints help information.
Parameters: - command (String) – The command to print help information for.
- Todo – The help documentation needs to finished.
-
Toolkit¶
-
Toolkit.
convvert_to_PEM
(private_key)[source]¶ Converts a private key integer to PEM format
Todo
Implement this… Maybe… This may be needed for making document sets on lower levels of the hierarchy.
-
Toolkit.
data_to_key
(data, p)[source]¶ Calculates a congruent integer to the numerator that is divisible by the denominator.
Parameters: - data (int) –
.
- n (int) – The maximum number the first term in the key can be.
Returns: key. The key pair from the given encoded integer.
Return type: (int, int)
- data (int) –
-
Toolkit.
find_divisible_congruency
(fraction, p)[source]¶ Calculates a congruent integer to the numerator that is divisible by the denominator.
Parameters: fraction (Fraction) – fraction, the fraction in question. Returns: The z such that z = (num + i*prime)/den and z is an integer (without trunction). Return type: int
-
Toolkit.
generate_keys
(poly, n, p)[source]¶ Creates the keys for distributing.
Parameters: - poly (Polynomial) – Polynomial function to create the keys.
- n (int) –
- p (int) – The prime modulus.
Returns: list of key pairs generated by Shamir’s Scheme.
Return type: list of int tuples
-
Toolkit.
generate_polynomial
(data, k, p)[source]¶ Makes a random polynomial with data as the coeficient term.
Parameters: - data (int) – The data as a numeric value to be split.
- k (int) – The number of points required to interpolate the polynomial, which is the polynomial’s order plus one.
- p (int) – The prime modulus.
Returns: polynomial as a lambda function.
Return type:
-
Toolkit.
key_to_data
(key, n)[source]¶ Calculates a congruent integer to the numerator that is divisible by the denominator.
Parameters: - key (int, int) – The key pair to be encoded.
- n (int) – The maximum number the first term in the key can be.
Returns: data. The key pair encoded as an integer.
Return type: int
-
Toolkit.
next_multiple_of_128
(data)[source]¶ Calculates the smallest number of bits bigger than the length of data and a multiple of 128.
-
Toolkit.
nthOrderLag
(values, n)[source]¶ Calculates the (n)th-ordered Lagrangian Interpolating Polynomial, evaluated at 0.
Parameters: n (int) – The order of the next LIP. Returns: A fraction containing the value of the nth LIP, evaluated at 0. Return type: Fraction
-
Toolkit.
random_distinct
(lower_bound, upper_bound, size)[source]¶ Generates lists of distinct random numbers,
Parameters: - lower_bound (int) – Low bound for searching.
- upper_bound (int) – High bound for searching.
- size (int) – Length of list of numbers.
Returns: List of random numbers within given bounds.
Return type: int


Pick a training module below to start.
{{value.description}}
The table below lists the students linked with you.
| Student Name | User Name | Solution Button | Current Belt | Max Allowed Belt | |
|---|---|---|---|---|---|
| {{studentEntry.givenName}} {{studentEntry.familyName}} | {{studentEntry.accountId.replace('Local_','')}} | {{beltsdeff[studentEntry.currentLevel]}} |


The ngBind
attribute tells Angular to replace the text content of the specified HTML element
with the value of a given expression, and to update the text content when the value of that
expression changes.
Typically, you don't use ngBind
directly, but instead you use the double curly markup like
{{ expression }}
which is similar but less verbose.
Once scenario in which the use of ngBind
is prefered over {{ expression }}
binding is when
it's desirable to put bindings into template that is momentarily displayed by the browser in its
raw state before Angular compiles it. Since ngBind
is an element attribute, it makes the
bindings invisible to the user while the page is loading.
An alternative solution to this problem would be using the
ngCloak
directive.
<ANY ng-bind="{expression}"> ... </ANY>
<ANY class="ng-bind: {expression};"> ... </ANY>
ngBind – {expression} –
Expression to evaluate.
Enter a name in the Live Preview text box; the greeting below the text box changes instantly.

 Enter name: <input type="text" ng-model="name">
 Hello !

it('should check ng-bind', function() { expect(using('.doc-example-live').binding('name')).toBe('Whirled'); using('.doc-example-live').input('name').enter('world'); expect(using('.doc-example-live').binding('name')).toBe('world'); });


Settings
Service
Google Play Music
Amazon Music
.com
.de
.co.uk
.at
YouTube
Google Play Music Desktop Player
Setup
Support
Thanks for using Playify. Want to support me?
Buy me a coffee
Contribute to the project
© krmax44


waiting for discovered services
looking for services...
$service.name;
at $service.host;:$service.port;
$service.text;


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SquareEnvironment BoundedEnv
public class BoundedEnv
Dean Attali
March 10, 2006
This class is a modified version of the BoundedEnv from the
Marine Biologist Simulation
| Constructor Summary | |
|---|---|
BoundedEnv(int rows,
int cols,
int hGap,
int vGap,
javax.swing.JPanel panelp,
Scrabble p)
Constructs an empty BoundedEnv object |
|
BoundedEnv(int rows,
int cols,
javax.swing.JPanel panelp,
Scrabble p)
Constructs an empty BoundedEnv object with no gaps at the sides |
| Method Summary | |
|---|---|
void |
add(Letter obj)
Adds a new object to this environment at the location it specifies. |
Letter[] |
allObjects()
Returns all the objects in this environment. |
void |
clearLastPlayed()
If a play was challenged, delete the letters played on that turn |
void |
clearNonPermanents()
Changes all the non-permanent letters to permanent |
void |
clearSelected()
Clears the selected letter |
void |
drawEnv(java.awt.Graphics2D g2d)
Draw the environment |
Location[] |
getNewObjects()
|
Location |
getNextEmpty()
|
Location |
getSelected()
|
boolean |
isEmpty(Location loc)
Determines whether a specific location in this environment is empty. |
boolean |
isValid(Location loc)
Verifies whether a location is valid in this environment. |
int |
numCols()
|
int |
numNonPerm()
|
int |
numObjects()
Returns the number of objects in this environment. |
int |
numRows()
Returns the number of rows in the environment. |
Letter |
objectAt(Location loc)
Returns the object at a specific location in this environment. |
void |
remove(Letter obj)
Removes the object from this environment. |
void |
removeAll()
Remove all the objects from the environment |
void |
removeAllNew()
Remove all the new objects |
void |
setSelected(Location loc)
|
java.lang.String |
toString()
Creates a single string representing all the objects in this environment (not necessarily in any particular order). |
void |
writeNewObjects()
Show the player where the new objects were placed |
| Methods inherited from class SquareEnvironment |
|---|
getDirection, getNeighbor, neighborsOf, numAdjacentNeighbors, numCellSides |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BoundedEnv(int rows, int cols, int hGap, int vGap, javax.swing.JPanel panelp, Scrabble p)
rows
- Number of rowscols
- Number of columnshGap
- The horizontal gapvGap
- The vertical happanelp
- The panel that created this objectp
- The main game classpublic BoundedEnv(int rows, int cols, javax.swing.JPanel panelp, Scrabble p)
rows
- cols
- panelp
- p
- | Method Detail |
|---|
public int numRows()
public int numCols()
public Location getSelected()
public void setSelected(Location loc)
loc
- The location of the selected letterpublic void clearSelected()
public int numNonPerm()
public boolean isValid(Location loc)
isValid
in interface Environment
isValid
in class SquareEnvironment
loc
- location to check
true
if loc
is valid;
false
otherwisepublic int numObjects()
numObjects
in interface Environment
numObjects
in class SquareEnvironment
public Letter[] allObjects()
allObjects
in interface Environment
allObjects
in class SquareEnvironment
public boolean isEmpty(Location loc)
isEmpty
in interface Environment
isEmpty
in class SquareEnvironment
loc
- the location to test
true
if loc
is a
valid location in the context of this environment
and is empty; false
otherwisepublic Letter objectAt(Location loc)
objectAt
in interface Environment
objectAt
in class SquareEnvironment
loc
- the location in which to look
loc
;
null
if loc
is not
in the environment or is emptypublic java.lang.String toString()
toString
in class java.lang.Object
public void add(Letter obj)
obj.location()
is a valid empty location.)
add
in interface Environment
add
in class SquareEnvironment
obj
- the new object to be added
java.lang.IllegalArgumentException
- if the precondition is not metpublic void remove(Letter obj)
obj
is in this environment.)
remove
in interface Environment
remove
in class SquareEnvironment
obj
- the object to be removed
java.lang.IllegalArgumentException
- if the precondition is not metpublic void removeAll()
public void drawEnv(java.awt.Graphics2D g2d)
g2d
- The graphics on which to drawpublic Location getNextEmpty()
public Location[] getNewObjects()
public void clearNonPermanents()
public void clearLastPlayed()
public void writeNewObjects()
public void removeAllNew()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Class: Aws::IoTFleetWise::Types::S3Config
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Struct
|
|
|
Instance Chain:
self,
::Aws::Structure ,
Struct
|
|
| Inherits: |
Struct
|
| Defined in: | gems/aws-sdk-iotfleetwise/lib/aws-sdk-iotfleetwise/types.rb |
Overview
The Amazon ::Aws::S3
bucket where the Amazon Web Services IoT FleetWise
campaign sends data. Amazon S3 is an object storage service that
stores data as objects within buckets. For more information, see
Creating, configuring, and working with Amazon S3 buckets in the
Amazon Simple Storage Service User Guide.
Constant Summary
Instance Attribute Summary
-
#bucket_arn ⇒ String
rw
The Amazon
::Aws::IoTFleetWise::Resource
Name (ARN) of the Amazon S3 bucket. -
#data_format ⇒ String
rw
Specify the format that files are saved in the Amazon S3 bucket.
-
#prefix ⇒ String
rw
(Optional) Enter an
::Aws::S3
bucket prefix. -
#storage_compression_format ⇒ String
rw
By default, stored data is compressed as a .gzip file.
Instance Method Summary
::Aws::Structure
- Included
| #to_hash | Alias for Structure#to_h. |
Instance Attribute Details
#bucket_arn ⇒ String
(rw)
The Amazon ::Aws::IoTFleetWise::Resource
Name (ARN) of the Amazon S3 bucket.
# File 'gems/aws-sdk-iotfleetwise/lib/aws-sdk-iotfleetwise/types.rb', line 3062
class S3Config < Struct.new( :bucket_arn, :data_format, :storage_compression_format, :prefix) SENSITIVE = [] include Aws::Structure end
#data_format ⇒ String
(rw)
Specify the format that files are saved in the Amazon S3 bucket. You can save files in an Apache Parquet or JSON format.
Parquet - Store data in a columnar storage file format. Parquet is optimal for fast data retrieval and can reduce costs. This option is selected by default.
JSON - Store data in a standard text-based JSON file format.
# File 'gems/aws-sdk-iotfleetwise/lib/aws-sdk-iotfleetwise/types.rb', line 3062
class S3Config < Struct.new( :bucket_arn, :data_format, :storage_compression_format, :prefix) SENSITIVE = [] include Aws::Structure end
#prefix ⇒ String
(rw)
(Optional) Enter an ::Aws::S3
bucket prefix. The prefix is the string of
characters after the bucket name and before the object name. You can
use the prefix to organize data stored in Amazon S3 buckets. For
more information, see Organizing objects using prefixes in the
Amazon Simple Storage Service User Guide.
By default, Amazon Web Services IoT FleetWise sets the prefix
processed-data/year=YY/month=MM/date=DD/hour=HH/
(in UTC) to data
it delivers to Amazon S3. You can enter a prefix to append it to
this default prefix. For example, if you enter the prefix
vehicles
, the prefix will be
vehicles/processed-data/year=YY/month=MM/date=DD/hour=HH/
.
# File 'gems/aws-sdk-iotfleetwise/lib/aws-sdk-iotfleetwise/types.rb', line 3062
class S3Config < Struct.new( :bucket_arn, :data_format, :storage_compression_format, :prefix) SENSITIVE = [] include Aws::Structure end
#storage_compression_format ⇒ String
(rw)
By default, stored data is compressed as a .gzip file. Compressed files have a reduced file size, which can optimize the cost of data storage.
# File 'gems/aws-sdk-iotfleetwise/lib/aws-sdk-iotfleetwise/types.rb', line 3062
class S3Config < Struct.new( :bucket_arn, :data_format, :storage_compression_format, :prefix) SENSITIVE = [] include Aws::Structure end


Toggle navigation
zbus
Offical Site
Source Code
Logout
Message Queues
+
MQ Name
Message Depth
Channel
Message Active
Consuming Clients
Filter Topic
x
Topic:
Mask:
Declare
Servers:
x
Delete
Servers:


---
layout: post
title: Are Gen Y spoiled brats or just a bit different?
tags:
- Business
status: publish
type: post
published: true
meta: {}
---
Managers unhappy with Gen Y - ABC News (Australian Broadcasting Corporation)
An independent survey of more than 240 Australian business managers concludes that Generation Y are the most difficult employees to manage.
I attended an internal conference recently where a CIO I work with suggested that Gen-Y would present new challenges for management because of their need to be:
- Always networked
- Continually stimulated and keep interested
This survey would seem to bear this out.
I think I have already seen this affect. Over the last couple of years I have seen recent graduates with delusions of grandeur (in one particular example raw 23 years expecting to be project managers) in terms of job interest. I am pleased to say that after a few weeks of my acid tongue their ego was sufficiently damaged for them to take on more mundane jobs such as documenting and managing the backup cycle.
However I am one of the more continually connected ones. I always have Meebo open, to get around the IM blocks in the firewall, and use Google many, many, times a day -- and I only just qualify as Gen-X
Powered by ScribeFire.


Rhode Island says Pawtucket violated public record law
by EndPlayPAWTUCKET, R.I. (AP) - The Rhode Island attorney general's office says Pawtucket violated the state's public record slaw by refusing to release police officers' hometowns to a member of a nonpartisan group promoting transparency.
Special Assistant Attorney General Sean Lyness gave Pawtucket's city attorney Frank Milos ten days to comply with the state's Access to Public Records Act on Oct. 28.
Milos says the city has been receiving opposition to the directive from members of the police department and asked Attorney General Peter Neronha to reconsider his office's decision.
Police union lawyer Joseph Penza Jr. argues that divulging the officer's hometowns violates their right to privacy and "would endanger their physical safety."
The Providence Journal reports that the state attorney general's office is evaluating a request from Milos for an additional 20 days to comply.


Client use this snac to send message thru server. Within the ICBM
(Inter-Client Basic Message) types (family 4), a channel is defined.
Each channel represents a different kind of message.
Channel 1 is used for what would commonly be called an "instant message" (plain
text messages). Channel 2 is used for complex messages (rtf, utf8) and
negotiating "rendezvous". These transactions end in something more
complex happening, such as a chat invitation, or a file transfer.
Channel 3 is used for chat messages (not in the same family as
these channels). Channel 4 is used for various ICQ messages.
Examples are normal messages, URLs, and old-style
authorization.
This snac contain one fixed part (target uin, channel, msg-id cookie)
and channel-dependend tlv-chain.
First dword in msg-id cookies is actually the computer uptime in milliseconds
(ie GetTickCount(), at least this is what the ICQ Lite and the other official
clients I have tested uses).
| 00 04 |
|
word |
|
SNAC family |
| 00 06 |
|
word |
|
SNAC subtype |
| 00 00 |
|
word |
|
SNAC flags |
| xx xx xx xx |
|
dword |
|
SNAC request-id |
|
| |
xx xx xx xx xx xx xx xx |
|
qword |
|
msg-id cookie |
| |
xx xx |
|
word |
|
message channel (see table below) |
| |
xx |
|
byte |
|
screenname string length |
| |
xx .. |
|
string |
|
screenname string |
|
| |
| xx xx |
|
word |
|
TLV.Type(0xXX) - icbm info |
| xx xx |
|
word |
|
TLV.Length |
|
|
|
|
| |
| |
|
| |
| xx xx |
|
word |
|
TLV.Type(0xXX) - icbm info |
| xx xx |
|
word |
|
TLV.Length |
|
|
|
|
| |
| |
|
|
|


GITHUB / OCT ICONS
Tool Tip TESTING
Learn more.
Log In
Log Out
Delete
Learn more.
Learn more.
Learn more.
Learn more.
Learn more.
Learn more.
Learn more.
Learn more.
Learn more.
Learn more.


BT Sport awarded exclusive rights to Champions League and Europa League to 2024
The deal has cost £400m per year and commences in 2021.
BT Sport has been awarded the exclusive broadcast rights to UEFA’s European club competitions until 2024, it was announced on Friday.
As part of the deal – which has cost £400million per year and commences in 2021 – BT have secured the rights to all 420 games from the Champions League, Europa League and the new Europa Conference League for a further three seasons.
BT Sport will see an increase of 77 games from the previous deal, which includes highlights and in-match clips.
Last season, both the Champions League and Europa League finals were contested by Premier League teams.
BT Sport reported a 26 per cent increase in Champions League viewer hours, with the final between Liverpool and Tottenham made available for everyone to watch in the UK via social media.
A record 11.3 million people tuned in across all platforms to watch the Reds go on and lift the European Cup for a sixth time in Madrid.
BT Sport leads the way when it comes to UEFA Champions League coverage.Chief executive of BT's Consumer Division Marc Allera
Chief executive of BT’s Consumer Division Marc Allera said: “We’re delighted to remain the home of UEFA Champions League in the UK.
“BT Sport leads the way when it comes to UEFA Champions League coverage, and we are very excited to continue to bring our world class coverage to one of the most exciting football competitions in the world – whether that is broadcasting 12 games simultaneously or delivering industry leading images in 4K UHD.
“With increasingly more ways to watch our content, with more games on show than ever before, and alongside our excellent line up of other competitions and sports, BT Sport is going from strength to strength.”
Labour has costed the policy at £20billion, saying it will deliver free full-fibre internet to every home and business by 2030 if it wins the General Election.
But BT chief executive Philip Jansen said the Labour Party had dramatically under-estimated the price of its pledge, saying it would cost closer to £100b.
The BT share price later stabilised to just a two per cent fall – nevertheless wiping nearly £500m off the company’s value.


Colleges and Universities - Netherlands
(C)Copyright 1995,1996 Christina DeMello. Reproduction and distribution are
permissible for non-profit purposes only, but no changes are to be
made to this document without the author's written consent.
Please send additions, corrections, and comments to<EMAIL_ADDRESS>Please
give me a few days to respond as I no longer have a
direct net connection at work every day. Also, this list may be
updated more quickly than I can respond personally to email.
Last modified: Thu Jul 11 20:53:17 1996
- Delft University of Technology
- Delta University
- Eindhoven University of Technology
- Erasmus University of Rotterdam
- Haagse Hogeschool
- Hanzehogeschool
- Hogeschool Eindhoven
- Hogeschool van Amsterdam
- Hogeschool van Utrecht
- IJselland Polytechnic
- Intercultural Open University
- Leiden University
- Nijenrode University
- Noordelijke Hogeschool Leeuwarden
- Open University of the Netherlands
- Tilburg University
- University of Amsterdam
- University of Groningen
- University of Limburg
- University of Nijmegen
- University of Twente
- Utrecht University
- Vrije University
- Wageningen Agricultural University
Return to Top Level
<EMAIL_ADDRESS><EMAIL_ADDRESS>Last updated:
Mon Jul 15 00:42:18 PDT 1996


Occurs when the current playback position is moved.
Syntax
| HTML Attribute | <element onseeking = "handler(event)"> |
|---|---|
| Event Property | object.onseeking = handler; |
| attachEvent Method | object.attachEvent("onseeking", handler) |
| addEventListener Method | object.addEventListener("seeking", handler, useCapture) |
Event information
| Synchronous | No |
|---|---|
| Bubbles | No |
| Cancelable | No |
Event handler parameters
- pEvtObj [in]
-
Type: Event
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section <IP_ADDRESS>
Remarks
The IHTMLMediaElement::seeking property changes to VARIANT_TRUE during this operation.
To invoke this event, do one of the following:
- Use the playback controls to change the current position.
See also
- Reference
- onseeked
- IHTMLMediaElement::seeking
Build date: 1/13/2014


state() = #ailib_timer_state{}
| cancel/1 | |
| is_current/2 | |
| is_previous/2 | |
| new/0 | |
| new/1 | |
| restart/1 | |
| start/3 |
is_current(Ref::term(), Ailib_timer_state::state()) -> boolean()
is_previous(Ref::term(), Ailib_timer_state::state()) -> boolean()
new() -> state()
new(Opts::list()) -> state()
start(Timeout::integer(), TimeoutMsg::term(), Timer::state()) -> state() | {error, infinity} | {error, unknown_message}
Generated by EDoc