RT @rbonales: Nearing that time of year, please reserve March 5-6, 2015 to be in Bend, OR at Ruby on Ales 5 at the Tower Theatre - website …
11/24/2014, 6:58:06 AM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @rbonales: Nearing that time of year, please reserve March 5-6, 2015 to be in Bend, OR at Ruby on Ales 5 at the Tower Theatre - website …
11/24/2014, 6:58:06 AM
Favs: 0
Retweets: 0
link


Susan Granger's review of "PATCH ADAMS" (Universal Pictures)
In this true comedy/drama, Robin Williams ("What Dreams May Come," "Good Will Hunting") plays Hunter "Patch" Adams, a manic-depressive who decides it's better to be a doctor than a perennial patient. Problem is: Patch is also a clown, infuriating the medical establishment by doing outrageous things. Based on the 1993 book "Gesundheit: Good Health is a Laughing Matter" by Hunter Doherty Adams, the film's timely theme is the therapeutic value of humor, characterized by a personalized approach to medicine, but writer Steve Oedekerk and director Tom Shadyac cater to Williams' talent for improvisation. The story begins in 1969 in Fairfax Hospital's Psychiatric Ward, where Patch voluntarily commits himself after attempting suicide and acquires his nickname by repairing another inmate's paper cup with a piece of adhesive. Patch then moves on to Virginia Medical College where, as an idealistic med student, he wants to "treat the patient as well as the disease." He succeeds brilliantly with the hospitalized children, using an enema bulb to make a red nose, and even with a surly, dying patient (Peter Coyote) but fails dismally with his up-tight roommate (Philip Seymour Hoffman) and the villainous Dean (Bob Gunton), who is determined to expel him. A serious fellow student (Monica Potter) with her own demons to exorcise provides the love interest, joining Patch to create an unconventional clinic to "use humor to cure pain and suffering" - and their Gesundheit! Institute still proves free care in West Virginia. There's joy and sorrow, despair and determination, not unlike Williams' far better "Awakenings" (1990), but the conclusion is sheer melodrama. On the Granger Movie Gauge of 1 to 10, "Patch Adams" is a syrupy, simplistic, sentimental 7. It's a whimsical, feel-good film.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Created {{ gist.gist.created_at | date:'medium' }}
{{ gist.gist.description || 'no description' }}
{{ file.content }}


All photos uploaded to the site are released under Creative Commons - CC0 and do not require attribution.
No more hassle trying to figure out whether you can use photos for commercial use and whether you need to provide attribution.
(Visite: stocksnap, gratisography )
Part of the image and videos used in the demo are not distributed with the theme.
They are all licensed under Creative Commons and credited to their respective creator/owner.


APINSmart
Sender:
Year
2014
2015
2016
2017
Month
January
February
March
April
May
June
July
August
September
October
November
December
Individuals HIV CTR
Individuals tested HIV+
Individuals who received SRH/HIV services
New ANC clients
Pregnant women HIV CTR (ANC)
Pregnant women HIV CTR (L&D)
Women HIV CTR (Post-Partum)
Pregnant women tested + (ANC)
Pregnant women tested + (L&D)
Women tested + (Post-Partum)
Pregnant women received triple ARVs
Infants born to HIV+ mothers
Exposed infants who received DNA PCR
Exposed infants who received dNVP+6weeks
Exposed infants DNA PCR +


|
Class Summary |
| AbstractRenderer |
This class implements some, but not all of the common tasks of a renderer. |
| AbstractSceneManager |
The AbstractSceneManager contains some common tasks and fields of a scene
manager. |
| AbstractTouchHandler |
The AbstractTouchHandler contains many fields and operations that an
OnTouchListener can use. |
| BasicGLES20Renderer |
The Class BasicGLES20Renderer. |
| BasicRenderer |
The Class BasicRenderer. |
| BoundingBox |
A BoundingBox is used for every node that has a shape associated with it. |
| Camera |
Stores the specification of a virtual camera. |
| Frustum |
Stores the specification of a viewing frustum, or a viewing volume. |
| GL2DRenderer |
The Class GL2DRenderer. |
| GLES11Renderer |
This is an implementation of a renderer for devices that only support OpenGL
ES 1.1. |
| GLES20Renderer |
This class handles all of the aspect of drawing a shape to the screen. |
| GLLight |
Represents a Light that will be drawn with OpenGL ES 2.0. |
| GLMaterial |
Represents a material that will be drawn with OpenGL ES 2.0. |
| GLShader |
This class manages an OpenGL shader. |
| GLTexture |
This class handles an OpenGL texture. |
| GLViewer |
This class extends GLSurfaceView, an important class from the Android
framework. |
| GraphSceneManager |
This is a possible implementation of how to manage a 3D-scene. |
| Group |
A group is an abstract superclass for all the nodes in a GraphSceneManager
that do not contain an actual shape but rather a collection of child nodes. |
| Leaf |
This is the abstract super class of all the nodes in a graph scene manager
that contain an element that needs to be drawn. |
| Light |
This class stores the general properties of a light source. |
| Material |
This class stores the general properties of a material. |
| PhysicsGroup |
The PhysicsGroup class extends the abstract Group class to provide an
interface between the actual 3D scene and its interaction with the underlying
physics engine. |
| PhysicsTouchHandler |
The PhysicsTouchHandler is used to interact with application that have
support for a physics engine built in. |
| Plane |
The class Plane is used as a user interaction to move objects. |
| Ray |
A ray is used to find the object that lies in the 3D-space exactly below the
2D point that is pressed by the user on the screen. |
| RayShapeIntersection |
This is a data structure to hold information about whether an intersection
between a ray and a shape occured and if yes where the hit point is. |
| RenderItem |
A data structure that contains a shape and its transformation. |
| Shape |
This class represents a 3D shape. |
| ShapeNode |
A ShapeNode is a leaf in the GraphSceneManager. |
| SimpleSceneManager |
A simple scene manager is a basic implementation of a
SceneManagerInterface . |
| TouchHandler |
This is a basic touch handler that is used for interacting with scenes that
don't have support for a physics engine. |
| Trackball |
A Trackball is used to intuitively rotate an arbitrary object in the world. |
| TransformGroup |
A TransformGroup is a Group that has a transformation stored. |
| VertexBuffers |
This class contains information about the properties of a Shape . |
| VertexData |
This class is only used for the import of data from an .obj files. |
| WorldTrackball |
A WorldTrackball is used to rotate the camera. |


WITNESS LIST
Business & Commerce
February 6, 2020 9:00 AM
Electricity
ON:
Bertin, Suzanne Executive Director (also providing written testimony) (Texas Advanced
Energy Business Alliance), Austin, TX
Coleman, Katie (Texas Assoc. of Manufacturers), Austin, TX
D'Andrea, Arthur Commissioner (Public Utility Commission of Texas), Austin, TX
Havey, Julia (Texas Electric Cooperatives), Austin, TX
Hemmeline, Charlie (also providing written testimony) (Texas Solar Power Association),
Austin, TX
Keene, Russell T. “Russ” (also providing written testimony) (Self; Texas Public Power
Association), Austin, TX
Magness, Bill President and CEO (also providing written testimony) (ERCOT), Taylor, TX
Peacock, Bill (also providing written testimony) (Texas Public Policy Foundation), Austin,
TX
Prueher, Josh (Broad Reach Power), Houston, TX
Rathgeber, Julia (Association of Electric Companies of Texas), Austin, TX
Reed, Cyrus Conservation director (also providing written testimony) (Sierra club lone star
chapter), Austin, TX
Reedy, Steve Acting Director (also providing written testimony) (Independent Market
Monitor (ERCOT Market)), Austin, TX
Richmond, Michele Executive Director (Texas Competitive Power Advocates (TCPA)),
Pflugerville, TX
Rose, Tom (also providing written testimony) (NET Policy Group), Dallas, TX
Walker, DeAnn Chairman (Public Utility Commission of Texas), Austin, TX
Wood, Pat Advisory Board Member (also providing written testimony) (Self;
Conservative Texans for Energy Innovation), Austin, TX
Registering, but not testifying:
ON:
McCord, Mia (Texas Conservative Coalition Research Institute), Austin, TX


MC (Midnight Commander) is a text-mode full-screen file manager and visual shell. It provides a clear, user-friendly, and somewhat protected interface to a Unix system while making many frequent file operations more efficient and preserving the full power of the command prompt.
This package is known to build and work properly using an LFS-9.1 platform.
Download (HTTP): http://ftp.midnight-commander.org/mc-4.8.24.tar.xz
Download (FTP): ftp://ftp.osuosl.org/pub/midnightcommander/mc-4.8.24.tar.xz
Download MD5 sum: 3a11df2dd379dd67c497c8d2c344715c
Download size: 2.3 MB
Estimated disk space required: 209 MB (with tests)
Estimated build time: 0.6 SBU (using parallelism=4; with tests)
GLib-2.64.1 and PCRE-8.44
Doxygen-1.8.17, GPM-1.20.7, Samba-4.12.0, UnZip-6.0, X Window System, and Zip-3.0
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/MC
Install MC by running the following commands:
./configure --prefix=/usr \ --sysconfdir=/etc \ --enable-charset && make
To test the results, issue: make check. One test concerning rpm files fails.
Now, as the root
user:
make install && cp -v doc/keybind-migration.txt /usr/share/mc
--sysconfdir=/etc
: This
switch places the global configureation directory in /etc
.
--enable-charset
: This
switch adds support to mcedit for editing files in
encodings different from the one implied by the current locale.
The ~/.config/mc
directory and its
contents are created when you start mc for the first time. Then you
can edit the main ~/.config/mc/ini
configuration file manually or through the MC shell. Consult the mc(1) man page for
details.
On 8.x versions of mc, keybind
names used in mc.keymap.* files are changed. This is described
in keybind-migration.txt
.
Last updated on 2020-03-19 05:00:16 -0500


Your browser does not support iframes.
Copy code to integrate this composition on your websites.
Code copied to clipboard
Please be aware that local publication is for testing purposes only.


The Weekend Sales + Printable Coupons from RetailMeNot!
 Hurry, Offer Ends 4/21.
More top offers include:
eBay: 4 Day Deal Frenzy up to 90% Off + Free Shipping
Amazon: Up to 75% Off Clothing + Free Shipping
Sephora: 15% Off Sitewide & in Stores
Chili’s: Free Chips & Salsa
& many more at www.retailmenot.com
Copyright 2013 RetailMeNot, Inc. 301 Congress Avenue, Suite 700, Austin, Texas 78701
To opt-out please reply to this email with UNSUBSCRIBE in the subject line.


