The Java EE 7 Tutorial
45.5 Using the JMS API in Java EE Applications
This section describes how using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
A general rule in the Java EE platform specification applies to all Java EE components that use the JMS API within EJB or web containers: Application components in the web and EJB containers must not attempt to create more than one active (not closed) Session
object per connection. Multiple JMSContext
objects are permitted, however, since they combine a single connection and a single session.
This rule does not apply to application clients. The application client container supports the creation of multiple sessions for each connection.
45.5.1 Creating Resources for Java EE Applications
You can use annotations to create application-specific connection factories and destinations for Java EE enterprise bean or web components. The resources you create in this way are visible only to the application for which you create them.
You can also use deployment descriptor elements to create these resources. Elements specified in the deployment descriptor override elements specified in annotations. See Packaging Applications for basic information about deployment descriptors. You must use a deployment descriptor to create application-specific resources for application clients.
To create a destination, use a @JMSDestinationDefinition
annotation like the following on a class:
@JMSDestinationDefinition( name = "java:app/jms/myappTopic", interfaceName = "javax.jms.Topic", destinationName = "MyPhysicalAppTopic" )
The name
, interfaceName
, and destinationName
elements are required. You can optionally specify a description
element. To create multiple destinations, enclose them in a @JMSDestinationDefinitions
annotation, separated by commas.
To create a connection factory, use a @JMSConnectionFactoryDefinition
annotation like the following on a class:
@JMSConnectionFactoryDefinition( name="java:app/jms/MyConnectionFactory" )
The name
element is required. You can optionally specify a number of other elements, such as clientId
if you want to use the connection factory for durable subscriptions, or description
. If you do not specify the interfaceName
element, the default interface is javax.jms.ConnectionFactory
. To create multiple connection factories, enclose them in a @JMSConnectionFactoryDefinitions
annotation, separated by commas.
You need to specify the annotation only once for a given application, in any of the components.
|
Note: If your application contains one or more message-driven beans, you may want to place the annotation on one of the message-driven beans. If you place the annotation on a sending component such as an application client, you need to specify the |
When you inject the resource into a component, use the value of the name
element in the definition annotation as the value of the lookup
element in the @Resource
annotation:
@Resource(lookup = "java:app/jms/myappTopic") private Topic topic;
The following portable JNDI namespaces are available. Which ones you can use depends on how your application is packaged.
-
java:global
: Makes the resource available to all deployed applications -
java:app
: Makes the resource available to all components in all modules in a single application -
java:module
: Makes the resource available to all components within a given module (for example, all enterprise beans within an EJB module) -
java:comp
: Makes the resource available to a single component only (except in a web application, where it is equivalent tojava:module
)
See the API documentation for details on these annotations. The examples in Sending and Receiving Messages Using a Simple Web Application, Sending Messages from a Session Bean to an MDB, and Using an Entity to Join Messages from Two MDBs all use the @JMSDestinationDefinition
annotation. The other JMS examples do not use these annotations. The examples that consist only of application clients are not deployed in the application server and must therefore communicate with each other using administratively created resources that exist outside of individual applications.
45.5.2 Using Resource Injection in Enterprise Bean or Web Components
You may use resource injection to inject both administered objects and JMSContext
objects in Java EE applications.
<IP_ADDRESS> Injecting a ConnectionFactory, Queue, or Topic
Normally, you use the @Resource
annotation to inject a ConnectionFactory
, Queue
, or Topic
into your Java EE application.  You may want to use the default connection factory, whose JNDI name is java:comp/DefaultJMSConnectionFactory
.
When you use resource injection in an application client component, you normally declare the JMS resource static:
@Resource(lookup = "java:comp/DefaultJMSConnectionFactory") private static ConnectionFactory connectionFactory; @Resource(lookup = "jms/MyQueue") private static Queue queue;
However, when you use this annotation in a session bean, a message-driven bean, or a web component, do not declare the resource static:
@Resource(lookup = "java:comp/DefaultJMSConnectionFactory") private ConnectionFactory connectionFactory; @Resource(lookup = "jms/MyTopic") private Topic topic;
If you declare the resource static in these components, runtime errors will result.
<IP_ADDRESS> Injecting a JMSContext Object
To access a JMSContext
object in an enterprise bean or web component, instead of injecting the ConnectionFactory
resource and then creating a JMSContext
, you can use the @Inject
and @JMSConnectionFactory
annotations to inject a JMSContext
. To use the default connection factory, use code like the following:
@Inject private JMSContext context1;
To use your own connection factory, use code like the following:
@Inject @JMSConnectionFactory("jms/MyConnectionFactory") private JMSContext context2;
45.5.3 Using Java EE Components to Produce and to Synchronously Receive Messages
An application that produces messages or synchronously receives them can use a Java EE web or EJB component, such as a managed bean, a servlet, or a session bean, to perform these operations. The example in Sending Messages from a Session Bean to an MDB uses a stateless session bean to send messages to a topic. The example in Sending and Receiving Messages Using a Simple Web Application uses managed beans to produce and to consume messages.
Because a synchronous receive with no specified timeout ties up server resources, this mechanism usually is not the best application design for a web or EJB component. Instead, use a synchronous receive that specifies a timeout value, or use a message-driven bean to receive messages asynchronously. For details about synchronous receives, see JMS Message Consumers.
Using the JMS API in a Java EE component is in many ways similar to using it in an application client. The main differences are the areas of resource management and transactions.
<IP_ADDRESS> Managing JMS Resources in Web and EJB Components
The JMS resources are a connection and a session, usually combined in a JMSContext
object. In general, it is important to release JMS resources when they are no longer being used. Here are some useful practices to follow.
-
If you wish to maintain a JMS resource only for the life span of a business method, use a
try
-with-resources statement to create theJMSContext
so that it will be closed automatically at the end of thetry
block. -
To maintain a JMS resource for the duration of a transaction or request, inject the
JMSContext
as described in Injecting a JMSContext Object. This will also cause the resource to be released when it is no longer needed. -
If you would like to maintain a JMS resource for the life span of an enterprise bean instance, you can use a
@PostConstruct
callback method to create the resource and a@PreDestroy
callback method to close the resource. However, there is normally no need to do this, since application servers usually maintain a pool of connections. If you use a stateful session bean and you wish to maintain the JMS resource in a cached state, you must close the resource in a@PrePassivate
callback method and set its value tonull
, and you must create it again in a@PostActivate
callback method.
<IP_ADDRESS> Managing Transactions in Session Beans
Instead of using local transactions, you use JTA transactions. You can use either container-managed transactions or bean-managed transactions. Normally, you use container-managed transactions for bean methods that perform sends or receives, allowing the EJB container to handle transaction demarcation. Because container-managed transactions are the default, you do not have to specify them.
You can use bean-managed transactions and the javax.transaction.UserTransaction
interface's transaction demarcation methods, but you should do so only if your application has special requirements and you are an expert in using transactions. Usually, container-managed transactions produce the most efficient and correct behavior. This tutorial does not provide any examples of bean-managed transactions.
45.5.4 Using Message-Driven Beans to Receive Messages Asynchronously
The sections What Is a Message-Driven Bean? and How Does the JMS API Work with the Java EE Platform? describe how the Java EE platform supports a special kind of enterprise bean, the message-driven bean, which allows Java EE applications to process JMS messages asynchronously. Other Java EE web and EJB components allow you to send messages and to receive them synchronously but not asynchronously.
A message-driven bean is a message listener to which messages can be delivered from either a queue or a topic. The messages can be sent by any Java EE component (from an application client, another enterprise bean, or a web component) or from an application or a system that does not use Java EE technology.
A message-driven bean class has the following requirements.
-
It must be annotated with the
@MessageDriven
annotation if it does not use a deployment descriptor. -
The class must be defined as
public
, but not asabstract
orfinal
. -
It must contain a public constructor with no arguments.
It is recommended, but not required, that a message-driven bean class implement the message listener interface for the message type it supports. A bean that supports the JMS API implements the javax.jms.MessageListener
interface, which means that it must provide an onMessage
method with the following signature:
void onMessage(Message inMessage)
The onMessage
method is called by the bean's container when a message has arrived for the bean to service. This method contains the business logic that handles the processing of the message. It is the message-driven bean's responsibility to parse the message and perform the necessary business logic.
A message-driven bean differs from an application client's message listener in the following ways.
-
In an application client, you must create a
JMSContext
, then create aJMSConsumer
, then callsetMessageListener
to activate the listener. For a message-driven bean, you need only define the class and annotate it, and the EJB container creates it for you. -
The bean class uses the
@MessageDriven
annotation, which typically contains anactivationConfig
element containing@ActivationConfigProperty
annotations that specify properties used by the bean or the connection factory. These properties can include the connection factory, a destination type, a durable subscription, a message selector, or an acknowledgment mode. Some of the examples in Chapter 46, "Java Message Service Examples" set these properties. You can also set the properties in the deployment descriptor. -
The application client container has only one instance of a
MessageListener
, which is called on a single thread at a time. A message-driven bean, however, may have multiple instances, configured by the container, which may be called concurrently by multiple threads (although each instance is called by only one thread at a time). Message-driven beans may therefore allow much faster processing of messages than message listeners. -
You do not need to specify a message acknowledgment mode unless you use bean-managed transactions. The message is consumed in the transaction in which the
onMessage
method is invoked.
Table 45-3 lists the activation configuration properties defined by the JMS specification.
Table 45-3 @ActivationConfigProperty Settings for Message-Driven Beans
| Property Name | Description |
|---|---|
|
|
Acknowledgment mode, used only for bean-managed transactions; the default is |
|
|
The lookup name of the queue or topic from which the bean will receive messages |
|
|
Either |
|
|
For durable subscriptions, set the value to |
|
|
For durable subscriptions, the client ID for the connection (optional) |
|
|
For durable subscriptions, the name of the subscription |
|
|
A string that filters messages; see JMS Message Selectors for information |
|
|
The lookup name of the connection factory to be used to connect to the JMS provider from which the bean will receive messages |
For example, here is the message-driven bean used in Receiving Messages Asynchronously Using a Message-Driven Bean:
@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationLookup", propertyValue = "jms/MyQueue"), @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") }) public class SimpleMessageBean implements MessageListener { @Resource private MessageDrivenContext mdc; static final Logger logger = Logger.getLogger("SimpleMessageBean"); public SimpleMessageBean() { } @Override public void onMessage(Message inMessage) { try { if (inMessage instanceof TextMessage) { logger.log(Level.INFO, "MESSAGE BEAN: Message received: {0}", inMessage.getBody(String.class)); } else { logger.log(Level.WARNING, "Message of wrong type: {0}", inMessage.getClass().getName()); } } catch (JMSException e) { logger.log(Level.SEVERE, "SimpleMessageBean.onMessage: JMSException: {0}", e.toString()); mdc.setRollbackOnly(); } } }
If JMS is integrated with the application server using a resource adapter, the JMS resource adapter handles these tasks for the EJB container.
The bean class commonly injects a MessageDrivenContext
resource, which provides some additional methods you can use for transaction management (setRollbackOnly
, for example):
@Resource private MessageDrivenContext mdc;
A message-driven bean never has a local or remote interface. Instead, it has only a bean class.
A message-driven bean is similar in some ways to a stateless session bean: Its instances are relatively short-lived and retain no state for a specific client. The instance variables of the message-driven bean instance can contain some state across the handling of client messages: for example, an open database connection, or an object reference to an enterprise bean object.
Like a stateless session bean, a message-driven bean can have many interchangeable instances running at the same time. The container can pool these instances to allow streams of messages to be processed concurrently. The container attempts to deliver messages in chronological order when that would not impair the concurrency of message processing, but no guarantees are made as to the exact order in which messages are delivered to the instances of the message-driven bean class. If message order is essential to your application, you may want to configure your application server to use just one instance of the message-driven bean.
For details on the lifecycle of a message-driven bean, see The Lifecycle of a Message-Driven Bean.
45.5.5 Managing JTA Transactions
Java EE application clients and Java SE clients use JMS local transactions (described in Using JMS Local Transactions), which allow the grouping of sends and receives within a specific JMS session. Java EE applications that run in the web or EJB container commonly use JTA transactions to ensure the integrity of accesses to external resources. The key difference between a JTA transaction and a JMS local transaction is that a JTA transaction is controlled by the application server's transaction managers. JTA transactions may be distributed, which means that they can encompass multiple resources in the same transaction, such as a JMS provider and a database.
For example, distributed transactions allow multiple applications to perform atomic updates on the same database, and they allow a single application to perform atomic updates on multiple databases.
In a Java EE application that uses the JMS API, you can use transactions to combine message sends or receives with database updates and other resource manager operations. You can access resources from multiple application components within a single transaction. For example, a servlet can start a transaction, access multiple databases, invoke an enterprise bean that sends a JMS message, invoke another enterprise bean that modifies an EIS system using the Connector Architecture, and finally commit the transaction. Your application cannot, however, both send a JMS message and receive a reply to it within the same transaction.
JTA transactions within the EJB and web containers can be either of two kinds.
-
Container-managed transactions: The container controls the integrity of your transactions without your having to call
commit
orrollback
. Container-managed transactions are easier to use than bean-managed transactions. You can specify appropriate transaction attributes for your enterprise bean methods.Use the
Required
transaction attribute (the default) to ensure that a method is always part of a transaction. If a transaction is in progress when the method is called, the method will be part of that transaction; if not, a new transaction will be started before the method is called and will be committed when the method returns. See Transaction Attributes for more information. -
Bean-managed transactions: You can use these in conjunction with the
javax.transaction.UserTransaction
interface, which provides its owncommit
androllback
methods you can use to delimit transaction boundaries. Bean-managed transactions are recommended only for those who are experienced in programming transactions.
You can use either container-managed transactions or bean-managed transactions with message-driven beans. To ensure that all messages are received and handled within the context of a transaction, use container-managed transactions and use the Required
transaction attribute (the default) for the onMessage
method.
When you use container-managed transactions, you can call the following MessageDrivenContext
methods.
-
setRollbackOnly
: Use this method for error handling. If an exception occurs,setRollbackOnly
marks the current transaction so that the only possible outcome of the transaction is a rollback. -
getRollbackOnly
: Use this method to test whether the current transaction has been marked for rollback.
If you use bean-managed transactions, the delivery of a message to the onMessage
method takes place outside the JTA transaction context. The transaction begins when you call the UserTransaction.begin
method within the onMessage
method, and it ends when you call UserTransaction.commit
or UserTransaction.rollback
. Any call to the Connection.createSession
method must take place within the transaction.
Using bean-managed transactions allows you to process the message by using more than one transaction or to have some parts of the message processing take place outside a transaction context. However, if you use container-managed transactions, the message is received by the MDB and processed by the onMessage
method within the same transaction. It is not possible to achieve this behavior with bean-managed transactions.
When you create a JMSContext
in a JTA transaction (in the web or EJB container), the container ignores any arguments you specify, because it manages all transactional properties. When you create a JMSContext
in the web or EJB container and there is no JTA transaction, the value (if any) passed to the createContext
method should be JMSContext.AUTO_ACKNOWLEDGE
or JMSContext.DUPS_OK_ACKNOWLEDGE
.
When you use container-managed transactions, you normally use the Required
transaction attribute (the default) for your enterprise bean's business methods.
You do not specify the activation configuration property acknowledgeMode
when you create a message-driven bean that uses container-managed transactions. The container acknowledges the message automatically when it commits the transaction.
If a message-driven bean uses bean-managed transactions, the message receipt cannot be part of the bean-managed transaction. You can set the activation configuration property acknowledgeMode
to Auto-acknowledge
or Dups-ok-acknowledge
to specify how you want the message received by the message-driven bean to be acknowledged.
If the onMessage
method throws a RuntimeException
, the container does not acknowledge processing the message. In that case, the JMS provider will redeliver the unacknowledged message in the future.


