public final class AlphaComposite extends Object implements Composite
AlphaComposite
class implements basic alpha
compositing rules for combining source and destination colors
to achieve blending and transparency effects with graphics and
images.
The specific rules implemented by this class are the basic set
of 12 rules described in
T. Porter and T. Duff, "Compositing Digital Images", SIGGRAPH 84,
253-259.
The rest of this documentation assumes some familiarity with the
definitions and concepts outlined in that paper.
This class extends the standard equations defined by Porter and
Duff to include one additional factor.
An instance of the AlphaComposite
class can contain
an alpha value that is used to modify the opacity or coverage of
every source pixel before it is used in the blending equations.
It is important to note that the equations defined by the Porter
and Duff paper are all defined to operate on color components
that are premultiplied by their corresponding alpha components.
Since the ColorModel
and Raster
classes
allow the storage of pixel data in either premultiplied or
non-premultiplied form, all input data must be normalized into
premultiplied form before applying the equations and all results
might need to be adjusted back to the form required by the destination
before the pixel values are stored.
Also note that this class defines only the equations for combining color and alpha values in a purely mathematical sense. The accurate application of its equations depends on the way the data is retrieved from its sources and stored in its destinations. See Implementation Caveats for further information.
The following factors are used in the description of the blending equation in the Porter and Duff paper:
Factor Definition As the alpha component of the source pixel Cs a color component of the source pixel in premultiplied form Ad the alpha component of the destination pixel Cd a color component of the destination pixel in premultiplied form Fs the fraction of the source pixel that contributes to the output Fd the fraction of the destination pixel that contributes to the output Ar the alpha component of the result Cr a color component of the result in premultiplied form
Using these factors, Porter and Duff define 12 ways of choosing
the blending factors Fs and Fd to
produce each of 12 desirable visual effects.
The equations for determining Fs and Fd
are given in the descriptions of the 12 static fields
that specify visual effects.
For example,
the description for
SRC_OVER
specifies that Fs = 1 and Fd = (1-As).
Once a set of equations for determining the blending factors is
known they can then be applied to each pixel to produce a result
using the following set of equations:
Fs = f(Ad) Fd = f(As) Ar = As*Fs + Ad*Fd Cr = Cs*Fs + Cd*Fd
The following factors will be used to discuss our extensions to the blending equation in the Porter and Duff paper:
Factor Definition Csr one of the raw color components of the source pixel Cdr one of the raw color components of the destination pixel Aac the "extra" alpha component from the AlphaComposite instance Asr the raw alpha component of the source pixel Adr the raw alpha component of the destination pixel Adf the final alpha component stored in the destination Cdf the final raw color component stored in the destination
The AlphaComposite
class defines an additional alpha
value that is applied to the source alpha.
This value is applied as if an implicit SRC_IN rule were first
applied to the source pixel against a pixel with the indicated
alpha by multiplying both the raw source alpha and the raw
source colors by the alpha in the AlphaComposite
.
This leads to the following equation for producing the alpha
used in the Porter and Duff blending equation:
As = Asr * AacAll of the raw source color components need to be multiplied by the alpha in the
AlphaComposite
instance.
Additionally, if the source was not in premultiplied form
then the color components also need to be multiplied by the
source alpha.
Thus, the equation for producing the source color components
for the Porter and Duff equation depends on whether the source
pixels are premultiplied or not:
Cs = Csr * Asr * Aac (if source is not premultiplied) Cs = Csr * Aac (if source is premultiplied)No adjustment needs to be made to the destination alpha:
Ad = Adr
The destination color components need to be adjusted only if they are not in premultiplied form:
Cd = Cdr * Ad (if destination is not premultiplied) Cd = Cdr (if destination is premultiplied)
The adjusted As, Ad, Cs, and Cd are used in the standard Porter and Duff equations to calculate the blending factors Fs and Fd and then the resulting premultiplied components Ar and Cr.
The results only need to be adjusted if they are to be stored back into a destination buffer that holds data that is not premultiplied, using the following equations:
Adf = Ar Cdf = Cr (if dest is premultiplied) Cdf = Cr / Ar (if dest is not premultiplied)Note that since the division is undefined if the resulting alpha is zero, the division in that case is omitted to avoid the "divide by zero" and the color components are left as all zeros.
For performance reasons, it is preferable that
Raster
objects passed to the compose
method of a CompositeContext
object created by the
AlphaComposite
class have premultiplied data.
If either the source Raster
or the destination Raster
is not premultiplied, however,
appropriate conversions are performed before and after the compositing
operation.
BufferedImage
class, do not store alpha values
for their pixels. Such sources supply an alpha of 1.0 for
all of their pixels.
BufferedImage.TYPE_BYTE_INDEXED
should not be used as a destination for a blending operation
because every operation
can introduce large errors, due to
the need to choose a pixel from a limited palette to match the
results of the blending equations.
Typically the integer values are related to the floating point values in such a way that the integer 0 is equated to the floating point value 0.0 and the integer 2^n-1 (where n is the number of bits in the representation) is equated to 1.0. For 8-bit representations, this means that 0x00 represents 0.0 and 0xff represents 1.0.
(A, R, G, B) = (0x01, 0xb0, 0x00, 0x00)
If integer math were being used and this value were being
composited in
SRC
mode with no extra alpha, then the math would
indicate that the results were (in integer format):
(A, R, G, B) = (0x01, 0x01, 0x00, 0x00)
Note that the intermediate values, which are always in premultiplied form, would only allow the integer red component to be either 0x00 or 0x01. When we try to store this result back into a destination that is not premultiplied, dividing out the alpha will give us very few choices for the non-premultiplied red value. In this case an implementation that performs the math in integer space without shortcuts is likely to end up with the final pixel values of:
(A, R, G, B) = (0x01, 0xff, 0x00, 0x00)
(Note that 0x01 divided by 0x01 gives you 1.0, which is equivalent to the value 0xff in an 8-bit storage format.)
Alternately, an implementation that uses floating point math might produce more accurate results and end up returning to the original pixel value with little, if any, roundoff error. Or, an implementation using integer math might decide that since the equations boil down to a virtual NOP on the color values if performed in a floating point space, it can transfer the pixel untouched to the destination and avoid all the math entirely.
These implementations all attempt to honor the same equations, but use different tradeoffs of integer and floating point math and reduced or full equations. To account for such differences, it is probably best to expect only that the premultiplied form of the results to match between implementations and image formats. In this case both answers, expressed in premultiplied form would equate to:
(A, R, G, B) = (0x01, 0x01, 0x00, 0x00)
and thus they would all match.
Composite
,
CompositeContext
| Modifier and Type | Field and Description |
|---|---|
static AlphaComposite |
Clear
AlphaComposite object that implements the opaque CLEAR rule
with an alpha of 1.0f. |
static int |
CLEAR
Both the color and the alpha of the destination are cleared
(Porter-Duff Clear rule).
|
static AlphaComposite |
Dst
AlphaComposite object that implements the opaque DST rule
with an alpha of 1.0f. |
static int |
DST
The destination is left untouched
(Porter-Duff Destination rule).
|
static int |
DST_ATOP
The part of the destination lying inside of the source
is composited over the source and replaces the destination
(Porter-Duff Destination Atop Source rule).
|
static int |
DST_IN
The part of the destination lying inside of the source
replaces the destination
(Porter-Duff Destination In Source rule).
|
static int |
DST_OUT
The part of the destination lying outside of the source
replaces the destination
(Porter-Duff Destination Held Out By Source rule).
|
static int |
DST_OVER
The destination is composited over the source and
the result replaces the destination
(Porter-Duff Destination Over Source rule).
|
static AlphaComposite |
DstAtop
AlphaComposite object that implements the opaque DST_ATOP rule
with an alpha of 1.0f. |
static AlphaComposite |
DstIn
AlphaComposite object that implements the opaque DST_IN rule
with an alpha of 1.0f. |
static AlphaComposite |
DstOut
AlphaComposite object that implements the opaque DST_OUT rule
with an alpha of 1.0f. |
static AlphaComposite |
DstOver
AlphaComposite object that implements the opaque DST_OVER rule
with an alpha of 1.0f. |
static AlphaComposite |
Src
AlphaComposite object that implements the opaque SRC rule
with an alpha of 1.0f. |
static int |
SRC
The source is copied to the destination
(Porter-Duff Source rule).
|
static int |
SRC_ATOP
The part of the source lying inside of the destination
is composited onto the destination
(Porter-Duff Source Atop Destination rule).
|
static int |
SRC_IN
The part of the source lying inside of the destination replaces
the destination
(Porter-Duff Source In Destination rule).
|
static int |
SRC_OUT
The part of the source lying outside of the destination
replaces the destination
(Porter-Duff Source Held Out By Destination rule).
|
static int |
SRC_OVER
The source is composited over the destination
(Porter-Duff Source Over Destination rule).
|
static AlphaComposite |
SrcAtop
AlphaComposite object that implements the opaque SRC_ATOP rule
with an alpha of 1.0f. |
static AlphaComposite |
SrcIn
AlphaComposite object that implements the opaque SRC_IN rule
with an alpha of 1.0f. |
static AlphaComposite |
SrcOut
AlphaComposite object that implements the opaque SRC_OUT rule
with an alpha of 1.0f. |
static AlphaComposite |
SrcOver
AlphaComposite object that implements the opaque SRC_OVER rule
with an alpha of 1.0f. |
static AlphaComposite |
Xor
AlphaComposite object that implements the opaque XOR rule
with an alpha of 1.0f. |
static int |
XOR
The part of the source that lies outside of the destination
is combined with the part of the destination that lies outside
of the source
(Porter-Duff Source Xor Destination rule).
|
| Modifier and Type | Method and Description |
|---|---|
CompositeContext |
createContext(ColorModel srcColorModel,
ColorModel dstColorModel,
RenderingHints hints)
Creates a context for the compositing operation.
|
AlphaComposite |
derive(float alpha)
Returns a similar
AlphaComposite object that uses
the specified alpha value. |
AlphaComposite |
derive(int rule)
Returns a similar
AlphaComposite object that uses
the specified compositing rule. |
boolean |
equals(Object obj)
Determines whether the specified object is equal to this
AlphaComposite . |
float |
getAlpha()
Returns the alpha value of this
AlphaComposite . |
static AlphaComposite |
getInstance(int rule)
Creates an
AlphaComposite object with the specified rule. |
static AlphaComposite |
getInstance(int rule,
float alpha)
Creates an
AlphaComposite object with the specified rule and
the constant alpha to multiply with the alpha of the source. |
int |
getRule()
Returns the compositing rule of this
AlphaComposite . |
int |
hashCode()
Returns the hashcode for this composite.
|
@Native public static final int CLEAR
Fs = 0 and Fd = 0, thus:
Ar = 0 Cr = 0
@Native public static final int SRC
Fs = 1 and Fd = 0, thus:
Ar = As Cr = Cs
@Native public static final int DST
Fs = 0 and Fd = 1, thus:
Ar = Ad Cr = Cd
@Native public static final int SRC_OVER
Fs = 1 and Fd = (1-As), thus:
Ar = As + Ad*(1-As) Cr = Cs + Cd*(1-As)
@Native public static final int DST_OVER
Fs = (1-Ad) and Fd = 1, thus:
Ar = As*(1-Ad) + Ad Cr = Cs*(1-Ad) + Cd
@Native public static final int SRC_IN
Fs = Ad and Fd = 0, thus:
Ar = As*Ad Cr = Cs*Ad
@Native public static final int DST_IN
Fs = 0 and Fd = As, thus:
Ar = Ad*As Cr = Cd*As
@Native public static final int SRC_OUT
Fs = (1-Ad) and Fd = 0, thus:
Ar = As*(1-Ad) Cr = Cs*(1-Ad)
@Native public static final int DST_OUT
Fs = 0 and Fd = (1-As), thus:
Ar = Ad*(1-As) Cr = Cd*(1-As)
@Native public static final int SRC_ATOP
Fs = Ad and Fd = (1-As), thus:
Ar = As*Ad + Ad*(1-As) = Ad Cr = Cs*Ad + Cd*(1-As)
@Native public static final int DST_ATOP
Fs = (1-Ad) and Fd = As, thus:
Ar = As*(1-Ad) + Ad*As = As Cr = Cs*(1-Ad) + Cd*As
@Native public static final int XOR
Fs = (1-Ad) and Fd = (1-As), thus:
Ar = As*(1-Ad) + Ad*(1-As) Cr = Cs*(1-Ad) + Cd*(1-As)
public static final AlphaComposite Clear
AlphaComposite
object that implements the opaque CLEAR rule
with an alpha of 1.0f.CLEAR
public static final AlphaComposite Src
AlphaComposite
object that implements the opaque SRC rule
with an alpha of 1.0f.SRC
public static final AlphaComposite Dst
AlphaComposite
object that implements the opaque DST rule
with an alpha of 1.0f.DST
public static final AlphaComposite SrcOver
AlphaComposite
object that implements the opaque SRC_OVER rule
with an alpha of 1.0f.SRC_OVER
public static final AlphaComposite DstOver
AlphaComposite
object that implements the opaque DST_OVER rule
with an alpha of 1.0f.DST_OVER
public static final AlphaComposite SrcIn
AlphaComposite
object that implements the opaque SRC_IN rule
with an alpha of 1.0f.SRC_IN
public static final AlphaComposite DstIn
AlphaComposite
object that implements the opaque DST_IN rule
with an alpha of 1.0f.DST_IN
public static final AlphaComposite SrcOut
AlphaComposite
object that implements the opaque SRC_OUT rule
with an alpha of 1.0f.SRC_OUT
public static final AlphaComposite DstOut
AlphaComposite
object that implements the opaque DST_OUT rule
with an alpha of 1.0f.DST_OUT
public static final AlphaComposite SrcAtop
AlphaComposite
object that implements the opaque SRC_ATOP rule
with an alpha of 1.0f.SRC_ATOP
public static final AlphaComposite DstAtop
AlphaComposite
object that implements the opaque DST_ATOP rule
with an alpha of 1.0f.DST_ATOP
public static final AlphaComposite Xor
AlphaComposite
object that implements the opaque XOR rule
with an alpha of 1.0f.XOR
public static AlphaComposite getInstance(int rule)
AlphaComposite
object with the specified rule.public static AlphaComposite getInstance(int rule, float alpha)
AlphaComposite
object with the specified rule and
the constant alpha to multiply with the alpha of the source.
The source is multiplied with the specified alpha before being composited
with the destination.rule
- the compositing rulealpha
- the constant alpha to be multiplied with the alpha of
the source. alpha
must be a floating point number in the
inclusive range [0.0, 1.0].IllegalArgumentException
- if
alpha
is less than 0.0 or greater than 1.0, or if
rule
is not one of
the following: CLEAR
, SRC
, DST
,
SRC_OVER
, DST_OVER
, SRC_IN
,
DST_IN
, SRC_OUT
, DST_OUT
,
SRC_ATOP
, DST_ATOP
, or XOR
public CompositeContext createContext(ColorModel srcColorModel, ColorModel dstColorModel, RenderingHints hints)
createContext
in interface Composite
srcColorModel
- the ColorModel
of the sourcedstColorModel
- the ColorModel
of the destinationhints
- the hint that the context object uses to choose between
rendering alternativesCompositeContext
object to be used to perform
compositing operations.public float getAlpha()
AlphaComposite
. If this
AlphaComposite
does not have an alpha value, 1.0 is returned.AlphaComposite
.public int getRule()
AlphaComposite
.AlphaComposite
.public AlphaComposite derive(int rule)
AlphaComposite
object that uses
the specified compositing rule.
If this object already uses the specified compositing rule,
this object is returned.rule
- the compositing ruleAlphaComposite
object derived from
this object that uses the specified compositing rule.IllegalArgumentException
- if
rule
is not one of
the following: CLEAR
, SRC
, DST
,
SRC_OVER
, DST_OVER
, SRC_IN
,
DST_IN
, SRC_OUT
, DST_OUT
,
SRC_ATOP
, DST_ATOP
, or XOR
public AlphaComposite derive(float alpha)
AlphaComposite
object that uses
the specified alpha value.
If this object already has the specified alpha value,
this object is returned.alpha
- the constant alpha to be multiplied with the alpha of
the source. alpha
must be a floating point number in the
inclusive range [0.0, 1.0].AlphaComposite
object derived from
this object that uses the specified alpha value.IllegalArgumentException
- if
alpha
is less than 0.0 or greater than 1.0public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
public boolean equals(Object obj)
AlphaComposite
.
The result is true
if and only if
the argument is not null
and is an
AlphaComposite
object that has the same
compositing rule and alpha value as this object.
equals
in class Object
obj
- the Object
to test for equalitytrue
if obj
equals this
AlphaComposite
; false
otherwise.Object.hashCode()
,
HashMap
Dracula Javadoc Sample, Made with Allan Im.