--- layout: post title: "Eighteenth Sunday in Ordinary Time" date: 2020-08-02 09:00:00 categories: Sunday tags: featured image: /assets/article_images/2020-04-26-Third-Sunday-Easter/scripture.jpg image2: /assets/article_images/2020-04-26-Third-Sunday-Easter/scripture-mobile.jpg ---
Holy Mass is at the very core of our worship as a Catholic community. Nothing can ever be substituted for the celebration of the Eucharist. But in this exceptional time of difficulty for our communities, our nation, and the whole world, this order of prayer can be offered by individuals and families and engages us in our Sunday celebration of the Word of God. We can pray this prayer in our homes—the “domestic churches” which help build up the Body of Christ on earth—and thus be connected to the entire Church at prayer.
During this time of prayer, we include the opportunity to make a Spiritual Communion. Making a Spiritual Communion is a worthy practice, recommended by innumerable saints throughout the ages, which unites our whole selves to God and his Church.
Taken from the Mass and the Liturgy of the Hours
Leader: God, ✠ come to my assistance.
Response: Lord, make haste to help me.
Leader: Glory be to the Father, and to the Son, and to the Holy Spirit:
Response: as it was in the beginning, is now, and ever shall be, world without end. Amen.
R You satisfy the hungry heart
With gift of finest wheat;
Come give to us, O saving Lord,
The bread of life to eat.
V As when the shepherd calls his sheep,
They know and heed his voice;
So when you call your fam’ly, Lord,
We follow and rejoice. R
V The myst’ry of your presence, Lord,
No mortal tongue can tell:
Whom all the world cannot contain
Comes in our hearts to dwell. R
V You give yourself to us, O Lord;
Then selfless let us be,
To serve each other in your name
In truth and charity. R
Leader: Let us acknowledge our sins, and seek the Lord’s pardon and peace.
Together: I confess to almighty God
and to you, my brothers and sisters,
that I have greatly sinned,
in my thoughts and in my words,
in what I have done and in what I have failed to do,
through my fault, through my fault,
through my most grievous fault;
therefore I ask blessed Mary ever-Virgin,
all the Angels and Saints,
and you, my brothers and sisters,
to pray for me to the Lord our God.
Leader: Draw near to your servants, O Lord,
and answer their prayers with unceasing kindness,
that, for those who glory in you as their Creator and guide,
you may restore what you have created
and keep safe what you have restored.
Through our Lord Jesus Christ, your Son,
who lives and reigns with you in the unity
of the Holy Spirit,
one God, for ever and ever.
Together: Amen.
Thus says the LORD: All you who are thirsty, come to the water! You who have no money, come, receive grain and eat; Come, without paying and without cost, drink wine and milk! Why spend your money for what is not bread; your wages for what fails to satisfy?  Come to me heedfully, listen, that you may have life. I will renew with you the everlasting covenant, the benefits assured to David.
The Word of the Lord.
―Thanks be to God.
Reader: The hand of the Lord feeds us; he answers all our needs.
Together: The hand of the Lord feeds us; he answers all our needs.
Reader: The LORD is gracious and merciful,
slow to anger and of great kindness.
The LORD is good to all
and compassionate toward all his works.
Together: The hand of the Lord feeds us; he answers all our needs.
Reader: The eyes of all look hopefully to you,
and you give them their food in due season;
you open your hand
and satisfy the desire of every living thing.
Together: The hand of the Lord feeds us; he answers all our needs.
Reader: The LORD is just in all his ways
and holy in all his works.
The LORD is near to all who call upon him,
to all who call upon him in truth.
Together: The hand of the Lord feeds us; he answers all our needs.
Brothers and sisters: What will separate us from the love of Christ? Will anguish, or distress, or persecution, or famine, or nakedness, or peril, or the sword? No, in all these things we conquer overwhelmingly through him who loved us. For I am convinced that neither death, nor life, nor angels, nor principalities, nor present things, nor future things, nor powers, nor height, nor depth, nor any other creature will be able to separate us from the love of God in Christ Jesus our Lord.
The word of the Lord.
―Thanks be to God.
Reader: One does not live on bread alone,
Together: but on every word that comes forth from the mouth of God.
When Jesus heard of the death of John the Baptist, he withdrew in a boat to a deserted place by himself. The crowds heard of this and followed him on foot from their towns. When he disembarked and saw the vast crowd, his heart was moved with pity for them, and he cured their sick.
When it was evening, the disciples approached him and said, “This is a deserted place and it is already late; dismiss the crowds so that they can go to the villages and buy food for themselves.” Jesus said to them, “There is no need for them to go away; give them some food yourselves.” But they said to him, “Five loaves and two fish are all we have here.” Then he said, “Bring them here to me, ” and he ordered the crowds to sit down on the grass. Taking the five loaves and the two fish, and looking up to heaven, he said the blessing, broke the loaves, and gave them to the disciples, who in turn gave them to the crowds. They all ate and were satisfied, and they picked up the fragments left over—twelve wicker baskets full. Those who ate were about five thousand men, not counting women and children.
The Gospel of the Lord.

Leader: Glory to the Father, and to the Son and to the Holy Spirit.

Leader: Let us give thanks to our Savior who came into this world as God’s presence
among us. Let us call upon him:
Response: Christ, King of Glory, be our light and our joy.
Leader: Lord Jesus, you are the rising Sun, the firstfruits of the future resurrection,
grant that we may not sit in the shadow of death but walk in the light of life.
Response: Christ, King of Glory, be our light and our joy.
Leader: Show us your goodness, present in every creature, that we may contemplate
your glory everywhere.
Response: Christ, King of Glory, be our light and our joy.
Leader: Do not allow us to be overcome by evil today, but grant that we may
overcome evil through the power of good.
Response: Christ, King of Glory, be our light and our joy.
Leader: You were baptized in the Jordan and anointed by the Holy Spirit, grant that
we may this day give thanks to your Holy Spirit.
Response: Christ, King of Glory, be our light and our joy.
Leader: In your mercy, continue to sanctify all who are afflicted from the present pandemic, and draw us all closer to you, and to one another, in this time of suffering.
Response: Christ, King of Glory, be our light and our joy.
Leader: Let us pray together as Jesus taught us:
Together: Our Father, who art in heaven …
Leader: You have given us bread from heaven, alleluia, alleluia.
Response: Containing in itself all delight, alleluia, alleluia.
Together: My Jesus,
I believe that you are present
in the Most Holy Sacrament of the Altar.
I love you above all things,
and I desire to receive you into my soul.
Since I cannot at this moment receive you sacramentally,
come at least spiritually into my heart.
I embrace you as if you were already there
and unite myself wholly to you.
Never permit me to be separated from you,
my Lord and my God!
Amen.
Canticle of Zechariah (Luke 1:68-79)
Together: ✠ Blessed be the Lord, the God of Israel;
he has come to his people and set them free.
He has raised up for us a mighty savior,
born of the house of his servant David.
Through his holy prophets he promised of old
that he would save us from our enemies,
from the hands of all who hate us.
He promised to show mercy to our fathers
and to remember his holy covenant.
This was the oath he swore to our father Abraham:
to set us free from the hands of our enemies,
free to worship him without fear,
holy and righteous in his sight
all the days of our life.
You, my child, shall be called the prophet of the Most High;
for you will go before the Lord to prepare his way,
to give his people knowledge of salvation
by the forgiveness of their sins.
In the tender compassion of our God
the dawn from on high shall break upon us,
to shine on those who dwell in darkness and the shadow of death,
and to guide our feet into the way of peace.
Glory be to the Father, and to the Son,
and to the Holy Spirit:
as it was in the beginning, is now, and ever shall be,
world without end. Amen.
Leader: ✠ May the Lord bless us, protect us from all evil,
and bring us to everlasting life.
Together: Amen.
“You Satisfy the Hungry Heart” text by Omer Westendorf, 1916-1997; tune: BICENTENNIAL, CM with refrain; Robert E. Kreutz, 1922-1996, © 1977, Archdiocese of Philadelphia. Published by International Liturgy Publications. Reprinted with permission granted by OneLicense.net license #A-705112.
Excerpts from the Lectionary for Mass for Use in Dioceses of the United States of America, second typical edition © 2001, 1998, 1997, 1986, 1970 Confraternity of Christian Doctrine, Inc., Washington, DC; excerpts from The Roman Missal © 2010, ICEL; excerpts from The Liturgy of the Hours © 1994, ICEL; used with permission granted by the USCCB until November 22 during the COVID-19 pandemic. All rights reserved. No portion of these texts may be reproduced by any means without permission in writing from the copyright owner.


|
C++ Actor Framework 0.19
|
Similar to an observable
, but always emits either a single value or an error.
More...
#include <single.hpp>
Public Types | |
| using | output_type = T |
Public Member Functions | |
| single (intrusive_ptr< op::base< T > > pimpl) noexcept | |
| single & | operator= (std::nullptr_t) noexcept |
| single (single &&) noexcept=default | |
| single (const single &) noexcept=default | |
| single & | operator= (single &&) noexcept=default |
| single & | operator= (const single &) noexcept=default |
| observable< T > | as_observable () && |
| observable< T > | as_observable () const & |
| template<class OnSuccess , class OnError > | |
| disposable | subscribe (OnSuccess on_success, OnError on_error) |
| bool | valid () const noexcept |
| operator bool () const noexcept | |
| bool | operator! () const noexcept |
| void | swap (single &other) |
Similar to an observable
, but always emits either a single value or an error.


#assign n0_docs="active"> <#assign n1_platforms="active"> <#assign n2_db2="active">
To test using DB2 set the platform to db2
in
src/test/resources/application-test.yaml
Refer to docs / testing if application-test.yaml doesn't exist yet.
```yml ebean: test: platform: db2 # h2, postgres, mysql, oracle, sqlserver ddlMode: dropCreate # none | dropCreate | migrations dbName: test ``` <@next_edit "SAP Hana" "/docs/database/hana" "/docs/database/db2/index.html"/>


{%extends "issue_base.html"%} {%block body%}
Download upload.py, a simple tool for uploading diffs from a version control system to the codereview app.
Usage summary:
upload.py [options] [-- diff_options]
Diff options are passed to the diff command of the underlying system.
Supported version control systems:
Read more about this script.