NoSwear Tutorials
Hello, and welcome to the new home for NoSwear Tutorials.
On the left hand side you will find everything there is to know about the NoSwear plugin. Follow the tutorial in parts to help learn in simple stages, or skip to the step you want to learn.
Helpful NoSwear Links
Permissions
- NoSwear.Bypass
- Bypass Swear detection
- NoSwear.Admin
- Access Administration commands


One Saturday night, I received some Vicodin pills from a friend, (x5) 5/500 MG ones to be exact, equalling 25MG. My experience is written below as followed. Also, I have had many experiences with psychoactives, mostly pills.
Location: House, Computer Room.
Dosage: 25 MG Vicodin
People: Danny and Devan.
10:00 PM- Ingested three of the five Vicodin pills, I had received from a great friend.
10:15 PM- Feeling mildly warm, browsing the web and starting to feel a sense of well being.
10:26 PM- Feeling tingly in my fingers and toes. Feeling quite happy. Listening to FLOWING by 311.
10:45 PM- Ingest the two remaining, 5 MG Vicodin pills.
11:00 PM- Feeling quite wonderful, and wish this would last forever. I have tooken over 35 MG of Vicodin before, but 17-25 MG seems to work for me. Many thoughts race through my head, and nirvana seems to cloud my mind.
11:20 PM- I watched the end of Matrix: Revolutions, and enjoy the spectacular special effects, that seem to look even more amazing than usually. My girlfriend Devan stops by, and is on 2 Oxycodone pills. We begin to make love, and the joys of this world rush through every fiber in my body, as well as Devans.
11:45 PM- Still making love with Devan. Feeling overpowered by Passion. Our eyes meet and she is more beautiful then a breath of spring air. True love is experienced, as we reach the peak of the sacred act. Devan and I both experience an Orgasm, which to this day, is undescribable by my tounge.
12:00 AM- Finished making love. I feel extreme joy, and happy to be alive. We both get into the bathtub, and bath each other. The water tempature was perfect and I wouldn't have changed anything was felt, as we cleansed each other.
12:20 AM- We lie down together and fall asleep into a great slumber, and heavenly dreams came upon me. I dreamt I was flowing in space, passing many stars and planets. It was amazing. Everything was perfect that night.
NEXT DAY: I wake up, and Devan is still asleep. It's 10:00 AM, and I get ready for work. I will never forget that night. It was one of the greatest trips and most passionate night I have ever had.
EXTRA NOTES: I enjoyed Vicodin very much, considering it to be a mild psychoactive. Devan was on Oxycodone, which is also an Opiate as you know, so I must thank the Opiate drug family for such an incredibly journey that we were tooken on. There was no hallucinations or Mind-Body Seperation that DXM, MDMA or Mushrooms have brought before, but that night, I felt something else, and the power of love was shone upon me like the blazing sun as it shines her light to the ground in which we stand upon.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Table of Contents
The X configuration file provides a means to configure the X server. This section describes the settings necessary to enable the NVIDIA driver. A comprehensive list of parameters is provided in Appendix B, X Config Options.
The NVIDIA Driver includes a utility called nvidia-xconfig, which is designed to make editing the X configuration file easy. You can also edit it by hand.
nvidia-xconfig will find the X configuration file and modify it to use the NVIDIA X driver. In most cases, you can simply answer "Yes" when the installer asks if it should run it. If you need to reconfigure your X server later, you can run nvidia-xconfig again from a terminal. nvidia-xconfig will make a backup copy of your configuration file before modifying it.
Note that the X server must be restarted for any changes to its configuration file to take effect.
More information about nvidia-xconfig can be found in the nvidia-xconfig manual page by running.
% man nvidia-xconfig
If you do not have a working X config file, there are a few
different ways to obtain one. A sample config file is included both
with the X.Org distribution and with the NVIDIA driver package (at
/usr/share/doc/NVIDIA_GLX-1.0/
). The
nvidia-xconfig
utility, provided with the NVIDIA driver package, can generate a
new X configuration file. Additional information on the X config
syntax can be found in the xorg.conf manual page (man xorg.conf
).
If you have a working X config file for a different driver (such as the “vesa” or “fbdev” driver), then simply edit the file as follows.
Remove the line:
Driver "vesa" (or Driver "fbdev")
and replace it with the line:
Driver "nvidia"
Remove the following lines:
Load "dri" Load "GLCore"
In the Module
section of the
file, add the line (if it does not already exist):
Load "glx"
If the X config file does not have a Module
section, you can safely skip the
last step.
There are numerous options that may be added to the X config file to tune the NVIDIA X driver. See Appendix B, X Config Options for a complete list of these options.
Once you have completed these edits to the X config file, you may restart X and begin using the accelerated OpenGL libraries. After restarting X, any OpenGL application should automatically use the new NVIDIA libraries. (NOTE: If you encounter any problems, see Chapter 8, Common Problems for common problem diagnoses.)
If X is explicitly configured to use the NVIDIA driver, then the X config file should be edited to use a different X driver after uninstalling the NVIDIA driver. Otherwise, X may fail to start, since the driver it was configured to use will no longer be present on the system after uninstallation.
If you edited the file manually, revert any edits you made. If you used the nvidia-xconfig utility, either by answering "Yes" when prompted to configure the X server by the installer, or by running it manually later on, then you may restore the backed-up X config file, if it exists and reflects the X config state that existed before the NVIDIA driver was installed.
If you do not recall any manual changes that you made to the file, or do not have a backed-up X config file that uses a non-NVIDIA X driver, you may want to try simply renaming the X configuration file, to see if your X server loads a sensible default.