--- title: 20XX Magazine Website layout: project logo: 20XX/Screen Compare.png slug: 20XX image: 20XX-Dir.png order: 2 tagline: category: design tags: [UX/UI] ---
A 3-Month UX/UI Freelance Contract Job.
20XX magazine is a publication showcasing New York City culture, artists, and
events, focussing on native New Yorkers of color. 20XX magazine publishes
content digitally via Medium and released their first print issue in October
of 2020.
During initial discussions, we decided the magazine should represent the
future, with an aesthetic inspired by video games like Mega Man Battle Network,
Jet Set Radio and NieR:Automata. We wanted a clean and simple style, one
that is playful with fun animations and color choices.
Ahead of our initial design meeting, I asked Mathew, the magazine founder,
to put together a mood board to get a head start on conceptualizing the
visual/UI aspects of the site.
During the initial meeting, we decided the site should have a strong visual/UI focus. We also developed the idea of a navigational "AI" similar to "Clippy" from Microsoft Office to help guide the user around.
After this meeting to discuss goals and UI/UX strategy, I built a draft sitemap and wireframes, as well as some possible font/color choices.
Designed by Mathew L.
Title - Apex MK3 (Medium)
Tagline - Apex MK3 (Light)
SubHeader - Plat Nomor
Body - RobotoMono
After multiple meetings to go over the rough wireframes, sketches, and font/color choices, I drafted multiple designs using Adobe XD until we landed on a final design.
"2wen-t" Modeled by Jonathan Yuen
The 20XX Team and I created 2wen-t navigational assistant character design together. Additionally, I designed the navigational/UX interactions.
The site landing page displays the title and picture lead for a featured article. The user can drag to view this featured article or click the navigational assistant to view the article directory for additional articles.
On the Article Directory page, the user sees all articles published on the site and can use 2wen-t to query for specific content via a search feature.
The gallery section of the site contains image collections showcasing art and photography.
In retrospect, I felt the navigational assistant required some sort impactful cue to guide the user to click it. One idea I had was for a dialog box ("Hi, click me!") that would pop up when a user first visits the site.
Additionally, we later discovered that the magazine name was already in use. While the name had been chosen long before my tenure, I felt like it should be my goal to guide all my future clients on branding, even if outside my direct responsibilities.