Overview
This document describes how to use the HTTP client included in Twisted Web. After reading it, you should be able to make HTTP and HTTPS requests using Twisted Web. You will be able to specify the request method, headers, and body and you will be able to retrieve the response code, headers, and body.
A number of higher-level features are also explained, including proxying, automatic content encoding negotiation, and cookie handling.
Prerequisites
This document assumes that you are familiar with Deferreds and Failures, and producers and consumers. It also assumes you are familiar with the basic concepts of HTTP, such as requests and responses, methods, headers, and message bodies. The HTTPS section of this document also assumes you are somewhat familiar with SSL and have read about using SSL in Twisted.
The Agent
Issuing Requests
The twisted.web.client.Agent
class is the entry
point into the client API. Requests are issued using the request
method, which
takes as parameters a request method, a request URI, the request headers,
and an object which can produce the request body (if there is to be one).
The agent is responsible for connection setup. Because of this, it
requires a reactor as an argument to its initializer. An example of
creating an agent and issuing a request using it might look like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
from twisted.internet import reactor from twisted.web.client import Agent from twisted.web.http_headers import Headers agent = Agent(reactor) d = agent.request( 'GET', 'http://example.com/', Headers({'User-Agent': ['Twisted Web Client Example']}), None) def cbResponse(ignored): print 'Response received' d.addCallback(cbResponse) def cbShutdown(ignored): reactor.stop() d.addBoth(cbShutdown) reactor.run()
As may be obvious, this issues a new GET request for /
to the web server on example.com
. Agent
is
responsible for resolving the hostname into an IP address and connecting
to it on port 80 (for HTTP URIs), port 443 (for HTTPS
URIs), or on the port number specified in the URI itself. It is also
responsible for cleaning up the connection afterwards. This code sends
a request which includes one custom header, User-Agent. The
last argument passed to Agent.request
is None
,
though, so the request has no body.
Sending a request which does include a body requires passing an object
providing twisted.web.iweb.IBodyProducer
to Agent.request
. This interface extends the more general
IPushProducer
by adding a new length
attribute and adding several
constraints to the way the producer and consumer interact.
-
The length attribute must be a non-negative integer or the constant
twisted.web.iweb.UNKNOWN_LENGTH
. If the length is known, it will be used to specify the value for the Content-Length header in the request. If the length is unknown the attribute should be set toUNKNOWN_LENGTH
. Since more servers support Content-Length, if a length can be provided it should be. -
An additional method is required on
IBodyProducer
implementations:startProducing
. This method is used to associate a consumer with the producer. It should return aDeferred
which fires when all data has been produced. -
IBodyProducer
implementations should never call the consumer'sunregisterProducer
method. Instead, when it has produced all of the data it is going to produce, it should only fire theDeferred
returned bystartProducing
.
For additional details about the requirements of IBodyProducer
implementations, see
the API documentation.
Here's a simple IBodyProducer
implementation which
writes an in-memory string to the consumer:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
from zope.interface import implements from twisted.internet.defer import succeed from twisted.web.iweb import IBodyProducer class StringProducer(object): implements(IBodyProducer) def __init__(self, body): self.body = body self.length = len(body) def startProducing(self, consumer): consumer.write(self.body) return succeed(None) def pauseProducing(self): pass def stopProducing(self): pass
This producer can be used to issue a request with a body:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
from twisted.internet import reactor from twisted.web.client import Agent from twisted.web.http_headers import Headers from stringprod import StringProducer agent = Agent(reactor) body = StringProducer("hello, world") d = agent.request( 'GET', 'http://example.com/', Headers({'User-Agent': ['Twisted Web Client Example'], 'Content-Type': ['text/x-greeting']}), body) def cbResponse(ignored): print 'Response received' d.addCallback(cbResponse) def cbShutdown(ignored): reactor.stop() d.addBoth(cbShutdown) reactor.run()
If you want to upload a file or you just have some data in a string, you
don't have to copy StringProducer
though. Instead, you can
use FileBodyProducer
.
This IBodyProducer
implementation works with any file-like
object (so use it with a StringIO
if your upload data is
already in memory as a string); the idea is the same
as StringProducer
from the previous example, but with a
little extra code to only send data as fast as the server will take it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
from StringIO import StringIO from twisted.internet import reactor from twisted.web.client import Agent from twisted.web.http_headers import Headers from twisted.web.client import FileBodyProducer agent = Agent(reactor) body = FileBodyProducer(StringIO("hello, world")) d = agent.request( 'GET', 'http://example.com/', Headers({'User-Agent': ['Twisted Web Client Example'], 'Content-Type': ['text/x-greeting']}), body) def cbResponse(ignored): print 'Response received' d.addCallback(cbResponse) def cbShutdown(ignored): reactor.stop() d.addBoth(cbShutdown) reactor.run()
FileBodyProducer
closes the file when it no longer needs it.
Receiving Responses
So far, the examples have demonstrated how to issue a request. However,
they have ignored the response, except for showing that it is a
Deferred
which seems to fire when the response has been
received. Next we'll cover what that response is and how to interpret
it.
Agent.request
, as with most Deferred
-returning
APIs, can return a Deferred
which fires with a
Failure
. If the request fails somehow, this will be
reflected with a failure. This may be due to a problem looking up the
host IP address, or it may be because the HTTP server is not accepting
connections, or it may be because of a problem parsing the response, or
any other problem which arises which prevents the response from being
received. It does not include responses with an error status.
If the request succeeds, though, the Deferred
will fire with
a Response
. This
happens as soon as all the response headers have been received. It
happens before any of the response body, if there is one, is processed.
The Response
object has several attributes giving the
response information: its code, version, phrase, and headers, as well as
the length of the body to expect. The Response
object also
has a method which makes the response body available: deliverBody
. Using the
attributes of the response object and this method, here's an example which
displays part of the response to a request:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
from pprint import pformat from twisted.internet import reactor from twisted.internet.defer import Deferred from twisted.internet.protocol import Protocol from twisted.web.client import Agent from twisted.web.http_headers import Headers class BeginningPrinter(Protocol): def __init__(self, finished): self.finished = finished self.remaining = 1024 * 10 def dataReceived(self, bytes): if self.remaining: display = bytes[:self.remaining] print 'Some data received:' print display self.remaining -= len(display) def connectionLost(self, reason): print 'Finished receiving body:', reason.getErrorMessage() self.finished.callback(None) agent = Agent(reactor) d = agent.request( 'GET', 'http://example.com/', Headers({'User-Agent': ['Twisted Web Client Example']}), None) def cbRequest(response): print 'Response version:', response.version print 'Response code:', response.code print 'Response phrase:', response.phrase print 'Response headers:' print pformat(list(response.headers.getAllRawHeaders())) finished = Deferred() response.deliverBody(BeginningPrinter(finished)) return finished d.addCallback(cbRequest) def cbShutdown(ignored): reactor.stop() d.addBoth(cbShutdown) reactor.run()
The BeginningPrinter
protocol in this example is passed to
Response.deliverBody
and the response body is then delivered
to its dataReceived
method as it arrives. When the body has
been completely delivered, the protocol's connectionLost
method is called. It is important to inspect the Failure
passed to connectionLost
. If the response body has been
completely received, the failure will wrap a twisted.web.client.ResponseDone
exception. This
indicates that it is known that all data has been received. It
is also possible for the failure to wrap a twisted.web.http.PotentialDataLoss
exception: this
indicates that the server framed the response such that there is no way
to know when the entire response body has been received. Only
HTTP/1.0 servers should behave this way. Finally, it is possible for
the exception to be of another type, indicating guaranteed data loss for
some reason (a lost connection, a memory error, etc).
Just as protocols associated with a TCP connection are given a transport,
so will be a protocol passed to deliverBody
. Since it makes
no sense to write more data to the connection at this stage of the
request, though, the transport only provides IPushProducer
. This allows the
protocol to control the flow of the response data: a call to the
transport's pauseProducing
method will pause delivery; a
later call to resumeProducing
will resume it. If it is
decided that the rest of the response body is not desired,
stopProducing
can be used to stop delivery permanently;
after this, the protocol's connectionLost
method will be
called.
An important thing to keep in mind is that the body will only be read
from the connection after Response.deliverBody
is called.
This also means that the connection will remain open until this is done
(and the body read). So, in general, any response with a body
must have that body read using deliverBody
. If the
application is not interested in the body, it should issue a
HEAD request or use a protocol which immediately calls
stopProducing
on its transport.
HTTP over SSL
Everything you've read so far applies whether the scheme of the request URI is HTTP or HTTPS. However, to control the SSL negotiation performed when an HTTPS URI is requested, there's one extra object to pay attention to: the SSL context factory.
Agent
's constructor takes an optional second argument, a
context factory. This is an object like the context factory described
in Using SSL in Twisted but has
one small difference. The getContext
method of this factory
accepts the address from the URL being requested. This allows it to
return a context object which verifies that the server's certificate
matches the URL being requested.
Here's an example which shows how to use Agent
to request
an HTTPS URL with no certificate verification.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
from twisted.python.log import err from twisted.web.client import Agent from twisted.internet import reactor from twisted.internet.ssl import ClientContextFactory class WebClientContextFactory(ClientContextFactory): def getContext(self, hostname, port): return ClientContextFactory.getContext(self) def display(response): print "Received response" print response def main(): contextFactory = WebClientContextFactory() agent = Agent(reactor, contextFactory) d = agent.request("GET", "https://example.com/") d.addCallbacks(display, err) d.addCallback(lambda ignored: reactor.stop()) reactor.run() if __name__ == "__main__": main()
The important point to notice here is that getContext
now
accepts two arguments, a hostname and a port number. These two arguments,
a str
and an int
, give the address to which a
connection is being established to request an HTTPS URL. Because an agent
might make multiple requests over a single connection,
getContext
may not be called once for each request. A second
or later request for a URL with the same hostname as a previous request
may re-use an existing connection, and therefore will re-use the
previously returned context object.
To configure SSL options or enable certificate verification or hostname checking, provide a context factory which creates suitably configured context objects.
HTTP Persistent Connection
HTTP persistent connections use the same TCP connection to send and receive multiple HTTP requests/responses. This reduces latency and TCP connection establishment overhead.
The constructor of twisted.web.client.Agent
takes an optional parameter pool, which should be an instance
of HTTPConnectionPool
, which will be used
to manage the connections. If the pool is created with the
parameter persistent
set to True
(the
default), it will not close connections when the request is done, and
instead hold them in its cache to be re-used.
Here's an example which sends requests over a persistent connection:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
from twisted.internet import reactor from twisted.internet.defer import Deferred, DeferredList from twisted.internet.protocol import Protocol from twisted.web.client import Agent, HTTPConnectionPool class IgnoreBody(Protocol): def __init__(self, deferred): self.deferred = deferred def dataReceived(self, bytes): pass def connectionLost(self, reason): self.deferred.callback(None) def cbRequest(response): print 'Response code:', response.code finished = Deferred() response.deliverBody(IgnoreBody(finished)) return finished pool = HTTPConnectionPool(reactor) agent = Agent(reactor, pool=pool) def requestGet(url): d = agent.request('GET', url) d.addCallback(cbRequest) return d # Two requests to the same host: d = requestGet('http://localhost:8080/foo').addCallback( lambda ign: requestGet("http://localhost:8080/bar")) def cbShutdown(ignored): reactor.stop() d.addCallback(cbShutdown) reactor.run()
Here, the two requests are to the same host, one after the each other. In most cases, the same connection will be used for the second request, instead of two different connections when using a non-persistent pool.
Multiple Connections to the Same Server
twisted.web.client.HTTPConnectionPool
instances
have an attribute
called maxPersistentPerHost
which limits the
number of cached persistent connections to the same server. The default
value is 2. This is effective only when the persistent
option is
True. You can change the value like bellow:
1 2 3 4
from twisted.web.client import HTTPConnectionPool pool = HTTPConnectionPool(reactor, persistent=True) pool.maxPersistentPerHost = 1
With the default value of 2, the pool keeps around two connections to
the same host at most. Eventually the cached persistent connections will
be closed, by default after 240 seconds; you can change this timeout
value with the cachedConnectionTimeout
attribute of the pool. To force all connections to close use
the closeCachedConnections
method.
Automatic Retries
If a request fails without getting a response, and the request is
something that hopefully can be retried without having any side-effects
(e.g. a request with method GET), it will be retried automatically when
sending a request over a previously-cached persistent connection. You can
disable this behavior by setting retryAutomatically
to False
. Note that each request will only be retried
once.
Following redirects
By itself, Agent
doesn't follow HTTP redirects (responses
with 301, 302, 303, 307 status codes and a location
header
field). You need to use the twisted.web.client.RedirectAgent
class to do so. It
implements a rather strict behavior of the RFC, meaning it will redirect
301 and 302 as 307, only on GET
and HEAD
requests.
The following example shows how to have a redirect-enabled agent.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
from twisted.python.log import err from twisted.web.client import Agent, RedirectAgent from twisted.internet import reactor def display(response): print "Received response" print response def main(): agent = RedirectAgent(Agent(reactor)) d = agent.request("GET", "http://example.com/") d.addCallbacks(display, err) d.addCallback(lambda ignored: reactor.stop()) reactor.run() if __name__ == "__main__": main()
Using a HTTP proxy
To be able to use HTTP proxies with an agent, you can use the twisted.web.client.ProxyAgent
class. It supports the
same interface as Agent
, but takes the endpoint of the proxy
as initializer argument.
Here's an example demonstrating the use of an HTTP proxy running on localhost:8000.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
from twisted.python.log import err from twisted.web.client import ProxyAgent from twisted.internet import reactor from twisted.internet.endpoints import TCP4ClientEndpoint def display(response): print "Received response" print response def main(): endpoint = TCP4ClientEndpoint(reactor, "localhost", 8000) agent = ProxyAgent(endpoint) d = agent.request("GET", "https://example.com/") d.addCallbacks(display, err) d.addCallback(lambda ignored: reactor.stop()) reactor.run() if __name__ == "__main__": main()
Please refer to the endpoints documentation for
more information about how they work and the twisted.internet.endpoints
API documentation to learn
what other kinds of endpoints exist.
Handling HTTP cookies
An existing agent instance can be wrapped with
twisted.web.client.CookieAgent
to automatically
store, send and track HTTP cookies. A CookieJar
instance, from the Python standard library module
cookielib, is
used to store the cookie information. An example of using
CookieAgent
to perform a request and display the collected
cookies might look like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
from cookielib import CookieJar from twisted.internet import reactor from twisted.python import log from twisted.web.client import Agent, CookieAgent def displayCookies(response, cookieJar): print 'Received response' print response print 'Cookies:', len(cookieJar) for cookie in cookieJar: print cookie def main(): cookieJar = CookieJar() agent = CookieAgent(Agent(reactor), cookieJar) d = agent.request('GET', 'http://www.google.com/') d.addCallback(displayCookies, cookieJar) d.addErrback(log.err) d.addCallback(lambda ignored: reactor.stop()) reactor.run() if __name__ == "__main__": main()
Automatic Content Encoding Negotiation
twisted.web.client.ContentDecoderAgent
adds
support for sending Accept-Encoding request headers and
interpreting Content-Encoding response headers. These headers
allow the server to encode the response body somehow, typically with some
compression scheme to save on transfer
costs. ContentDecoderAgent
provides this functionality as a
wrapper around an existing agent instance. Together with one or more
decoder objects (such as
twisted.web.client.GzipDecoder
), this wrapper
automatically negotiates an encoding to use and decodes the response body
accordingly. To application code using such an agent, there is no visible
difference in the data delivered.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
from twisted.python import log from twisted.internet import reactor from twisted.internet.defer import Deferred from twisted.internet.protocol import Protocol from twisted.web.client import Agent, ContentDecoderAgent, GzipDecoder class BeginningPrinter(Protocol): def __init__(self, finished): self.finished = finished self.remaining = 1024 * 10 def dataReceived(self, bytes): if self.remaining: display = bytes[:self.remaining] print 'Some data received:' print display self.remaining -= len(display) def connectionLost(self, reason): print 'Finished receiving body:', reason.type, reason.value self.finished.callback(None) def printBody(response): finished = Deferred() response.deliverBody(BeginningPrinter(finished)) return finished def main(): agent = ContentDecoderAgent(Agent(reactor), [('gzip', GzipDecoder)]) d = agent.request('GET', 'http://www.yahoo.com/') d.addCallback(printBody) d.addErrback(log.err) d.addCallback(lambda ignored: reactor.stop()) reactor.run() if __name__ == "__main__": main()
Implementing support for new content encodings is as simple as writing a
new class like GzipDecoder
that can decode a response using
the new encoding. As there are not many content encodings in widespread
use, gzip is the only encoding supported by Twisted itself.
Conclusion
You should now understand the basics of the Twisted Web HTTP client. In particular, you should understand:
- How to issue requests with arbitrary methods, headers, and bodies.
- How to access the response version, code, phrase, headers, and body.
- How to store, send, and track cookies.
- How to control the streaming of the response body.
- How to enable the HTTP persistent connection, and control the number of connections.