At Sparow, our vision is to connect people through experience. The basis to our vision and mission at Sparow is ‘birds of a feather flock together’, in which we believe that the best way to truly bring people together is to help them find individuals whom share common interests, outlooks, and values about the world.
Our Mission at Sparow is to create a platform that connects like-minded people to quality events and venues that deliver unique experiences.


Select a trading pair to get started
Note: I won't be much active the next few days (probably only during evenings) because I have a lot of work to do, so responses from me and exchange requests on duco exchange may be delayed by a few hours
Duino-Coin and Coin Magi
Sell: 1 DUCO ≈ ? XMG
Buy: 1 DUCO ≈ ? XMG
Liquidity: ?
Transaction fee: 0.05 XMG
Duino-Coin and Likecoin
Sell: 1 DUCO ≈ ? LKE
Buy: 1 DUCO ≈ ? LKE
Liquidity: ?
Transaction fee: 0 LKE
Duino-Coin and Tron
Sell: 1 DUCO ≈ ? TRX
Buy: 1 DUCO ≈ ? TRX
Liquidity: ?
Transaction fee: 1 TRX
Sell: 1 DUCO ≈ ? BCH
Buy: 1 DUCO ≈ ? BCH
Liquidity: ?
Transaction fee: 0.00001 BCH
Duino-Coin and Ripple
Sell: 1 DUCO ≈ ? XRP
Buy: 1 DUCO ≈ ? XRP
Liquidity: ?
Transaction fee: 0.15 XRP
Duino-Coin and Digibyte
Sell: 1 DUCO ≈ ? DGB
Buy: 1 DUCO ≈ ? DGB
Liquidity: ?
Transaction fee: 0.003 DGB
Duino-Coin and Nano
Sell: 1 DUCO ≈ ? NANO
Buy: 1 DUCO ≈ ? NANO
Liquidity: ?
Transaction fee: ? NANO
More pairs
Please note that Litecoin, Ethereum, Bitcoin, Dogecoin or other coins with high fees won't be added.
link Listing form


LOGOUT
Dashboard
Open Call log
Inquiry/call back
Todays booking
Pre books
Driver/promoter
Open Call Log
date
call time
Number Called
Website
CallerID
Caller Name
Actions
Results
Call recording
Quick notes
Write a note
Close


Millions of children, women and men face starvation and disease. Without urgent action, the crisis will continue to spiral out of control. Red Cross and Red Crescent staff and volunteers, who live in the communities under threat, are working to break this preventable cycle of drought, food shortage, disease and death. National Red Cross and Red Crescent Societies, supported by the International Federation of Red Cross and Red Crescent Societies (IFRC) are racing to help stop the crisis. Our three key priorities are to reach remote and underserviced areas, respond through our volunteer network to help communities prevent and treat malnutrition and disease, and build community resilience through programmes that restore dignity and strengthen food security and reduce need in the future.
Sources: Food Security Outlook: The Famine Early Warning Systems Network, population density: PRB World Population Data
| Appeal | Start Date | End Date | Targeted | Budget | Funding | Coverage | Appeal Code |


Splits values into two groups, based on the result of the given filter
array.
Array.prototype.reduce()
and Array.prototype.push()
to add elements to groups,
based on filter
.filter
has a truthy value for any element, add it to the first group, otherwise add it to the
second group.


--- layout: page title: "PHOTO GALLERY" description: "archive" active: gallery header-img: "img/gallery-bg.jpg" images: - image_path: /gallery/albums/alb01.jpg gallery-folder: /gallery/082017/ gallery-name: August 2017 gallery-date: August 2017 - image_path: /gallery/albums/alb02.jpg gallery-folder: /gallery/092017/ gallery-name: September 2017 gallery-date: September 2017 - image_path: /gallery/albums/alb03.jpg gallery-folder: /gallery/102017/ gallery-name: October 2017 gallery-date: October 2017 - image_path: /gallery/albums/alb04.jpg gallery-folder: /gallery/112017/ gallery-name: November 2017 gallery-date: November 2017 - image_path: /gallery/albums/alb05.jpg gallery-folder: /gallery/122017/ gallery-name: December 2017 gallery-date: December 2017 - image_path: /gallery/albums/alb06.jpg gallery-folder: /gallery/012018/ gallery-name: January 2018 gallery-date: January 2018 - image_path: /gallery/albums/alb07.jpg gallery-folder: /gallery/022018/ gallery-name: February 2018 gallery-date: February 2018 - image_path: /gallery/albums/alb08.jpg gallery-folder: /gallery/032018/ gallery-name: March 2018 gallery-date: March 2018 - image_path: /gallery/albums/alb09.jpg gallery-folder: /gallery/042018/ gallery-name: April 2018 gallery-date: April 2018 - image_path: /gallery/albums/alb10.jpg gallery-folder: /gallery/052018/ gallery-name: May 2018 gallery-date: May 2018 - image_path: /gallery/albums/alb11.jpg gallery-folder: /gallery/062018/ gallery-name: June 2018 gallery-date: June 2018 - image_path: /gallery/albums/alb12.jpg gallery-folder: /gallery/072018/ gallery-name: July 2018 gallery-date: July 2018 - image_path: /gallery/albums/alb13.jpg gallery-folder: /gallery/082018/ gallery-name: August 2018 gallery-date: August 2018 - image_path: /gallery/albums/alb14.jpg gallery-folder: /gallery/092018/ gallery-name: September 2018 gallery-date: September 2018 - image_path: /gallery/albums/alb15.jpg gallery-folder: /gallery/112018/ gallery-name: November 2018 gallery-date: November 2018 - image_path: /gallery/albums/alb16.jpg gallery-folder: /gallery/012019/ gallery-name: January 2019 gallery-date: January 2019 ---


See the Pen NWqBzmV by Morgan Selbekk (@mselbekk1) on CodePen.
See the Pen NWqLgMP by Morgan Selbekk (@mselbekk1) on CodePen.
See the Pen dyoqRej by Morgan Selbekk (@mselbekk1) on CodePen.
See the Pen bGdxRKG by Morgan Selbekk (@mselbekk1) on CodePen.
See the Pen jOPvwKW by Morgan Selbekk (@mselbekk1) on CodePen.


Expand sidebar
This is a sidebar pushing the masonry aside. It should detect this and rerender.
Erik Johansson
Beyoncé | I Am
Vox Media
Halcyon theme
RESIZE.THATSH.IT


Returns the number of bytes in a file. Use FSIZE to determine the size of the file, which is the same as the position of the last byte in the file.
Syntax
FSIZE(file_num)
File_num is the unique ID number of the file whose size you want to know. File_num is returned by a previously executed FOPEN function. If file_num is not valid, FSIZE returns the #VALUE! error value.
Example
The following function returns the size in bytes of the open file identified as FileNumber:
FSIZE(FileNumber)
Related Functions
FOPEN Opens a file with the type of permission specified
FPOS Sets the position in a text file
Return to index


| sound_variable = variable previously assigned with a LoadSound command. |
|
This plays a sound previously loaded and assigned to a variable using the LoadSound command. See example.
You will need to assign a channel variable handle to the sound when you play it. All subsequent sound handling commands require you use the CHANNEL variable, not the sound variable to control the sound - such as StopChannel, PauseChannel, ResumeChannel, ChannelPitch, ChannelVolume, ChannelPan, and ChannelPlaying. |
|
; Assign a global variable for the sound
Global sndPlayerDie ; Load the sound file into memory sndPlayerDie=LoadSound("sounds/die.wav") ; Play the sound chnDie=PlaySound ( sndPlayerDie ) |