|
Original New Zealand Cast |
The Duke of Plaza-Toro |
Mr. George Lauri |
Luiz |
Mr. William Rosevear |
Don Alhambra |
Mr. Howard Vernon |
Marco Palmieri |
Mr. Henry Bracy |
Giuseppe Palmieri |
Mr. Sydney Deane |
The Duchess of Plaza-Toro |
Miss Elsie Cameron |
Casilda |
Miss Florence Young |
Gianetta |
Miss Flora Graupner |
Tessa |
Miss Violet Varley |
|
REVIEW OF THE NZ PREMIERE OF 'THE GONDOLIERS' The large and excellent Comic Opera Company which J.C. Williamson has sent over to amuse and delight the inhabitants of this colony, made their bow to an Auckland audience, and opened their New Zealand tour in the Opera House last night receiving a welcome as enthusiastically hearty as it was thoroughly well deserved. It is true that, of late, the people of this city have had an almost an operabundance of amusements submitted to them, the demands upon their patronage having been consequently numerous, but if this had been so in far greater degree there could still be little doubt with regard to the prospects of our present entertainment. With a company so strong numerically and so talented individually triumphant success must always be assured, and no matter how near to satiety the theatre-going public may have approached, their power and brilliancy is certain to prove irresistibly attractive. It is not too much to say that almost every member of the vast combination, and unquestionably, each of the principals, is an artiste in his or her own particular line, and that in every respect - musically, dramatically, and otherwise - the company is one of the best that has yet visited the colony. The tour they have just begun will include the principal towns of New Zealand, and it may safely be assumed that, at its conclusion, the feeling throughout the length and breath of the land will be one of sincere gratitude to Mr. Williamson, and to the ladies and gentlemen whose acquaintance we owe to his enterprise. If their opening performance is a fair sample of their capabilities, Auckland and the places to be afterwards visited have, indeed, a treat in store. But their genuine merit is not the only claim, great as it is, which this company have upon the public. To their credit must also be added, the fact that they in their repertoire several famous operas never previously produced in New Zealand. In this category is the opera in which they appeared to a crowed house last night, and with which they won the unqualified admiration of their very large audience. "The Gondoliers" is the latest production of Gilbert and Sullivan, and although it is decidedly one of their best, and has attained a celebrity equal to any of its elder brothers, last night saw its first presentation on a New Zealand stage. It is almost a pity that the pleasure of hearing it has been denied us so long, but now that we have the opportunity it is our duty to ourselves to make the most of it. (There follows a lengthy description of the musical numbers and a brief outline of the plot) The interpretation of the opera by the company deserves nothing but commendation. Mr. Howard Vernon, who was accorded a most cordial reception, is in his element as the Grand Inquisitor, and acquits himself accordingly. He sings with all his customary power, and his acting is vivacious and amusingly effective. Miss Graupner and Miss Varley, both of whom are new to the colony, are really excellent as Gianetta and Tessa. These ladies sing sweetly and dance with nimble grace, and would be a valuable acquisition to any comic opera company. Miss Elsie Cameron and Miss Florence Young, also strangers to New Zealand, appear as the Duchess and her daughter respectively, and make the most of their music and parts. The Gondoliers are represented by Messrs. Henry Bracy and Sydney Deane, and both gentlemen have, by their first appearance here last night, already won their way to public favour by the merits of their performances. Mr. George Lauri is admirably suited as the Duke, and besides singing well, dances most gracefully. The part of Luiz, the rightful Monarch of Barataria, is judiciously entrusted to Mr. William Rosevear, and other characters have suitable representatives. The chorus is powerful and excellently trained, and a most efficient orchestra is under the able directorship of Mr. Leon Caron, and with all the attractions already named, there are also those of charming dresses, appropriate scenery, and appointments that are perfectly complete.
New Zealand Herald. Friday Sept 16th, 1892. |
|
NEWSFLASH: DR. BAKEWELL ON CHOLERA
A lecture was delivered in the hall of St. Patrick's Literary Institution by Dr. Bakewell last night on "Cholera! Its history, Symptoms, and Mode of Transmission". New Zealand Herald. Thursday September 15th 1892. |
|
MUSICAL AND DRAMATIC
The Italian Concert Company's season closed on Wednesday. Yesterday the company left for Gisborne. New Zealand Herald. Saturday September 17th 1892. |
| Back to the main review listings | Return to 'Down under in the 19th Century' |


1:00PM - 1:30PM
Wednesday 03/07/2018
Yann Cabon and Noah Sager
Link to: Online Presentation
Link to: Demos


Meaning is a tiny, fragile thing. The rules that define it are both arbitrary and ambiguous. Consider language - what made perfect sense 300 years ago is almost incomprehensible now, and what makes perfect sense now will be just as incoherent 300 years hence. And consider how many words there are in current, common use English. It’s a finite, if somewhat ill-defined number. But just imagine how many words could exist within the same phonological and morphological constraints. The number is enormous, perhaps even infinite. And all of them nonsense.


Pizza Builder
SIZE AND CRUST
CHEESE AND SAUCE
TOPPINGS
CHOOSE CHEESE & SAUCE
CHEESE?
CHOOSE A SAUCE
Cheese
Normal
Light
Extra
Double
Triple
Sauce
Robust Inspired Tomato Sauce
Normal
Light
Extra
Double
Triple
Hearty Marinara Sauce
Normal
Light
Extra
Double
Triple
BBQ Sauce
Normal
Light
Extra
Double
Triple
Garlic Parmesan White Sauce
Normal
Light
Extra
Double
Triple
Alfredo Sauce
Normal
Light
Extra
Double
Triple
BUILD
CANCEL


001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.shiro.event; 020 021/** 022 * An event bus can publish events to event subscribers as well as provide a mechanism for registering and unregistering 023 * event subscribers. 024 *
 025 * An event bus enables a publish/subscribe paradigm within Shiro - components can publish or consume events they 026 * find relevant without needing to be tightly coupled to other components. This affords great 027 * flexibility within Shiro by promoting loose coupling and high cohesion between components and a much safer pluggable 028 * architecture. 029 *
Sending Events
 030 * If a component wishes to publish events to other components: 031 *
 032 * MyEvent myEvent = createMyEvent(); 033 * eventBus.publish(myEvent); 034 *
 035 * The event bus will determine the type of event and then dispatch the event to components that wish to receive 036 * events of that type. 037 *
Receiving Events
 038 * A component can receive events of interest by doing the following. 039 *
 040 *
For each type of event you wish to consume, create a public method that accepts a single event argument. 041 * The method argument type indicates the type of event to receive.
 042 *
Annotate each of these public methods with the {@link org.apache.shiro.event.Subscribe Subscribe} annotation.
 043 *
Register the component with the event bus: 044 *
 045 * eventBus.register(myComponent); 046 *
 047 *
 048 *
 049 * After registering the component, when when an event of a respective type is published, the component's 050 * {@code Subscribe}-annotated method(s) will be invoked as expected. 051 *
 052 * This design (and its constituent helper components) was largely influenced by 053 * Guava's EventBus 054 * concept, although no code was viewed/copied/imported (even though Guava code is Apache 2.0 licensed and could have 055 * been used). 056 * 057 * @since 1.3 058 */ 059public interface EventBus { 060 061 /** 062 * Publishes the specified event to an event subsystem that will deliver events to relevant {@link Subscribe}rs. 063 * 064 * @param event The event object to distribute to relevant subscribers. 065 */ 066 void publish(Object event); 067 068 /** 069 * Registers all event handler methods on the specified instance to receive relevant events. The handler methods 070 * are determined by the {@code EventBus} implementation, typically by using an 071 * {@link org.apache.shiro.event.support.EventListenerResolver EventListenerResolver} 072 * (e.g. {@link org.apache.shiro.event.support.AnnotationEventListenerResolver AnnotationEventListenerResolver}). 073 * 074 * @param subscriber the object whose event handler methods should be registered to receive events. 075 */ 076 void register(Object subscriber); 077 078 /** 079 * Unregisters all previously-registered event handler methods on the specified instance. If the specified object 080 * was not previously registered, calling this method has no effect. 081 * 082 * @param subscriber the previously 083 */ 084 void unregister(Object subscriber); 085}


The UVa Online Judge, hosted by the University of Valladolid, hosts hundreds of problems similar to the ones used in programming contests. This is one of the most popular online judges used for honing people's programming and algorithmic skills.
| Universidad de Valladolid OJ (UVa) | ||||
|---|---|---|---|---|
| Rank | Name | Submissions | ||
| AC | WA | TL | ||
The ACM-ICPC Live Archive hosts hundreds of problems used in the ACM-ICPC Regionals and World Finals.
| Baylor University OJ (LA) | ||||
|---|---|---|---|---|
| Rank | Name | Submissions | ||
| AC | WA | TL | ||
Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems. Project Euler exists to encourage, challenge, and develop the skills and enjoyment of anyone with an interest in the fascinating world of mathematics.
| Project Euler (Euler) | ||
|---|---|---|
| Rank | Name | Solved |
You can type a UVa problem ID in the text box below and check which persons in that ranklist solved that problem.
You can type an LA problem ID in the text box below and check which persons in that ranklist solved that problem.
Problems solved during the mock competitions every Saturday are shown here. You can download the problem statements and their corresponding judge input and output. All of the problems from the competitions are taken from past ACM ICPC competitions among the Preliminary, Regional, and World Final events.
You can edit or add mock information here.
You need help?
Great.
There are three submenus in this website. The first is the "Online Judges" one. You will see here the ranks of each member of the Guild relative to each other. The "Problem Compare" submenu lets you type a list of problem IDs and check the people who solved those problems. Use that to find out which problems you can probably solve, or problems other can't solve yet.
This site shows the real-time rankings of UPPG members in several popular competitive coding online judges. Click on the sidebar menu to pick an online judge rank.
For correspondence related to this web application, you can e-mail Carl's UPPG mail account. Send a mail if you want to add or correct your own usernames in the ranklist, provided that you're part of the Guild. You can also suggest other OJs to add as long as they have an API for the number of problems solved.