| I l@ve RuBoard |
The Software IC is a metaphor that people like to toss around when discussing reusability and component-based development.[3] The idea is that software components should be combined just as integrated circuit chips are combined. This works only if the components you are using are known to be reliable.
[3] The term "Software IC" (Integrated Circuit) seems to have been invented in 1986 by Cox and Novobilski in their Objective-C book Object-Oriented Programming [CN91].
Chips are designed to be tested—not just at the factory, not just when they are installed, but also in the field when they are deployed. More complex chips and systems may have a full Built-in Self Test (BIST) feature that runs some base-level diagnostics internally, or a Test Access Mechanism (TAM) that provides a test harness that allows the external environment to provide stimuli and collect responses from the chip.
We can do the same thing in software. Like our hardware colleagues, we need to build testability into the software from the very beginning, and test each piece thoroughly before trying to wire them together.
Chip-level testing for hardware is roughly equivalent to unit testing in software—testing done on each module, in isolation, to verify its behavior. We can get a better feeling for how a module will react in the big wide world once we have tested it throughly under controlled (even contrived) conditions.
A software unit test is code that exercises a module. Typically, the unit test will establish some kind of artificial environment, then invoke routines in the module being tested. It then checks the results that are returned, either against known values or against the results from previous runs of the same test (regression testing).
Later, when we assemble our "software IC's" into a complete system, we'll have confidence that the individual parts work as expected, and then we can use the same unit test facilities to test the system as a whole. We talk about this large-scale checking of the system in Ruthless Testing.
Before we get that far, however, we need to decide what to test at the unit level. Typically, programmers throw a few random bits of data at the code and call it tested. We can do much better, using the ideas behind design by contract.
We like to think of unit testing as testing against contract (see Design by Contract). We want to write test cases that ensure that a given unit honors its contract. This will tell us two things: whether the code meet the contract, and whether the contract means what we think it means. We want to test that the module delivers the functionality it promises, over a wide range of test cases and boundary conditions.
What does this mean in practice? Let's look at the square root routine we first encountered on page 114. Its contract is simple:
require: argument >= 0; ensure: ((result * result) - argument).abs <= epsilon*argument;
This tells us what to test:
Pass in a negative argument and ensure that it is rejected.
Pass in an argument of zero to ensure that it is accepted (this is the boundary value).
Pass in values between zero and the maximum expressible argument and verify that the difference between the square of the result and the original argument is less than some small fraction of the argument.
Armed with this contract, and assuming that our routine does its own pre- and postcondition checking, we can write a basic test script to exercise the square root function.
public void testValue(double num, double expected) { double result = 0.0; try { // We may throw a result = mySqrt(num); // precondition exception } catch (Throwable e) { if (num < 0.0) // If input is < 0, then return; // we're expecting the else // exception, otherwise assert(false); // force a test failure } assert(Math.abs(expected-result) < epsilon*expected); }
Then we can call this routine to test our square root function:
testValue(-4.0, 0.0); testValue( 0.0, 0.0); testValue( 2.0, 1.4142135624); testValue(64.0, 8.0); testValue(1.0e7, 3162.2776602);
This is a pretty simple test; in the real world, any nontrivial module is likely to be dependent on a number of other modules, so how do we go about testing the combination?
Suppose we have a module A that uses a LinkedList and a Sort. In order, we would test:
LinkedList's contract, in full
Sort's contract, in full
A's contract, which relies on the other contracts but does not directly expose them
This style of testing requires you to test subcomponents of a module first. Once the subcomponents have been verified, then the module itself can be tested.
If LinkedList and Sort's tests passed, but A's test failed, we can be pretty sure that the problem is in A, or in A's use of one of those subcomponents. This technique is a great way to reduce debugging effort: we can quickly concentrate on the likely source of the problem within module A, and not waste time reexamining its subcomponents.
Why do we go to all this trouble? Above all, we want to avoid creating a "time bomb"—something that sits around unnoticed and blows up at an awkward moment later in the project. By emphasizing testing against contract, we can try to avoid as many of those downstream disasters as possible.
Tip 48
Design to Test
When you design a module, or even a single routine, you should design both its contract and the code to test that contract. By designing code to pass a test and fulfill its contract, you may well consider boundary conditions and other issues that wouldn't occur to you otherwise. There's no better way to fix errors than by avoiding them in the first place. In fact, by building the tests before you implement the code, you get to try out the interface before you commit to it.
The unit tests for a module shouldn't be shoved in some far-away corner of the source tree. They need to be conveniently located. For small projects, you can embed the unit test for a module in the module itself. For larger projects, we suggest moving each test into a subdirectory. Either way, remember that if it isn't easy to find, it won't be used.
By making the test code readily accessible, you are providing developers who may use your code with two invaluable resources:
Examples of how to use all the functionality of your module
A means to build regression tests to validate any future changes to the code
It's convenient, but not always practical, for each class or module to contain its own unit test. In Java, for example, every class can have its own main. In all but the application's main class file, the main routine can be used to run unit tests; it will be ignored when the application itself is run. This has the benefit that the code you ship still contains the tests, which can be used to diagnose problems in the field.
In C++ you can achieve the same effect (at compile time) by using #ifdef to compile unit test code selectively. For example, here's a very simple unit test in C++, embedded in our module, that checks our square root function using a testValue routine similar to the Java one defined previously:
#ifdef _TEST_ int main(int argc, char **argv) { argc--; argv++; // skip program name if (argc < 2) { // do standard tests if no args testValue(-4.0, 0.0); testValue( 0.0, 0.0); testValue( 2.0, 1.4142135624); testValue(64.0, 8.0); testValue(1.0e7, 3162.2776602); } else { // else use args double num, expected; while (argc >= 2) { num = atof(argv[0]); expected = atof(argv[1]); testValue(num,expected); argc -= 2; argv += 2; } } return 0; } #endif
This unit test will either run a minimal set of tests or, if given arguments, allow you to pass data in from the outside world. A shell script could use this ability to run a much more complete set of tests.
What do you do if the correct response for a unit test is to exit, or abort the program? In that case, you need to be able to select the test to run, perhaps by specifying an argument on the command line. You'll also need to pass in parameters if you need to specify different starting conditions for your tests.
But providing unit tests isn't enough. You must run them, and run them often. It also helps if the class passes its tests once in a while.
Because we usually write a lot of test code, and do a lot of testing, we'll make life easier on ourselves and develop a standard testing harness for the project. The main shown in the previous section is a very simple test harness, but usually we'll need more functionality than that.
A test harness can handle common operations such as logging status, analyzing output for expected results, and selecting and running the tests. Harnesses may be GUI driven, may be written in the same target language as the rest of the project, or may be implemented as a combination of makefiles and Perl scripts. A simple test harness sis shown in the answer to Exercise 41 on page 305.
In object-oriented languages and environments, you might create a base class that provides these common operations. Individual tests can subclass from that and add specific test code. You could use a standard naming convention and reflection in Java to build a list of tests dynamically. This technique is a nice way of honoring the DRY principle—you don't have to maintain a list of available tests. But before you go off and start writing your own harness, you may want to investigate Kent Beck and Erich Gamma's xUnit at [URL 22]. They've already done the hard work.
Regardless of the technology you decide to use, test harnesses should include the following capabilities:
A standard way to specify setup and cleanup
A method for selecting individual tests or all available tests
A means of analyzing output for expected (or unexpected) results
A standardized form of failure reporting
Tests should be composable; that is, a test can be composed of subtests of subcomponents to any depth. We can use this feature to test selected parts of the system or the entire system just as easily, using the same tools.
Ad Hoc TestingDuring debugging, we may end up creating some particular tests on-the-fly. These may be as simple as a print statement, or a piece of code entered interactively in a debugging or IDE environment. At the end of the debugging session you need to formalize the adhoc test. If the code broke once, it is likely to break again. Dont't just throw away the test you created; add it to the existing unit test. |
For example, using JUnit (the Java member of the xUnit family), we might write our square root test as follows:
public class JUnitExample extends TestCase { public JUnitExample(final String name) { super(name); } protected void setUp() { // Load up test data... testData.addElement(new dblPair(-4.0,0.0)); testData.addElement(new dblPair(0.0,0.0)); testData.addElement(new dblPair(64.0,8.0)); testData.addElement(new dblPair(Double.MAX_VALUE, 1.3407807929942597E154)); } public void testMySqrt() { double num, expected,.result = 0.0; Enumeration enum = testData.element(); while (enum.hasMoreElements()) { dblPair p = (dblPair)enum.nextElement(); num = p.getNum(); expected = p.getExpected(); testValue(num, expected); } } public static Test suite() { TestSuite suite= new Testsuit(); suite.addTest(new JUnitExample("testMySqrt")); return suite; } }
JUnit is designed to be composable: we could add as many tests as we wanted to this suite, and each of those tests could in turn be a suite. In addition, you have your choice of a graphical or batch interface to drive the tests.
Even the best sets of tests are unlikely to find all the bugs; there's something about the damp, warm conditions of a production environment that seems to bring them out of the woodwork.
This means you'll often need to test a piece of software once it has been deployed—with real-world data flowing though its veins. Unlike a circuit board or chip, we don't have test pins in software, but we can provide various views into the internal state of a module, without using the debugger (which may be inconvenient or impossible in a production application).
 Log messages should be in a regular, consistent format; you may want to parse them automatically to deduce processing time or logic paths that the program took. Poorly or inconsistently formatted diagnostics are just so much "spew"—they are difficult to read and impractical to parse.
Another mechanism for getting inside running code is the "hot-key" sequence. When this particular combination of keys is pressed, a diagnostic control window pops up with status messages and so on. This isn't something you normally would reveal to end users, but it can be very handy for the help desk.
For larger, more complex server code, a nifty technique for providing a view into its operation is to include a built-in Web server. Anyone can point a Web browser to the application's HTTP port (which is usually on a nonstandard number, such as 8080) and see internal status, log entries, and possibly even some sort of a debug control panel. This may sound difficult to implement, but it's not. Freely available and embed-dable HTTP Web servers are available in a variety of modern languages. A good place to start looking is [URL 58].
All software you write will be tested—if not by you and your team, then by the eventual users—so you might as well plan on testing it thoroughly. A little forethought can go a long way toward minimizing maintenance costs and help-desk calls.
Despite its hacker reputation, the Perl community has a very strong commitment to unit and regression testing. The Perl standard module installation procedure supports a regression test by invoking
% make test
There's nothing magic about Perl itself in this regard. Perl makes it easier to collate and analyze test results to ensure compliance, but the big advantage is simply that it's a standard—tests go in a particular place, and have a certain expected output. Testing is more cultural than technical; we can instill this testing culture in a project regardless of the language being used.
Tip 49
Test Your Software, or Your Users Will
| 41. |
| I l@ve RuBoard |


public class GestureEvent extends java.lang.Object implements RobotEvent
EventBusFactory.getRobotEventBus(int)
)| Constructor and Description |
|---|
GestureEvent(java.lang.String identifier,
Robot robot,
GestureAlertHandler shouldAlertHandler)
Constructor for 'GestureEvent' with a specified event block and identifier.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getEventPhaseMask() |
java.lang.String |
getIdentifier()
Specifies the unique identifier for this given `GestureEvent` (optional).
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getInformation() |
EventPhase |
getPhase() |
Robot |
getRobot() |
GestureAlertHandler |
getShouldAlertHandler()
The main execution block of `GestureEvent`.
|
java.util.Date |
getTimestamp() |
boolean |
isActive() |
void |
setEventPhaseMask(int eventPhaseMask)
Tells the `GestureEvent` to trigger when it enters specific `EventPhase` phases.
Certain events recognize phases in the event, and can be configured to trigger upon entry into any of these phases. As of this writing, these events are `gestureSlideAlongAxis` and `gestureDrop`. - EventPhase.IDLE Nothing is happening; waiting for event to start. - EventPhase.STARTED The gesture might be starting. |
void |
setInformation(java.util.HashMap<java.lang.String,java.lang.Object> information)
Set additional information to use during alert block execution (optional).
|
void |
setPhase(EventPhase phase) |
void |
setShouldAlertHandler(GestureAlertHandler shouldAlertHandler) |
protected boolean |
shouldSignalForPhase(EventPhase eventPhaseNew) |
void |
startListening()
Start listening for the 'GestureEvent'
If the robot is already listening to listen to this event, this call is a no-op. When the gesture event happens, the 'GestureEvent' object is posted to the Robot Event Bus. To register to the Robot Specific Event bus refer to EventBusFactory.getRobotEventBus(int) |
void |
stopListening()
Stop listening for the 'GestureEvent'
|
public GestureEvent(java.lang.String identifier, Robot robot, GestureAlertHandler shouldAlertHandler)
shouldAlertHandler
- The execution block of the event.identifier
- The 'String' identifier for event creator.robot
- The 'Robot' associated with the GestureEventpublic Robot getRobot()
getRobot
in interface RobotEvent
public java.lang.String getIdentifier()
public GestureAlertHandler getShouldAlertHandler()
com.w2.api.engine.events.EventBusFactory#getRobotEventBus(int)}
public void setShouldAlertHandler(GestureAlertHandler shouldAlertHandler)
shouldAlertHandler
- Set the main execution block of the 'GestureEvent'public java.util.HashMap<java.lang.String,java.lang.Object> getInformation()
public void setInformation(java.util.HashMap<java.lang.String,java.lang.Object> information)
public java.util.Date getTimestamp()
public boolean isActive()
public EventPhase getPhase()
com.w2.api.engine.events.gesture.EventPhase}
public void setPhase(EventPhase phase)
phase
- The new 'EventPhase' to set.com.w2.api.engine.events.gesture.EventPhase}
public int getEventPhaseMask()
public void setEventPhaseMask(int eventPhaseMask)
EventPhase.IDLE
EventPhase.STARTED
EventPhase.ESTABLISHED
EventPhase.COMPLETED
EventPhase.CANCELLED
eventPhaseMask
- Bitwise-OR of `WWEventPhase` enums.protected boolean shouldSignalForPhase(EventPhase eventPhaseNew)
public void startListening()
EventBusFactory.getRobotEventBus(int)
public void stopListening()


{% load i18n %}
{% comment %}
TODO : delete this template in the next major release
This template will not exist anymore in the next release. Please do not use it.
See docs about PYBB_MARKUP_ENGINES_PATHS setting and pybb.markup.bbcode.py
{% endcomment %}
{% with 'markitup/sets/'|add:PYBB_MARKUP|add:'/style.css' as style_static %}
{% endwith %}
{% with 'markitup/sets/'|add:PYBB_MARKUP|add:'/set.js' as static_setjs %}
{% endwith %}


--- layout: index title: People tagline: tags : [about, info] img : img-mobile : author : Marcin Koculak css: js: keywords: canonical: --- {% include JB/setup %}
Claude Bajada is a lecturer at the Department of Physiology and Biochemistry at the University of Malta with a particular interest in the confluence of neural architecture, brain function and MRI techniques. His PhD work, at the University of Manchester, focused on using novel approaches to elucidate the white matter architecture of the temporal lobe. Claude currently leads the Large-scale data collection working group for COST Action CA18106.


Views can be written as plain HTML, Jade or any other supported by HTML formatters.
You only have one requirement. In HTML insert <SocketStream>
where you want link and script tags to be inserted.
This will ensure that you get the CSS and JavaScript files loaded in the page.
You should consider the size of what you are loading. Normally CSS is not that huge, so let's consider JS.
If you have a lot of JavaScript and you put the SocketStream tag within the head tag, the user will not see the contents of the page until the scripts have been loaded which on a slow connection could take seconds when the page might be plain white.
If on the other hand you have a page heavy on content and light on JavaScript, and you put it within the head tag, the user will see the top of the page styled before the full page is loaded.
The recommended place for bundles of CSS and JS to be loaded is just before the closing
tag. This is where
you should put the SocketStream tag.
If you are doing XHTML rather than HTML use <SocketStream/>
.
If you are doing Jade use != SocketStream
such as
body
+facebook-root()
main
div#content
block content
p Content block to be filled in
!= SocketStream
Note than the SocketStream include notation and up to the page formatter, so ultimately you are in control by configuring the formatters.
By default the start code will be executed at the end of the view regardless of where you put the SocketStream tag. In a typical installation the end of your HTML for the view served to the browser will look like,

If you want the previous behaviour of appending the startCode to the JS bundle rather than the view HTML set the client option "startInBundle".
ss.client.set({ startInBundle: true });


Review: The Game By: C. Michael Bailey
Starring: Michael Douglas, Sean Penn, Deborah Unger, Peter Donat, Carroll Baker, and Armin Mueller-Stahl. Directed by: David Fincher Polygram 1997 125 minutes
Take This Is Your Life, A Christmas Carol, and Deathtrap, mix them together and you get a potent thriller like The Game. David Fincher, whose previous outing Seven defined 1990s American noir, issues forth another provocatively dark treat.
 Haunted by his father's suicide (recorded as grainy 8 mm family footage from his childhood) and a failed marriage, Van Orton manifests his fear and bitterness by coldly firing an old family friend because of declining profits.
Enter Conrad Van Orton (Sean Penn), Nicholas' brother. Conrad, "Connie" to Nicholas, meets his brother for lunch to wish him a happy birthday. As a present, Conrad gives Nicholas and gift certificate to CRS, Consumer Recreation Services. CRS is a company that specializes in custom tailored "games" for the participant. Conrad tells him to call the number on the card. "To make your life fun," Conrad says. Fun is something Nicholas desperately needs to have.
Nicholas is skeptical at first but makes the call to CRS after overhearing a conversation between two men at his health club. Curious now, he goes to the CRS office and is asked to take several psychological and physical tests that take the better part of a day. He leaves CRS being told that they will contact him. He is contacted, interrupted during a business meeting on his cellular phone, and is told that his application was rejected. He had not provided his cellular number to CRS, a mystery. And thus, Nicholas Van Orton's game begins.
After a slow start, The Game accelerates as Van Orton is bounced like a pinball from one conspiratorial scenario to the next. Beginning with finding a wooden clown laying face down in his driveway to fleeing from assassins to believing that this game is part of an elaborate con to steal all of his money, Nicholas finds himself becoming more and more off center. His carefully controlled world begins to fray and unravel. Originally told that "the game" would be a life-changing experience, Nicholas finds himself dirty and drugged in a Mexican crypt wondering what the experience is and wondering if it can all be really be real. As the movie spirals unpredictably to its conclusion, the viewer, like Van Orton, is wondering about the "fun" Conrad alluded to earlier in the film.
Michael Douglas is well cast as the financially successful, spiritually bankrupt Van Orton. Sean Penn has little more than a bit role in this film, but is also effective playing Nicholas' dark sheep brother. Deborah Unger (most recently in David Cronenberg's Crash) plays a mysterious waitress at Van Orton's favorite club who ultimately plays a pivotal role in Nicholas' "game". Fincher's San Francisco is a dark place though not as dark as the mythic metropolis of Seven. The Game proves to be a more polished and ultimately predictable film than Seven. Predictable, but not too predictable. Fincher deftly takes the viewer along for the ride, not really betraying what is coming next. This effect is a much because of the memory of his daring, anti-Hollywood conclusion of Seven as it is his carefully crafted script.
With The Game, David Fincher emerges as an intriguing and vital force in American film making. During this rather fallow time when really fine and provocative films are few and far between, Fincher and his fine directing are greatly welcome.
-- C. Michael Bailey
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% include 'templates/head-meta.html' %}
Maybe head back to the homepage or use one of the menu links instead?