Week 9 consisted of testing all the scripts on the new server. A few errors were spotted where users were not being created properly. Minor modifications to a line in the script fixed this and another test run later that day was successful.
The second script, to manage the MySQL side of the server (creation of users, permissions set on databases) was then tested. This was mostly successful but Rob came to us after looking through PhpmyAdmin and discovering a few permission errors on certain databases. An additional GRANT statement was added to the script and this issue was resolved. Going back to Rob and asking him to look through PhpmyAdmin again, he was happy the issue had been rectified and all users had their correct permissions including root or admin users.
By week 10, the DB2 server was nearing completion with just minor house-keeping needed, and documentation to be completed. Since Jordan had done a lot of the smaller setups and configuration, I let him undertake the task of completing documentation and a set up guide.
I had now finished focusing on DB2, other than demonstrations and to help Jordan with any questions.
I decided to turn my attention to the DB3 course. Rob always said DB3 never needed to be looked at this semester, but it was always going to be nice if it did get looked into. He was happy if 2021 Semester 2 students started looking into it as it wasn't neccessary for this year, but given DB2 was near completion, I decided to start working on this.
First task began with refreshing myself on how DB3 was run. Going through labs and reading through my previously created DB3 load script, I remembered DB3 ran on 2 servers. A Ubuntu Docker server where students would launch MSSQL Docker containers, and a Windows Server server where students would perform various DBA tasks. Talking with Rob, we needed to decide on the appropriate solution, would we look into a similar 'lift and shift' that we did with DB2, or could we explore hosted services options? Going through what students need to do and what they need to achieve, we couldn't find a simple hosted service solution, and decided for simplicity, ease of use and not having to spend the time to further educate lecturers on how to use new software, a lift and shift was the way to go.
Next step after we decided on a lift and shift option, was to go into the DB3 servers and see what type of hardware these servers are running, what software, and check if there is any current resource issues. If we are merging into Azure servers, it makes sense to explore the options of upgrades, both with hardware and software.
I started looking into the DB3 Docker server first as this was the most accessible and I also like to try and further my knowledge and experience with Docker and containers. The DB3 Docker server runs 2 virtual CPU's, 16GB RAM, and an 80GB HDD. Looking into the CPU's more, these were expensive server CPU's running 12 cores each @ 2.2Ghz. A concern for me was going to be the cost of running a machine, similarly or better specc'd, in the cloud. DB2 was a relatively low cost course to set up, and running this single Docker server was going to be more than the cost to run DB2 alone.
I had a conversation with Rob and expressed my concern about the cost involved. I feel like I have a duty to optimise costs as much as possible for Otago Polytechnic because as a business, you want to minimise outgoing or ongoing costs, but at the same time we want to deliver a high quality of service and teaching. I gave Rob a list of servers similar to what we were currently running and approximate costs. To my surprise, Rob assured me that all of these were within budget for the Polytechnic and I could continue exploring options.
During week 12 I was exploring Azure VM options. DB3 Docker is a very memory intensive server and I needed to look into VMs built for a specific purpose. This was all new to me as DB2 was able to be run on a general purpose VM.
I looked into VMs and was overwhelmed by all the different series, purposed and the great variance in price. I got in touch with both Rob and Faisal to help point me in the direction of learning which VMs were going to be suitable and to learn about each series of VMs
Faisal pointed me in the direction of an Azure resource which went through each series. After looking into it, a B series VM was looking to be suitable.
The B stands for burstable. This was talking about CPU performance. A burstable VM's CPU will run at a baseline performance percentage but during high loads, that percentage can burst offering higher performance during high loads.
This burst varies for each machine, but after consulting with Rob, a B2mS server looked like a good option to explore. That particular VM runs at 60% but can burst to 200%.
A burstable VM looked like a good option as high loads would only be expected during class times where students are launching and working with containers. Assuming 2 streams of classes with 4 hours class time each per week, the VM would run
at its full capacity for 8 hours per week, but allowing some additional time for students working outside of classroom hours.


Commons Configuration allows you to access configuration properties from a variety of different sources. No matter if they are stored in a properties file, a XML document, or a JNDI tree, they can all be accessed in the same way through the generic Configuration interface.
Another strength of Commons Configuration is its ability to mix configurations from heterogeneous sources and treat them like a single logic configuration. This section will introduce you to the different configurations available and will show you how to combine them.
Currently there are quite a number of different sources of Configuration objects. But, by just using a Configuration object versus a specific type like XMLConfiguration or JNDIConfiguration, you are sheltered from the mechanics of actually retrieving the configuration values. These various sources include:
Often you want to provide a base set of configuration values, but allow the user to easily override them for their specific environment. Well one way is to hard code the default values into your code, and have then provide a property file that overrides this. However, this is a very rigid way of doing things. Instead, with the CompositeConfiguration you can provide many different ways of setting up a configuration. You can either do it manually:
CompositeConfiguration config = new CompositeConfiguration(); config.addConfiguration(new SystemConfiguration()); config.addConfiguration(new PropertiesConfiguration("application.properties"));
or via the ConfigurationFactory class:
ConfigurationFactory factory = new ConfigurationFactory("config.xml"); Configuration config = factory.getConfiguration();
The config.xml file used in the example above is a configuration descriptor, it specifies the Configuration objects to load. Here is an example of descriptor:
<?xml version="1.0" encoding="ISO-8859-1" ?> <configuration> <system/> <properties fileName="application.properties"/> </configuration>
What this says is that we are loading up all system properties, as well as the properties file application.properties. The order of precedence is first to last. So in the above example, if a property is not found in the system properties, it'll be searched in the properties file. This allows you to set up default values in a properties file, and override them with the system properties.
All the classes in this package that represent different kinds of configuration sources share a single interface: Configuration. This interface allows you to access and manipulate configuration properties in a generic way.
A major part of the methods defined in the Configuration interface deals with retrieving properties of different data types. All these methods take a key as an argument that points to the desired property. This is a string value whose exact meaning depends on the concrete Configuration implementation used. They try to find the property specified by the passed in key and convert it to their target type; this converted value will be returned. There are also overloaded variants of all methods that allow to specify a default value, which will be returned if the property cannot be found. The following data types are supported:
Properties can have multiple values, so it is also possible to query a list containing all of the available values. This is done using the getList() method.
For manipulating properties or their values the following methods can be used:
The most concrete implementations of the Configuration interface that are shipped with this library are not thread-safe. They can be accessed concurrently in a read-only manner. However if one thread modifies a configuration object, manual synchronization has to be performed to ensure correctness of data. Notes about the thread safety of conrete implementation classes can be found in the Javadocs for these classes.


Flying is the fastest option available to normal people. There are lots of options to choose from. Convenience is also a big factor with flying.
Cost. Flights can be expensive and can vary unpredictably based on a variety of factors, many of which ar beyond our control
Travelling across the Atlantic by boat can be a fantastic way to travel in leisurely fashion. And if you rent a cabin on a freighter it can be significantly cheaper.
Time. Travelling by boat can take an entire week. Also, if you are prone to seasickness, a week at sea might not be the best way for you to travel.
This website is a project I created to practice coding. I have tragically never visited Norway. I can't wait to do so and will, the first chance I get! If you have anything you would like to share with me regarding coding, Norway, or general travel please do!


--- layout: page-fullwidth permalink: /BetterWriting/ title: Better Writing ---
Compact, precise and literal writing is desirable in most disciplines, but is essential in technical fields. Wordy, imprecise and metaphoric text dilutes and confuses the reader of a technical document. In this exercise we will work on improving our skills.


Before Change
def reduce(self, execution_request):
node_builder = self._scheduler.node_builder()
for step_batch in self._scheduler.schedule(execution_request):
for step, promise in step_batch:
keyed_request, result = self._maybe_cache_get(step)
if result is None:
result = step(node_builder)
self._maybe_cache_put(keyed_request, result)
promise.success(result)
def _try_pickle(obj):
try:
pickle.dumps(obj, protocol=pickle.HIGHEST_PROTOCOL)
except Exception as e:
After Change
key, result = self._maybe_cache_get(entry, runnable)
if result is None:
try:
result = Return(runnable.func(*runnable.args))
self._maybe_cache_put(key, result)
except Exception as e:
result = Throw(e)