DBS branch in Hong Kong not damaged by fire seen in online video
SINGAPORE: A DBS bank branch in Hong Kong was not damaged by a fire that broke out in a neighbouring unit.
Replying to CNA's queries on Wednesday (Nov 13), a spokesperson from the Singapore bank added that the employees of the branch were safe.
READ: In photos: Hong Kong university campuses burn as student protesters battle police
READ: Student protesters dig in on university campus, chaos erupts around Hong Kong
A video of the fire, which lasts for more than a minute, shows a shop unit next to a DBS branch engulfed in flames.
The fire happened on Yee Wo Street in Causeway Bay on Tuesday night. One person is seen in the video trying to extinguish the flames with a bucket of water.
According to HK01.com, protesters had set fire to the unit at around 11pm.
Thick smoke rose up all the way to the top of the residential building and explosions were also heard during the incident, reported the local news outlet.
Firefighters took around five minutes to extinguish the flames.
The unidentified shop, which had no signboard, was boarded up before the fire, reported HK01.com.
When CNA arrived at the scene on Wednesday evening, the bank outlet was temporarily closed from 4pm.
A notice posted on the glass window said that customers were advised to use online or mobile banking services.
Access to the ATM machine outside the branch, which is normally 24/7, was also temporarily unavailable.
Only the bank exterior seemed to be affected by the blaze.
Protests in Hong Kong continue to cause widespread disruption. On Wednesday, it was announced that there will be a suspension of classes on Thursday due to "transportation and safety reasons".
This comes after protesters fought intense battles with riot police on a university campus on Tuesday night.
The epicentre was the Chinese University of Hong Kong in the New Territories where the usually placid hillside grounds were turned into a battlefield for hours.
This was part of the largely anonymous protest movement's new strategy of "blossom everywhere", in which small groups of people target as many parts of the city as possible to cause maximum disruption and stretch police resources.
Additional reporting by Afifah Ariffin.


| DOSE: T+ 0:00 |
1 repeated |
oral |
Alcohol |
|
| T+ 0:00 |
20 mg |
insufflated |
2C-T-2 |
(powder / crystals) |
| T+ 0:10 |
20 mg |
insufflated |
2C-T-2 |
(powder / crystals) |
I'm a very experienced psychedelic user, having taken most drugs in circulation and combinations of them. This experience, however, was quite unlike anything I've done before. I began the night, as usual, by getting quite drunk. Once the party died off, my friend suggested that I insufflate some 2c-T2 to determine the effects. Iíve tried 2c-I and 2c-B, and figured that this experience would be relatively the same. Wrong!
T=0: I snorted roughly 20mg through one nostril. The pain was unreasonably severe; even drunk I needed a pen to bite down on as a gag. Tears flowed from my eyes, and I just laughed at myself for submitting to this much pain.
T+10m: My friend took about 15mg orally, and then gave me another 20mg to snort. (We tend to do drugs in really high doses, considering ourselves experienced enough to go farther than is recommended.) Once again, the pain was incredibly intense, but it subsided quite quickly.
T+20m: Iím sitting on the couch. Besides feeling pretty winded, Iíve had one or two very intense but quick hallucinations. Both of them involved sudden distortions of location: it seemed as if the room spiraled around and crumpled up for only a second or two.
T+30m: My body has begun quivering and shaking to a degree that I previously would have considered life-threatening. I have no control whatsoever over my motor functions, and the shaking has become so pronounced that Iím unable to hold a glass of water without spraying it everywhere. This is the first time to date that Iíve lost control of my body. Only by standing up really quickly and focusing on my location am I able to stop shaking. Presently, I vomit uncontrollably into a bucket, expelling nearly a gallon of fluid. After this, my body feels better but the quivering grows more intense.
T+40m Ė T+2h: During this time period, I began to stutter. I donít mean mild stuttering. I mean full blown chattering, without any hope of actual communication. Iíve never stuttered before, and never quite understood the mechanism that makes it happen.  I could not be silent, because I had no control over my vocal chords. Fortunately, I was able to communicate in fragments by writing in a notepad. My mind was close to normal, but it was a real head trip to be stuck in a quivering sack of flesh and blood hopelessly repeating:
ďT-t-tut-t-t-t-t-t-t-t-t-t-t-t-tut-t-t-t-t-t-t-t-t-tut-t-t-t-t-t.Ē
Although I was an entertaining prospect for my three friends, it was quite humiliating and frustrating.
T+2.5h: Iíve grown so embarrassed and angry at my uncontrollable stuttering that I seek a release. The friend who also ingested 2c-T2 suggested we smoke some Hash. After one long drag from the pipe, my stutter completely disappears. Thank god! We look at a picture on the computer screen, and with lots of concentration, I find it is possible to see hidden pictures WITHIN the picture. Most of them are frightening to me, mainly because Iím on edge from having taken such a large dose.
T+2.75h: It is now 3:00, and although my body is tired, my mind is not.  After a few seconds of shut eye, both of us bolt up and stare at each other intently. We have both simultaneously realized that 2c-T2 is all about CLOSED EYE VISUALS.
T+2.75h Ė T+7h: The past 4.25 hours have been a journey that I could never forget, if only I could remember. These visuals that I experienced while half asleep and half awake were by far and away the most intense I can remember, besides of course DMT. By concentrating hard on a location, I could see it perfectly even with eyes closed. Needless to say, I was exploring completely unreached depths in my brain until mid-morning. Iíd love to relate some of the hallucinations, but they were so vivid and confusing that I found it hard to use words to describe them.
Epilogue: From T+7:15 to T+13:00, I sleep peacefully and normally. Waking up, I know exactly what happened but am unable to remember specific hallucinations. All in all, I found this to be a very new and different experience, on a different level than most of my trips due to the unspeakably huge body load. I would do this again, maybe when I am able to cope with a rather derisive blow to my ego.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Virus Name
Accession ID
Location
Date
Age
Gender
Submission Lab
COVID19 2019/2020 Tracking
selected out of
records |
Reset All
Gender
reset
Year
reset
Month
reset
Age
reset
Geographical Locations
Light
Dark
Satellite
Street
Toggle cluster edges
Nucleotide Differences
RAxML Phylogenetic Tree
Current clusters |


System requirements (example)¶
To run the Object Storage service for Rackspace Private Cloud Powered By OpenStack (RPCO), your system must meet the following requirements.
Hardware¶
Each node in the cluster must meet the following minimum specifications:
- Six SAS drives of at least 1 TB capacity each
- One core for every 3 TB of drive capacity
- Two GB RAM, plus an additional 250 MB RAM for every TB of drive capacity
The amount of disk space depends on how much can fit into the rack efficiently.
Object Storage is designed to run on commodity hardware. At Rackspace, storage servers are generic 4U servers with 24 2-TB SATA drives and 8 cores of processing power. RAID on the storage drives is not required and is not recommended. The disk usage pattern of Object Storage is unsuitable for RAID.
Operating system¶
Object Storage in RPCO runs on the Ubuntu operating system.
Software¶
Object Storage in RPCO requires the following components of Rackspace Private Cloud v13:
- Identity (keystone)
- Infrastructure services (SQLite database, Memcached, and RabbitMQ)
Networking¶
One Gbps or 10 Gbps is suggested internally. An external network should connect anything external to the proxy servers. The storage network is intended to be isolated on a private network or multiple private networks.
Database¶
A SQLite database is part of the Object Storage for RPCO container and account management process.
Permissions¶
Object Storage for RPCO can be installed with either root permissions or
as a user with sudo permissions if the sudoers
file is configured to
enable all the permissions.


[
°/
°]
Temperature
°
Feels Like
°
Wind
Rain
km/h
Gust
km/h
mm
since 9am
Humidity
Pressure
%
Dew Point:
°
-
hPa
Last updated:
Refresh


class Builder : ObjectBuilder<Card>
Used to create a Card object with the user's card details. To create a Card with a Stripe token (e.g. for Google Pay), use Card.create.
<init> |
Used to create a Card object with the user's card details. To create a Card with a Stripe token (e.g. for Google Pay), use Card.create. Builder() |
build |
fun build(): Card |
setCvc |
fun setCvc(cvc: String?): Builder |
setExpiryMonth |
fun setExpiryMonth(expiryMonth: Int?): Builder |
setExpiryYear |
fun setExpiryYear(expiryYear: Int?): Builder |
setNumber |
fun setNumber(number: String?): Builder |


|
BL3 SDK
0.0.1
Borderlands 3 Class Documentation
|
#include <BL3_ClothingSystemRuntime_structs.hpp>
Public Attributes | |
| EClothingWindMethod | WindMethod |
| unsigned char | UnknownData00 [0x3] |
| struct FClothConstraintSetup | VerticalConstraintConfig |
| struct FClothConstraintSetup | HorizontalConstraintConfig |
| struct FClothConstraintSetup | BendConstraintConfig |
| struct FClothConstraintSetup | ShearConstraintConfig |
| float | SelfCollisionRadius |
| float | SelfCollisionStiffness |
| float | SelfCollisionCullScale |
| struct FVector | Damping |
| float | Friction |
| float | WindDragCoefficient |
| float | WindLiftCoefficient |
| struct FVector | LinearDrag |
| struct FVector | AngularDrag |
| struct FVector | LinearInertiaScale |
| struct FVector | AngularInertiaScale |
| struct FVector | CentrifugalInertiaScale |
| float | SolverFrequency |
| float | StiffnessFrequency |
| float | GravityScale |
| float | TetherStiffness |
| float | TetherLimit |
| float | CollisionThickness |
| float | AnimDriveSpringStiffness |
| float | AnimDriveDamperStiffness |
| struct FVector AngularDrag |
| struct FVector AngularInertiaScale |
| float AnimDriveDamperStiffness |
| float AnimDriveSpringStiffness |
| struct FClothConstraintSetup BendConstraintConfig |
| struct FVector CentrifugalInertiaScale |
| float CollisionThickness |
| struct FVector Damping |
| float Friction |
| float GravityScale |
| struct FClothConstraintSetup HorizontalConstraintConfig |
| struct FVector LinearDrag |
| struct FVector LinearInertiaScale |
| float SelfCollisionCullScale |
| float SelfCollisionRadius |
| float SelfCollisionStiffness |
| struct FClothConstraintSetup ShearConstraintConfig |
| float SolverFrequency |
| float StiffnessFrequency |
| float TetherLimit |
| float TetherStiffness |
| unsigned char UnknownData00[0x3] |
| struct FClothConstraintSetup VerticalConstraintConfig |
| float WindDragCoefficient |
| float WindLiftCoefficient |
| EClothingWindMethod WindMethod |