COMFORT
FOUND IN GOOD
OLD BOOKS
BY
GEORGE HAMILTON FITCH
AUTHOR OF
"MODERN ENGLISH BOOKS OF POWER"
"THE CRITIC IN THE ORIENT"
"THE CRITIC IN THE OCCIDENT"
I love everything that's old:
old friends, old times, old manners,
old books, old wine.
-Goldsmith


MyController as defined in MyFeature Module
{{ provider }}
{{ value }}
{{ factory }}
{{ service }}
{{ dynamic }}


| Gender: | Male | Phone: | +86-188-5788-4045 |
|---|---|---|---|
| Birthday: | 1978/7 | E-mail: |<EMAIL_ADDRESS>|
| Location: | Hangzhou, China |
| Period | School | Stage |
|---|---|---|
| 1992 ~ 1995 | Hangzhou High School | High School |
| 1995 ~ 1999 | Department of Computer Science, Zhejiang University | Undergraduate |
| 1999 ~ 2002 | Department of Computer Science, Zhejiang University | Master’s Degree |
The carrier-class cross-platform SMS exchange system provides stable and reliable data exchange and forwarding services for telecommunications, China Unicom, and mobile messaging.
Provides automated modeling, analysis, and monitoring systems for 3G network devices and topologies.
A fully automated high-performance video surveillance system based on HD sampling, distributed storage, online playback, pattern recognition and monitoring.
Provide a stable and reliable information release and exchange platform for Fuyang City Government.
Provides WEB-based online product display and sales platform for Kirin Pharmaceutical.
Based on J2EE platform and AJAX technology for overseas trade user information exchange, organization, custom browsing and interesting association mining system. Provides a good user experience through dynamic page technology, completes information gathering and mining through user communication and participation, and realizes the proliferation of information and data through information organization, mining, and association, thereby establishing a comprehensive and self-growth capability. Overseas trade information internet platform.
WEB platform of overseas trade clearancing based for Yiwu Customs, based on J2EE platform.
Based on the traditional scenic spot customers, through the integration of tourism industry chain attractions attractions, travel agencies, distributors, hotels, ticket ticketing and other links, to build an online travel supermarket, providing tourists with a complete online platform for tourism information and travel services. Build a comprehensive tourism information integration community through good tourist interaction.
JAVA technology-based online ticket booking e-commerce platform.
JAVA technology-based online ticket booking e-commerce platform.
Microsoft’s new technology and new product release platform based on the .Net architecture provides a reliable test authorization release and management system for new products.
The online scheduling and management system is based entirely on WEB 2.0 and AJAX architectures, providing web-based desktop-like user experiences and rich extension interfaces for users to smoothly transition from traditional desktop applications (such as Microsoft Outlook) to online systems.
Online e-commerce system for Internet users based on the Web 2.0, provide information and booking platform for business trip.