FilmChecker is free and open source. It comes under the MIT-Licence. You can find the source code at Github.
If you have any suggestions, feedback or ideas for improvments feel free to open an issue in our issue tracker or write an email to<EMAIL_ADDRESS>FilmChecker uses the following libraries:
Copyright 2018 - 2020 Zouroboros and all other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.
This specification defines an interface to store and retrieve error data related to the previous navigations of a document.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This is document is the First Public Working Draft of the Navigation Error Logging specification.
Please send comments to<EMAIL_ADDRESS>(archived) with [NavigationErrorLogging] at the start of the subject line.
This document is produced by the Web Performance Working Group. The Web Performance Working Group is part of the Rich Web Clients Activity in the W3C Interaction Domain.
Publication as a First Public Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
This section is non-normative.
Accurately measuring performance characteristics of web applications is an important aspect in helping site developers understand how to make their web applications faster. Likewise, measuring and understanding when web applications are not properly loading for end users due to network errors is an example of the worst case web browsing performance.
Today, site developers do not have real time web application availability data from their end users. Synthetic testing cannot truly provide global or near real-time availability data for real end users.
For example, a user visits http://example.com, causing the User Agent to send a HTTP request to the server. The server has a memory bug that causes a random set of responses to have a space in the middle of the HTTP response header, like so:
HTTP/1. 1 200 OK Date: Thu, 24 Jan 2015 05:46:54 GMT Content-Length: 2291 Content-Type: text/html
In this example, the seventh character of the first response, incorrectly has a space
(e.g., HTTP/1. 1
should be HTTP/1.1
). When the server sends this response, this causes
strict format validation issues at the CDN near the user to fail to process the
request. So while the server sees a 200 OK HTTP response, the end user actually sees
a 500 Server Error HTTP response.
The previous example described a case where the site developers may not actually know that end users are hitting this problem for quite some time. As the issue is random, it may not be caught by synthetic testing.
To address the need for detailed information on the errors resulting from the navigation of the document, the Navigation Error Logging specification defines the NavigationErrorEntry interface. This interface allows JavaScript mechanisms to provide client-side error data on the previous navigations of the document within the applications. As it is typically impossible to obtain error data through JavaScript mechanisms during an aborted navigation due to the error, this data is persisted across sessions. The interface also allows a web developer to specify a error reporting url that the user agent can use to upload error data to in real time on a navigation error.
The following script shows how a developer can use the NavigationErrorEntry interface to obtain accurate error timing data related to the previous navigations of the document.
<!doctype html> <html> <head> </head> <body onload="init()"> <script> function onNavigationErrorsReceived(errorList) { for (i = 0; i < errorList.length; i++) { if (window.console) console.log("Document: " + errorList[i].name + "\n" + "Error Type: " + errorList[i].errorType + "\n" + "Time of Error (UTC): " + new Date(errorList[i].startTime) + "\n" + "Duration: " + errorList[i].duration); } } function init() { window.performance.getNavigationErrors(onNavigationErrorsReceived); } </script> </body> </html>
All diagrams, examples, and notes in this specification are non-normative, as are all sections explicitly marked non-normative. Everything else in this specification is normative.
The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in the normative parts of this document are to be interpreted as described in RFC 2119. For readability, these words do not appear in all uppercase letters in this specification.
Requirements phrased in the imperative as part of algorithms (such as "strip any leading space characters" or "return false and abort these steps") are to be interpreted with the meaning of the key word ("must", "should", "may", etc) used in introducing the algorithm.
Some conformance requirements are phrased as requirements on attributes, methods or objects. Such requirements are to be interpreted as requirements on user agents.
Conformance requirements phrased as algorithms or specific steps may be implemented in any manner, so long as the end result is equivalent. (In particular, the algorithms defined in this specification are intended to be easy to follow, and not intended to be performant.)
The IDL fragments in this specification must be interpreted as required for conforming IDL fragments, as described in the Web IDL specification. [Web IDL]
The construction "a Foo
object", where Foo
is actually an interface, is sometimes used instead of
the more accurate "an object implementing the interface Foo
".
The term "navigation" refers to the act of navigating.
The term "JavaScript" is used to refer to ECMA-262, rather than the official term ECMAScript, since the term JavaScript is more widely known.
This section is non-normative.
This specification defines the NavigationErrorEntry interface to store and retrieve error data related to previous navigations of a document.
NavigationErrorEntry
interfaceinterface NavigationErrorEntry { readonly attribute DOMString name; readonly attribute DOMTimeStamp startTime; readonly attribute DOMTimeStamp duration; readonly attribute NavigationErrorType errorType; }; enum NavigationErrorType { "dns", "tcp", "ssl", "http", "abandoned" };
name
attribute
The name
attribute MUST return the current address
of the document where the error occurred, as an absolute URL.
startTime
attribute
The startTime
attribute MUST return a DOMTimeStamp
with the time immediately after the user agent finishes prompting
to unload the previous document while navigating to the document that resulted in an error.
duration
attribute
The duration
attribute MUST return a DOMTimeStamp
equal to the difference between the time immediately after the User Agent logs the occurrence of the error and startTime.
errorType
attribute
This attribute MUST return one of the following strings describing the type of the error: dns
, tcp
, ssl
,
http
, and abandoned
. The abandoned
error type refers to the case where the user aborts the navigation before it is complete.
Performance
Interfacepartial interface Performance { void enableNavigationErrorReporting(DOMString reportUrl); void disableNavigationErrorReporting(); void enableNavigationErrorLogging(boolean enable); void getNavigationErrors(GetNavigationErrorsCallback getnavigationerrorscallback); void clearNavigationErrors(); typedef sequence <NavigationErrorEntry> NavigationErrorEntryList; }; callback GetNavigationErrorsCallback = void (NavigationErrorEntryList navigationerrorentrylist);
enableNavigationErrorReporting
methodThe enableNavigationErrorReporting
method, when invoked, enables reporting of future navigation errors for the origin of the current document to the resolved URL provided by the reportUrl
parameter. This setting must be persisted across sessions.
When a navigation to a url in the given origin fails, the user agent MUST fetch reportUrl
, with the synchronous flag not set, using HTTP method POST, with a Content-Type header field of application/json with an entity body consisting of the JSON stringification of the NavigationErrorEntry object corresponding to the failed navigation. The user agent MUST not follow redirects when fetching this and ignore the response. If the fetch of reportUrl
itself fails, the user agent MUST not retry fetching reportUrl
.
Parameters
inreportUrl
type of DOMString
The reportUrl
parameter indicates the resolved URL
where the error data is to be sent. The User Agent MUST throw the
URLMismatchError exception
if the URL cannot be resolved.
No return value
No additional exceptions
disableNavigationErrorReporting
methodThe disableNavigationErrorReporting
method, when invoked, disables reporting of navigation errors for the origin of the current document. This setting must be persisted across sessions.
No Parameters
No return value
No additional exceptions
enableNavigationErrorLogging
methodThe enableNavigationErrorLogging
method, when invoked, enables or disables logging of navigation errors, based on whether enable
is true
or false
, respectively, for the origin of the current document. This setting must be persisted across sessions.
The user agent should limit the total number of NavigationErrorEntry objects stored for a given origin. A limit of 150 entries is recommended.
Parameters
inenable
type of boolean
The enable parameter enables or disables logging of navigation errors.
No return value
No additional exceptions
getNavigationErrors
methodThe getNavigationErrors
method calls back the provided callback with a
NavigationErrorEntryList
object that contains a copy of all NavigationErrorEntry
objects
for the origin of the current document in chronological order.
Parameters
ingetnavigationerrorscallback
type of GetNavigationErrorsCallback.
No return value
No additional exceptions
clearNavigationErrors
methodThe clearNavigationErrors
method clears the buffer used to store the
list of NavigationErrorEntry objects.
No parameters
No return value
No additional exceptions
The value of the timing attributes must monotonically increase to ensure timing attributes are not skewed by adjustments to the system clock while recording error data. The difference between any two chronologically recorded timing attributes must never be negative.
This section is non-normative.
The NavigationErrorEntry interface exposes timing and other information for an error that has occurred in the previous navigations to the web page. Access to the NavigationErrorEntry interface is limited to the same origin.
The user agent mechanisms used to delete private data such as history or cookies for a given origin or as a whole should also delete the corresponding NavigationErrorEntry objects.
We would like to offer our sincere thanks to Aaron Heady, Daniel Austin, James Simonsen, Philippe Le Hegaret, and Jason Weber for their contributions to this work.


espn_mbb_scoreboard.Rd
Get ESPN men's college basketball schedule for a specific year
Get ESPN men's college basketball schedule for a specific year
espn_mbb_scoreboard(season) espn_mbb_scoreboard(season)
| season | Either numeric or character |
|---|
Returns a tibble
Returns a tibble
Thomas Mock, you a genius for this one.
Thomas Mock, you a genius for this one.
# Get schedule from 2018 season (returns 1000 results, max allowable.) # Get schedule from date 2021-02-15 espn_mbb_scoreboard (season = "20210215")#>#> # A tibble: 13 x 31 #> matchup matchup_short season type slug game_id game_uid game_date #> <chr> <chr> <int> <int> <chr> <chr> <chr> <chr> #> 1 Virginia Cav~ UVA @ FSU 2021 2 regul~ 4012602~ s:40~l:41~ 2021-02-~ #> 2 Stephen F. A~ SFA @ UNO 2021 2 regul~ 4012863~ s:40~l:41~ 2021-02-~ #> 3 George Fox ~ GFX @ IDST 2021 2 regul~ 4012967~ s:40~l:41~ 2021-02-~ #> 4 Eastern Kent~ EKU @ TNTC 2021 2 regul~ 4012818~ s:40~l:41~ 2021-02-~ #> 5 Murray State~ MUR @ SIUE 2021 2 regul~ 4012861~ s:40~l:41~ 2021-02-~ #> 6 Hampton Pira~ HAMP @ LONG 2021 2 regul~ 4012880~ s:40~l:41~ 2021-02-~ #> 7 South Caroli~ SCUP @ PRES 2021 2 regul~ 4012844~ s:40~l:41~ 2021-02-~ #> 8 East Tenness~ ETSU @ UTC 2021 2 regul~ 4012824~ s:40~l:41~ 2021-02-~ #> 9 Washington H~ WASH @ WSU 2021 2 regul~ 4012866~ s:40~l:41~ 2021-02-~ #> 10 Baylor Bears~ BAY @ WVU 2021 2 regul~ 4012538~ s:40~l:41~ 2021-02-~ #> 11 Houston Bapt~ HBU @ AMCC 2021 2 regul~ 4012837~ s:40~l:41~ 2021-02-~ #> 12 Nevada Wolf ~ NEV @ SJSU 2021 2 regul~ 4012626~ s:40~l:41~ 2021-02-~ #> 13 Prairie View~ PV @ GRAM 2021 2 regul~ 4012536~ s:40~l:41~ 2021-02-~ #> # ... with 23 more variables: attendance <int>, home_team_name <chr>, #> # home_team_logo <chr>, home_team_abb <chr>, home_team_id <chr>, #> # home_team_location <chr>, home_team_full <chr>, home_team_color <chr>, #> # home_score <int>, home_win <int>, home_record <chr>, away_team_name <chr>, #> # away_team_logo <chr>, away_team_abb <chr>, away_team_id <chr>, #> # away_team_location <chr>, away_team_full <chr>, away_team_color <chr>, #> # away_score <int>, away_win <int>, away_record <chr>, status_name <chr>, #> # startDate <chr># Get schedule from 2018 season (returns 1000 results, max allowable.) # Get schedule from date 2021-02-15 espn_mbb_scoreboard (season = "20210215")#>#> # A tibble: 13 x 31 #> matchup matchup_short season type slug game_id game_uid game_date #> <chr> <chr> <int> <int> <chr> <chr> <chr> <chr> #> 1 Virginia Cav~ UVA @ FSU 2021 2 regul~ 4012602~ s:40~l:41~ 2021-02-~ #> 2 Stephen F. A~ SFA @ UNO 2021 2 regul~ 4012863~ s:40~l:41~ 2021-02-~ #> 3 George Fox ~ GFX @ IDST 2021 2 regul~ 4012967~ s:40~l:41~ 2021-02-~ #> 4 Eastern Kent~ EKU @ TNTC 2021 2 regul~ 4012818~ s:40~l:41~ 2021-02-~ #> 5 Murray State~ MUR @ SIUE 2021 2 regul~ 4012861~ s:40~l:41~ 2021-02-~ #> 6 Hampton Pira~ HAMP @ LONG 2021 2 regul~ 4012880~ s:40~l:41~ 2021-02-~ #> 7 South Caroli~ SCUP @ PRES 2021 2 regul~ 4012844~ s:40~l:41~ 2021-02-~ #> 8 East Tenness~ ETSU @ UTC 2021 2 regul~ 4012824~ s:40~l:41~ 2021-02-~ #> 9 Washington H~ WASH @ WSU 2021 2 regul~ 4012866~ s:40~l:41~ 2021-02-~ #> 10 Baylor Bears~ BAY @ WVU 2021 2 regul~ 4012538~ s:40~l:41~ 2021-02-~ #> 11 Houston Bapt~ HBU @ AMCC 2021 2 regul~ 4012837~ s:40~l:41~ 2021-02-~ #> 12 Nevada Wolf ~ NEV @ SJSU 2021 2 regul~ 4012626~ s:40~l:41~ 2021-02-~ #> 13 Prairie View~ PV @ GRAM 2021 2 regul~ 4012536~ s:40~l:41~ 2021-02-~ #> # ... with 23 more variables: attendance <int>, home_team_name <chr>, #> # home_team_logo <chr>, home_team_abb <chr>, home_team_id <chr>, #> # home_team_location <chr>, home_team_full <chr>, home_team_color <chr>, #> # home_score <int>, home_win <int>, home_record <chr>, away_team_name <chr>, #> # away_team_logo <chr>, away_team_abb <chr>, away_team_id <chr>, #> # away_team_location <chr>, away_team_full <chr>, away_team_color <chr>, #> # away_score <int>, away_win <int>, away_record <chr>, status_name <chr>, #> # startDate <chr>