| DAY/PERIOD | 1 | 2 | 3 | 4 | 5 | ||
|---|---|---|---|---|---|---|---|
| MON | ASSEMBLY | ENGLISH | TIFFIN | HINDI | EVS | STORY/RHYMES/ELOCUTION PROJECTOR | PHONETIC & PRACTICE |
| TUE | ASSEMBLY | ENGLISH | TIFFIN | MATHS | HINDI | ACTIVITY | PHONETIC & PRACTICE |
| WED | ASSEMBLY | MATHS | TIFFIN | ENGLISH | EVS | ACTIVITY | EVS PRACTICE/PROJECTOR |
| THU | ASSEMBLY | SWIMMING | TIFFIN | MATHS | CONVERSATION/MORAL TEACHING | GAMES | MENTAL MATHS |
| FRI | ASSEMBLY | SWIMMING | TIFFIN | HINDI | COMPUTER | DRAWING/ART/CRAFT | MATRA & PRACTICE |


Anti-Semitism and Rationality
22 May 2015There are many disturbing revelations about President Obama’s thinking in his latest interview with Jeffrey Goldberg. The most glaring of these was that the President does not seem to understand how anti-Semitism and racism affect the actions of those with such views. Goldberg does, but does not pursue this very important issue after Obama explains his indefensible position:
It’s been my [Goldberg’s] belief that it is difficult to negotiate with parties that are captive to a conspiratorial anti-Semitic worldview not because they hold offensive views, but because they hold ridiculous views. As Walter Russell Mead and others have explained, anti-Semites have difficulty understanding the world as it actually works, and don’t comprehend cause-and-effect in politics and economics. Though I would like to see a solid nuclear deal (it is preferable to the alternatives) I don’t believe that the regime with which Obama is negotiating can be counted on to be entirely rational.
Obama responded to this theory by saying the following: “Well the fact that you are anti-Semitic, or racist, doesn’t preclude you from being interested in survival. It doesn’t preclude you from being rational about the need to keep your economy afloat; it doesn’t preclude you from making strategic decisions about how you stay in power; and so the fact that the supreme leader is anti-Semitic doesn’t mean that this overrides all of his other considerations. You know, if you look at the history of anti-Semitism, Jeff, there were a whole lot of European leaders—and there were deep strains of anti-Semitism in this country—”
I interjected by suggesting that anti-Semitic European leaders made irrational decisions, to which Obama responded, “They may make irrational decisions with respect to discrimination, with respect to trying to use anti-Semitic rhetoric as an organizing tool. At the margins, where the costs are low, they may pursue policies based on hatred as opposed to self-interest… And so I think it is not at all contradictory to say that there are deep strains of anti-Semitism in the core regime, but that they also are interested in maintaining power, having some semblance of legitimacy inside their own country, which requires that they get themselves out of what is a deep economic rut that we’ve put them in, and on that basis they are then willing and prepared potentially to strike an agreement on their nuclear program.”
This is where Obama’s fatal flaw in understanding anti-Semitism lies and where Goldberg fails to educate him because he completely downplayed how virulent anti-Semitism affects those in power. It wasn’t just that some anti-Semitic European leaders made irrational decisions “at the margins where costs are low.” Towards the end of the Second World War, as it became clear to the Nazi leadership they were going to lose the war, the rational choice for self-preservation would have been to divert all their resources to the war effort. Instead of wasting men, money, trains and time on exterminating Jews, it would have been rational and certainly not marginal, to divert most if not all of this toward stopping or slowing the allied advance.
 In the mind of Adolf Hitler, Nazi Germany was not only engaged in a war with the Allies, but with world Jewry that, according their their perverted ideology, was the cause of all of Germany’s ills. In their mind, even if they couldn’t win the war against the Allies, at least they could try to win the war against the Jews and make sure that post-war Germany would still be Judenrein. In this mindset, it was still rational to weaken their military forces if it meant they could kill more Jews because in this way, even if the Third Reich fell, Germany would still have its victory over the Jews.
While President Obama says the Iranian leadership suffers from venomous anti-Semitism, he fails to draw the necessary conclusions from this and Goldberg fails to stand up to him.
What many fail to recognize about anti-Semites and other racists is not that they are irrational, but that they are in fact very rational within the context of their own hateful ideologies. So being anti-Semitic doesn’t “preclude” you from being interested in self-preservation, but it does preclude you from understanding self-preservation according to the same rationale we do. If you believe there is a secret cabal of Jews out to destroy the Muslim world through their domination of world governments, the media and banks, you might justifiably (in the eyes of an anti-Semite, that is) decide it is better to suffer economically and even militarily, in order to stop that nefarious plot by nuking the state behind it all. If you do, you’ll be a hero who suffered temporary loses but in fact saved the world from the evil Jews.
Goldberg makes a feeble attempt to point this out, but in the end the President is so set on reaching this deal and so convinced that deep down even anti-Semites are rational just like we are that he refuses to see what is right in front of him. And once again it is the Jews that will pay the price. __