Current public security users include public security internal platforms in Hangzhou, Yinchuan, Erdos, Zhuhai, Fuyang and many other areas, involving anti-drug, public security, traffic control, and cyber police.
Current corporate users include Zhejiang University, Sinopec BP, Graduate Degree Center of the Ministry of Education, and Hangzhou Normal University.
Involved technology:
As co-founder and chief technical leader, responsible for the planning of the company’s products and technology, including determination of technical platform and architecture, construction of technical teams, and management of daily R&D.
Detail of business & technology cannot be listed due to confidentiality agreements.
Technicians. Willing to and being good at discovering and resolving all issues through technical means and methods, including communication and collaboration between people. Willing to learn, understand and share all logical things and apply to work and life. Do well in communication, presentation, understanding and collaboration orally but prefer to do through utilities, plans, work flow, documents and code.
Have a certain understanding and prehension of the whole complete life cycle of software development, including:
Have a deeper understanding of the nature of computer technology, based which running up to quickly deconstruct, analyze and grasp issues, such as a fresh language, architecture, framework, theory or technology, so much as person or group.
Accumulated experience in the fields of financial data analysis, user interaction and experience design, internet service architecture, e-commerce architecture and R&D, database/warehouse modeling, big data processing, high-performance concurrence algorithm design.
Individual development can be found at: Github and BitBucket.
Liberals. Self-consistent view of world, life and values has been constructed based on freedom, equality, openness, and try to practice the line in terms of work, life, social and so on., such as the open source community development.
For literature, history, classics (Chinese ancient classics), philosophy (Chinese/Western philosophy, especially Taoist and existentialist), religion (mainly European theology), science (mainly for pure mathematics and theoretical physics), psychology, arts (Chinese and Western music, painting, architecture, Chinese calligraphy), economics, political and other fields have enthusiast-level knowledge accumulation, personal speculation and understanding, and interest-loving practices.
Tens of years in avocation of tennis, cycling (mountain/road), outdoor (hiking); appreciatory in basketball, football, table tennis, badminton, volleyball, racing, billiards, go, chess, bridge.
Some personal positions and ideas can be found out or exchanged at: Weibo (original account with more than 30000 posts has been banned), Blog and Blog Backup.