Overview • User interface • Special tasks ↑ | ↓
This function allows to superimpose two structures or parts of two structures by minimization of the root mean square deviation of atom positions (A. D. McLachlan, J. Mol. Biol. 1979, 128, 49-79). One of the structures serves as the template and is unchanged, the other structure is the moving structure and is rotated and translated to achieve the best fit. By selecting always the same template structure with different moving structures you can superimpose multiple structures. See also explanation of the corresponding menu item.
Note that one of the structures has to be redrawn, and as MMM is a bit slow with graphics, this may take some time. Fitting starts only when you click the OK
button. To find out only the r.m.s.d. without actually transforming a structure, save the transformation matrix.
Superposition of complete structures works only if the chain identifiers match. Otherwise, select corresponding residues, use the only selected
option, and deactivate the check residue correspondence
checkbox.
Two popup menus allow for selection of the Template structure
and Moving structure
. Note that atoms are superimposed by matching chain identifier, matching residue number, and matching atom tag.
The Fit mode
group of radiobuttons allows to select which atom types are to be fitted. For identical sequences you might want to superimpose all atoms
, but most of the time you may want to superimpose only backbone atoms
. In rare cases you may want to restrict superposition to the Cα
atoms.
To superimpose only parts of a structure, select the corresponding residues both in the intended template and intended moving structure. If different sets of residues are selected, only matching residues are considered (chain identifier, rresidue number, and insertion code are checked). You can also select cofactors, if they have the same chain identifiers and residue numbers in both structures.
If chain identifiers or numbers of residues to be superimposed do not match, superposition can still be done after careful residue selection. In both structures to be superimposed you have to select corresponding residues in exactly the same sequence. The number of selected residues should be the same in both structures (surplus residues in the moving structure are ignored, surplus residues in the target structure create an error). Only residues, not atoms, or whole chains can be selected for this mode. You need to deactivate the check residue correspondence
checkbox before performing the transformation.
In the
For unlike proteins it may be tedious to manually generate selections of corresponding residues. MMM can try to align the sequences of the two proteins and superimpose either the aligned residues or the whole structure. As an example you can load PDB structures 1OMP and 2HQ0 and superimpose them by checking the
If the two structures are of the same protein in different states, you may display 3D (conical) arrows that depict the structural transformation. For that it is best to display only the moving structure as a coil. See also the motion command for how to do that in a single step.
The ensemble mode is useful if the moving structure is an ensemble of different conformations, whereas the template structure is a single model. In that case it is usually appropriate to separately fit each individual conformation in the ensemble to the template. This is achieved by activating the checkbox. If the checkbox is deactivated, the selected conformation (if any) or the first conformation is fitted to the template and all other conformations are translated and rotated in the same way.
Instead of actually moving the structure, you can just save the 4×4 affine transformation matrix that achieves the superposition. Click on the Fit mode
panel, activate the only selected
checkbox.
aligned residues
checkbox.
Save
button and select the filename (a selfexplanatory name is suggested). Then close the window by clicking the Cancel
button so that actual transformation and redrawing are avoided. The r.m.s.d. of both structures is still shown in the Message board.


Get perked up!
162 E 37th St, New York, NY 10016
1867 2nd Ave, New York, NY 10029
7am-7pm
About Us !
At Perk Kafe we get our coffee from Stumptown Coffee Roasters the coffee production experts. Using Direct Trade, Stumptown receives their coffee directly from farmers located around the equator from all around the world. Choosing from hundreds of varieties, they have sourced and selected roughly a dozen they found to be truly special roasts, we know you will too.
 At Perk our goal is to provide an awesome cafe with a lot of character, delivering perfect coffee and free wifi in the process. We serve a variety of all natural, gluten free, and specialty drinks and treats, including Dough Doughnuts, matcha, and coldbrew to-go.
Send us a message:
Follow us on social media!
Call Us: 212-686-PERK (7375)


