Hi everyone,
I created this template because i updated two Palo Alto from 8.1.4 to 9.0.3 and some counter went from 32 to 64bits
I just modified the template below from Pavol Rehak so check it out (for details details and trap configuration) :
https://share.zabbix.com/network_devices/palo-alto/paloalto-snmpv3-zabbix4-0
I changed all snmpv3 to snmpv2 and added graphs for discovered interface traffic (in & out)
I had some error on storage discovery too that i fixed
###
NAME : Template Palo Alto SNMPv2 64-bit counters
###
TESTED : zabbix 4.2 and PAN OS 9.0.3-h3 but should work on zabbix 3.4 and PAN OS 8.1
Remi Chanoine
There are no macros links in this template.
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| entPhysical discovery - Temperature |
-
 | SNMP agent |
entPhysicalName.discovery
Update: 1d
 |
| hrStorage discovery |
-
 | SNMP agent |
hrStorageDescr.discovery
Update: 1d
 |
| CPU discovery |
-
 | SNMP agent |
hrDeviceDescr.discovery
Update: 1d
 |
| interface discovery |
-
 | SNMP agent |
ifName.discovery
Update: 1d
 |
| entPhysical discovery - Fan |
-
 | SNMP agent |
entPhysicalName.discovery.fan
Update: 1d
 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Uptime |
“The amount of time since this host was last initialized. Note that this is different from sysUpTime in the SNMPv2-MIB [RFC1907] because sysUpTime is the uptime of the network management portion of the system.”
 | SNMP agent |
hrSystemUptime.0
Update: 1m
 |
| Hostname |
An administratively-assigned name for this managed node. By convention, this is the node’s fully-qualified domain name.
 | SNMP agent |
sysName.0
Update: 1d
 |
| HA mode |
Current high-availability peer state.
 | SNMP agent |
panSysHAMode.0
Update: 12h
 |
| HA status trap |
-
 | SNMP trap |
snmptrap[“HA link change”]
Update: 0
 |
| HA peer state |
Current high-availability peer state.
 | SNMP agent |
panSysHAPeerState.0
Update: 1m
 |
| System shutdown |
-
 | SNMP trap |
snmptrap[“System shutdown”]
Update: 0
 |
| General trap |
-
 | SNMP trap |
snmptrap[“General trap”]
Update: 0
 |
| HA state |
Current high-availability state.
 | SNMP agent |
panSysHAState.0
Update: 1m
 |
| Undefined traps |
-
 | SNMP trap |
snmptrap.fallback
Update: 0
 |
| Device description |
A textual description of the entity. This value should include the full name and version identification of the system’s hardware type, software operating-system, and networking software. It is mandatory that this only contain printable ASCII characters.
 | SNMP agent |
sysDescr.0
Update: 1d
 |
| $1 opration status |
“The operational status of the sensor.”
 | SNMP agent |
entPhySensorOperStatus.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor value |
The most recent measurement obtained by the agent for this sensor.
 | SNMP agent |
entPhySensorValue.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 class |
-
 | SNMP agent |
entPhysicalClass.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor description |
-
 | SNMP agent |