Bug 1351248 N[Core:DOM: UI Events & Focus Handling]Can't tab into or out of fieldset with overflow auto
Bug 1684486 R[Core:GFX: Color Management]Run cargo clippy on qcms.
Bug 1684491 R[Core:GFX: Color Management]Run cargo fmt after clippy changes.
Bug 1684517 R[Core:GFX: Color Management]Make qcms C bindings optional
Bug 1684534 R[Core:GFX: Color Management]Rename matrix and qcms_profile types.
Bug 1684535 R[Core:GFX: Color Management]Stop allowing unused variables.
Bug 1676966 R[Core:Layout: Text and Fonts]Fenix takes longer to reflow wikipedia.org than Fennec, partially due to font initialization
Bug 1041377 R[Firefox:Keyboard Navigation]Investigate removing Backspace as a shortcut for navigating back in history
Bug 1683678 R[Firefox:about:logins]Mask password button is no longer visible if Light theme is used
###########
Changes to 9 bugs - 8 fixed.


AN AFFAIR OF LOVE (UNE LIAISON PORNOGRAPHIQUE) (director: Frederic Fonteyne; screenwriter: Philippe Blasband; cinematographer: Virginie Saint-Martin; editor: Chantal Hymans; cast: Nathalie Baye (Elle-Her), Sergi Lopez (Lui-Him), Jacques Viala (Interviewer); Runtime: 78; Fine Line Features; 2000)
Reviewed by Dennis Schwartz
This is a French romantic story about two strangers living out their fantasy in a Paris hotel on Thursdays for a period of six months.  Sergi Lopez, also someone who is fortysomething, but according to his version, he responded to a personal ad in a girlie magazine and sent a letter with his photo, which resulted in the two meeting in a bar. In this minimalist tale, the two are interviewed separately by an unseen Jacques Viala, who could never get either one of them to reveal their fantasy, and what's more, they sometimes had different impressions about the affair.
Interestingly, this is a very steamy story, but the sex is not explicit...as the film is more than anything else a love story, about two nameless souls, not knowing anything about each other's lives, but through sex falling in love...yet unable in their six month relationship to find a way to make a declaration of love that sticks.
The story is narrated by the two, through the interviewer's offscreen questions to them about their relationship. Which starts with their first date, as each is visibly nervous, but they proceed to the hotel across the street and have their first sexual encounter behind closed doors. All the viewer finds out about it, is that it went OK and they will be meeting again next week. We also see that they are both sensitive, intelligent and respectable people.
The only time we see them have sex, is when they decide to do it "normally," with the only twist that she's on top of him. This normal sex excites them more than the fantasy she advertised for does, and it is also emotionally unwinding for them, as it brings them closer together than they imagined this relationship would be able to do. It was a great bedroom lovemaking scene, which was intimately done with both humor and passion.
But the viewer, unable to know more than the little he sees about them, can only guess at what draws them so close. The story played more like a gimmick than a real love affair, because after their initial encounters, it seemed rather strange that these intelligent people wouldn't be curious to know more about each other, especially since they were developing a certain bond together.
Yet, on the other hand, the reason this film worked so well, was the illuminated performance by Baye, who was 50 at the time of the film, but looks much younger and has such a touching quality about her, that she is simply ravishing. There was a great chemistry between her and the introspective, quietly handsome Spanish actor, Lopez. And if you add to that the mature script by French novelist and playwright Philippe Blasband and the classy way Frederic Fonteyne directed, it is easy to see why the film was so enthralling. What you get is an affair that turns out to be in surprisingly good taste, but without satisfying the more mundane matters in a relationship. It was as if this was a sex lab experiment, an ideal couple was being tested to see if a purely sexual encounter could spark a more intimate relationship. If the film moved off its experimental mode and let us see the couple act away from the controlled ground rule conditions, this might have been an even much better film.
The film was originally titled "Une Liaison Pornographique." It won for Best Film at Venice.
REVIEWED ON 3/1/2001 GRADE: B+
Dennis Schwartz: "Ozus' World Movie Reviews"
http://www.sover.net/~ozus
<EMAIL_ADDRESS>© ALL RIGHTS RESERVED DENNIS SCHWARTZ
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Davido’s album: Naira Marley sounded like he recorded his verse on suit and tie - Fans
- Nigerian singer Davido recently released his much anticipated album A Good Time
- Just a few hours after the release, the album became a trending topic on social media
- Rapper Naira Marley’s verse on a particular track off the album got music lovers talking
Popular Nigerian singer David Adeleke aka Davido is currently the topic of discussion on social media, following the release of his long awaited album, A Good Time.
The music star released the 17-album in the early hours of Friday, November 22, and despite the time of release, many fans stayed up late to be among those who experienced the beauty of the project fresh out of the oven.
Fans of OBO as he is often called showered accolades on him for making the album worth the wait. Although Davido had some interesting collaborations on the project, the track with controversial rapper Naira Marley, is already getting a lot of buzz.
PAY ATTENTION: Read best news on Nigeria's #1 news app
PAY ATTENTION: Get your daily relationship tips and advice on Africa Love Aid group
The track titled Sweet in The Middle, had Naira Marley presenting a lyrical version of himself that most of his fans are almost not accustomed to.
Many hilariously suggested that Davido made sure the rapper much known for pioneering the ‘No belt gang’, used a belt while recording, and also dressed up in a suit and tie.
Read mixed reactions on social media below:
PAY ATTENTION: NAIJ.com upgrades to Legit.ng: a letter from our Editor-in-Chief Bayo Olupohunda
Meanwhile, Legit.ng previously gathered that a funny video of Davido surfaced in the online community on Thursday, November 21, as the singer celebrated his 27th birthday. A DMW hypeman Special Spesh and posted a video of Davido using the toilet, while celebrating his birthday.
Davido pens touching note as he reminisces on his life in the past 7 years
NAIJ.com (naija.ng) -> Legit.ng We have upgraded to serve you better
Wizkid, Davido, D'banj steal show with amazing performances at Burna Boy's concert | Legit TV