- Technical
- Add Some Class to Your Life with Ruby
If you liked it you should have put a Ruby on it...
Who doesn't like a good Beyoncé joke? Honestly, I couldn't think of a better way to start off this post about class, without a reference to the classiest woman I don't know.
Dude, just start already. That song was like so 3 years ago, and so was that joke.
Well, I always like to start at the beginning. I will assume that you, the reader, has knowledge of Ruby as a programming language (limited to the basic data types: array, hash, string, integer, float, etc...). If you don't know what I'm talking about please go do some research on all of those things, then read all previous blog posts on this blog. I mean it. Do not read on.
But, back to the lecture at hand...there is some really great news, some pretty mediocre news, and some kinda bad news that awaits you.
The Kinda Bad
Why start off with the bad news? Well, aside from me being a pessimist, I think there is a valuable piece of news to learn right away.
But don't worry. The good news is next!The Really Good
You might want to take a seat because I am about to blow your mind! If you are familiar with the data types I listed above then you are already familiar with classes in Ruby! Each of those object is a class. An array is a class. A string is a class. A hash is a class. What classes allow you to do is define a blueprint, an outline if you will, of attributes and methods that are specific to that class, thus allowing the creation of a group of objects that are the same type. Without further ado, sit back, relax, 'cause it's time to get classy!
The Pretty Mediocre
And by pretty mediocre I mean the meat and potatoes of what you need to know. We will explore how a Ruby class can help us implement a Car class. An object of type car will have attributes of size, color, mileage, and year. We can represent this in the form of a hash. See below:
pinto = {
size: "compact",
color: "brown",
mileage: 250000,
year: 1978
}
=> {:size=>"compact", :color=>"brown", :mileage=>250000, :year=>1978}
Cool! Let's now take a second to define our class. First, a note about naming classes: names should be capitalized with no spaces and/or underscores (ex: Car, ShoppingCart). The keyword class
should come before the class name, and the class should end with the keyword end
.
class Car
end
Perhaps the most important method in a class is the constructor method, which is named initialize
. This is how Ruby knows exactly what to store in an object of that particular class, and what to name the values. Remember the hash of values that represented a Pinto? We will put them to use below:
class Car
def initialize(params)
@size = params[:size]
@color = params[:color]
@mileage = params[:mileage]
@year = params[:year]
end
end
Woah dude, what is the @ symbol doing next to those names? And why are we passing an argument called params to the initialize method? You're right, we need to take a step back! The params is just a place holder name for whatever we pass to our constructor method. The great thing about building a class is that you can pass a hash, which has key-value pairs, to the constructor which greatlty improves readibility and provides more flexibility if we want to change the input down the road. Let's say we start tracking the price of a Car, all we would need to do is add this line of code to our initialize method: @price = params[:price]
. This also allows the creation of a Car object without knowing the exact order of the arguments. The @ symbol represents an instance variable, which is unique to that instance of Car (a Pinto and a Tesla don't share the same size or year).
Now it's time to start using our class to create an instance of Car. We will go ahead and create a Pinto!
pinto = Car.new(pinto)
=> #<Car:0x007fe7319590f0 @size="compact", @color="brown", @mileage=250000, @year=1978>
Success! We now have an instance of Car class that represents a Pinto. Let's create another instance/object, this time something more exciting...
tesla = Car.new(year: 2015, size: "sedan", color: "black")
=> #<Car:0x007fe73194aff0 @size="sedan", @color="black", @mileage=nil, @year=2015>
Wow, a Tesla! But you didn't pass a hash, and mileage is set to nil...what's going on here? Passing a hash of values to a class is such common place in Ruby, it magically takes care of the assignment for you, you just need to list out the key-value pairs. Let's try to set the mileage of our Tesla to 0.
tesla.mileage = 0
=> NoMethodError: ...
Hmmm...what's going on here? The problem before us is that we have yet to define any methods for our Car class. Let's do that now.
class Car
attr_writer :mileage
def initialize(params)
...
end
end
tesla.mileage = 0
=> 0
Well now, that's sensational! That one little line of code allows us to set a new value to our Tesla! Amazing! There is also attr_reader
which will allow you to return the value of mileage, and attr_accessor
which will allow you to both read and write a given attribute of a class. What if we want to be able to drive our Car instances, which would increase our mileage. Follow along below:
class Car
attr_accessor :mileage
...
def drive(miles)
self.mileage += miles
end
end
tesla.drive(300)
tesla.mileage
=> 300
tesla.drive(33)
tesla.mileage
=> 333
Sweet! We can now track the mileage for an instance of Car. This is accomplished through an instance method. By calling the drive method on the tesla object, we are able to operate on that given object. We use the keyword self
inside of an instance method to represent the object that we are calling the instance method on, which allows us to modify the value of mileage.
Well, there you have it. Tell me you're feeling a little classier?? Just enough knowledge to be dangerous. If you break your computer, it's not my fault. When in doubt, google it out.


Linux ivp for EDT
Yes I know that there are other Linux distributions around but I am a big fan of debian in general and ubuntu in particular. These instruction are run against a Amazon EC2 t2.micro instance running ubuntu 14.04 trusty server.
Yes I know that there are other Linux distributions around but I am a big fan of debian in general and ubuntu in particular. These instruction are run against a Amazon EC2 t2.micro instance running ubuntu 14.04 trusty server.
If you are a Linux user then you must already know a little bit about shells, ssh and how to use the command line. If not you probably want to use a different platform as your dance floor.
Let's start a shell and validate the ability to run git from the command prompt:
$ git The program 'git' is currently not installed. You can install it by typing: sudo apt-get install git
So I guess it not there. Let's do what it says and install git.
$ sudo apt-get install -y git sudo: unable to resolve host ip-172-30-0-110 Reading package lists... Done Building dependency tree ⋮ 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 3,346 kB of archives. After this operation, 21.6 MB of additional disk space will be used. Do you want to continue? [Y/n] y ⋮ Setting up git (1:1.9.1-1ubuntu0.1) ... $ git --version git version 1.9.1
So we got some git. Let's get EDT.
$ git clone https://github.com/codemarc/ElectricDiscoTech Cloning into 'ElectricDiscoTech'... remote: Counting objects: 241, done. remote: Compressing objects: 100% (17/17), done. remote: Total 241 (delta 3), reused 0 (delta 0), pack-reused 223 Receiving objects: 100% (241/241), 4.34 MiB | 0 bytes/s, done. Resolving deltas: 100% (94/94), done. Checking connectivity... done.
Now let's see which version of npm is installed:
$ npm -v The program 'npm' is currently not installed. You can install it by typing: sudo apt-get install npm
This error message is a little misleading. The real problem is that I forgot to install Node.js which includes npm. There are a variety of ways to get Node.js working on Linux. I like to use a package manager, for ubuntu:
$ curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - ## Installing the NodeSource Node.js 4.x LTS Argon repo... ## Populating apt-get cache... + apt-get update ⋮ ## Confirming "trusty" is supported... ## Adding the NodeSource signing key to your keyring... ## Creating apt sources list file for the NodeSource Node.js 4.x LTS Argon repo... ## Running `apt-get update` for you... ⋮ Fetched 6,624 B in 3s (2,200 B/s) Reading package lists... Done ## Run `apt-get install nodejs` (as root) to install Node.js 4.x LTS Argon and npm
$ sudo apt-get install -y nodejs get install -y nodejs Reading package lists... Done Building dependency tree Reading state information... Doneq The following extra packages will be installed: libicu52 rlwrap The following NEW packages will be installed: libicu52 nodejs rlwrap 0 upgraded, 3 newly installed, 0 to remove and 70 not upgraded. Need to get 13.6 MB of archives. After this operation, 61.6 MB of additional disk space will be used. ⋮ update-alternatives: using /usr/bin/rlwrap to provide /usr/bin/readline-editor (readline-editor) in auto mode Setting up nodejs (4.2.2-2nodesource1~trusty1) ... Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
So assuming everything went right we should be able to test npm
$ npm -v 2.14.7
You can update npm using npm.
$ sudo npm install -g npm /usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js<EMAIL_ADDRESS>/usr/lib/node_modules/npm $ npm -v 3.5.0
bower is billed as a package manager for the web. What it saves you from is endless hours of searching for source components. If you know the name of a component and its author has created a package for it (most popular components have the by now) then all you need to do to grab a copy using: bower install <package>
To install or update bower run:
$ sudo npm install -g bower ⋮ $ bower -version 1.6.8


This text is displayed if your browser does not support HTML5 Canvas.
This text is displayed if your browser does not support HTML5 Canvas.
This text is displayed if your browser does not support HTML5 Canvas.
Done


| Interfaces |
| XAnimatedSprite |
This interface can be used to control an animated sprite object. |
| XAnimation |
This interface defines an animation sequence. |
| XBezierPolyPolygon2D |
This is a specialized interface for a 2D poly-polygon containing
straight line and bezier segments. |
| XBitmap |
This is a generic interface to a bitmap. |
| XBitmapCanvas |
This is a specialization of the canvas interface for bitmapped
canvases. |
| XBitmapPalette |
Interface to access the palette of a color-indexed bitmap.
|
| XBufferController |
Interface providing access to double/multi-buffer facilities of
screen devices. |
| XCachedPrimitive |
Interface for cached repaint of already drawn XCanvas
primitives. |
| XCanvas |
Central interface for rendering. |
| XCanvasFont |
This interface provides access to a specific, XCanvas-dependent
font incarnation. This font is not universally usable, but belongs
to the XCanvas it was queried from.
|
| XColorSpace |
Information how to interpret certain color data. |
| XCustomSprite |
Interface to control a custom sprite object on a XSpriteCanvas. |
| XGraphicDevice |
This interface provides access to a graphic device, such as a
printer, or a screen device. Every canvas ( |
| XHalfFloatBitmap |
Specialized interface for bitmaps containing half floats as their
color components. |
| XHalfFloatReadOnlyBitmap |
Specialized interface for bitmaps containing half floats as their
color components. Half floats are 16 bit wide, and some high-end
GPUs already have them as supported frame buffer format. In
contrast to XHalfFloatBitmap, this interface only
permits read-only access. |
| XIeeeDoubleBitmap |
This is a specialized interface for bitmaps containing IEEE
doubles for their color components. |
| XIeeeDoubleReadOnlyBitmap |
This is a specialized interface for bitmaps containing IEEE
doubles for their color components. In contrast to
XIeeeDoubleBitmap, this interface only permits
read-only access. |
| XIeeeFloatBitmap |
Specialized interface for bitmaps containing IEEE floats as their
color components. |
| XIeeeFloatReadOnlyBitmap |
Specialized interface for bitmaps containing IEEE floats as their
color components. In contrast to XIeeeFloatBitmap,
this interface only permits read-only access. |
| XIntegerBitmap |
This is a specialized interface for bitmaps having integer color
channels. |
| XIntegerBitmapColorSpace |
A color space for integer bitmap formats |
| XIntegerReadOnlyBitmap |
This is a specialized interface for bitmaps having integer color
channels. In contrast to XIntegerBitmap, this
interface only permits read-only access. |
| XLinePolyPolygon2D |
Specialized interface for a 2D poly-polygon containing only straight line segments.
|
| XParametricPolyPolygon2D |
Interface to a dynamic poly-polygon generator, that generates
poly-polygons depending on a given parameter value. |
| XPolyPolygon2D |
Generic interface for poly-polygons in 2D.
|
| XSimpleCanvas |
Provides the basic graphical output operations for a canvas. |
| XSprite |
Interface to control a sprite object. |
| XSpriteCanvas |
Specialization of a XBitmapCanvas, where moving, animated objects
(called sprites) are supported. |
| XTextLayout |
This is the central interface for text layouting. |
| XVolatileBitmap |
This is a specialized interface to a volatile bitmap (which can
become invalid at any point in time).
|
| Structs |
| ARGBColor |
ARGB color quad |
| AnimationAttributes |
This structure contains attributes needed to run an animation.
|
| Caret |
This structure contains the caret information. |
| ColorProfile |
ICC Color profile |
| FloatingPointBitmapLayout |
This structure describes the memory layout of a bitmap having
floating point color channels. |
| FontInfo |
This structure provides information about a specific font. |
| FontMetrics |
Metrics global to the font, i.e. not specific to single
glyphs. The font height is defined as
ascent+descent+internalLeading, and therefore not explicitely
included here. |
| FontRequest |
This structure contains all information necessary to describe a
font to be queried from XCanvas. |
| IntegerBitmapLayout |
This structure describes the memory layout of a bitmap having
integer color channels. |
| Panose |
|
| RGBColor |
RGB color triplet |
| RenderState |
This structure contains information passed to each
XCanvas render operation. |
| StringContext |
Collection of string-related arguments used on all canvas text
interfaces. |
| StrokeAttributes |
This structure contains all attributes required for path stroking. |
| TextHit |
This structure contains hit information for XTextLayout. |
| Texture |
Contains all information needed to define a texture. |
| ViewState |
This structure contains information considered the view state. |
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


Agenda
======
9.00 am convene
Morning - Beta 2
* Microbenchmark testbench design and initial performance breakdown report (*Matej*).
* Status breaking v3Channel out of pvIOCCPP (*Ralph*, *Marty*), plus Demo.
* Impressions of getting started with vxWorks and v3Channel
compilation (*Dirk Zimoch*)
* APS' requirements and desires for the IOC (*Andrew*)
For Andrew and Tim Mooney.
* Beamline instrumentation controls requirements on EPICS V4 (*Bob*)
Broad matters of high throughput large datasets etc.
Afternoon - IOC image processing requirements and CSS
* 1:30 pm NDarray / image server (*David*)
Demo included.
* Versioning and the EPICS V4 release procedure (*Ralph*)
* **3:30 pm** [9:30 am NY local time] CSS and PvManager status (*Gabriele*).
[Ralph will manage connection to Gabriele.]
* Plans for CSS/pvAccess integration.
*Matej*, *Gabriele*, *Bob*.
* Try to make a real plan for the compression support of NTImage.
[Who can talk to this, *Nikolay?*]
------------------------ Minutes ----------------------------
Present: GW,DH,RL,BD,MS,AJ,TK, Pavel Chevtsov, Martin Gasche, Dirk Zimoch
Scribe: TK
************
NEW TOPIC: Microbenchmark testbench design and initial performance breakdown report
************
Slides: Microbenchmarks
(*Matej*).
Matej's talk: microbenchmarking
create a set of profiling tools for the entire chain. Support multithreaded sw.
Uses macros embedded in the code to insert monitoring points.
GW/AJ: Table of results give the RMS of time of each stage, but it was presented as the mean. Check
whether RMS col describes mean or variance.
Effects at start (filling of cache) should be taken a look at.
GW/AJ/DZ: The benchmark results presented should distinguish between intial runthrough timings from subsequent ones, because of various process warmup effects (caching, branch-prediction and so on).
Plans: automate processing of results. Run the benchmark and get the results
GW: have we compared Java and C++ results?
MJ: no big difference visible
GW: prepare instructions for programmers how to use the microbenchmarks
AJ/DZ: There are cases (eg snl) where the client and server are operating on the same machine. In those
cases it would be worthwhile looking into some local transport such as shared memory. Suggestion for
the future.
Need benchmarks run on different platforms: RT Linux, vxWorks, RTEMS etc.
MS: Good idea to have a machine to run the benchmarks before each release to check the performance
************
NEW TOPIC: Status breaking v3Channel out of pvIOCCPP plus Demo.
************
(*Ralph*, *Marty*),
[Talk file pvaSrvStatus.html, from Marty, please fwd to Greg]
Ralph's presentation: pvaSrv status
Methods to use pvAccess to access version 3 records (anything that CA can connect to.)
DZ: What if the V3 channels are not in the same IOC?
RL: I assume [pvaSrv] won't work unless all channels are in the same IOC. However,
it may work with ca links in that case.
GW: It returns data as scalarArray, why not pvData structure [so that each V3 channel's name are the
names of the fields of the structure]?
RL: Don't know, ask Marty
GW: how to configure which channels are addressed?
RL: answer is in the talk. Defined in the command. Current implementation is a proof of principle, not final.
RL: after the access is done information is deliverd if the access was atomic. Need a method that indicates (failure) if the put was not atomic
RL: currently works only for value (VAL) fields. Reason to be clarified, no obvious reason for that limitation.
Semantics of puts and processing needs to be defined.
AJ: Change way of naming channels in multivalue to a single argument containing a space-separated list of names. e.g:
$ pvput 'double01 double02 double03' 3 1 2 3
$ pvput 'pva:///double01+double02+double03' 3 1 2 3
DZ: what is the purpose of this? Channel access clients would break this behaviour
Discussion: what are our goals with the IOC.
Proposal (RL): leave multiValue to be implemented only in 3.15 (and above)
What to do with pvaSrv? Add into a EPICS release soon?
********
DECISION: Provide support for single value pvaSrv on EPICS ver 3.14. Support for multivalue pvaSrv will compile against 3.15 only.
********
********
AI: on GW: Add links to pvaSrv (given by Ralph) to the mainpage of EPICS V4 webpages.
********
RL still has to actually remove pvaSrv code from pvIOCCPP.
RL: How to check that a NT type is correct?
DZ: do not trust client writers, rather server writers
Need way to validate the structures.
DIscussion: do we need an API for writing normative types
GW: writing NT is too simple. Having a validator and API would be nice but we do not have the manpower.
************
NEW TOPIC: Issues (annoyances) with building EPICS 4 (Dirk)
************
************
ISSUE: Couldn't find out how to do things from the web page. For instance, how to get started to get things.
************
************
AI on GW: Make "getting started" doc more visible and try to make index page link to useful data on getting started quicker. Include a text version of Getting Started in the tar distribution, possibly right in the README.
************
************
AI on AJ: Send comments to GW on the Getting Started document.
************
DZ: Gives a list of complaints and findings in his experience of first building EPICS V4 and using the "v3Channel" to get V3 data through V4:
DZ: readme doesnt explain how to get started.
DZ: The required order of compilation is not given in the README.
AJ: These have since been covered in the gettingStarted doc.
GW: Actually they have always been covered in Getting Started.
DZ: There are too many warnings in the c++ compilation.
DZ: Getting started should say from where you should get boost for vxWorks, and how to integrate it into your compile.
************
ISSUE: Some code mixes EPICS 4 strings (String) and standard strings (std::string). This potentially breaks the code.
************
Passing a std::string pointer to a String pointer doesn't work.
Solution proposed is to remove typedef String and typedef StringBuilder and simply use std::string and STL IO streams.
AI on MS asap: remove typedef String and typedef StringBuilder and simply use std::string and STL IO streams.
ISSUE: The montavista compiler generates error on the SHOW_EXCEPTION macro.
This probably a compiler error!
Mitigation is to assume that this compiler will not be used commonly.
TK: We don't so far have a list of supported target architectures, is it time to creat one?
AJ: There are many V3 supported architectures, maybe V4 should aim to support (but not necessarily tested) on all those?
AJ: Suggests email thread for assembling list of archs and compilers that are known to work and not work.
DZ: vxWorks versions of IO Streams don't support exceptions...
************
ISSUE: There are differences in how functions are called in iocShell and vxWorks shell - iocShell wrappers are doing real work instead of just wrapping the call (which is available in vxWorks).
************
************
AI on RL by any time soon: Unify configuration calls for vxWorks shell and iocShell [to mitigate issue above]
************
********
ISSUE: DZ: the configuration mechanism for multiValue (pre-configuring records sets that are published under a new name) is rudimentary
TK: Do we want to keep that mechanism?
*******
*******
AI on RL & AJ: Need to take a look at how to configure multivalue properly. (Maybe through info fields?).
*******
************
NEW TOPIC: APS' comments on getting started,
************
Andrew
Notes: ANJ-getting-started.txt
************
NEW TOPIC: requirements and desires for the IOC
************
Andrew for Andrew and Tim Mooney.
Slides: v4-requirements
Recommendations for V4 db:
* There is presently no value type with error bars:
GW: Not quite true, NTAggregate includes error bars, that's purpose of "dispersion" field.
* Data Analsysis use-case.
It would be a good idea to collaborate on a basic beamline data analysis IOC.
BD: This might change soon.
DZ: But experimenters won't trust an IOC they did not invent.
Consensus: Such beamline IOC may be created within communities.
In general, Tim is very positive about V4, but doesn't want to reinvent the Synapps package for it.
Additional Ideas
* Subscription parameters. Would be good to add to pvaccess the same kind of server side filtering that is in V 3.15.
Eg, client-specfic monitor dead-bands, rate limits, conditional monitors.
* Reflection API, ie, one should be able to ask an IOC what PVs it holds.
Discussion of with V4 servers (pvIOCJava get & rpc, pure pva, and pvaSrv) should get an RI that
at least allows one to get record name list.
AJ: A client shoudl be abel to request of server that it tells only the list of names of records, not names of
all fields as well.
*********
RESOLUTION: We shall add the addition of a reflection [needs to get a better name] interface accessible from pvaccess clients, to the goals for the year, so one can get a list of names of records and possibly fields (at least), possibly also other metadata of the server. With respect to pvaSrv, support for acquisition V3 IOC metadata (names of records and possibly list of fields for a record) and precise function, are to be decided.
******
************
NEW TOPIC: Beamline instrumentation controls requirements on EPICS V4 (*Bob*)
************
Slides: Beamline Requirements
Broad matters of high throughput large datasets etc.
Bob described work being done at BNL for prototyping a high throughput IOC.
AFTERNOON
************
NEW TOPIC: NDarray / image server (*David*)
************
Test server is publishing data as defined in NTImage, modelled on the areaDetector data definition
GW: What for?
DH: To allow separating or distributing the image processing from the image acquisition.
DH: pvGet take a long time and give time outs.
MS will fix the slow printing in pvGet for performance for pvStructure
MS will look into the race condition for the PV test server.
DH will work with Matej to incorporate this example into the test server
DH will work with Nikolay and Michael on image compression going forward
DH will tweak the performance for testing throughput in PVAccess
DH NTImage should use NTVariantArray for image data as the encoder of the pixels can change the data type during operation. (It usually won't, but it can.)
DH The unsigned types need to be supported.
DH field in image part includes fourcc (image encoding) (fourcc = 4 character code)
Tightening up the description of fourcc field of NTImage:
"fourcc" stands for 4 character code. Identifies codec that has been used in
the case of compressed data. "JPEG", for example. List of codecs. The empty
string, or a value of four spaces, indicates no compression has been
used. Additionally, the field may be valued "IRAW" in which case data should be interpretted
in compliance with RFC2361.
DH make fourcc optional
In his version of the NT document, DH has made changes to the NTVariantArray to include unsigned types
*********
AI on DH: Update the NT document with the agreed changes to definitions of NTImage and NTVariantArray for support of NTImage and areaDetector.
*********
If image data contains compressed 3D data (meaning a series of compressed 2D images), there would need to be an offset stored for the start index of the compressed data of each slice (since the compressed slices won't all be the same size and can't easily be calculated). Ask Mark Rivers about this issue and discusss adjusting the NT spec if necessary.Versioning and the EPICS V4 release procedure
************
AI on DH: publish the test image server along with a readme.
************
************
NEW TOPIC: Versioning and the EPICS V4 release procedure
************
Ralph
Jenkins build is now on cloudbees - and includes not only V4 but also CSS, logs, etc....
This creates the build and pushes the result onto sourceForge
Gabriele has secured a medium size business account for us. (I.e. 5000 minutes per month build time, good support.)
TK: What about vxWorks build
AJ: ~ will be setting up vxWorks build at APS.
4.major.minor.bugfix
--- major is not forward compatible.
--- all core modules get pulled up to the major number when that one changes
--- a new release is 4.n.0.0 (a new major release resets minor and bugfix to 0, all parts are always present)
************
AI on RL: Describe this, distribute and get confirmation - and then implement it.
************
Java source in JAR - binary in TAR
Java TAR should contain:
- binary, sources and javadoc as JARs
- dependency libraries as JARs (in a lib subdirectory)
- README
C++ TAR should contain:
- sources expanded as a tree
- documentation and doxygen expanded as a tree
************
AI on Ralph: will release the development branching plan.
************
He will take care of this in Mercurial, based on Vincent Driessen's
http://nvie.com/posts/a-successful-git-branching-model/
************
New Topic: CSS nd PvManager status (*Gabriele*):
************
Slides: pvManager
AI on MS: will provide a PVA plugin for CSS.scalars, matrices, array, and image. Ideally that connection will be done
by also writing a wrapper package of normative types, which is then used to get and set n-type variable values from vTypes.
************
AI: BD resolve how the development and integration of PVAccess into CSS will be done, ie identify a person to do it.
************
************
NEW TOPIC: Other issues
************
************
ISSUE: points out that the license and copyright files in EPICS V4 repo are rubbish.
************
GW: Acknowledged and we have to fix it.
************
ISSUE: Very large data set requests, such as large NTTable data from a database, can cause middle services to crash or otherwise choke.
************
RL: We have to resolve how to send tables that are way too big to be fully kept in a middle layer service's memory. Do we change tables to do this, adding an optional "more"/"done" field? Do we need a data iterator?
MS: It should be a type - so the client can decide if it wants to do this. It may want to cancel the operation.
AJ: This could also be needed for matrices, large arrays and images even...
RL: If the database cannot be cancelled, we can handle cancel on the middle layer server side by just dropping what the database is sending back.


X
Salary & Bills
Salary:
Bills:
Confirm
Extra Saving or Spending
Extra saving money:
Money you used from savings:
Confirm
currency:
Лв
€
$
input salary
21/05
week: 3
Salary:
Bills:
Amount to spend:
index
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
food
cigarettes
activities
transport
other
Saved
m
t
w
t
f
s
s
Spent
m
t
w
t
f
s
s
clear local storage
next month
next week
This week
Total Money Spent:
0
Total Money Saved:
0
This month
Total Money Spent:
Total Money Saved:
Total since start
Total Money Spent:
Total Money Saved:


JPMorgan expands commercial lending team, appoints four local experts
This is to provide Indian mid-cap companies access to leading global financial capabilities, a strong network and deep market expertise
by BS ReporterJPMorgan has appointed four local experts to join the Corporate Client Banking and Specialized Industries team. This is to provide Indian mid-cap companies access to leading global financial capabilities, a strong network and deep market expertise. Pranav Chawda will be the head of CCBSI India. Dhaval Shah joins as head of CCBSI Western India. Srinivasan Kannan, based in Chennai, is appointed as the head of CCBSI Southern India. Gautam Viswanathan joins as the treasury services lead for India to provide local companies with a broad range of cash management and payment solutions.


Let's start with what we know...
- We can all internet, right?
- So, let's visit a web page
- Like this one:
LET'S HEAR IT FOR THE INTERNET!!!
Okay, more seriously...
- Nowadays, the internet is commonplace,
- so, we take it for granted.
- Let's actually examine what happened.
Where did that web page come from?
- Is my computer running the entire internet?
- Is my computer running Amazon.com?
- Is some other computer running Amazon.com?
So, was it something like this?
Well... kinda
But...
My computer isn't connected directly to Amazon.com's server. So, it's really more like this:
(Except, worse)
How did my computer's request reach Amazon.com???
- The request's destination was determined.
- The request was routed to the destination.
Didn't we know the destination already?
- Not exactly.
- We knew the server's domain name
- We needed the server's network address
What's a Domain Name?
www.amazon.com
- It's a "more memorable" name for a server
- (at least, compared to a network address)
How do we get the network address?
<IP_ADDRESS>
- Via the DNS protocol.
- DNS stands for "Domain Name System".
- It produces a list of network addresses that are associated with a domain name.
You can query DNS via the 'dig' command!
How do we route the request to the network address?
- There are several protocols that help with this:
- BGP: Border Gateway Protocol
- IS-IS: Intermediate System - Intermediate System
- OSPF: Open Shortest Path First
- But, these are beyond the scope of this presentation.
Okay. So what?
- Well...
- The data passes through many servers during its journey.
- Let's add a proxy server to this path.
- This will allow us to intercept and observe the data.
Here are some freely available proxy servers
Like this!
That looked important. What was it?
- That was HTTP, the HyperText Transfer Protocol.
- It allows clients to request resources from servers.
HTTP Request
GET / HTTP/1.1
Host: www.amazon.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: x-wl-uid=19hjJTOfKZ8ZX3plg0k6rLXNc+QO1ja5YDdgSm0w/iT7KqBTfq3u+9wnG3zB9J9Anj0tx/ehgoAg=; session-id-time=2082787201l; session-id=188-4865042-5922907; s_nr=1378666121578-New; s_vnum=1810665824270%26vn%3D1; s_dslv=1378666121581; ubid-main=181-7824637-2863522; session-token=Wwj/RQ58DUMxlaq+Nsb0NvL8DlbuFfnTlHY1LpfSr5eVNJViv/yaGzVxcVrIqyJRstcvdqNQQDmyiqEoJUuQw5KVrCBZBNNsDs6V0Gt+00Hrpeqhr7xCz7w+zbKH/tD9J6y1d7F80F3Gc4S6tz+jfb0ylIu5Ubi+2MbOCiV1ZURlvMpVr5gV6pag0jfgTWyqy/137EgdJiJfHC91uDf/wZM8XmGhl6G2p1yYuRDANNl6/K3Xay+jli243loFA7b5
Connection: keep-alive
Notice that the client is:
- Using the HTTP/1.1 protocol.
- Contacting www.amazon.com.
- GETting the "/" resource.
- Providing cookies to the server.
What's a cookie?
- Cookies are a way of tracking state across multiple requests.
- Servers instruct the browser to save cookies.
- Browsers show the cookies to the server on each request.
HTTP Response
HTTP/1.1 200 OK
Date: Sun, 03 Aug 2014 19:24:29 GMT
Server: Server
Set-Cookie: skin=noskin; path=/; domain=.amazon.com
pragma: no-cache
cache-control: no-cache
x-frame-options: SAMEORIGIN
expires: -1
Vary: Accept-Encoding,User-Agent
Content-Type: text/html; charset=ISO-8859-1
Set-cookie: ubid-main=181-7824637-2863522; path=/; domain=.amazon.com; expires=Tue, 01-Jan-2036 08:00:01 GMT
Content-Length: 249071
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Notice that the server is:
- Reponding with the HTTP/1.1 protocol.
- Indicating that the client's request was successful (200 OK).
- Instructing the client to set some cookies.
- Sending content that is 249071 bytes in length.
How do I decipher HTTP response codes?
- Specific HTTP response codes are documented here.
- More generally, responses are categorized as follows:
- 1xx: Information
- 2xx: Success
- 3xx: Redirection
- 4xx: Client Error
- 5xx: Server Error
Neat. But... where is the web page?
- It's embedded in the HTTP response's content.
- No, it doesn't look like a web page yet.
- It's represented as HTML.
HTML?
- HTML stands for "HyperText Markup Language"
- It describes the structure and semantic meaning of text.
Here's an example of some HTML!
<!doctype html>

<title>example.html</title>

Hello!

Thanks for reading this example!

HTML documents usually contain...
- Hyperlinks
-
Pointers to other HTTP resources.
- Cascading Style Sheets (CSS)
-
Declaration of the web page's look and feel.
- Javascript
-
Code that makes the web page more interactive
So, HTML is just a bunch of files?
- In most cases, no.
- Instead, the server constructs HTML dynamically.
Okay, then. How is HTML constructed?
- That's a very open-ended question.
- Numerous frameworks provide solutions to this problem.
- For now, let's focus on the Ruby on Rails framework.
Fine. How does Rails construct HTML?
- The client's request is routed to a controller action.
- The controller action evaluates the request and produces output data.
- A view template renders the output data as HTTP response content.
Simple, right?
Maybe not. It would be nice to have an example...
Oh Look! An example!
How surprisingly convenient!
The "Ask" Page
First, the application asks the end-user to
type his or her name.
The "Sing" Page
Then, the application sings a
song using the end-user's name!
Simply brilliant!
So... where do we begin?
Let's start with an HTTP request for a page:
The application will evaluate its routing rules
to determine which controller action should evaluate
the request.
The Routing Rules
File: /config/routes.rb
Rails.application.routes.draw do
# When the client requests the "/" URL,
# redirect them to "/name_game/ask"
root to: redirect('name_game/ask')
# These URL's map "to" specific controller actions.
get 'name_game/ask', to: "name_game#ask"
get 'name_game/sing', to: "name_game#sing"
end
According to these rules...
- Our URL path matches:
/name_game/sing
- This maps to the action:
name_game#sing
- So, our request will be handled by:
- Class: NameGameController
- Method: sing
The Controller
File: /app/controllers/name_game_controller.rb
class NameGameController < ApplicationController
def ask
end
def sing
@name = params[:name].capitalize
if @name.empty?
flash[:error] = "Come on -- don't be shy! What's your name?"
redirect_to("/name_game/ask")
else
name_ending = @name[1..-1]
@b_name = "B" + name_ending
@f_name = "F" + name_ending
@m_name = "M" + name_ending
end
end
end
Eek! Code!
- Don't worry -- it's safely behind your screen!
- This code reads the
:name
query parameter.
- From this, it derives the following output data:
- @name
- @b_name
- @f_name
- @m_name
- This output data is then forwarded to the view template
The View Template
File: /app/views/name_game/sing.html.erb

<%= @name %>, huh?

<%= @name %>, <%= @name %>, bo-<%= @b_name %>

Banana-fana fo-<%= @f_name %>

Mee-mi-mo-<%= @m_name %>

<%= @name %>!

I love this game!
Wanna <%= link_to "play again", "/name_game/ask" %>?


class MultiReader(list):
Known subclasses: cocopp.readalign.ArrayMultiReader
, cocopp.readalign.HMultiReader
, cocopp.readalign.VMultiReader
List of data arrays to be aligned.
The main purpose of this class is to be used as a single container
of the data arrays to be aligned by alignData()
in the
parent module.
A data array is defined as an array where rows correspond to
recordings at different moments of an experiment. Elements of these
rows correspond to different measures.
These data arrays can be aligned along the time or the function
values for instance.
This class is part abstract. Some methods have to be defined by inheriting classes depending on wanted alignment:
isFinished()
, True when all the data is read.getInitialValue()
, returns the initial alignment value.newCurrentValue()
, returns the next alignment value.align()
, process all the elements of self to make them aligned.
Some attributes have to be defined as well idx
,
the index of the column with alignment values in the data array,
idxData
, the index of the column with the actual data.
| Class | SingleReader |
Single data array reader class. |
| Method | __init__ |
accepts a list of arrays or a MultiReader (i.e. a list of SingleReader ) as input data type |
| Method | currentLine |
Aggregates currentLines information. |
| Method | currentValues |
Gets the list of the current alignment values. |
| Method | nextValues |
Gets the list of the next alignment values. |
| Instance Variable | isHArray |
Undocumented |
cocopp.readalign.ArrayMultiReader


[1]
before a route that is also much longer.
[2]
before a route that is almost broken off on mapquest and screen issues .Old 2009 or exits.