entPhysicalDescr.[”{#PHY}”]
Update: 1d

LLD
 |
| $1 storage size |
-
 | SNMP agent |
hrStorageSize.[”{#STOR}”]
Update: 30m

LLD
 |
| $1 storage type |
-
 | SNMP agent |
hrStorageType.[”{#STOR}”]
Update: 12h

LLD
 |
| $1 storage used |
-
 | SNMP agent |
hrStorageUsed.[”{#STOR}”]
Update: 1m

LLD
 |
| {#CPU} status |
“The current operational state of the device described by this row of the table. A value unknown(1) indicates that the current state of the device is unknown. running(2) indicates that the device is up and running and that no unusual error conditions are known. The warning(3) state indicates that agent has been informed of an unusual error condition by the operational software (e.g., a disk device driver) but that the device is still ‘operational’. An example would be a high number of soft errors on a disk. A value of testing(4), indicates that the device is not available for use because it is in the testing state. The state of down(5) is used only when the agent has been informed that the device is not available for any use.”
 | SNMP agent |
hrDeviceStatus.[”{#CPU}”]
Update: 1m

LLD
 |
| {#CPU} load - percentage |
“The average, over the last minute, of the percentage of time that this processor was not idle. Implementations may approximate this one minute smoothing period if necessary.”
 | SNMP agent |
hrProcessorLoad.[”{#CPU}”]
Update: 1m

LLD
 |
| $1 admin status |
-
 | SNMP agent |
ifAdminStatus.[”{#IFNAME}”]
Update: 2m

LLD
 |
| $1 alias (description) |
-
 | SNMP agent |
ifAlias.[”{#IFNAME}”]
Update: 6h

LLD
 |
| $1 input traffic (30 sec) |
-
 | SNMP agent |
ifHCInOctets.[”{#IFNAME}”]
Update: 30s

LLD
 |
| $1 output traffic (30 sec) |
-
 | SNMP agent |
ifHCOutOctets.[”{#IFNAME}”]
Update: 30s

LLD
 |
| $1 link status |
-
 | SNMP agent |
ifOperStatus.[”{#IFNAME}”]
Update: 2m

LLD
 |
| $1 opration status |
-
 | SNMP agent |
entPhySensorOperStatus.fan.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor value |
-
 | SNMP agent |
entPhySensorValue.fan.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 class |
-
 | SNMP agent |
entPhysicalClass.fan.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor description |
-
 | SNMP agent |
entPhysicalDescr.fan.[”{#PHY}”]
Update: 1d

LLD
 |
| Name | Description | Expression | Priority |
|---|---|---|---|
| {#PHY} sensor status not ok |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:entPhySensorOperStatus.[”{#PHY}”].last()}<>1

Recovery expression:
 | average |
| {#PHY} temperature above 65 °C |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:entPhySensorValue.[”{#PHY}”].last()}>65

Recovery expression:
 | average |
| {#PHY} temperature above 70 °C |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:entPhySensorValue.[”{#PHY}”].last()}>70

Recovery expression:
 | high |
| {#PHY} temperature above 80 °C |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:entPhySensorValue.[”{#PHY}”].last()}>80

Recovery expression:
 | disaster |
| {#PHY} sensor status not ok |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:entPhySensorOperStatus.fan.[”{#PHY}”].last()}<>1

Recovery expression:
 | average |
| {#CPU} status down |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrDeviceStatus.[”{#CPU}”].last()}=5

Recovery expression:
 | average |
| {#CPU} status warning |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrDeviceStatus.[”{#CPU}”].last()}=3

Recovery expression:
 | warning |
| CPU load on {#CPU} more than 90% |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrProcessorLoad.[”{#CPU}”].last()}>90

Recovery expression:
 | average |
| CPU load on {#CPU} more than 95% |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrProcessorLoad.[”{#CPU}”].last()}>95

Recovery expression:
 | high |
| Free disk space is less than 2% on {#STOR} |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrStorageUsed.[”{#STOR}”].last()} / {Palo Alto SNMPv2 64-bit counters:hrStorageSize.[”{#STOR}”].last()} * 100 > 98

Recovery expression:
 | disaster |
| Free disk space is less than 5% on {#STOR} |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrStorageUsed.[”{#STOR}”].last()} / {Palo Alto SNMPv2 64-bit counters:hrStorageSize.[”{#STOR}”].last()} * 100 > 95

Recovery expression:
 | high |
| Free disk space is less than 10% on {#STOR} |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrStorageUsed.[”{#STOR}”].last()} / {Palo Alto SNMPv2 64-bit counters:hrStorageSize.[”{#STOR}”].last()} * 100 > 90

Recovery expression:
 | average |
| {#IFNAME} interface down |
interface ifAdminStatus is up(1) and ifOperStatus is down(2)
 |
Expression: {Palo Alto SNMPv2 64-bit counters:ifAdminStatus.[”{#IFNAME}”].last()}=1 and {Palo Alto SNMPv2 64-bit counters:ifOperStatus.[”{#IFNAME}”].last()}=2

Recovery expression:
 | high |
| {#PHY} sensor status not ok (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:entPhySensorOperStatus.[”{#PHY}”].last()}<>1

Recovery expression:
 | average |
| {#PHY} temperature above 65 °C (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:entPhySensorValue.[”{#PHY}”].last()}>65

Recovery expression:
 | average |
| {#PHY} temperature above 70 °C (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:entPhySensorValue.[”{#PHY}”].last()}>70

Recovery expression:
 | high |
| {#PHY} temperature above 80 °C (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:entPhySensorValue.[”{#PHY}”].last()}>80

Recovery expression:
 | disaster |
| Free disk space is less than 2% on {#STOR} (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrStorageUsed.[”{#STOR}”].last()} / {Palo Alto SNMPv2 64-bit counters:hrStorageSize.[”{#STOR}”].last()} * 100 > 98

Recovery expression:
 | disaster |
| Free disk space is less than 5% on {#STOR} (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrStorageUsed.[”{#STOR}”].last()} / {Palo Alto SNMPv2 64-bit counters:hrStorageSize.[”{#STOR}”].last()} * 100 > 95

Recovery expression:
 | high |
| Free disk space is less than 10% on {#STOR} (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrStorageUsed.[”{#STOR}”].last()} / {Palo Alto SNMPv2 64-bit counters:hrStorageSize.[”{#STOR}”].last()} * 100 > 90

Recovery expression:
 | average |
| {#CPU} status down (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrDeviceStatus.[”{#CPU}”].last()}=5

Recovery expression:
 | average |
| {#CPU} status warning (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrDeviceStatus.[”{#CPU}”].last()}=3

Recovery expression:
 | warning |
| CPU load on {#CPU} more than 90% (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrProcessorLoad.[”{#CPU}”].last()}>90

Recovery expression:
 | average |
| CPU load on {#CPU} more than 95% (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:hrProcessorLoad.[”{#CPU}”].last()}>95

Recovery expression:
 | high |
| {#IFNAME} interface down (LLD) |
interface ifAdminStatus is up(1) and ifOperStatus is down(2)
 |
Expression: {Palo Alto SNMPv2 64-bit counters:ifAdminStatus.[”{#IFNAME}”].last()}=1 and {Palo Alto SNMPv2 64-bit counters:ifOperStatus.[”{#IFNAME}”].last()}=2

Recovery expression:
 | high |
| {#PHY} sensor status not ok (LLD) |
-
 |
Expression: {Palo Alto SNMPv2 64-bit counters:entPhySensorOperStatus.fan.[”{#PHY}”].last()}<>1

Recovery expression:
 | average |
Hi everyone,
I created this template because i updated two Palo Alto from 8.1.4 to 9.0.3 and some counter went from 32 to 64bits
I just modified the template below from Pavol Rehak so check it out (for details details and trap configuration) :
https://share.zabbix.com/network_devices/palo-alto/paloalto-snmpv3-zabbix4-0
I changed all snmpv3 to snmpv2 and added graphs for discovered interface traffic (in & out)
I had some error on storage discovery too that i fixed
###
NAME : Template Palo Alto SNMPv2 64-bit counters
###
TESTED : zabbix 4.2 and PAN OS 9.0.3-h3 but should work on zabbix 3.4 and PAN OS 8.1
Remi Chanoine
There are no macros links in this template.
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| interface discovery |
-
 | SNMP agent |
ifName.discovery
Update: 1d
 |
| hrStorage discovery |
-
 | SNMP agent |
hrStorageDescr.discovery
Update: 1d
 |
| entPhysical discovery - Fan |
-
 | SNMP agent |
entPhysicalName.discovery.fan
Update: 1d
 |
| CPU discovery |
-
 | SNMP agent |
hrDeviceDescr.discovery
Update: 1d
 |
| entPhysical discovery - Temperature |
-
 | SNMP agent |
entPhysicalName.discovery
Update: 1d
 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Device description |
A textual description of the entity. This value should include the full name and version identification of the system’s hardware type, software operating-system, and networking software. It is mandatory that this only contain printable ASCII characters.
 | SNMP agent |
sysDescr.0
Update: 1d
 |
| Hostname |
An administratively-assigned name for this managed node. By convention, this is the node’s fully-qualified domain name.
 | SNMP agent |
sysName.0
Update: 1d
 |
| HA peer state |
Current high-availability peer state.
 | SNMP agent |
panSysHAPeerState.0
Update: 1m
 |
| General trap |
-
 | SNMP trap |
snmptrap[“General trap”]
Update: 0
 |
| HA mode |
Current high-availability peer state.
 | SNMP agent |
panSysHAMode.0
Update: 12h
 |
| Undefined traps |
-
 | SNMP trap |
snmptrap.fallback
Update: 0
 |
| HA state |
Current high-availability state.
 | SNMP agent |
panSysHAState.0
Update: 1m
 |
| HA status trap |
-
 | SNMP trap |
snmptrap[“HA link change”]
Update: 0
 |
| System shutdown |
-
 | SNMP trap |
snmptrap[“System shutdown”]
Update: 0
 |
| Uptime |
“The amount of time since this host was last initialized. Note that this is different from sysUpTime in the SNMPv2-MIB [RFC1907] because sysUpTime is the uptime of the network management portion of the system.”
 | SNMP agent |
hrSystemUptime.0
Update: 1m
 |
| $1 admin status |
-
 | SNMP agent |
ifAdminStatus.[”{#IFNAME}”]
Update: 2m

LLD
 |
| $1 alias (description) |
-
 | SNMP agent |
ifAlias.[”{#IFNAME}”]
Update: 6h

LLD
 |
| $1 input traffic (30 sec) |
-
 | SNMP agent |
ifHCInOctets.[”{#IFNAME}”]
Update: 30s

LLD
 |
| $1 output traffic (30 sec) |
-
 | SNMP agent |
ifHCOutOctets.[”{#IFNAME}”]
Update: 30s

LLD
 |
| $1 link status |
-
 | SNMP agent |
ifOperStatus.[”{#IFNAME}”]
Update: 2m

LLD
 |
| $1 storage size |
-
 | SNMP agent |
hrStorageSize.[”{#STOR}”]
Update: 30m

LLD
 |
| $1 storage type |
-
 | SNMP agent |
hrStorageType.[”{#STOR}”]
Update: 12h

LLD
 |
| $1 storage used |
-
 | SNMP agent |
hrStorageUsed.[”{#STOR}”]
Update: 1m

LLD
 |
| $1 opration status |
-
 | SNMP agent |
entPhySensorOperStatus.fan.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor value |
-
 | SNMP agent |
entPhySensorValue.fan.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 class |
-
 | SNMP agent |
entPhysicalClass.fan.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor description |
-
 | SNMP agent |
entPhysicalDescr.fan.[”{#PHY}”]
Update: 1d

LLD
 |
| {#CPU} status |
“The current operational state of the device described by this row of the table. A value unknown(1) indicates that the current state of the device is unknown. running(2) indicates that the device is up and running and that no unusual error conditions are known. The warning(3) state indicates that agent has been informed of an unusual error condition by the operational software (e.g., a disk device driver) but that the device is still ‘operational’. An example would be a high number of soft errors on a disk. A value of testing(4), indicates that the device is not available for use because it is in the testing state. The state of down(5) is used only when the agent has been informed that the device is not available for any use.”
 | SNMP agent |
hrDeviceStatus.[”{#CPU}”]
Update: 1m

LLD
 |
| {#CPU} load - percentage |
“The average, over the last minute, of the percentage of time that this processor was not idle. Implementations may approximate this one minute smoothing period if necessary.”
 | SNMP agent |
hrProcessorLoad.[”{#CPU}”]
Update: 1m

LLD
 |
| $1 opration status |
“The operational status of the sensor.”
 | SNMP agent |
entPhySensorOperStatus.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor value |
The most recent measurement obtained by the agent for this sensor.
 | SNMP agent |
entPhySensorValue.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 class |
-
 | SNMP agent |
entPhysicalClass.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor description |
-
 | SNMP agent |
entPhysicalDescr.[”{#PHY}”]
Update: 1d

LLD
 |
| Name | Description | Expression | Priority |
|---|---|---|---|
| {#PHY} sensor status not ok |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorOperStatus.[”{#PHY}”])<>1

Recovery expression:
 | average |
| {#PHY} temperature above 65 °C |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>65

Recovery expression:
 | average |
| {#PHY} temperature above 70 °C |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>70

Recovery expression:
 | high |
| {#PHY} temperature above 80 °C |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>80

Recovery expression:
 | disaster |
| {#PHY} sensor status not ok |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorOperStatus.fan.[”{#PHY}”])<>1

Recovery expression:
 | average |
| {#CPU} status down |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrDeviceStatus.[”{#CPU}”])=5

Recovery expression:
 | average |
| {#CPU} status warning |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrDeviceStatus.[”{#CPU}”])=3

Recovery expression:
 | warning |
| CPU load on {#CPU} more than 90% |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrProcessorLoad.[”{#CPU}”])>90

Recovery expression:
 | average |
| CPU load on {#CPU} more than 95% |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrProcessorLoad.[”{#CPU}”])>95

Recovery expression:
 | high |
| Free disk space is less than 2% on {#STOR} |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 98

Recovery expression:
 | disaster |
| Free disk space is less than 5% on {#STOR} |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 95

Recovery expression:
 | high |
| Free disk space is less than 10% on {#STOR} |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 90

Recovery expression:
 | average |
| {#IFNAME} interface down |
interface ifAdminStatus is up(1) and ifOperStatus is down(2)
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/ifAdminStatus.[”{#IFNAME}”])=1 and last(/Palo Alto SNMPv2 64-bit counters/ifOperStatus.[”{#IFNAME}”])=2

Recovery expression:
 | high |
| {#IFNAME} interface down (LLD) |
interface ifAdminStatus is up(1) and ifOperStatus is down(2)
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/ifAdminStatus.[”{#IFNAME}”])=1 and last(/Palo Alto SNMPv2 64-bit counters/ifOperStatus.[”{#IFNAME}”])=2

Recovery expression:
 | high |
| Free disk space is less than 2% on {#STOR} (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 98

Recovery expression:
 | disaster |
| Free disk space is less than 5% on {#STOR} (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 95

Recovery expression:
 | high |
| Free disk space is less than 10% on {#STOR} (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 90

Recovery expression:
 | average |
| {#PHY} sensor status not ok (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorOperStatus.fan.[”{#PHY}”])<>1

Recovery expression:
 | average |
| {#CPU} status down (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrDeviceStatus.[”{#CPU}”])=5

Recovery expression:
 | average |
| {#CPU} status warning (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrDeviceStatus.[”{#CPU}”])=3

Recovery expression:
 | warning |
| CPU load on {#CPU} more than 90% (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrProcessorLoad.[”{#CPU}”])>90

Recovery expression:
 | average |
| CPU load on {#CPU} more than 95% (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrProcessorLoad.[”{#CPU}”])>95

Recovery expression:
 | high |
| {#PHY} sensor status not ok (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorOperStatus.[”{#PHY}”])<>1

Recovery expression:
 | average |
| {#PHY} temperature above 65 °C (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>65

Recovery expression:
 | average |
| {#PHY} temperature above 70 °C (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>70

Recovery expression:
 | high |
| {#PHY} temperature above 80 °C (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>80

Recovery expression:
 | disaster |
Hi everyone,
I created this template because i updated two Palo Alto from 8.1.4 to 9.0.3 and some counter went from 32 to 64bits
I just modified the template below from Pavol Rehak so check it out (for details details and trap configuration) :
https://share.zabbix.com/network_devices/palo-alto/paloalto-snmpv3-zabbix4-0
I changed all snmpv3 to snmpv2 and added graphs for discovered interface traffic (in & out)
I had some error on storage discovery too that i fixed
###
NAME : Template Palo Alto SNMPv2 64-bit counters
###
TESTED : zabbix 4.2 and PAN OS 9.0.3-h3 but should work on zabbix 3.4 and PAN OS 8.1
Remi Chanoine
There are no macros links in this template.
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| interface discovery |
-
 | SNMP agent |
ifName.discovery
Update: 1d
 |
| hrStorage discovery |
-
 | SNMP agent |
hrStorageDescr.discovery
Update: 1d
 |
| entPhysical discovery - Fan |
-
 | SNMP agent |
entPhysicalName.discovery.fan
Update: 1d
 |
| CPU discovery |
-
 | SNMP agent |
hrDeviceDescr.discovery
Update: 1d
 |
| entPhysical discovery - Temperature |
-
 | SNMP agent |
entPhysicalName.discovery
Update: 1d
 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Device description |
A textual description of the entity. This value should include the full name and version identification of the system’s hardware type, software operating-system, and networking software. It is mandatory that this only contain printable ASCII characters.
 | SNMP agent |
sysDescr.0
Update: 1d
 |
| Hostname |
An administratively-assigned name for this managed node. By convention, this is the node’s fully-qualified domain name.
 | SNMP agent |
sysName.0
Update: 1d
 |
| HA peer state |
Current high-availability peer state.
 | SNMP agent |
panSysHAPeerState.0
Update: 1m
 |
| General trap |
-
 | SNMP trap |
snmptrap[“General trap”]
Update: 0
 |
| HA mode |
Current high-availability peer state.
 | SNMP agent |
panSysHAMode.0
Update: 12h
 |
| Undefined traps |
-
 | SNMP trap |
snmptrap.fallback
Update: 0
 |
| HA state |
Current high-availability state.
 | SNMP agent |
panSysHAState.0
Update: 1m
 |
| HA status trap |
-
 | SNMP trap |
snmptrap[“HA link change”]
Update: 0
 |
| System shutdown |
-
 | SNMP trap |
snmptrap[“System shutdown”]
Update: 0
 |
| Uptime |
“The amount of time since this host was last initialized. Note that this is different from sysUpTime in the SNMPv2-MIB [RFC1907] because sysUpTime is the uptime of the network management portion of the system.”
 | SNMP agent |
hrSystemUptime.0
Update: 1m
 |
| $1 admin status |
-
 | SNMP agent |
ifAdminStatus.[”{#IFNAME}”]
Update: 2m

LLD
 |
| $1 alias (description) |
-
 | SNMP agent |
ifAlias.[”{#IFNAME}”]
Update: 6h

LLD
 |
| $1 input traffic (30 sec) |
-
 | SNMP agent |
ifHCInOctets.[”{#IFNAME}”]
Update: 30s

LLD
 |
| $1 output traffic (30 sec) |
-
 | SNMP agent |
ifHCOutOctets.[”{#IFNAME}”]
Update: 30s

LLD
 |
| $1 link status |
-
 | SNMP agent |
ifOperStatus.[”{#IFNAME}”]
Update: 2m

LLD
 |
| $1 storage size |
-
 | SNMP agent |
hrStorageSize.[”{#STOR}”]
Update: 30m

LLD
 |
| $1 storage type |
-
 | SNMP agent |
hrStorageType.[”{#STOR}”]
Update: 12h

LLD
 |
| $1 storage used |
-
 | SNMP agent |
hrStorageUsed.[”{#STOR}”]
Update: 1m

LLD
 |
| $1 opration status |
-
 | SNMP agent |
entPhySensorOperStatus.fan.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor value |
-
 | SNMP agent |
entPhySensorValue.fan.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 class |
-
 | SNMP agent |
entPhysicalClass.fan.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor description |
-
 | SNMP agent |
entPhysicalDescr.fan.[”{#PHY}”]
Update: 1d

LLD
 |
| {#CPU} status |
“The current operational state of the device described by this row of the table. A value unknown(1) indicates that the current state of the device is unknown. running(2) indicates that the device is up and running and that no unusual error conditions are known. The warning(3) state indicates that agent has been informed of an unusual error condition by the operational software (e.g., a disk device driver) but that the device is still ‘operational’. An example would be a high number of soft errors on a disk. A value of testing(4), indicates that the device is not available for use because it is in the testing state. The state of down(5) is used only when the agent has been informed that the device is not available for any use.”
 | SNMP agent |
hrDeviceStatus.[”{#CPU}”]
Update: 1m

LLD
 |
| {#CPU} load - percentage |
“The average, over the last minute, of the percentage of time that this processor was not idle. Implementations may approximate this one minute smoothing period if necessary.”
 | SNMP agent |
hrProcessorLoad.[”{#CPU}”]
Update: 1m

LLD
 |
| $1 opration status |
“The operational status of the sensor.”
 | SNMP agent |
entPhySensorOperStatus.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor value |
The most recent measurement obtained by the agent for this sensor.
 | SNMP agent |
entPhySensorValue.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 class |
-
 | SNMP agent |
entPhysicalClass.[”{#PHY}”]
Update: 1m

LLD
 |
| $1 sensor description |
-
 | SNMP agent |
entPhysicalDescr.[”{#PHY}”]
Update: 1d

LLD
 |
| Name | Description | Expression | Priority |
|---|---|---|---|
| {#PHY} sensor status not ok |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorOperStatus.[”{#PHY}”])<>1

Recovery expression:
 | average |
| {#PHY} temperature above 65 °C |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>65

Recovery expression:
 | average |
| {#PHY} temperature above 70 °C |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>70

Recovery expression:
 | high |
| {#PHY} temperature above 80 °C |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>80

Recovery expression:
 | disaster |
| {#PHY} sensor status not ok |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorOperStatus.fan.[”{#PHY}”])<>1

Recovery expression:
 | average |
| {#CPU} status down |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrDeviceStatus.[”{#CPU}”])=5

Recovery expression:
 | average |
| {#CPU} status warning |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrDeviceStatus.[”{#CPU}”])=3

Recovery expression:
 | warning |
| CPU load on {#CPU} more than 90% |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrProcessorLoad.[”{#CPU}”])>90

Recovery expression:
 | average |
| CPU load on {#CPU} more than 95% |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrProcessorLoad.[”{#CPU}”])>95

Recovery expression:
 | high |
| Free disk space is less than 2% on {#STOR} |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 98

Recovery expression:
 | disaster |
| Free disk space is less than 5% on {#STOR} |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 95

Recovery expression:
 | high |
| Free disk space is less than 10% on {#STOR} |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 90

Recovery expression:
 | average |
| {#IFNAME} interface down |
interface ifAdminStatus is up(1) and ifOperStatus is down(2)
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/ifAdminStatus.[”{#IFNAME}”])=1 and last(/Palo Alto SNMPv2 64-bit counters/ifOperStatus.[”{#IFNAME}”])=2

Recovery expression:
 | high |
| {#IFNAME} interface down (LLD) |
interface ifAdminStatus is up(1) and ifOperStatus is down(2)
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/ifAdminStatus.[”{#IFNAME}”])=1 and last(/Palo Alto SNMPv2 64-bit counters/ifOperStatus.[”{#IFNAME}”])=2

Recovery expression:
 | high |
| Free disk space is less than 2% on {#STOR} (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 98

Recovery expression:
 | disaster |
| Free disk space is less than 5% on {#STOR} (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 95

Recovery expression:
 | high |
| Free disk space is less than 10% on {#STOR} (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrStorageUsed.[”{#STOR}”]) / last(/Palo Alto SNMPv2 64-bit counters/hrStorageSize.[”{#STOR}”]) * 100 > 90

Recovery expression:
 | average |
| {#PHY} sensor status not ok (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorOperStatus.fan.[”{#PHY}”])<>1

Recovery expression:
 | average |
| {#CPU} status down (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrDeviceStatus.[”{#CPU}”])=5

Recovery expression:
 | average |
| {#CPU} status warning (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrDeviceStatus.[”{#CPU}”])=3

Recovery expression:
 | warning |
| CPU load on {#CPU} more than 90% (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrProcessorLoad.[”{#CPU}”])>90

Recovery expression:
 | average |
| CPU load on {#CPU} more than 95% (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/hrProcessorLoad.[”{#CPU}”])>95

Recovery expression:
 | high |
| {#PHY} sensor status not ok (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorOperStatus.[”{#PHY}”])<>1

Recovery expression:
 | average |
| {#PHY} temperature above 65 °C (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>65

Recovery expression:
 | average |
| {#PHY} temperature above 70 °C (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>70

Recovery expression:
 | high |
| {#PHY} temperature above 80 °C (LLD) |
-
 |
Expression: last(/Palo Alto SNMPv2 64-bit counters/entPhySensorValue.[”{#PHY}”])>80

Recovery expression:
 | disaster |


| # | Sta | Rlx | Name | Row Text |
| 0 | | 0 | autoRow0 | <coal> is used for "generating" "heat" by "burning" (7599-58ef-3f3c-3428) |
| 1 | | 0 | autoRow1 | <coal> is a kind of "fossil fuel" (cab1-f3c3-59de-b682) |
| 2 | | 0 | autoRow2 | "heat" is a kind of "energy" (9e7d-986e-6af1-5ac1) |
| 3 | ST | 0 | autoRow3 | burning fossil fuels converts potential energy into thermal energy (66a3-8213-aabe-5609) |
| 4 | ST | 0 | autoRow4 | energy transformation means one kind of energy changes into another kind of energy (3d34-b43e-8a7e-07fd) |
| 5 | ST | 0 | autoRow5 | fossil fuel contains chemical energy (bfa4-74ef-3e51-a3cb) |
| 6 | ST | 0 | autoRow6 | conversion is a kind of process (d3f2-e61a-32a0-2306) |
| 7 | ST | 0 | autoRow7 | chemical energy is a kind of energy (b043-79cc-a77e-e968) |
| 8 | ST | 0 | autoRow8 | energy conversion is similar to energy transformation (a67b-a715-13a4-9b5d) |
| 9 | ST | 0 | autoRow9 | form means kind (7c96-f704-e51e-1678) |
| 10 | ST | 0 | autoRow10 | heat energy is synonymous with thermal energy (ae86-c631-e4ad-1669) |
| 11 | ST | 0 | autoRow11 | heat means heat energy (4710-c993-7a19-bef2) |
| # | Sta | Rlx | Name | Row Text |
| 0 | | 0 | autoRow0 | <natural gas> is used for "generating" "heat" by "burning" in a furnace ; in a stove (9f86-6ae1-8a59-fef8) |
| 1 | | 0 | autoRow1 | <natural gas> is a kind of "fossil fuel" (2355-0cfa-86f8-5767) |
| 2 | | 0 | autoRow2 | "heat" is a kind of "energy" (9e7d-986e-6af1-5ac1) |
| 3 | ST | 0 | autoRow3 | burning fossil fuels converts potential energy into thermal energy (66a3-8213-aabe-5609) |
| 4 | ST | 0 | autoRow4 | energy transformation means one kind of energy changes into another kind of energy (3d34-b43e-8a7e-07fd) |
| 5 | ST | 0 | autoRow5 | fossil fuel contains chemical energy (bfa4-74ef-3e51-a3cb) |
| 6 | ST | 0 | autoRow6 | conversion is a kind of process (d3f2-e61a-32a0-2306) |
| 7 | ST | 0 | autoRow7 | chemical energy is a kind of energy (b043-79cc-a77e-e968) |
| 8 | ST | 0 | autoRow8 | energy conversion is similar to energy transformation (a67b-a715-13a4-9b5d) |
| 9 | ST | 0 | autoRow9 | form means kind (7c96-f704-e51e-1678) |
| 10 | ST | 0 | autoRow10 | heat energy is synonymous with thermal energy (ae86-c631-e4ad-1669) |
| 11 | ST | 0 | autoRow11 | heat means heat energy (4710-c993-7a19-bef2) |


Idris Elba joins ‘The Harder They Fall,’ Jay-Z’s all-black Western
by Amanda N'Duka, DeadlineIdris Elba is saddling up to join Jonathan Majors in “The Harder They Fall,” an all-black Western feature for Netflix. Jeymes Samuel, the screenwriter behind the 2014 romantic dramedy “Love, Rosie” starring Lily Collins and Sam Claflin, is making his feature directorial debut on the project.
Samuel, also known as The Bullitts, is producing the project with Jay-Z, James Lassiter and Lawrence Bender. Samuel and Jay-Z, who previously collaborated on “The Great Gatsby” soundtrack, will write and produce original music for “The Harder They Fall.”
Here’s the logline for the film co-written by Samuel and Boaz Yakin: When outlaw Nat Love (Majors) discovers that the man (Elba) who killed his parents two decades ago is being released from prison, he reunites with his gang to track his enemy down and seek his revenge.
Elba also is starring in another Western drama, “Concrete Cowboys,” which began filming this year. In December, Elba will be seen on the big screen “Cats,” the hotly anticipated film adaptation of the Broadway smash musical.
He’s repped by WME and the Artists Partnership.


Arusha, Tanzania
+1475849459
computer
Home
About
portifolio
Home
About
Projects
contacts
Hello wold
Join Us


This site is built on frames and your internet browser is not framed capable. Please upgrade your browser in order to be able to view this site. Thank you...


For me, it was particularly tough because I had had the same friends since kindergarten. How was I supposed to maintain these relationships while not overlooking life at Ohio University? I was worried that we’d gradually fade out of touch. Well, I now have the best answer for the conundrum: fantasy football.
Fantasy football transcends time and distance- it’s just something I have to do. My friends and I have an eight-team league that keeps us within our roots. In high school, we would talk trash about sports and get competitive over trivial differences. I loved it, and I hope my friends did too (sometimes I’m not sure because I tend to be unnecessarily ruthless in a sardonic way to the ones I love). The relationship we built lives on every NFL season. We get our competitive kick, and it’s just like the good old days when times were simpler.
I am 2-2 this year, but I’m looking to turn this season around. I have the most lethal toddler on the planet, Kyler Murray, at quarterback. At running back I took a risk with glass bones Christian McCaffrey, but I have DeAndre Swift beside him and famous woman respecter Tyreek Hill at wide receiver- that NFL players don’t have to be good people at all to get a roster spot. I reluctantly watched Ben Roethlisberger for 18 years. Ask a Browns fan how they are feeling about their quarterback these days. As humans, sometimes we have to give to get, even if it brings uncomfortable emotions every now and then. Regardless, I hope this team can bring me the forever elusive fantasy football championship that I have been craving for years.
I know I haven’t provided the in-depth fantasy football analysis that you might have expected upon reading this article, but my intent is not to do that. It’s to show that sports can be a great uniter amongst friends near and far. I look forward to every season because it’s when the group chat is the most active and lively, and it is simply a fun time.
 Fight for your pride and do what’s right: play fantasy football. We’re all making new friends and living new lives, but we should never forget to appreciate the people who molded us into who we are today. I know that I’ll keep playing fantasy football beyond my college years, and if I had to go out on a limb, I’d confidently say that it will keep my Athens connections together the same way it has kept my high school friendships intact. And, like the great Forrest Gump once said, “that’s all I’ve got to say about that.”
Paul Nern is a junior studying communication studies at Ohio University. Please note that the views and opinions of the columnists do not reflect those of The Post. Want to talk more about it? Let Paul know by emailing him pn501919@ohio.edu.


I'm a software developer who loves taking on big conceptual ideas and turning them into solvable problems. To me, rewarding work is building technoglogical tools to help people and the communities they live in.
Translated a react-native app to a functional browser based React app. Utilized media queries, integrated google maps, and React context to connect over 1000 monthly users from the NYC public with 500+ events hosted by 30+ community organizations.
Built a React frontend form for StimuLink, an application for owners in need of PPP loans to estimate how much relief they are eligible for. Completed for a hackathon to help small businesses impacted during the pandemic with a team of three software engineers, two experience designers, and two data scientists.
Built an online classroom management tool for teachers to share resources and quiz students virtually, utilizing reference documents and middleware such as Access Control. Strategizing with a team to solve the complex backend and handle extensive views of a large scale project.
A journaling app I created over 4 days that allows users to log entries into a journal. The front end was created using JavaScript and Handlebars, while the back-end utilized Ruby on Rails to connect to a heroku hosted API.
Collaborated with a team of 4 over 3 days to design and build a Javascript app, with a MongoDB back end, so authenticated users could create, update and delete single question, four answer surveys. Primarily created the front end using Handlebars to display requests.
I built a front end SPA over 4 days that allows users to play a game of Tic Tac Toe against themself. I utilized Bootstrap and JQuery to render and change views, and build the game logic using JavaScript.
Translated a react-native app to a functional browser based React app. Utilized media queries, integrated google maps, and React context to connect over 1000 monthly users of the NYC public with 500+ events hosted by 30+ community organizations.
• Built four applications over the course of a 12 week immersive program.
• Utilized Git and GitHub for version control.
FEATURED PROJECTS
MBTA Stopwatch
Poll-ar Bear
DreamLoom
Tic Tac Toe
Conceptualized and researched market trends and practices to create optimal imagery and design infographics that highlighted 100+ products key features. Imagery used by over 40+ major retailers including Walmart, Costco, and CVS.
Brought a cosmetic line to life by building a client friendly wordpress ecommerce site. Ran marketing campaigns using Facebook Ads, increasing Amazon.com sales over 100%. Created a clean and professional brand guideline for a magazine distributed to 8 campuses, 12 galleries and 50+ individual subscribers.
GPA: 3.23
Program focus on Web Design and Animation. Minor in Art History, wrote the featured essay in the Art History capstone exhibition.
Cumulatively spent over 1200 hours in vocational training focused on using the Adobe Creative Suite, Traditional Arts and Film Editing.
Apart from software engineering, I enjoy sketching and animating. I have recently developed an intrest in gardening, specifically aquaponics.
When I’m not building my technical or creative skills, I’m often playing video games, catching up on a new TV show, or cooking dinner.


-*- html -*- YXA source code documentation @title Yaws related sources @doc Here you can find modules used by the Yaws based web interface.


Magic Bitwise And Operation
问题描述 :
Given n integers, your task is to pick k out of them so that the picked number are minimum when do bitwise “AND” among all of them.
For example, there are three integers 5, 6 and 7. You are asked to pick two of them. Your possible strategy is (5, 6), (5, 7) or (6, 7). The values when do bitwise and all the picked numbers together are as follows:
5 and 6 = 4
5 and 7 = 5
6 and 7 = 6
The smallest one is 4.
For example, there are three integers 5, 6 and 7. You are asked to pick two of them. Your possible strategy is (5, 6), (5, 7) or (6, 7). The values when do bitwise and all the picked numbers together are as follows:
5 and 6 = 4
5 and 7 = 5
6 and 7 = 6
The smallest one is 4.
输入:
There are multiple test cases for this problem. The first line of the input contains an integer denoting the number of test cases.
For each test case, there are two integers in the first line: n and k, denoting the number of given integers and the number of integers you are asked to pick out. n <= 40
The second line contains the n integers. You may assume that all integers are small than 2^60.
For each test case, there are two integers in the first line: n and k, denoting the number of given integers and the number of integers you are asked to pick out. n <= 40
The second line contains the n integers. You may assume that all integers are small than 2^60.
Notes: There are about one thousand randomly generated test cases. Fortunately 90% of them are relatively small.
输出:
There are multiple test cases for this problem. The first line of the input contains an integer denoting the number of test cases.
For each test case, there are two integers in the first line: n and k, denoting the number of given integers and the number of integers you are asked to pick out. n <= 40
The second line contains the n integers. You may assume that all integers are small than 2^60.
For each test case, there are two integers in the first line: n and k, denoting the number of given integers and the number of integers you are asked to pick out. n <= 40
The second line contains the n integers. You may assume that all integers are small than 2^60.
Notes: There are about one thousand randomly generated test cases. Fortunately 90% of them are relatively small.
样例输入:
3 3 2 5 6 7 8 2 238 153 223 247 111 252 253 247 40 10<PHONE_NUMBER>316675007<PHONE_NUMBER>02423550<PHONE_NUMBER>752164603<PHONE_NUMBER>781551605<PHONE_NUMBER>501751263<PHONE_NUMBER>583327167<PHONE_NUMBER>660382702<PHONE_NUMBER>20596463<PHONE_NUMBER>397603327<PHONE_NUMBER>016295871<PHONE_NUMBER>63428351<PHONE_NUMBER>225167807<PHONE_NUMBER>314572791<PHONE_NUMBER>060561407<PHONE_NUMBER>803426303<PHONE_NUMBER>982081471<PHONE_NUMBER>425982911<PHONE_NUMBER>070041535<PHONE_NUMBER>568853481<PHONE_NUMBER>56350975<PHONE_NUMBER>532488126<PHONE_NUMBER>62281727<PHONE_NUMBER>19991167<PHONE_NUMBER>55241589<PHONE_NUMBER>050118651<PHONE_NUMBER>605798263<PHONE_NUMBER>241186815<PHONE_NUMBER>506187487<PHONE_NUMBER>476483027<PHONE_NUMBER>820730879<PHONE_NUMBER>917823999<PHONE_NUMBER>940854259<PHONE_NUMBER>501577715<PHONE_NUMBER>20235519<PHONE_NUMBER>643616248<PHONE_NUMBER>991521790<PHONE_NUMBER>000052703<PHONE_NUMBER>826440703<PHONE_NUMBER>778151421<PHONE_NUMBER>522637695
样例输出:
Case #1: 4 Case #2: 9 Case #3:<PHONE_NUMBER>6245424
/******************************************************************************** 剪个枝就过了～比赛的时候没什么人做，主要是因为位运算的威慑力太大了～ ********************************************************************************/ #include <iostream> #include <algorithm> #include <complex> #include <cstdlib> #include <cstring> #include <utility> #include <bitset> #include <cstdio> #include <memory> #include <string> #include <vector> #include <cmath> #include <ctime> #include <queue> #include <stack> #include <list> #include <map> #include <set> using namespace std; #define lowbit(x) ( (x) & ( (x) ^ (x - 1) ) ) //typedef long long LL; //typedef unsigned long long ULL; typedef __int64 LL; typedef unsigned __int64 ULL; typedef pair<int, int> PII; typedef pair<double, double> PDD; typedef map<int, int>::iterator MI; typedef vector<int>::iterator VI; typedef list<LL>::iterator LI; typedef set<int>::iterator SI; const int INF_INT = 0x3f3f3f3f; const LL INF_LL = 0x7fffffffffffffff; const double oo = 10e9; const double eps = 10e-7; const double PI = acos(-1.0); const int MAXN = 44; int test, n, m; LL ans, arr[MAXN]; bool check(int id, LL buf) { for (int i = id + 1; i < n; ++i) { buf &= arr[i]; } return buf < ans; } void dfs(int crt, int step, LL buf) { ans = min(ans, buf); if (step >= m) { return ; } for (int nxt = crt + 1; nxt < n; ++nxt) { LL tmp = buf & arr[nxt]; if (!check(nxt, tmp)) { continue ; } dfs(nxt, step + 1, tmp); } return ; } void ace() { int cas = 1; for (scanf("%d", &test); test--; ++cas) { scanf("%d %d", &n, &m); for (int i = 0; i < n; ++i) { scanf("%I64d", arr + i); } sort(arr, arr + n); ans = INF_LL; for (int i = 0; i < n; ++i) { dfs(i, 1, arr[i]); } printf("Case #%d: %I64d\n", cas, ans); } return ; } int main() { ace(); return 0; }
版权声明：本文为博主原创文章，未经博主允许不得转载。
参考：http://blog.csdn.net/codeforces_sphinx/article/details/6775662
(adsbygoogle = window.adsbygoogle || []).push({});
Title…[...]here are some links to sites that we link to simply because we assume they’re really worth visiting[...]…
夭寿啊，家暴啦
夭寿啊，家暴啦
夭寿啊，家暴啦
夭寿啊，家暴啦
夭寿啊，家暴啦
夭寿啊，家暴啦
夭寿啊，家暴啦
夭寿啊，家暴啦
夭寿啊，家暴啦
夭寿啊，家暴啦
夭寿啊，家暴啦
处凡愚而不减，在圣贤而不增；
住烦恼而不乱，居禅定而不寂。
这是研发类的题还是算法类？
不错，再多来的CF上面的题
第二种解法如果数组有重复元素 就不正确
顶一个 赞一个
很好的思路，可以借鉴
算法是程序的灵魂，算法分简单和复杂，如果不搞大数据类，程序员了解一下简单点的算法也是可以的，但是会算法的一定要会编程才行，程序员不一定要会算法，利于自己项目需要的可以简单了解。
非常不错
&这是C语言？
很好的思路，可以借鉴
说的就是无向图啊，有向图的算法也是类似的
示例程序中的代码不够稳健，没有考虑到输入了非法字符或者不合理输入的情况。
太变态了。我用hash居然超时了。这样break掉居然都行啊。。。
妈呀！这个模板好长OwQ！


Toby
Nate
Andrew
Laney's Quarter Collection
Mary Mac's Quarter Collection
Molly Patrick's Quarter Collection


In multi-choice QA , the models are presented with 5 options (one correct answer plus 4 distractor answers), and are required to pick out the correct one. We report seperate accuracy for the 3 different types of questions.
To be done.
To be done.
To be done.


| filterConfig | DvsFilterConfig[] |
List of Network Filter Configurations.
In an update operation, the array can contain all
DvsTrafficFilterConfigSpec objects
or all DvsFilterConfig and
DvsTrafficFilterConfig
object, but not mixed of Config and Spec objects. If array of
FilterConfigSpec and TrafficFilterConfigSpec is used
for updating Network Filter then only the Network Filters
matching key /
key
is updated.
If array of DvsFilterConfig and
DvsTrafficFilterConfig
is used for updating port settings, the Network Filter
settings will be overridden with the new array specified. The
specified array should only contain FilterConfig and
TrafficFilterConfig objects with FilterConfig#inherited /
TrafficFilterConfig#inherited set to false.
FilterConfig/TrafficFilterConfig objects with
FilterConfig#inherited/TrafficFilterConfig#inherited as
true in the specified array will be ignored. The updated result will
include FilterConfig/TrafficFilterConfig objects
inherited from parent, if any.
|


Paul Graham is a programmer, writer, and investor. In 1995, he and Robert Morris started Viaweb, the first software as a service company. Viaweb was acquired by Yahoo in 1998, where it became Yahoo Store. In 2001 he started publishing essays on paulgraham.com, which in 2014 got 12 million page views. In 2005 he and Jessica Livingston, Robert Morris, and Trevor Blackwell started Y Combinator, the first of a new type of startup incubator. Since 2005 Y Combinator has funded over 800 startups, including Dropbox, Airbnb, Stripe, and Reddit.
Paul is the author of On Lisp (Prentice Hall, 1993), ANSI Common Lisp (Prentice Hall, 1995), and Hackers & Painters (O'Reilly, 2004). He has an AB from Cornell and a PhD in Computer Science from Harvard, and studied painting at RISD and the Accademia di Belle Arti in Florence.
Photo by Dave Thomas, released under the Attribution Creative Commons license.


FIND BEST PLACE TO LIVE?
I am a
year old,
single
married
female
male
looking to
rent
Apartment/Condo
Landed House
HDB Apartment
having
1-2 bedrooms
3 bedrooms
4 bedrooms
5 bedrooms
5+ bed rooms
within the budget of
S$ 500 to S$ 2000
S$ 2000 to S$ 5000
S$ 5000 to S$ 10000
S$ 10000 to S$ 20000
S$ 20000 to S$ 50000
in
Singapore
within
2KM
4KM
6KM
8KM
10KM
15KM
20KM
from
and
2KM
4KM
6KM
8KM
10KM
15KM
20KM
from
and
2KM
4KM
6KM
8KM
10KM
15KM
20KM
from
CLEAR
SEARCH
Click to See Matching Properties


Do you prefer the usage of "ES6 Promise"? If you do, you will like the usage of "Fetch" too.
Compared to "Ajax", "Fetch" owns a competitive feature: promise, which synchronize asynchronous methods elegantly, the meaning and the usage of "Fetch" can be understood easily as well.
Here, I'd like to list the most common usage of "Fetch".
The flow of fetching stuff is simple:
Suppose we would fetch the content of an remote html
fetch('./data/test.html')
.then(function (response) {
return response.text() // return a promise
})
.then(function (body) {
console.log( body ) // log: html content
})
If we'd like to fetch data(json) right after fetching content(html)
fetch('./data/test.html')
.then(response => {
return response.text()
})
.then(body => {
console.log(body)
return fetch('./data/test.json') // return a promise(`fetch('/url')` will return a promise )
})
.then(response => {
return response.json() // return a promise too
})
.then(json => {
console.log(json) // log: json's data
})
Promise.all([
Promise.resolve(fetch('./data/test.html')),
Promise.resolve(fetch('./data/test.json'))
]).then(data => {
console.log('Two requests are both completed!')
})
Github Fetch Document
Offcial Manual
Fetch, well done!


Edit CMSParagraphComponent: MyParagraph
Mock Backend Calls
Save will pass
Save will fail
Trigger Unrelated Validation


Protobuf and WebGL demo
Custom protobuf schema, JS protobuf reader and WebGL renderer.
Example tile
- All pixels of the tile have content
- Tile served in protobuf encoding (GZipped)
- The protobuf schema is currently very simple
- A single channel of data is in the tile (e.g. a count per pixel)
- Tile size is as follows:
- All pixels painted (as shown here)
-
- Uncompressed tile size: 377kb
- Compressed tile size: 269kb
- 50% pixels painted (which is still a very rich tile)
-
- Uncompressed tile size: 82kb
- Compressed tile size: 64kb
- Note: the color is assigned totally at random currently (todo: style by count)
- Optimizations and enhancements to explore:
- Use relative pixel locations (relative to previous pixel) to improve compression
- Ensure zigzag encoding for the negative moves
- Use smaller data types in the protobuf layer (if available)
- Support multiple channels beyond a single count
- Understand the WebGL styling better - e.g. add slider to filter by count
- Add adapters for Leaflet and Mapbox
- Implement a backend using (?) GBIF data as a real example to proof the solution
- Use the multiple channels and demonstrate charts rendered from the data tiles
- Use relative pixel locations (relative to previous pixel) to improve compression


Notes App
Save Note ``
New note
Delete Note
Sorry, your browser does not support localStorage. Please upgrade your browser to use Notes


Transparency, for PicoContainer, means that components do not have to implement any interface or abstraction in order to be components. Moreover, components do not have to adhere to any naming conventions or bundle any meta-data in order to qualify as components.
Constructor Injection is what we recommend, so the minimum definition of a component is a simple class that takes its dependencies in its constructor. For Setter Injection, it is a class with dependencies delivered via simple setters. Your components may be interface / implementation separated, but we are not forcing that for when using PicoContainer.
If you live with this ideal, you may be able to use the components you design for Pico with other frameworks or containers. I.e. you are not locked in. We suggest you choose other technologies that are similarly light on API and framework, and could be characterized as transparent. Good examples are XStream, Sitemesh and anything that deals with POJOs.
Given this goal, we have some exceptions:
Java does not have a Startable interface, nor does it have a Disposable (.Net has IDisposable), so we made our own. You can use ours or your own in a similar design. If you use your own, you may want to extend StartableLifecycleStrategy and override a couple of methods. That's if you need lifecycle at all.
If a Startable inerface goes into J2SE, then it will probably be supported.
We also support @Inject as an annotation for methods and fields. This is a variation of Setter Injection. The annotations are part of our codebase. Again, you can use your own, or others if you override one of the two classes from PicoContainer's codebase AnnotatedFieldInjection and AnnotatedMethodInjection.
Annotations are a break with transparency, so we don't recommend them - stick to vanilla Constructor Injection if you can.
If a simple @Inject annotation goes into J2SE, then it will probably be supported.


Youth is not a time of life; it is a state of mind. it is not s matter of rosy cheeks, red lips and supple knees; it is a matter of the will, a quality of the imagination, a vigor of the emotions. It is the freshness of the deep spring of life. Youth means a temperamental predominance of courage over timidity, of the appetite for adventure over the love of ease. This often exists in a man of 60, more than a boy of 20. Nobody grows old merely by a number of years. Wegrow old by deserting our ideals. Years may wrinkle the skins, but to give up enthusiasm wrinkles the soul. Worry, fear, self-distrust bows the heart and turns the spring back to dust. Whether 60 or 16,there is in every human being’s heart the lure of wonder, the unfailing childlike appetite of what’s next and the joy of the game of living. In the center of your heart and my heart there is a wireless station: so long as it receives messages of beauty, hope, cheer, courage and power from men and from the infinite, so long are you young. When the aerials are down, and your spirit is covered with snows of cynicism and the ice of pessimism, then you are grown old, even at 20, but as long as your aerials are up, to catch waves of optimism, there is hope you may die young at 80.


nips nips2005 nips2005-72 nips2005-72-reference knowledge-graph by maker-knowledge-mining
Source: pdf
Author: Jin Yu, Douglas Aberdeen, Nicol N. Schraudolph
Abstract: Reinforcement learning by direct policy gradient estimation is attractive in theory but in practice leads to notoriously ill-behaved optimization problems. We improve its robustness and speed of convergence with stochastic meta-descent, a gain vector adaptation method that employs fast Hessian-vector products. In our experiments the resulting algorithms outperform previously employed online stochastic, ofﬂine conjugate, and natural policy gradient methods. 1
[1] J. Baxter and P. L. Bartlett. Inﬁnite-horizon policy-gradient estimation. Journal of Artiﬁcial Intelligence Research, 15:319–350, 2001.
[2] J. Baxter, P. L. Bartlett, and L. Weaver. Experiments with inﬁnite-horizon, policy-gradient estimation. Journal of Artiﬁcial Intelligence Research, 15:351–381, 2001.
[3] N. N. Schraudolph. Local gain adaptation in stochastic gradient descent. In Proc. Intl. Conf. Artiﬁcial Neural Networks, pages 569–574, Edinburgh, Scotland, 1999. IEE, London.
[4] N. N. Schraudolph. Fast curvature matrix-vector products for second-order gradient descent. Neural Computation, 14(7):1723–1738, 2002.
[5] R. Jacobs. Increased rates of convergence through learning rate adaptation. Neural Networks, 1:295–307, 1988.
[6] J. Kivinen and M. K. Warmuth. Additive versus exponentiated gradient updates for linear prediction. In Proc. 27th Annual ACM Symposium on Theory of Computing, pages 209–218. ACM Press, New York, NY, 1995.
[7] T. Tollenaere. SuperSAB: Fast adaptive back propagation with good scaling properties. Neural Networks, 3:561–573, 1990.
[8] F. M. Silva and L. B. Almeida. Acceleration techniques for the backpropagation algorithm. In L. B. Almeida and C. J. Wellekens, editors, Neural Networks: Proc. EURASIP Workshop, volume 412 of Lecture Notes in Computer Science, pages 110–119. Springer Verlag, 1990.
[9] M. Riedmiller and H. Braun. A direct adaptive method for faster backpropagation learning: The RPROP algorithm. In Proc. Intl. Conf. Neural Networks, pages 586–591. IEEE, 1993.
[10] L. B. Almeida, T. Langlois, J. D. Amaral, and A. Plakhov. Parameter adaptation in stochastic optimization. In D. Saad, editor, On-Line Learning in Neural Networks, Publications of the Newton Institute, chapter 6, pages 111–134. Cambridge University Press, 1999.
[11] R. S. Sutton. Gain adaptation beats least squares? In Proceedings of the 7th Yale Workshop on Adaptive and Learning Systems, pages 161–166, 1992.
[12] B. A. Pearlmutter. Fast exact multiplication by the Hessian. Neural Comput., 6(1):147–60, 1994.
[13] A. Griewank. Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation. Frontiers in Applied Mathematics. SIAM, Philadelphia, 2000.
[14] N. N. Schraudolph and T. Graepel. Combining conjugate direction methods with stochastic approximation of gradients. In C. M. Bishop and B. J. Frey, editors, Proc. 9th Intl. Workshop Artiﬁcial Intelligence and Statistics, pages 7–13, Key West, Florida, 2003.
[15] S. Kakade. A natural policy gradient. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors, Advances in Neural Information Processing Systems 14, pages 1531–1538. MIT Press, 2002.
[16] S. Amari. Natural gradient works efﬁciently in learning. Neural Comput., 10(2):251–276, 1998.


stripe
/
com.stripe.android.view
/
BillingAddressFields
/
Full
Full
Full
Require the customer's full billing address when adding a new Payment Method


The client wanted to describe their website and display their projects.
Designed a wordpress website for them with a blog.
Wordpress was used.
The client wanted to create an ecommerce store with a payment gateway.
Designed a wordpress website with woo-commerce and 2-checkout for a payment plugin.
Wordpress was used.
The customer offers digital marketing services. He wanted to create a website for the business.
Designed a wordpress website for them with Elementor.
Wordpress with Elementor was used.
TEMPLATE TEXT.
TEMPLATE TEXT 2.
TEMPLATE TEXT 3


object
xml
¶
Bi-directional XML parser.
static, context_switching_calls
(no dependencies on other entities)
Public interface¶
parse/2
¶
Parses Chars to/from a data structure of the form xml(<atts>, <content>).
static
parse(Chars,Document)
parse(+nonvar,?nonvar)
- zero_or_one
parse(?nonvar,+nonvar)
- zero_or_one
parse/3
¶
Parses Chars to/from a data structure of the form xml(<atts>, <content>).
static
parse(Controls,Chars,Document)
parse(+nonvar,+nonvar,?nonvar)
- zero_or_one
parse(+nonvar,?nonvar,+nonvar)
- zero_or_one
subterm/2
¶
Unifies Subterm with a sub-term of XMLTerm. Note that XMLTerm is a sub-term of itself.
static
subterm(XMLTerm,Subterm)
subterm(+nonvar,?nonvar)
- zero_or_one
pp/1
¶
Pretty prints a XML document on the current output stream.
static
pp(XMLDocument)
pp(+nonvar)
- zero_or_one
Protected interface¶
(none)
Private predicates¶
xml_to_document/3
¶
Translates the list of character codes XML into the Prolog term Document. Controls is a list of terms controlling the treatment of layout characters and character entities.
static
xml_to_document(Controls,XML,Document)
xml_to_document(+nonvar,+nonvar,?nonvar)
- zero_or_one
empty_map/1
¶
True if Map is a null map.
static
empty_map(Map)
empty_map(?nonvar)
- zero_or_one
map_member/3
¶
True if Map is a ordered map structure which records the pair Key-Data. Key must be ground.
static
map_member(Key,Map,Data)
map_member(+nonvar,+nonvar,?nonvar)
- zero_or_one
map_store/4
¶
True if Map0 is an ordered map structure, Key must be ground, and Map1 is identical to Map0 except that the pair Key-Data is recorded by Map1.
static
map_store(Map0,Key,Data,Map1)
map_store(+nonvar,+nonvar,+nonvar,?nonvar)
- zero_or_one
pp_string/1
¶
Prints String onto the current output stream. If String contains only 7-bit chars it is printed in shorthand quoted format, otherwise it is written as a list.
static
pp_string(String)
pp_string(+nonvar)
- zero_or_one
fault/5
¶
Identifies SubTerm as a sub-term of Term which cannot be serialized after Indentation. Message is an atom naming the type of error; Path is a string encoding a list of SubTerm’s ancestor elements in the form <tag>{(id)}* where <tag> is the element tag and <id> is the value of any attribute _named_ id.
static
fault(Term,Indentation,SubTerm,Path,Message)
fault(+nonvar,+nonvar,?nonvar,?nonvar,?nonvar)
- zero_or_one
exception/4
¶
Hook to raise an exception to be raised in respect of a fault in the XML Term: Document.
static
exception(Message,Document,Culprit,Path)
exception(+atom,+nonvar,+nonvar,+nonvar)
- one
document_generation//2
¶
DCG generating Document as a list of character codes. Format is true|false defining whether layouts, to provide indentation, should be added between the element content of the resultant “string”. Note that formatting is disabled for elements that are interspersed with pcdata/1 terms, such as XHTML’s ‘inline’ elements. Also, Format is over-ridden, for an individual element, by an explicit ‘xml:space’=”preserve” attribute.
static
document_generation(Format,Document)
pcdata_7bit//1
¶
Represents the ascii character set in its simplest format, using the character entities & " < and > which are common to both XML and HTML. The numeric entity ' is used in place of ', because browsers don’t recognize it in HTML.
static
pcdata_7bit(Char)
character_data_format/3
¶
Holds when Format0 and Format1 are the statuses of XML formatting before and after Chars - which may be null.
static
character_data_format(Chars,Format0,Format1)
character_data_format(+nonvar,+nonvar,?nonvar)
- zero_or_one
cdata_generation//1
¶
Holds when Format0 and Format1 are the statuses of XML formatting before and after Chars - which may be null.
static
cdata_generation(Chars)
Operators¶
(none)
Remarks¶
On-line documentation: https://binding-time.co.uk/index.php/Parsing_XML_with_Prolog
Compliance: This XML parser supports a subset of XML suitable for XML Data and Worldwide Web applications. It is neither as strict nor as comprehensive as the XML 1.0 Specification mandates.
Compliance-strictness: It is not as strict, because, while the specification must eliminate ambiguities, not all errors need to be regarded as faults, and some reasonable examples of real XML usage would have to be rejected if they were.
Compliance-comprehensive: It is not as comprehensive, because, where the XML specification makes provision for more or less complete DTDs to be provided as part of a document, xml.pl actions the local definition of ENTITIES only. Other DTD extensions are treated as commentary.
Bi-directional conversions: The conversions are not completely symmetrical, in that weaker XML is accepted than can be generated. Specifically, in-bound (Chars -> Document) parsing does not require strictly well-formed XML. If Chars does not represent well-formed XML, Document is instantiated to the term malformed(<attributes>, <content>).


| Top |
Pixbufs are client-side images. For details on how to create and manipulate pixbufs, see the GdkPixbuf API documentation.
The functions described here allow to obtain pixbufs from GdkWindows and cairo surfaces.
GdkPixbuf * gdk_pixbuf_get_from_window (GdkWindow *window
,gint src_x
,gint src_y
,gint width
,gint height
);
Transfers image data from a GdkWindow and converts it to an RGB(A) representation inside a GdkPixbuf. In other words, copies image data from a server-side drawable to a client-side RGB(A) buffer. This allows you to efficiently read individual pixels on the client side.
This function will create an RGB pixbuf with 8 bits per channel with
the size specified by the width
and height
arguments scaled by the
scale factor of window
. The pixbuf will contain an alpha channel if
the window
contains one.
If the window is off the screen, then there is no image data in the obscured/offscreen regions to be placed in the pixbuf. The contents of portions of the pixbuf corresponding to the offscreen region are undefined.
If the window you’re obtaining data from is partially obscured by other windows, then the contents of the pixbuf areas corresponding to the obscured regions are undefined.
If the window is not mapped (typically because it’s iconified/minimized
or not on the current workspace), then NULL
will be returned.
If memory can’t be allocated for the return value, NULL
will be returned
instead.
(In short, there are several ways this function can fail, and if it fails
it returns NULL
; so check the return value.)
window |
Source window |
|
src_x |
Source X coordinate within |
|
src_y |
Source Y coordinate within |
|
width |
Width in pixels of region to get |
|
height |
Height in pixels of region to get |
A newly-created pixbuf with a
reference count of 1, or NULL
on error.
[nullable][transfer full]
GdkPixbuf * gdk_pixbuf_get_from_surface (cairo_surface_t *surface
,gint src_x
,gint src_y
,gint width
,gint height
);
Transfers image data from a cairo_surface_t and converts it to an RGB(A)
representation inside a GdkPixbuf. This allows you to efficiently read
individual pixels from cairo surfaces. For GdkWindows, use
gdk_pixbuf_get_from_window()
instead.
This function will create an RGB pixbuf with 8 bits per channel.
The pixbuf will contain an alpha channel if the surface
contains one.
surface |
surface to copy from |
|
src_x |
Source X coordinate within |
|
src_y |
Source Y coordinate within |
|
width |
Width in pixels of region to get |
|
height |
Height in pixels of region to get |
A newly-created pixbuf with a
reference count of 1, or NULL
on error.
[nullable][transfer full]


Bingo!; or, When to Use Customizable Classes in Ruby
July 15, 2015
For as far back as I can remember, I’ve always been an ardent gamer. From my early elementary school days, I can remember holding a 40-game unbeaten streak against my classmates in Connect Four, playing card games and simpler board games such as Sorry! and Battleship against my younger sisters, learning English verb conjugations and the location of every country in the world and their capitals using interactive educational software, and creating “statue ball,” a hybrid of tag, dodge ball, hide-and-go-seek, and...Mario 3. The Nintendo Entertainment System was first video gaming system I owned, and I still experience nostalgia when I think about playing the groundbreaking action, adventure, platforming, role-playing, and puzzle games (all hail Tetris) released for that console.
I added “classic” games such as chess and bridge to my repertoire during my teenage years, and continued to buy new video game consoles up until college, where, because the snow trapped us indoors for five months of the year and, well, college culture, I would generally play games prefaced by the word “drinking.” Once a gamer, always a gamer, I guess. The last truly great game I discovered was a popular multi-player Russian card game called “Durak,” which combines the lazy-weekend atmosphere of a trump-based card game with the strategic planning and ally-backstabbing of Risk. Though it is virtually unknown in the West and it’s more fun with 3-5 people, you can play a very good two-player version of it here.
So, when a “Bingo challenge” appeared in the DBC curriculum this week, the gamer in me got pretty excited that I would be programming a game, albeit a very simple one. As it turned out, the actual “Bingo challenge” assigned was much more facile than emulating Bingo, but that didn’t stop me from striking out on my own and creating my own version of Bingo using the power of Ruby’s customizable classes. In this blog post, I will be breaking down my Bingo code after providing a brief introduction to Ruby classes.
Ruby’s Customizable Classes
Classes in Ruby are at the very heart of its object-oriented approach. Whenever we want to model an object that exists in the real world, we can create a class that will serve as a convenient container for its characteristics (called attributes) and anything the object can do or we might want to do with the object (called methods in Ruby). Classes are especially useful when we want to model several similar objects that all correspond to the Platonic ideal of the object, but have different manifestations in the real world. I realize that I’m obfuscating worse than a politician here with my deliberately abstract language, so let’s take a look at a concrete example. Imagine for a minute that you’re running a used book store and want to be able to keep track of and manipulate your inventory in Ruby. Let’s create a Book
class to help us:
class Book
def initialize(title, author, price)
@title = title
@author = author
@price = price
end
end
Now, whenever we want to add an individual book (called an instance of the class) to our list, it is given three important attributes at the time of its creation—title, author, and price—that are assigned to instance variables, denoted by the @ sign in the code. (We could have added many more, but three will suffice for this example.) In real life, we’re probably going to want to interface with a database to pull in books into our program, but of course it’s possible to add them manually too:
dreams = Book.new("Einstein's Dreams", "Alan Lightman", 9.95)
watchman = Book.new("Go Set a Watchman", "Harper Lee", 20.99)
So, what exactly is the advantage of classes? Well, if we want to automate the process of offering a 10% discount, it’s easy to add a method to the Book
class that will do exactly this:
class Book
def discount
@price = (@price * 0.9).round(2)
end
end
Now if we want to discount our lightly used Go Set a Watchman in a futile effort to compete with Amazon, all we have to do is call the ::discount
method on it like so:
watchman.discount
# Result: @price changes to 18.89
A book for sale is just one practical, everyday example of how Ruby classes can model objects. But that’s just the proverbially proverbial tip of the iceberg—objects of much greater complexity are capable of being modeled in Ruby as well. It’s also possible to model objects of only slightly greater complexity, such as, for example, a bingo game.
Bingo!
The requirements for playing Bingo are straightforward—all you need to do is live in a nursing home. I kid. What you need to play are a randomized 5x5 board, a random number generator that will call out numbers, some way to check off numbers that are called, some way to keep track of your board, and some way to shout “BINGO!” In my BingoBoard
class, I’ve emulated each of these features. We will look at them in order:
class BingoBoard
attr_reader :bingo_board
def initialize
b = (1..15).to_a.shuffle.slice(0..4)
i = (16..30).to_a.shuffle.slice(0..4)
n = (31..45).to_a.shuffle.slice(0..4)
g = (46..60).to_a.shuffle.slice(0..4)
o = (61..75).to_a.shuffle.slice(0..4)
@bingo_board = [b, i, n, g, o].transpose
@bingo_board[2][2] = "X"
@call_stack = (1..75).to_a.shuffle
end
First things first, we need to generate a bingo card. I’ve accomplished this by generating five arrays (“rows”) containing five randomized numbers chosen from chunks of 15, transposing these rows into columns to mimic the traditional format of the bingo card, and finally pre-marking the center square. In this initialization step, I’ve also opted to generate my call_stack
, which contains numbers 1-75 in the randomized order they’ll be called as the game proceeds. This works fine for my single-player version of Bingo, but were I to build a multi-player version, I would probably want to separate the board generation process from the game play.
Speaking of gameplay, here’s my method to draw a ball, which is contained within the BingoBoard
class:
def draw_ball
@number = @call_stack.pop
if @number <= 15
call_letter = "B"
elsif @number <= 30
call_letter = "I"
elsif @number <= 45
call_letter = "N"
elsif @number <= 60
call_letter = "G"
else
call_letter = "O"
end
puts("#{call_letter} #{@number}, ladies and gentlemen! #{call_letter} #{@number}")
end
Nothing too complicated here. I’m pop
ping off the last number in my randomized call_stack
, determining what letter it corresponds to, and then announcing it to the world. Once the number is called, I need to check to see whether there’s a match on the bingo board:
def check
@bingo_board.each do |row|
row.map! do |element|
if element == @number
element = "X"
else
element
end
end
end
end
Since our bingo card is a matrix (or an array of arrays, if you prefer), iterating over it requires a touch of finesse. In my implementation, I’ve used nested Enumerable methods to accomplish this—the #each
method will sequentially select rows for investigation, then once the row is selected, the #map!
method is called on the row and will permanently replace any element that matches called number with an X. As anyone who is familiar with bingo knows, the bingo card will gradually fill up with X’s (usually agonizingly slowly) as the game progresses. Since 5 X’s in a row, column, or diagonal signals the end of the game, the next thing we need is a method that will determine whether any of these magical conditions are met:
def winner?
# test all rows
bingo_board.each { |row| return true if row.uniq == ["X"]}
# test all columns
bingo_board.transpose.each { |column| return true if column.uniq == ["X"]}
#test diagonals
if [bingo_board[0][0], bingo_board[1][1], bingo_board[3][3], bingo_board[4][4]].uniq == ["X"]
return true
elsif [bingo_board[4][0], bingo_board[3][1], bingo_board[1][3], bingo_board[0][4]].uniq == ["X"]
return true
end
return false
end
As if often the case in Ruby, there are several possible ways to write the code for this part, and while this might not be the most efficient or elegant one, the code is readable and gets the job done. The crucial array method used is #uniq
—if there are only X’s in a row, column, or diagonal, then the #uniq
method will result in ["X"]
and trigger a return of true
. The check for this true
is performed in the last method needed for our bingo game, something that will print to the screen the current status of the bingo card after each call and then check whether the game is complete:
def display
# Shows current status of bingo card
puts ""
puts("---B----I----N----G----O--")
@bingo_board.each do |row|
print "| "
row.each do |element|
if element.to_s.length == 2
print element.to_s + " | "
else
print " " + element.to_s + " | "
end
end
puts ""
puts("--------------------------")
end
# Performs check to see if card is a winner
if winner?
8.times do
print "."
sleep 0.2
end
print "BINGO! You've won! Congratulations! "
abort "You won in #{75 - @call_stack.length} calls!"
end
end
end # This "end" closes the class BingoBoard
And that’s the bingo game. It’s all conveniently contained within a class that automatically generates persistent variables that keep careful track of the current status of the bingo card(s) and the numbers drawn, and contains methods for printing out the board and checking for a winning card. By itself, the class doesn’t do anything, but rather gathers together all the tools needed to run a bingo game. From here, it’s quite straightforward to actually program a bingo game—just create a new instance of the BingoBoard
class, add in some basic user prompts, and you’re off and running! Here’s a one-player version that I made (with just a few tweaks, this can transformed into a two-player version):
# GAME EMULATION FOR 1 PLAYER
game = BingoBoard.new
puts "Want to play some bingo? Type 'Sure' to start game."
answer = gets.chomp
if answer == "Sure"
puts "Here's your board!"
game.display
while "Sox" > "Cubs" # or while true, if you prefer
puts "Press Enter to hear the next call. Type in 'quit' to exit."
continue = gets.chomp
if continue == ""
puts ""
game.draw_ball
game.check
game.display
elsif continue == "quit"
break
else
puts "Sorry, I'm didn't understand that..."
end
end
else
puts "Well, that's too bad. See you next time."
 Type 'Sure' to start game.
Sure
Here's your board!
---B----I----N----G----O--
| 10 | 22 | 42 | 50 | 65 |
--------------------------
| 12 | 17 | 43 | 52 | 75 |
--------------------------
| 6 | 18 | X | 47 | 62 |
--------------------------
| 8 | 20 | 36 | 54 | 63 |
--------------------------
| 13 | 24 | 32 | 56 | 66 |
--------------------------
Press Enter to hear the next call. Type in 'quit' to exit.
O 62, ladies and gentlemen! O 62
---B----I----N----G----O--
| 10 | 22 | 42 | 50 | 65 |
--------------------------
| 12 | 17 | 43 | 52 | 75 |
--------------------------
| 6 | 18 | X | 47 | X |
--------------------------
| 8 | 20 | 36 | 54 | 63 |
--------------------------
| 13 | 24 | 32 | 56 | 66 |
--------------------------
etc.
Only three more squares to go until...BINGO!
Pithy Ending
Classes in Ruby are incredibly powerful and are the crux of Ruby’s object-oriented approach. Classes can be used to model almost any object in the real world. From simple objects like books or dice to more complicated things like a user’s account on a website or an interactive game that emulates controlling a nuclear reactor, the only limit is your imagination (and time and your computer’s memory allotment and your patience and your ability to program, etc.). Gaining a deep understanding of classes and when to construct them represents another solid step toward unlocking the power of Ruby. Onwards and upwards, fellow Rubyists!


Ottawa urges CN and union to continue talks as 3,200 workers go on strike
The rail workers began their strike after failing to reach a deal by a midnight deadline
by The Canadian PressThe federal government urged Canadian National Railway Co. and the Teamsters Canada Rail Conference to continue negotiating as roughly 3,200 conductors, trainpersons and yard workers went on strike.
Labour Minister Patty Hajdu says the government is concerned about the impact of a work stoppage on Canadians, but remains hopeful the two sides will reach an agreement.
The rail workers began their strike after failing to reach a deal by a midnight deadline.
Union spokesman Christopher Monette says they are still in talks with CN in hopes of reaching a negotiated settlement and ending the labour dispute as soon as possible.
The union has said passenger rail services in the country’s three biggest cities would not be affected by the strike.
The workers, who have been without a contract since July 23, say they’re concerned about long hours, fatigue and what they consider dangerous working conditions.
The dispute comes as CN confirmed last week that it was cutting jobs across the railway as it deals with a weakening North American economy that has eroded demand.
READ MORE: Some 3000 CN Rail unionized workers threaten national strike
The Canadian Press


Gateway
BOT
19-Apr-19 01:55 PM
[dscrd-hush] <dukeleto> @Inevitability latest agama has been modified to support HUSH3, we are waiting on the next release
[dscrd-hush] <dukeleto> we don't control the Agama release schedule, but are encouraging them to make one soon
[dscrd-hush] <dukeleto> binaries for various platforms needs to be made, etc
[dscrd-hush] <Inevitability> It's not working. Agama imports nothing
[dscrd-hush] <Inevitability> And every time i start Agama, i need to activate HUSH....
[dscrd-hush] <Inevitability> And yet, now my coins are dead.
[dscrd-hush] <Berg> Your coins are not dead unless you lost your private key..
[dscrd-hush] <Inevitability> Agama not support new hush
[dscrd-hush] <ComputerGenie - ChickenPool> 1500 years from now, any coins held by any privkey now will still be held by that privkey unless you transfer them
[dscrd-hush] <Inevitability> I don't now, how import private key to Agama
[dscrd-hush] <ComputerGenie - ChickenPool> we are waiting on the next release
[dscrd-hush] <Inevitability> ок
[dscrd-hush] <Inevitability> What wallet i can use for mining HUSH now ?
[dscrd-hush] <ComputerGenie - ChickenPool> you don't need a wallet to mine, just use your R address
[dscrd-hush] <dukeleto> yep
[dscrd-hush] <ComputerGenie - ChickenPool> promises that you will not die if you mine and hold for a few days
[dscrd-hush] <dukeleto> best financial move I ever made was not touching certain privkeys for multiple years, 50% luck and 50% things were very different back then
[dscrd-hush] <dukeleto> also, This Is Not Financial Advice
[dscrd-hush] <dukeleto> I have been writing the whitepaper like a ..... whitepaperer ?
[dscrd-hush] <dukeleto> does anybody read these things?
[dscrd-hush] <dukeleto> are whitepapers still a thing?
[dscrd-hush] <dukeleto> or is this just for me to feel good?
[dscrd-hush] <dukeleto> Since the original BTC whitepaper was 9 pages, that seems the Golden Standard, wouldn't you say @jl777c ?
[dscrd-hush] <Inevitability>
[dscrd-hush] <ComputerGenie - ChickenPool> does anybody read these things?
imo, less than 1% do, the other 99% live for:
wen moon
[dscrd-hush] <dukeleto> The new HUSH whitepaper prominently features KMD, since that is our upstream. And sure, we mention ZEC/BTC as our grandupstreams...
[dscrd-hush] <Berg> HUSH dad?
[dscrd-hush] <dukeleto> but the only coin outside of that which is mentioned....
[dscrd-hush] <dukeleto> first person to guess gets 5 HUSH
[dscrd-hush] <ComputerGenie - ChickenPool> BTG?
[dscrd-hush] <ComputerGenie - ChickenPool> :troll:
(edited)
[dscrd-hush] <dukeleto> wrong
[dscrd-hush] <dukeleto>
[dscrd-hush] <ComputerGenie - ChickenPool> goes to find the paper that he hasn't ready yet
[dscrd-hush] <dukeleto> somebody plz beat CG to this...
[dscrd-hush] <dukeleto> didn't mean for this to be a cryptopuzzle
[dscrd-hush] <dukeleto> but now it is, lol
[dscrd-hush] <dukeleto> i probably should embed a cryptopuzzle in our whitepaper, eh? an actual private key
[dscrd-hush] <dukeleto> all the cool kids do that nowadays, i heard
[dscrd-hush] <dukeleto> a privkey which owns HUSH,KMD,BTCH would be a cool little cryptopuzzle to embed in the whitepaper
[dscrd-hush] <ComputerGenie - ChickenPool> htf did I miss that the 1st time I read it?
[dscrd-hush] <dukeleto> CG gonna be so mad when he finds it
[dscrd-hush] <ComputerGenie - ChickenPool> ffs I feel dumb
[dscrd-hush] <dukeleto> let the new kids get a bounty
[dscrd-hush] <dukeleto>
[dscrd-hush] <dukeleto> But it's up for anybody to grab
[dscrd-hush] <penguin> piratechain
[dscrd-hush] <dukeleto> @ComputerGenie - ChickenPool give me ideas of how to embed a privkey in the wp
[dscrd-hush] <Inevitability> Does anyone know how to import different keys into Agama ?
[dscrd-hush] <penguin> you will have to run native mode - if you want them in same wallet *
(edited)
[dscrd-hush] <dukeleto> @penguin give me address plz, zaddr or Raddr
[dscrd-hush] <penguin> wooo
[dscrd-hush] <dukeleto> @Inevitability in the Tools section, there is a "WIF to WIF" tool
[dscrd-hush] <penguin> 1 moment
[dscrd-hush] <dukeleto> which can convert WIFs between chains


Work from Home Tips
Increase Efficiency and Productivity
- Hi I’m GeGe! I started this blog to give insights into the working lawyer’s life and to provide my experiences and stories.
- Over the years of practicing law, I’ve encountered many situations that I wasn’t sure about how to tackle, and there weren’t resources available to help me figure things out. So, my motivation for starting this is to be that resource to others who are experiencing the same or similar situations.
- For this inaugural video, I want to talk about something on the top of everyone’s mind—working from home. How I’ve been dealing with it, the pros and cons I’ve experienced, and I’ll share some tips to help you get through the challenges of the WFH life
- PROS
- No commute
- No need to wear makeup or a suit everyday
- Extra time to work out
- Research has shown that working out will boost your mood for the day and even 20 minutes is good enough to achieve that
- CONS
- Boring/lack of social interaction
- Check in with co-workers
- Walk to a coffee shop
- Listening to some nice background music.
- Stress and fatigue brought on by lack of separation of home and office
- Keep a regular work schedul
- Difficult to be efficient
- Plan the day’s tasks the night before - Prioritize tasks
- Take breaks. Set timer for 90-120 minutes of work
- Reward yourself after finishing a task
- Seek out new activities to keep your life interesting and stimulating
- Flow state concept—the subjective state in which a person functions at her fullest capacity with all attention focused on task. This results in positive emotions and a sense of being in control of one’s own destiny. This year, it’s been particularly hard to feel like we’re in control.
- Flow state is best achieved if doing an activity that challenges you but without being too overwhelming
- Link if you’d like to read more about flow state
- For me, this channel is my fix!


2016
Undergraduate Students
- Joe Salame
- BME | Wright State University
- Skyler Hannebaum
- BME | Wright State University
- Charles (CJ) Simmons
- BME | Wright State University
- Michael Rybak
- BME | Wright State University
Professional Mentors
- Dr. Julie Skipper
- Adjunct Professor
- Wright State University Engineering
- Adam Renner
- AFRL Engineer
2015
Undergraduate Students
- Tirzah Weiss
- BME | Ohio State University
- Jacob Breide
- CE | University of Cincinnati
- Alex Opp
- CE | Wright State University
- Andy Urschel
- EE | Ohio State University
- Cam Wrabel
- ECE | Ohio State University
Graduate Students
- James Neyhouse
- EE | Wright State University
Professional Mentors
- Adam Renner
- AFRL Engineer
- Sanjay Boddhu
- QBase Research Associate
- Subhashini Ganapathy
- Assistant Professor
- Wright State University Engineering
2014
Undergraduate Students
- Lucas Cron
- ECE | Ohio State University
- Wes Nash
- ECE | Ohio State University
- Alex Opp
- CE | Wright State University
- Stephanie Suhr
- BME | Wright State University
- Andy Urschel
- EE | Ohio State University
- Cam Wrabel
- ECE | Ohio State University
Graduate Students
- James West
- CS | Wright State University
- Pawel Grzebala
- CE | Wright State University
- Kushal Abhyankar
- HFE | Wright State University
- Rahul Bodduluri
- CS | Wright State University
Professional Mentors
- Adam Renner
- AFRL Engineer
- Sanjay Boddhu
- QBase Research Associate
- Subhashini Ganapathy
- Assistant Professor
- Wright State University Engineering
2013
Undergraduate Students
- Lucas Boswell
- EE | University of Cincinnati
- Brandon Harmon
- CS | MU
- Nathan Weinle
- EE | Wright State University
- Nir Wiener
- CE | Wright State University
Graduate Students
- Matt McCartney
- CS | USC
- James West
- CS | Wright State University
Professional Mentors
- Adam Renner
- AFRL Engineer
Acknowledgements
Special Thanks to:
- Flavio Bergamaschi, Technical Staff Member, Emerging Technology at IBM Hursley Laboratory
- For working with us on the Incident Command Center Project


Countries starting with A
Countries starting with B
Countries starting with C
Countries starting with D
Countries starting with E
Countries starting with F
Countries starting with G
Countries starting with H
Countries starting with I
Countries starting with J
Countries starting with K
Countries starting with L
Countries starting with M
Countries starting with N
Countries starting with O
Countries starting with P
Countries starting with Q
Countries starting with R
Countries starting with S
Countries starting with T
Countries starting with U
Countries starting with V
Countries starting with W
Countries starting with Y
Countries starting with Z


fun <TokenType : Token> trim(): Processor<TokenType, Unit>
Creates and returns a processor that removes leading and trailing whitespace from tokens.


Your address:
Done
Tokens
Change Pin
Show private key
Sign out
bars
CRTT
Send
My address
Transaction History


footer
element testfooter
element,
sectioning content/root is body
footer
element,
sectioning content/root is not body
footer
with aria-label
footer
with aria-labelledby
footer
with title
attribute.
footer
with aria-describedby
footer
with aria-label
& title
attributes


This file is the reference documentation for the Python Bee package. This package is made of tasks to build your Python projects and templates to quick start new ones.
Bee packages are managed as Ruby Gems, thus you can install Bee Python typing sudo gem install bee_python under Unix systems or gem install bee_python under Windows. Note that this will also install Bee if not already installed because Bee is a required dependency of bee_python.
To get a reference about Python tasks, please see Tasks Reference section.
You can also get documentation about a given task in a terminal typing bee -k python.pylint for instance. To list all available tasks in the Python package, type bee -k python.?.
To get a reference about Python templates, please see Templates Reference section.
You can also get documentation about a given template in a terminal typing bee -e python.project for instance. To list all available templates in the Python package, type bee -e python.?.
Enjoy!


|
Algorithm developed. |
F1 in schools Entry |
Hugh wins Car Design |
||||
| Algorithm Developed - Zachary wrote an algorithm to calculate time to travel 20 metres assuming constant thrust |
Competition Launch - We have entered into F1 for schools |
In a friendly competition among the team, Hugh's had the best drag coefficient |