Once one or more AudioBuffers are loaded then we're ready to play sounds. Let's assume we've just loaded an AudioBuffer with the sound of a dog barking and that the loading has finished.
Then we can play this dogBarkingBuffer with a the following code.
var context = new webkitAudioContext(); function playSound() { var source = context.createBufferSource(); // creates a sound source source.buffer = dogBarkingBuffer; // tell the source which sound to play source.connect(context.destination); // connect the source to the context's destination (the speakers) source.noteOn(0); // play the source now }
This playSound() function could be called every time somebody presses a key or clicks something with the mouse.
Even better, we could make the function take the buffer and time as arguments:
var context = new webkitAudioContext(); function playSound(buffer, time) { var source = context.createBufferSource(); source.buffer = buffer; source.connect(context.destination); source.noteOn(time); }
Then a different sound could be played depending on different events (like which key is pressed). Normally, a time of 0 would be used to "play sound now". But, sounds can be played at exact times to create rhythms.


WikiLeaks<EMAIL_ADDRESS>leaked emails, 2009 mail archive
This message is part of a particular mailbox provided at WikiLeaks
and it should be discussed here.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
membership recruiting
Greetings, I have been informed that someone using your email address
has been attempting
to recruit members for Aryan Nations. I would like to know what
organization you
represent, as it cannot be the true AN. Prompt attention to this
matter is appreciated,
Best regards, Jim
<EMAIL_ADDRESS>Entry for this page on WikiLeaks |
Discussion page on WikiLeaks |
wikileaks.org
Date Index |
Thread Index |
Author Index


Hiking Mount Rinjani in Indonesia - Part 1
Ramblings
Sometimes, when age is fast catching up, one tends to start focusing on being able to achieve few difficult tasks and plan to be more fit for the days to come… and this is what exactly lead us to plan for a hiking trip from Singapore.
Based in Singapore, there are a lot of good hiking destinations in South East Asia which are easily accessible thanks to the local low cost airlines.
I had registered for the half marathon during June 2016 but work commitments and the pressure of leading an implementation team had put up a big hurdle for the preparations. The turning point was a short trip to Bintan from Singapore in August 2016. One of my friend (Vinod) had registered for IronMan event there and asked me to tag along his other companion had to drop out due to an emergency.  Back to Singapore, I started serious preparations for the half marathon.
Couple of weeks before the half marathon, Vinod suggested for going for a hike somewhere nearby and we started looking for destinations. Mt. Rinjani was chosen as the destination based on the reviews we found online and we started contacting the trek operators in Lombok to negotiate the details of the hike. The final itinerary was, I will be completing the half marathon on 4th December 2016 and start the hike to Mt. Rinjani on 7th December 2016…
A short review of my half-marathon experience
Being a honest participant, I had registered in the last batch to flag off as I knew that I will be slower than the other runners. This turned out to be a big disadvantage as when the last batch of runners reached the water stations, we were told that there is no more water. The event was so badly organized, we runners had to cross the barriers to go and buy water from the convenient stores along the way. I managed to complete my first half marathon in 3 hours 20 minutes despite.
Seinfeld has a perfect quote to describe a marathon: Ah, what’s to see? A woman from Norway, a guy from Kenya and 20,000 losers.
The planning
Hiking poles, Water bladder to carry in the backpack, hiking t-shirts and shorts, thermal wear, etc were all bought from Decathlon.
Since the hike is on volcanic scree, we also picked up new shoes from Merrell.
Tour operators we contacted
- Green Rinjani
- Lun Expeditions
- Rudy Trekker
- Trekking Rinjani
- Hajar Trekking, etc
We decided to go with Lun Expeditions as the price offered to us very competitive than the other operators and the reviews for the operator were also good.
December is usually off-season as the trek is officially closed from January to March during the monsoons. The volcano had erupted in September 2016 and when we checked with the contact email on the official website, this was the reply we got:
Its officially CLOSED as written on the website and we still don’t know when it will be open as from Metreology and Geofisika still warning us of the activity of the baby volcano.
Follow up Letter Head of Geological Agency of the Ministry of Energy and Mineral Resources No. 2622/45 / BGLV / 2016 dated 27 September 2016 regarding Increased Activity Level Mount Rinjani from Level I (Normal) to Level II (Vigilant), then starting from Tuesday September 27, 2016 at 15:00 pm , the entire hiking trail to Mount Rinjani is closed from all climbing activities.
The trek operators were still conducting the treks and the there were few recent reviews on TripAdvisor as well in November 2016. We decided to go through the trek even though the official site maintained by the Govt. was last updated in September for the volcano’s eruption.
Deluxe package for 2 persons with Lun Expeditions was booked through Whatsapp. The price negotiated for the deluxe package was comparable to the standard package being offered by other operators and it was the best deal. Lun has been the most accommodating person we have come across in our travels. He arranged for our accommodation at Sembalun (Pesona Rinjani) instead of Senaru (as was the norm with all other operators we contacted) as we arrived late in the night at Lombok and were starting the trek the next morning.
Day 1: 6th December 2016
We started from Singapore at 14:50 and reached Lombok at 23:00 hours. From Lombok airport to Sembalun Village was almost another 2 hours drive.
All Photographs are copyrighted.


We have included 100+ Different Pages to each demo. Includes Data Tables, Form Pages, Charts, Widgets etc.
We have included 13 Unique Dashboard Variations at the moment and We are going to add new demos soon. You will love all Dashboards.
We have added 7 different styles for Header and Navigations. Added Horizontal and Vertical, both types of Navigation & Mega Menu.
Yes, We have also added eCommerce Dashboard option. It also has relevant sections, like List of Products, Total Earnings and & Status.
We have covered almost each possible Graphs / Charts in our Elite Admin - Responsive Web App Kit. Its easy to implement in your project.
With Elite Admin - Responsive Web App Kit, you will get option for export data from data table. You can save your data in excel, pdf, csv format.
Don’t go by our Words, checkout our awesome demos and verify yourself.
Save 1000s of hours of designing and coding work as we already did that for you.
You will get almost everything you need. We have added all possible widgets to make your life easier with easy editing. Check them out.
Check all widgetsYes, We have also added eCommerce Dashboard option. It also has relevant sections, like List of Products, Total Earnings and & Status.
Check eCommerce DemoYup, Mail Box Application is added with Elite Admin - Responsive Kit. We have included templates for Inbox, Compose Mail, Mail detail.
Check MailboxWe have added 7 different styles for Header and Navigations. Added Horizontal and Vertical, both types of Navigation & Mega Menu. recenly added menu like wordpress.
We have included 6 pre-defined color schemes with Elite Admin.
Included Dark and Light Sidebar for getting desire look and feel.
Yes, we have added 1100+ Pages template to make it easier.
Almost 500+ UI Components being given with Elite Admin Pack.
Wide range of Widgets are available with Elite Admin Package.
Its been made with Bootstrap 3x and full responsive layout.
Lots of Icon Fonts are included here in the package of Elite Admin.
All the layout of Elite Admin is Fully Responsive and widely tested.
Our Css is written Less Base to make your life easier.
Customization will be easy as we understand your pain.
You name it and we have it, Yes lots of variations for Charts.
You can upload multiple files with our Multiple selector.
Data Tables are initial requirement
and we added them.
Different Forms with Validation are
included in pack.
Yes, all related e-Commerce
pages are included.
We have added 3 Level Dropdown
Menu in Elite Pack.
Calendar is available with our package
& in nice design.
Covered options to showcase different
variation for gallery.
We have made detailed documentation,
so it will easy to use.
We believe in supreme support is
key and we offer that.
We are constantly updating our
pack with new features.
I purchased this web kit hoping to spend more time coding database interactions rather than interface. All of my expectations have been met so far. This is a fantastic kit with everything I’ve needed. I love the modal window inputs and various calendar and time pickers. I used to do all this with seperate jquery and java scripts, but now it’s all built in. I’m working on two client projects using this kit and they love it.


Last week I wanted to emulate the css effects in python on images. The filter that caught my attention was the sepia filter. I write this because I couldn't find much information about the topic on the web.
A quick search on your favourite search engine leads to this page where as mentioned in stackoverflow ([^1]) what you have to do is:
outputRed = (inputRed * .393) + (inputGreen *.769) + (inputBlue * .189)
outputGreen = (inputRed * .349) + (inputGreen *.686) + (inputBlue * .168)
outputBlue = (inputRed * .272) + (inputGreen *.534) + (inputBlue * .131)
The result is (Image by Andrea Ranalleta on Unsplash):
With this information what you have to do is to ignore the alpha layer and for each pixel calculate a bunch of numbers.
You can use Pillow
for this and then on your program:
from PIL import Image
def sepia(image_path:str)->Image:
img = Image.open(image_path)
width, height = img.size
pixels = img.load() # create the pixel map
for py in range(height):
for px in range(width):
r, g, b = img.getpixel((px, py))
tr = int(0.393 * r + 0.769 * g + 0.189 * b)
tg = int(0.349 * r + 0.686 * g + 0.168 * b)
tb = int(0.272 * r + 0.534 * g + 0.131 * b)
if tr > 255:
tr = 255
if tg > 255:
tg = 255
if tb > 255:
tb = 255
pixels[px, py] = (tr,tg,tb)
return img
Here I'm assuming that the image is a jpeg
, but in case of a png
is
similar but taking care of the alpha layer. This is easy, but very slow, so ... how can this be faster?
My next search was for applying filters to images and I discovered cv2. Scrolling fast the docs I wrote this:
import cv2
import numpy as np
from PIL import Image
def sepia_cv(image_path:str)->Image:
"""
Optimization on the sepia filter using cv2
"""
image = Image.open(image_path)
# Load the image as an array so cv knows how to work with it
img = np.array(image)
# Apply a transformation where we multiply each pixel rgb
# with the matrix for the sepia
filt = cv2.transform( img, np.matrix([[ 0.393, 0.769, 0.189],
[ 0.349, 0.686, 0.168],
[ 0.272, 0.534, 0.131]
]) )
# Check wich entries have a value greather than 255 and set it to 255
filt[np.where(filt>255)] = 255
# Create an image from the array
return Image.fromarray(filt)
What is happening here is that the previous sums and products are no
more than a linear transformation between subspaces of the reals,
so we can represent this as a matrix. But loading cv2
and numpy
for this is too much so let's just use numpy.
def sepia_np(image_path:str)->Image:
"""
Optimization on the sepia filter using numpy
"""
image = Image.open(image_path)
# Load the image as an array so cv knows how to work with it
img = np.array(image)
# Apply a transformation where we multiply each pixel
# rgb with the matrix transformation for the sepia
lmap = np.matrix([[ 0.393, 0.769, 0.189],
[ 0.349, 0.686, 0.168],
[ 0.272, 0.534, 0.131]
])
filt = np.array([x * lmap.T for x in img] )
# Check wich entries have a value greather than 255 and set it to 255
filt[np.where(filt>255)] = 255
# Create an image from the array
return Image.fromarray(filt.astype('uint8'))
In this solution take care of ([^2])
In CSS
you can apply an scale to the filter. After searching a lot I
found this
link where
it specifies how to apply the filter using this scale. The thing is
that aside the linear map, you are using a movement. The
transformation matrix is:
matrix = [[ 0.393 + 0.607 * (1 - k), 0.769 - 0.769 * (1 - k), 0.189 - 0.189 * (1 - k)],
[ 0.349 - 0.349 * (1 - k), 0.686 + 0.314 * (1 - k), 0.168 - 0.168 * (1 - k)],
[ 0.272 - 0.349 * (1 - k), 0.534 - 0.534* (1 - k), 0.131 + 0.869 * (1 - k)]]
where k
is the interval [0,1].
Here are some examples:
Calling python -m cProfile test.py
(^3) with my Pentium G3258 on the image used in this post (2453x2453 pixels):
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.007 0.007 0.293 0.293 test.py:34(sepia_cv)
1 0.033 0.033 0.499 0.499 test.py:56(sepia_np)
1 7.857 7.857 16.634 16.634 test.py:7(sepia)
This times don't count the time importing the modules used.
[^1]: How is a sepia tone created?
[^2]: Why we need uint8


Dashboard
Home
(current)
Back
Search
Moodle charts
(current)
WebSubmission charts
Dashboard
Select course
SelectYear
SelectSemester
Change Presentation Order
Alphabetical order
Descending order
Ascending order
Set period
From
To

Set period
Threshold (Amount of activities)
>
>=
<
<=
=
Set threshold
Export CSV
Year view
Month view
Day view
Alphabetical order
Descending order
Ascending order
From
To
Set period
Threshold (Amount of activities)
>
>=
<
<=
=
Set threshold
Alphabetical order
Descending order
Ascending order
From
To
Set period
Threshold (Amount of activities)
>
>=
<
<=
=
Set threshold
Export CSV
Event Name
Threshold (Amount of activities in Different events overview)
Set
Year view
Month view
Day view
Alphabetical order
Descending order
Ascending order
From
To
Set period
Threshold (Amount of activities)
>
>=
<
<=
=
Set threshold
Export CSV
Year view
Month view
Day view


{% extends "basegoals.html" %} {% block styles %} {% endblock %} {% block content %}
| ID | Goal Section Title | Goal Title | Delete Goal |
| {{item.goalId}} | {{item.sectionTitle}} | {{item.title}} | Delete |
Available Goals Are below. Please check on Add button to add it to this template.
| Goal ID | GoalSection | Goal | Add To Template |
| {{goal.goalId}} | {{goal.sectionTitle}} | {{goal.title}} | Add |


Toggle navigation
Burgundy Corporate Tower
My Profile
Settings
Logout
Dashboard
Employees
Leave Requests
Overtime Requests
Attendance Summary
My Profile
Personal Information
Upload a different photo...
Personal Information
First name:
Last name:
Position:
Sex:
Date of Birth:
Religion:
Address:
Forbes Park...
Civil Status:
Date Hired:
Contact No:
Height:
Weight:
Educational Attainment:
Government ID
SSS#:
TIN#:
PhilHealth:
PAG-IBIG:
User Account
Username:
Password:
Confirm password:
Person to be notified in case of emergency:
Name:
Contact No:
Address:
Forbes Park...


The University of Melbourne is a public-spirited institution that makes distinctive contributions to society in research, learning and teaching and engagement.


Treebank Statistics: UD_Ligurian-GLT: POS Tags: INTJ
There are 11 INTJ
lemmas (1%), 11 INTJ
types (1%) and 23 INTJ
tokens (0%).
Out of 16 observed tags, the rank of INTJ
is: 12 in number of lemmas, 14 in number of types and 15 in number of tokens.
The 10 most frequent INTJ
lemmas: scì, ben, eh, ah, no, diascoa, graçie, guao, seguo, Òh
The 10 most frequent INTJ
types: scì, Ben, eh, ah, no, Diascoa, Graçie, Seguo, guao, Òh
The 10 most frequent ambiguous lemmas: scì (INTJ 6, ADV 3, NOUN 1), ben (ADV 23, INTJ 4, NOUN 1), no (ADV 77, INTJ 2, NOUN 1), graçie (ADV 2, INTJ 1), seguo (ADJ 3, ADV 3, INTJ 1)
The 10 most frequent ambiguous types: scì (INTJ 4, ADV 3, NOUN 1), no (ADV 64, INTJ 1, NOUN 1), Graçie (ADV 1, INTJ 1), Seguo (ADV 1, INTJ 1)
- scì
- no
- Graçie
- ADV 1: Graçie à e seu duxentoçinquanta mioin de còpie vendue , Les Aventures de Tintin o l’ é un de i produti de stöie disegnæ ciù avvoxæ e conosciui de o vinteximo secolo .
- INTJ 1: Graçie de i çetroin , che me son arrivæ ; m’ é arrivou ascì a vòstra lettia de a settemaña passâ , à a quæ daggo replica , e no capiscio comm’ a l’ é che no m’ aggiæ mandou o conto de sta spediçion insemme à l’ atro de o meise de dexembre .
- Seguo
Morphology
The form / lemma ratio of INTJ
is 1.000000 (the average of all parts of speech is 1.323735).
The 1st highest number of forms (1) was observed with the lemma “ah”: ah.
The 2nd highest number of forms (1) was observed with the lemma “ben”: Ben.
The 3rd highest number of forms (1) was observed with the lemma “diascoa”: Diascoa.
INTJ
does not occur with any features.
Relations
INTJ
nodes are attached to their parents using 4 different relations: discourse (17; 74% instances), root (3; 13% instances), parataxis (2; 9% instances), conj (1; 4% instances)
Parents of INTJ
nodes belong to 5 different parts of speech: VERB (14; 61% instances), INTJ (3; 13% instances), (3; 13% instances), NOUN (2; 9% instances), PRON (1; 4% instances)
1 (4%) INTJ
nodes are leaves.
17 (74%) INTJ
nodes have one child.
1 (4%) INTJ
nodes have two children.
4 (17%) INTJ
nodes have three or more children.
The highest child degree of a INTJ
node is 6.
Children of INTJ
nodes are attached using 6 different relations: punct (25; 74% instances), parataxis (3; 9% instances), advcl (2; 6% instances), discourse (2; 6% instances), cc (1; 3% instances), nmod (1; 3% instances)
Children of INTJ
nodes belong to 6 different parts of speech: PUNCT (25; 74% instances), INTJ (3; 9% instances), VERB (3; 9% instances), ADV (1; 3% instances), CCONJ (1; 3% instances), NOUN (1; 3% instances)


Specifies a block. Can be given by number, or can be given via the special strings "genesis", "latest", or "pending".
Intended to work like Web3's BlockType.
Warning: Using "pending", while allowed, is not advised, as it may lead to internally inconsistent results. Use of "latest" is safe and will not lead to inconsistent results from a single decoder call due to the decoder's caching system, but pending blocks cannot be cached under this system, which may cause inconsistencies.
This function is asynchronous.
Constructs a contract instance decoder for a given instance of a contract in this project. Unlike the other functions, this method doesn't require giving an artifact for the address itself; however, the address had better correspond to a contract of a type given in the project info, or you'll get an exception.
The address of the contract instance to decode. If an invalid address is provided, this method will throw an exception.
The DecoderSettings to use, including the provider; see the documentation for that type for more information.
This function is asynchronous.
Constructs a contract decoder for a given contract artifact.
The artifact for the contract.
A contract constructor object may be substituted for the artifact, so if you're not sure which you're dealing with, it's OK.
The DecoderSettings to use, including the provider; see the documentation for that type for more information.
This function is asynchronous.
Constructs a contract instance decoder for a contract instance at a given address.
The artifact corresponding to the type of the contract.
A contract constructor object may be substituted for the artifact, so if you're not sure which you're dealing with, it's OK.
The address of the contract instance to decode.
Address must either be checksummed, or in all one case to circumvent the checksum. Mixed-case with bad checksum will cause this function to throw an exception.
The DecoderSettings to use, including the provider; see the documentation for that type for more information.
This function is asynchronous.
Constructs a contract instance decoder for a deployed contract instance.
The artifact corresponding to the type of the contract.
A contract constructor object may be substituted for the artifact, so if you're not sure which you're dealing with, it's OK.
The DecoderSettings to use, including the provider; see the documentation for that type for more information.
This function is asynchronous.
Constructs a project decoder for the project. See the DecoderSettings documentation for further information.
This function is asynchronous.
Constructs a contract decoder for a given contract.
The contract constructor object corresponding to the type of the contract.
The DecoderSettings to use; see the documentation for that type for more information. If absent, the decoder will be based on just the single contract provided; it is recommended to pass more information to get the decoder's full power.
This function is asynchronous.
Constructs a contract instance decoder for a contract instance at a given address.
The contract constructor object corresponding to the type of the contract.
The address of the contract instance to decode.
Address must either be checksummed, or in all one case to circumvent the checksum. Mixed-case with bad checksum will cause this function to throw an exception.
The DecoderSettings to use; see the documentation for that type for more information. If absent, the decoder will be based on just the single contract provided; it is recommended to pass more information to get the decoder's full power.
This function is asynchronous.
Constructs a contract instance decoder for a given contract instance.
The contract abstraction object corresponding to the contract instance.
The DecoderSettings to use; see the documentation for that type for more information. If absent, the decoder will be based on just the single contract provided; it is recommended to pass more information to get the decoder's full power.
This function is asynchronous.
Constructs a contract instance decoder for a deployed contract instance.
The contract constructor object corresponding to the type of the contract.
The DecoderSettings to use; see the documentation for that type for more information. If absent, the decoder will be based on just the single contract provided; it is recommended to pass more information to get the decoder's full power.
Generated using TypeDoc
Truffle Decoder
This module provides an interface for decoding contract state, transaction calldata, events, and return values and revert strings. It's an interface to the same low-level decoding functionality that Truffle Debugger uses. However, it has additional functionality that the debugger does not need, and the debugger has additional functionality that this decoder does not need.
The interface is split into three classes: The project decoder, the contract decoder, and the contract instance decoder. The project decoder is associated to the project as a whole and decodes transaction calldata and events. The contract decoder is associated to a specific contract class. It has all the capabilities of the project decoder, but it can also decode return values from calls made by the given contract class. The contract instance decoder is associated to a specific contract instance; it again has all the capabilities of the project decoder and contract decoder, but it can also decode the state variables for the specific instance. (In addition, in the case that the contract does not include a
deployedBytecode
field in its artifact, which can hinder decoding certain things, the contract instance decoder can sometimes work around this where the other decoders cannot.)This documentation describes the current state of the decoder, but further improvements are planned.
Usage
Initialization
Create a decoder with one of the various constructor functions.
For a project decoder, use the
forProject
function.For a contract decoder, use the
forArtifact
orforContract
function.For a contract instance decoder, use one of the following:
forDeployedArtifact
forDeployedContract
forArtifactAt
forContractAt
forContractInstance
forAddress
See the documentation of these functions for details, or below for usage examples.
All of these functions take a final argument in which information about the project is specified; currently only a few methods for specifying project information are allowed, but more are planned.
One can also spawn decoders from other decoders by supplying additional information. See the documentation for the individual decoder classes for a method listing.
Decoder methods
See the documentation for the individual decoder classes for a method listing.
Output format information
The decoder outputs lossless, machine-readable Format.Values.Result objects containing individual decoded values. See the format documentation for an overview and complete module listing.
Decoding modes, abification, and caveats
The decoder runs in either of two modes: full mode or ABI mode. Full mode requires some additional constraints but returns substantially more detailed information. Please see the notes on decoding modes for more about this distinction.
See also the notes about decoding state variables for additional caveats about what may or may not be fully decodable.
Basic usage examples
Decoding a log with the project decoder
This usage example is for a project with two contracts,
Contract1
andContract2
.The usage of decodeTransaction is similar.
For getting already-decoded logs meeting appropriate conditions, see ProjectDecoder.events.
Decoding state variables with the contract instance decoder
This usage example is for decoding the state variables of a contract
Contract
in a project that also contains a contractOtherContract
.In this example, we use the deployed version of
Contract
. If we wanted an instance at a different address, we could pass the address toforInstance
.In addition, rather than using
forContract
and thenforInstance
, we could also useforContractInstance
to perform both of these in one step. If we wanted to do this with a specified address, we could useforContractAt
.Yet another way would be:
These examples are not exhaustive.
One can find more advanced decoding examples with
variable
andwatchMappingKey
at the documentation for these individual functions.