Use the following graph to answer the question below:
init({
range: [ [ -2, NUM_STUDENTS * 3 + 2 ], [ -3, 12 ] ],
scale: [ 26, 26 ]
});
for ( var y = 1; y <= 10; ++y ) {
label( [ 0, y ], y * 10, "left", false );
style({ stroke: "#000", strokeWidth: 1, opacity: 0.2 }, function() {
line( [ 0, y ], [ NUM_STUDENTS * 3 + 1, y ] )
});
}
for ( var index = 0; index < NUM_STUDENTS; ++index ) {
style({ stroke: "none", fill: "#9ab8ed", opacity: 1.0 });
path([ [ index * 3 + 1, 0 ], [ index * 3 + 1, MIDTERM[ index ] / 10 ], [ index * 3 + 2, MIDTERM[ index ] / 10 ], [ index * 3 + 2, 0 ], [ index * 3 + 1, 0 ] ]);
style({ stroke: "none", fill: "#ffc966", opacity: 1.0 });
path([ [ index * 3 + 2, 0 ], [ index * 3 + 2, FINAL[ index ] / 10 ], [ index * 3 + 3, FINAL[ index ] / 10 ], [ index * 3 + 3, 0 ], [ index * 3 + 2, 0 ] ]);
style({ opacity: 1.0 });
label( [ index * 3 + 2, 0 ], person( index + 1 ), "below", false );
}
style({ stroke: "#000", strokeWidth: 2, opacity: 1.0 });
line( [ 0, 0 ], [ NUM_STUDENTS * 3 + 1, 0 ] );
line( [ 0, 0 ], [ 0, 10 ] );
label( [ ( NUM_STUDENTS * 3 + 1 ) / 2, -0.8 ], "Student", "below", false );
jQuery( label( [ -1.5, 5 ], "Score (points)", "center", false ) ).addClass( "rotate" );
label( [ ( NUM_STUDENTS * 3 + 1 ) / 2, 10.5 ], "Scores on Midterm and Final Exams", "above", false );
style({ stroke: "none", fill: "#9ab8ed", opacity: 1.0 });
path([ [ 0, -2 ], [ 0.5, -2 ], [ 0.5, -2.5 ], [ 0, -2.5 ], [ 0, -2 ] ]);
style({ stroke: "#000", strokeWidth: 2, opacity: 1.0 });
label( [ 0.5, -2.25 ], "Midterm", "right", false );
style({ stroke: "none", fill: "#ffc966", opacity: 1.0 });
path([ [ 3, -2 ], [ 3.5, -2 ], [ 3.5, -2.5 ], [ 3, -2.5 ], [ 3, -2 ] ]);
style({ stroke: "#000", strokeWidth: 2, opacity: 1.0 });
label( [ 3.5, -2.25 ], "Final", "right", false );
randRange( 0, 1 )
[ "midterm", "final exam" ][ COLUMN ]
COLUMN === 0 ? mean( MIDTERM ) : mean( FINAL )
What was the average student's score for the TEST?
AVERAGE
Use the key to figure out which of the two bars shows the scores for the TEST.
style({ stroke: PINK, fill: "none", strokeWidth: 2 });
ellipse( [ COLUMN * 3 + 1.2, -2.25 ], [ 1.5, 0.5 ] );
Find each of the TEST scores represented by the blueorange bars.
if ( COLUMN === 0 ) {
label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" });
} else {
label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" });
}
To find the average student's score, add up the individual scores and divide by the number of students.
\dfrac{plus.apply( null, COLUMN === 0 ? MIDTERM : FINAL )}{NUM_STUDENTS} =
\dfrac{sum( COLUMN === 0 ? MIDTERM : FINAL )}{NUM_STUDENTS} =
AVERAGE
The average student's score on the TEST was AVERAGE
.
true
mean( MIDTERM )
mean( FINAL )
MIDTERM_AVG > FINAL_AVG ? "Midterm" : ( MIDTERM_AVG < FINAL_AVG ? "Final exam" : "Same on both" )
On average, did the students do better on the midterm or the final exam?
ANSWER
- Midterm
- Final exam
- Same on both
Find each of the midterm scores represented by the blue bars.
label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" });
To find the average student's score on the midterm, add up the individual scores and divide by the number of students.
\dfrac{plus.apply( null, MIDTERM )}{NUM_STUDENTS} =
\dfrac{sum( MIDTERM )}{NUM_STUDENTS} =
MIDTERM_AVG
The average student's score on the midterm was MIDTERM_AVG
.
Find each of the final exam scores represented by the orange bars.
label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" });
To find the average student's score on the final exam, add up the individual scores and divide by the number of students.
\dfrac{plus.apply( null, FINAL )}{NUM_STUDENTS} =
\dfrac{sum( FINAL )}{NUM_STUDENTS} =
FINAL_AVG
The average student's score on the final exam was FINAL_AVG
.
The average student's score was higher on the midterm
than on the final exam.
The average student's score was higher on the final exam
than the midterm.
The average student's score was the same on both the midterm
and the final exam.
randRange( 0, 1 )
[ "midterm", "final exam" ][ COLUMN ]
COLUMN === 0 ? mode( MIDTERM ) : mode( FINAL )
What was the mode for the TEST scores?
MODE
Use the key to figure out which of the two bars shows the scores for the TEST.
style({ stroke: PINK, fill: "none", strokeWidth: 2 });
ellipse( [ COLUMN * 3 + 1.2, -2.25 ], [ 1.5, 0.5 ] );
Find each of the TEST scores represented by the blueorange bars.
if ( COLUMN === 0 ) {
label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" });
} else {
label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" });
}
The mode is the most frequently occurring score.
MODE
is the most frequently occurring score.
if ( COLUMN === 0 ) {
if ( MIDTERM[ INDEX ] === MODE ) {
ellipse( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 - 0.5 ], [ 0.8, 0.6 ] );
}
} else {
if ( FINAL[ INDEX ] === MODE ) {
ellipse( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 - 0.5 ], [ 0.8, 0.6 ] );
}
}
randRange( 0, 1 )
[ "midterm", "final exam" ][ COLUMN ]
COLUMN === 0 ? Math.min.apply( null, MIDTERM ) : Math.min.apply( null, FINAL )
COLUMN === 0 ? Math.max.apply( null, MIDTERM ) : Math.max.apply( null, FINAL )
MAX - MIN
What is the range of the TEST scores?
RANGE
The range is the difference between the largest value and the smallest value.
Use the key to figure out which of the two bars shows the scores for the TEST.
style({ stroke: PINK, fill: "none", strokeWidth: 2 });
ellipse( [ COLUMN * 3 + 1.2, -2.25 ], [ 1.5, 0.5 ] );
Find the largest and smallest TEST scores represented by the blueorange bars.
if ( COLUMN === 0 ) {
if ( MIDTERM[ INDEX ] === MIN || MIDTERM[ INDEX ] === MAX ) {
label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" });
}
} else {
if ( FINAL[ INDEX ] === MIN || FINAL[ INDEX ] === MAX ) {
label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" });
}
}
The smallest TEST score is MIN
. The largest TEST score is MAX
.
Find the range by subtracting the smallest score from the largest score.
\qquad MAX - MIN = RANGE
The range of TEST scores is RANGE
.
randRange( 0, 1 )
[ "midterm", "final exam" ][ COLUMN ]
COLUMN === 0 ? Math.min.apply( null, MIDTERM ) : Math.min.apply( null, FINAL )
COLUMN === 0 ? Math.max.apply( null, MIDTERM ) : Math.max.apply( null, FINAL )
(MAX + MIN) / 2
What is the midrange of the TEST scores?
MIDRANGE
The midrange is halfway between the largest value and the smallest value.
Use the key to figure out which of the two bars shows the scores for the TEST.
style({ stroke: PINK, fill: "none", strokeWidth: 2 });
ellipse( [ COLUMN * 3 + 1.2, -2.25 ], [ 1.5, 0.5 ] );
Find the largest and smallest TEST scores represented by the blueorange bars.
if ( COLUMN === 0 ) {
if ( MIDTERM[ INDEX ] === MIN || MIDTERM[ INDEX ] === MAX ) {
label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" });
}
} else {
if ( FINAL[ INDEX ] === MIN || FINAL[ INDEX ] === MAX ) {
label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" });
}
}
The smallest TEST score is MIN
. The largest TEST score is MAX
.
Find the midrange by averaging the smallest and largest scores.
\qquad \dfrac{MIN + MAX}{2} = MIDRANGE
The midrange of TEST scores is MIDRANGE
.


From the newsletter ... |
|
Read the Instructions!I was trying to understand the tiny buttons on the new personal CD player. "I can't make it out", I thought, "it won't work". I got a brisk thought in reply: "If all else fails, get the manual...!" I quickly picked up a booklet but even that did not seem to help, and I got another brisk thought: "Are you sure you've got the right manual?" I hadn't, but a steady read of the right one solved the difficulties. I had been guilty of thinking I could solve all the problems on my own, and had only managed to waste time. Rather like driving along a strange route, not quite knowing where you are, when you really ought to have stopped and been humble enough to ask the way. These days this sort of thing seems to crop up in other circumstances too. Talk to people and they will have a lot to say about things that have gone wrong when they should have gone right, and nobody seems to know how to fix them. All sorts of unhappy things like violence, bad sex, failing marriages, drug dependency, crime rates, hooliganism and so on. Could it be that these days there is a general tendency to ignore our Maker's Instructions and think we can fix things ourselves with ideas that might seem more up to date and less restrictive? About this time of year in church we have "Bible Sunday" because of the fine old set prayer which starts "Blessed Lord, who has caused all holy Scripture to be written for our learning." A statement that does not go down too well in these PC days of looking askance at any concept that says there is an ultimate source of truth. True, the Bible is a very complex set of books. Some terribly difficult to make head or tale of, some with statements as neat and plain as you could wish for even if they are tough. "If all else fails, read the Instructions" and in this Maker's Manual you can find a lot of answers. Guidelines for bringing up children, running a good business, making a stable marriage, seeking healing, looking after one another, and so on. Even so, although you may have the right manual in your hand, it is often very helpful to be able to talk to someone who knows more about the matter than you do. Any computer user will tell you this. It is the same with God's instructions on life, and should you be badly stuck about the way forward in some problem or other, it might be worth coming to one or other of us at Cogges. There is a good chance we could say, "I see what you mean. I think it might be helpful to do this..." Cogges Parish | Other articles | Feedback © 2003; Published in Cogges Parish monthly newsletter, November 2003 |


Demo
Alert
Show alert with default title
Show alert with custom title
Confirmation
Show confirmation
Prompt
Show prompt


networkjs
- NetworkX clone in JavaScript
networkjs
[options ...] <file.csv>
networkjs
-s
|--source
sourceNode ...
networkjs
-t
|--target
targetNode ...
networkjs
-w
|--weight
weightNode ...
networkjs
-d
|--degree
<file.csv> ...
networkjs
-b
|--betweenness
<file.csv> ...
networkjs
-e
|--eigenvector
<file.csv> ...
networkjs
-h
|--help
NetworkJS is a JavaScript Network Library, heavily inspired by the popular python equivalent NetworkX.
networkjs
is a command line tool and it can also be used as a library through
npm. For the moment it supports three centrality measures on Graph networks, while
the end goal is to have complete coverage over NetworkX api's. It takes an input
<file.csv> which should be a comma separated csv file, and performs the calculations
based on options.
The --degree
,--betweenness
and --eigenvector
options calculates those measures
on the provided dataset. The --help
flag displays command line options
The networkjs
command expects one valid csv file, which should be comma separated,
for example file.csv
. This file should contain the edge list of a graph in the
format of Source,Target,Weight,..etc or can be provided by individual option flags
These options instruct networkjs
to run the centrality measures on the provided
dataset :
-s
,--source
sourceNodeProvide the column name for Source Node. Default value = "Source"
-t
,--target
targetNodeProvide the column name for Target Node. Default value = "Target"
-w
,--weight
weightNodeProvide the column name for Weight Node. Default value = "Weight"
-d
,--degree
Run Degree centrality measure over the given dataset, which is defined as the number of links incident upon a node. https://en.wikipedia.org/wiki/Centrality#Degree_centrality
-b
,--betweenness
Run Betweenness centrality measure over the given dataset, which for a node is defined as the number of times a node acts as a bridge along the shortest path between two other nodes. https://en.wikipedia.org/wiki/Centrality#Betweenness_centrality
-e
,--eigenvector
Run Eigenvector centrality measure over the given dataset, which calculates the influence of a node in the network. It assigns relative scores to all nodes in the network based on the concept that connections to high-scoring nodes contribute more to the score of the node in question than equal connections to low-scoring nodes. https://en.wikipedia.org/wiki/Centrality#Eigenvector_centrality
-v
,--verbose
Print detailed logs and events
-h
,--help
Display command line help usage for the methods available
Provide the dataset csv and run the analysis on them like this :
$ networkjs -d -e -b file.csv -s Source -t Target -w Weight
View the command line usage :
$ networkjs --help
View the man docs of networkjs
:
$ man networkjs
NetworkJS is written in NodeJS and hence requires NodeJS >= 0.4.3 to be installed in the system. For any bugs do file an issue to the public repository https://github.com/koustuvsinha/networkjs/issues
NetworkJS is MIT licensed https://koustuvs.mit-license.org/, (C) 2016 Koustuv Sinha http://koustuvsinha.github.io


HTML and CSS: Design and Build Websites
Author Name: Jon Duckett
A full-color introduction to the basics of HTML and CSS from the publishers of Wrox! Every day, more and more people want to learn some HTML and CSS. Joining the professional web designers and programmers are new audiences who need to know a little bit of code at work (update a content management system or e-commerce store) and those who want to make their personal blogs more attractive. Many books teaching HTML and CSS are dry and only written for those who want to become programmers, which is why this book takes an entirely new approach. Introduces HTML and CSS in a way that makes them accessible to everyone―hobbyists, students, and professionals―and it’s full-color throughout Utilizes information graphics and lifestyle photography to explain the topics in a simple way that is engaging Boasts a unique structure that allows you to progress through the chapters from beginning to end or just dip into topics of particular interest at your leisure This educational book is one that you will enjoy picking up, reading, then referring back to. It will make you wish other technical topics were presented in such a simple, attractive and engaging way!