--- layout: post tags: [Dependency Injection, Software Design] date: 2013-01-11 11:07:55 UTC title: "Partial Type Name Role Hint" description: "This article describes how object roles can be indicated by parts of a type name." --- {% include JB/setup %}
{{ page.description }}
In my overview article on Role Hints I described how making object roles explicit can help making code more object-oriented. One way code can convey information about the role played by an object is to let a part of a class' name convey that information. This is often very useful when using Convention over Configuration.
While a class can have an elaborate and concise name, a part of that name can communicate a particular role. If the name is complex enough, it can hint at multiple roles.
As an example, consider the shipping Strategy selection problem from a previous post. Does attribute-based metadata like this really add any value?
[HandlesShippingMethod(ShippingMethod.Express)] public class ExpressShippingCostCalculator : IBasketCalculator
Notice how the term Express appears twice on two lines of code. You could successfully argue that the DRY principle is being violated here. This becomes even more apparent when considering the detached metadata example. Here's a static way to populate the map (in F# just because I can):
let map = Dictionary<ShippingMethod, IBasketCalculator>()
map.Add(ShippingMethod.Standard,
StandardShippingCostCalculator())
map.Add(ShippingMethod.Express,
ExpressShippingCostCalculator())
map.Add(ShippingMethod.PriceSaver,
PriceSaverShippingCostCalculator())
This code snippet uses some slightly unorthodox (but still valid) formatting to highlight the problem. Instead of a single statement per shipping method, you could just as well write an algorithm that populates this map based on the first part of each calculator's name. Follow that train of thought to its logical conclusion, and you don't even need the map:
public class ShippingCostCalculatorFactory : IShippingCostCalculatorFactory { private readonly IEnumerable<IBasketCalculator> candidates; public ShippingCostCalculatorFactory( IEnumerable<IBasketCalculator> candidates) { this.candidates = candidates; } public IBasketCalculator GetCalculator(ShippingMethod shippingMethod) { return (from c in this.candidates let t = c.GetType() where t.Name.StartsWith(shippingMethod.ToString()) select c).First(); } }
This implementation uses the start of the type name of each candidate as a Role Hint. The ExpressShippingCostCalculator already effectively indicates that it calculates shipping cost for the Express shipping method.
This is an example of Convention over Configuration. Follow a simple naming convention, and things just work. This isn't an irreversible decision. If, in the future, you discover that you need a more elaborate selection algorithm, you can always modify the ShippingCostCalculatorFactory class (or, if you wish to adhere to the Open/Closed Principle, add an alternative implementation of IShippingCostCalculatorFactory).
The default routing algorithm in ASP.NET MVC works this way. An incoming request to /basket/1234 is handled by a BasketController instance, /product/3457 by a ProductController instance, and so on.
The ASP.NET Web API works the same way, too.
Using a part of a type name as a Role Hint is very common when using Convention over Configuration. Many developers react strongly against this approach because they feel that the loss of type safety and the use of Reflection makes this a bit 'too magical' for their tastes. However, even when using attributes, you can easily forget to add an attribute to a class, so in the end you must rely on testing to be sure that everything works. The type safety of attributes is often an illusion.
The great benefit of Convention over Configuration is that it significantly cuts down on the number of moving parts. It also 'forces' you (and your team) to write more consistent code, because the overall application is simply not going to work if you don't follow the conventions.
Comments
I've used MVP pattern in Unity3D game development, where I had like MosterView and MonsterPresenter autowired by assembly scanning. As result I have IPresenter as input into View and IoC container that discover and inject correct Presenter implementation into View. I also wrote additional test, where I assert if every view has corresponding presenter, such that I would discover convention violation not at run-time, but at tests running step. Just reduces feedback time a little bit.
This idea came after watching your "Conventions: Make your code consistent" presentation. Thanks.


.PERSONAL INFORMATION.
Name
Birth
Gender
Male
Female
Address:
Phone number:
Email address:
Facebook Link:
Submit


This was the very beginning of coding for me. I feel like even though it is basic, it is my starting point and should serve to give perspective to how much coding I've learnt over time
Languages: HTML & CSS
I made this website to serve as a starting point for individuals who wish to give back to the society by linking them to our representatives from all over Kenya.Learn more about the project below
Languages: HTML & CSS
I also do marketing webpages. This one is a photography webpage for a photography start up. It serves to promote the start up and let people know about it.
Languages: HTML & CSS
© Sauda Habib


asked: 2015-03-01 TODO
Author: {{question.theQ.author}}
Answered: 2015-03-01
Author: {{answere.author}}
You can use markdown for input


title = "new-event" url = "/new-event" layout = "noSidebar" is_hidden = 0 [viewBag] localeUrl[en] = "/new-event" [new_event] == use Mrhili\Asociations\Models\Worker; use Mrhili\Asociations\Models\Association; function onStart(){ $this['cadres'] = Worker::where('confirmed', true)->get(); $this['associations'] = Association::where('confirmed', true)->get(); } ?> ==


Hi Customer,
We could not authorize your payment for the next billing cycle of your subscription therefore we've suspended your membership. But your current subscription is active until it expires.
Obviously we'd love to have you back, simply click restart your membership to update your details and continue to enjoy all the best TV shows & movies without interruption.
We're here to help if you need it. Visit the Help Center for more info or contact us.
The Netflix Team


|
Exodus
6.36
|
Macros | |
| #define | EX_WRITE 0x0001 |
| #define | EX_READ 0x0002 |
| #define | EX_NOCLOBBER 0x0004 |
| #define | EX_CLOBBER 0x0008 |
| #define | EX_NORMAL_MODEL 0x0010 |
| #define | EX_64BIT_OFFSET 0x0020 |
| #define | EX_LARGE_MODEL EX_64BIT_OFFSET |
| #define | EX_64BIT_DATA 0x400000 |
| #define | EX_NETCDF4 0x0040 |
| #define | EX_NOSHARE 0x0080 |
| #define | EX_SHARE 0x0100 |
| #define | EX_NOCLASSIC 0x0200 |
| #define | EX_DISKLESS 0x100000 |
| #define | EX_MMAP 0x200000 |
| #define | EX_MAPS_INT64_DB 0x0400 |
| #define | EX_IDS_INT64_DB 0x0800 |
| #define | EX_BULK_INT64_DB 0x1000 |
| #define | EX_ALL_INT64_DB (EX_MAPS_INT64_DB | EX_IDS_INT64_DB | EX_BULK_INT64_DB) |
| #define | EX_MAPS_INT64_API 0x2000 |
| #define | EX_IDS_INT64_API 0x4000 |
| #define | EX_BULK_INT64_API 0x8000 |
| #define | EX_INQ_INT64_API 0x10000 |
| #define | EX_ALL_INT64_API |
| #define | EX_MPIIO 0x20000 |
| #define | EX_MPIPOSIX 0x40000 |
| #define | EX_PNETCDF 0x80000 |
| #define EX_64BIT_DATA 0x400000 |
CDF-5 format: classic model but 64 bit dimensions and sizes
| #define EX_64BIT_OFFSET 0x0020 |
enable mods that permit storage of larger models
| #define EX_ALL_INT64_API |
All of the above...
| #define EX_ALL_INT64_DB (EX_MAPS_INT64_DB | EX_IDS_INT64_DB | EX_BULK_INT64_DB) |
All of the above...
| #define EX_BULK_INT64_API 0x8000 |
All integer bulk data (local indices, counts, maps); not ids
| #define EX_BULK_INT64_DB 0x1000 |
All integer bulk data (local indices, counts, maps); not ids \
| #define EX_CLOBBER 0x0008 |
Overwrite existing database if it exists
| #define EX_DISKLESS 0x100000 |
Experimental
| #define EX_IDS_INT64_API 0x4000 |
All entity ids (sets, blocks, maps) are int64_t values
| #define EX_IDS_INT64_DB 0x0800 |
All entity ids (sets, blocks, maps) are int64_t values
| #define EX_INQ_INT64_API 0x10000 |
Integers passed to/from ex_inquire are int64_t
| #define EX_LARGE_MODEL EX_64BIT_OFFSET |
enable mods that permit storage of larger models
| #define EX_MAPS_INT64_API 0x2000 |
All maps (id, order, ...) store int64_t values
| #define EX_MAPS_INT64_DB 0x0400 |
All maps (id, order, ...) store int64_t values
| #define EX_MMAP 0x200000 |
Experimental
| #define EX_MPIIO 0x20000 |
| #define EX_MPIPOSIX 0x40000 |
| #define EX_NETCDF4 0x0040 |
use the hdf5-based netcdf4 output
| #define EX_NOCLASSIC 0x0200 |
Do not force netcdf to classic mode in netcdf4 mode
| #define EX_NOCLOBBER 0x0004 |
Don't overwrite existing database, default
| #define EX_NORMAL_MODEL 0x0010 |
disable mods that permit storage of larger models
| #define EX_NOSHARE 0x0080 |
Do not open netcdf file in "share" mode
| #define EX_PNETCDF 0x80000 |
| #define EX_READ 0x0002 |
ex_open(): open file for reading (default)
| #define EX_SHARE 0x0100 |
Do open netcdf file in "share" mode
| #define EX_WRITE 0x0001 |
ex_open(): open existing file for appending.


This wordlist was created based on Chulalongkorn University top 5000 Thai frequency list (http://ling.arts.chula.ac.th/TNC/category.php?id=58&).
Only words and their freqeuncies are leveraged in this wordlist
© 2021 Sebastian Restrepo & LatamAsia


{% extends 'collect/base.html' %} {% block dashboard-active %}active{% endblock %} {% block content %}
| Name | Keywords | User IDs | Locations | Active | Tweets | Action |
|---|---|---|---|---|---|---|
| {{collection.name}} | {{collection.track}} | {{collection.follow}} | {{collection.locations}} | {{collection.is_running}} | {{collection.num_tweets}} |
{% if not collection.is_running %}Start
Edit
Delete
{% else %}
Stop
{% endif %}
|
You don't have any collections yet. Go ahead and start one!
{% endif %} New collection {% endblock %}


Cuttlefish or cuttles[2] are marine molluscs of the order Sepiida. They belong to the class Cephalopoda, which also includes squid, octopuses, and nautiluses. Cuttlefish have a unique internal shell, the cuttlebone, which is used for control of buoyancy.
Cuttlefish have large, W-shaped pupils, eight arms, and two tentacles furnished with denticulated suckers, with which they secure their prey. They generally range in size from 15 to 25 cm (6 to 10 in), with the largest species, Sepia apama, reaching 50 cm (20 in) in mantle length and over 10.5 kg (23 lb) in mass.[3]
 Their predators include dolphins, sharks, fish, seals, seabirds, and other cuttlefish. The average life expectancy of a cuttlefish is about 1–2 years. Studies are said to indicate cuttlefish to be among the most intelligent invertebrates.[4] Cuttlefish also have one of the largest brain-to-body size ratios of all invertebrates.[4]
The "cuttle" in cuttlefish comes from the Old English name for the species, cudele, which may be cognate with the Old Norse koddi (cushion) and the Middle Low German Kudel (rag).[5] The Greco-Roman world valued the cuttlefish as a source of the unique brown pigment the creature releases from its siphon when it is alarmed. The word for it in both Greek and Latin, sepia, now refers to the reddish-brown color sepia in English.
The earliest fossils of cuttlefish are from the Cretaceous period.[6][7] represented by Ceratisepia from the Late Maastrichtian-Paleocene.[8] Whether the earlier Trachyteuthis is assigned to this order, or to the Octopodiformes, remains unclear.[9]
The family Sepiidae, which contains all cuttlefish, inhabits tropical and temperate ocean waters. They are mostly shallow-water animals, although they are known to go to depths of about 600 m (2,000 ft).[10] They have an unusual biogeographic pattern: they are present along the coasts of East and South Asia, Western Europe, and the Mediterranean, as well as all coasts of Africa and Australia, but are totally absent from the Americas. By the time the family evolved, ostensibly in the Old World, the North Atlantic possibly had become too cold and deep for these warm-water species to cross.[11] The common cuttlefish (Sepia officinalis), is found in the Mediterranean, North and Baltic seas, although populations may occur as far south as South Africa. They are found in sublittoral depths, between the low tide line and the edge of the continental shelf, to about 180 m (600 ft).[12] The cuttlefish is listed under the Red List category of "least concern" by the IUCN Red List of Threatened Species. This means that while some over-exploitation of the marine animal has occurred in some regions due to large-scale commercial fishing, their wide geographic range prevents them from being too threatened. Ocean acidification, however, caused largely by higher levels of carbon dioxide emitted into the atmosphere, is cited as a potential threat.[13]
The family Sepiidae, which contains all cuttlefish, inhabits tropical and temperate ocean waters. They are mostly shallow-water animals, although they are known to go to depths of about 600 m (2,000 ft).[10] They have an unusual biogeographic pattern: they are present along the coasts of East and South Asia, Western Europe, and the Mediterranean, as well as all coasts of Africa and Australia, but are totally absent from the Americas. By the time the family evolved, ostensibly in the Old World, the North Atlantic possibly had become too cold and deep for these warm-water species to cross.[11] The common cuttlefish (Sepia officinalis), is found in the Mediterranean, North and Baltic seas, although populations may occur as far south as South Africa. They are found in sublittoral depths, between the low tide line and the edge of the continental shelf, to about 180 m (600 ft).[12]
The cuttlefish is listed under the Red List category of "least concern" by the IUCN Red List of Threatened Species. This means that while some over-exploitation of the marine animal has occurred in some regions due to large-scale commercial fishing, their wide geographic range prevents them from being too threatened. Ocean acidification, however, caused largely by higher levels of carbon dioxide emitted into the atmosphere, is cited as a potential threat.[13]


new BitmapData(game, width, height)
Creates a new BitmapData object.
Parameters:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
game |
Phaser.Game | A reference to the currently running game. |
||
width |
number |
<optional> |
256 | The width of the BitmapData in pixels. |
height |
number |
<optional> |
256 | The height of the BitmapData in pixels. |
- Source:
Members
-
baseTexture
-
- Source:
Properties:
Name Type Description baseTexture
PIXI.BaseTexture The PIXI.BaseTexture.
-
canvas
-
- Source:
Properties:
Name Type Description canvas
HTMLCanvasElement The canvas to which this BitmapData draws.
-
context
-
- Source:
Properties:
Name Type Description context
CanvasRenderingContext2D The 2d context of the canvas.
-
game
-
- Source:
Properties:
Name Type Description game
Phaser.Game A reference to the currently running game.
-
height
-
- Source:
Properties:
Name Type Description height
number The height of the BitmapData in pixels.
-
imageData
-
- Source:
Properties:
Name Type Description imageData
array The canvas image data.
-
name
-
- Source:
Properties:
Name Type Description name
string The name of the BitmapData.
-
pixels
-
- Source:
Properties:
Name Type Description pixels
UInt8Clamped A reference to the context imageData buffer.
-
texture
-
- Source:
Properties:
Name Type Description texture
PIXI.Texture The PIXI.Texture.
-
textureFrame
-
- Source:
Properties:
Name Type Description textureFrame
Phaser.Frame The Frame this BitmapData uses for rendering.
-
type
-
- Source:
Properties:
Name Type Description type
number The const type of this object.
-
width
-
- Source:
Properties:
Name Type Description width
number The width of the BitmapData in pixels.
Methods
-
a()
-
Shortcut to arc.
- Source:
-
add(sprite)
-
Updates the given Sprite so that it uses this BitmapData as its texture.
Parameters:
Name Type Description sprite
Phaser.Sprite The sprite to apply this texture to.
- Source:
-
addTo(sprites)
-
Given an array of Sprites it will update each of them so that their Textures reference this BitmapData.
Parameters:
Name Type Description sprites
Phaser.Sprite[] An array of Sprites to apply this texture to.
- Source:
-
arc(x, y, radius, startAngle, endAngle, anticlockwise) → {Phaser.BitmapData}
-
Adds an arc to the path which is centered at (x, y) position with radius r starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).
Parameters:
Name Type Argument Default Description x
number The x axis of the coordinate for the arc's center
y
number The y axis of the coordinate for the arc's center
radius
number The arc's radius
startAngle
number The starting point, measured from the x axis, from which it will be drawn, expressed in radians.
endAngle
number The end arc's angle to which it will be drawn, expressed in radians.
anticlockwise
boolean <optional>
true true draws the arc anticlockwise, otherwise in a clockwise direction.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
arcTo(x1, y1, x2, y2, radius) → {Phaser.BitmapData}
-
Adds an arc with the given control points and radius, connected to the previous point by a straight line.
Parameters:
Name Type Description x1
number y1
number x2
number y2
number radius
number - Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
at()
-
Shortcut to arcTo.
- Source:
-
beginFill(color) → {Phaser.BitmapData}
-
Begins a fill with the specified color. This ends the current sub-path.
Parameters:
Name Type Description color
string A CSS compatible color value (ex. "red", "#FF0000", or "rgba(255,0,0,0.5)"). Setting to null will result in no fill.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
beginLinearGradientFill(colors, ratios, x0, y0, x1, y1) → {Phaser.BitmapData}
-
Begins a linear gradient fill defined by the line (x0, y0) to (x1, y1). This ends the current sub-path. For example, the following code defines a black to white vertical gradient ranging from 20px to 120px, and draws a square to display it:
```myGraphics.beginLinearGradientFill(["#000","#FFF"], [0, 1], 0, 20, 0, 120).rect(20, 20, 120, 120);```
Parameters:
Name Type Description colors
Array An array of CSS compatible color values. For example, ["#F00","#00F"] would define a gradient drawing from red to blue.
ratios
Array An array of gradient positions which correspond to the colors. For example, [0.1, 0.9] would draw the first color to 10% then interpolating to the second color at 90%.
x0
number The position of the first point defining the line that defines the gradient direction and size.
y0
number The position of the first point defining the line that defines the gradient direction and size.
x1
number The position of the second point defining the line that defines the gradient direction and size.
y1
number The position of the second point defining the line that defines the gradient direction and size.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
beginLinearGradientStroke(colors, ratios, x0, y0, x1, y1) → {Phaser.BitmapData}
-
Begins a linear gradient stroke defined by the line (x0, y0) to (x1, y1). This ends the current sub-path. For example, the following code defines a black to white vertical gradient ranging from 20px to 120px, and draws a square to display it:
```myGraphics.setStrokeStyle(10).beginLinearGradientStroke(["#000","#FFF"], [0, 1], 0, 20, 0, 120).drawRect(20, 20, 120, 120);```
Parameters:
Name Type Description colors
Array An array of CSS compatible color values. For example, ["#F00","#00F"] would define a gradient drawing from red to blue.
ratios
Array An array of gradient positions which correspond to the colors. For example, [0.1, 0.9] would draw the first color to 10% then interpolating to the second color at 90%.
x0
number The position of the first point defining the line that defines the gradient direction and size.
y0
number The position of the first point defining the line that defines the gradient direction and size.
x1
number The position of the second point defining the line that defines the gradient direction and size.
y1
number The position of the second point defining the line that defines the gradient direction and size.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
beginPath() → {Phaser.BitmapData}
-
Starts a new path by resetting the list of sub-paths. Call this method when you want to create a new path.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
beginRadialGradientStroke(colors, ratios, x0, y0, r0, x1, y1, r1) → {Phaser.BitmapData}
-
Begins a radial gradient stroke. This ends the current sub-path. For example, the following code defines a red to blue radial gradient centered at (100, 100), with a radius of 50, and draws a rectangle to display it:
myGraphics.setStrokeStyle(10) .beginRadialGradientStroke(["#F00","#00F"], [0, 1], 100, 100, 0, 100, 100, 50) .drawRect(50, 90, 150, 110);
Parameters:
Name Type Description colors
Array An array of CSS compatible color values. For example, ["#F00","#00F"] would define a gradient drawing from red to blue.
ratios
Array An array of gradient positions which correspond to the colors. For example, [0.1, 0.9] would draw the first color to 10% then interpolating to the second color at 90%.
x0
number Center position of the inner circle that defines the gradient.
y0
number Center position of the inner circle that defines the gradient.
r0
number Radius of the inner circle that defines the gradient.
x1
number Center position of the outer circle that defines the gradient.
y1
number Center position of the outer circle that defines the gradient.
r1
number Radius of the outer circle that defines the gradient.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
beginStroke(color) → {Phaser.BitmapData}
-
Begins a stroke with the specified color. This ends the current sub-path.
Parameters:
Name Type Description color
String A CSS compatible color value (ex. "#FF0000", "red", or "rgba(255,0,0,0.5)"). Setting to null will result in no stroke.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) → {Phaser.BitmapData}
-
Adds a bezier curve from the current context point to (x, y) using the control points (cp1x, cp1y) and (cp2x, cp2y).
Parameters:
Name Type Description cp1x
number The x axis of control point 1.
cp1y
number The y axis of control point 1.
cp2x
number The x axis of control point 2.
cp2y
number The y axis of control point 2.
x
number The x axis of the ending point.
y
number The y axis of the ending point.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
bf()
-
Shortcut to beginBitmapFill.
- Source:
-
bs()
-
Shortcut to beginBitmapStroke.
- Source:
-
bt()
-
Shortcut to bezierCurveTo.
- Source:
-
c()
-
Shortcut to clear.
- Source:
-
circle(x, y, radius) → {Phaser.BitmapData}
-
Draws a circle with the specified radius at (x, y).
Parameters:
Name Type Description x
number x coordinate center point of circle.
y
number y coordinate center point of circle.
radius
number Radius of circle in radians.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
clear()
-
Clears the BitmapData.
- Source:
-
clearRect(x, y, width, height) → {Phaser.BitmapData}
-
Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black.
Parameters:
Name Type Description x
number The x axis of the coordinate for the rectangle starting point.
y
number The y axis of the coordinate for the rectangle starting point.
width
number The rectangles width.
height
number The rectangles height.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
clip() → {Phaser.BitmapData}
-
Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
closePath() → {Phaser.BitmapData}
-
Tries to draw a straight line from the current point to the start. If the shape has already been closed or has only one point, this function does nothing.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
cp()
-
Shortcut to closePath.
- Source:
-
createLinearGradient(x, y, width, height) → {CanvasGradient}
-
Creates a linear gradient with defined by an imaginary line which implies the direction of the gradient. Once the gradient is created colors can be inserted using the addColorStop method.
Parameters:
Name Type Description x
number The x axis of the coordinate for the gradients starting point.
y
number The y axis of the coordinate for the gradients starting point.
width
number The width of the gradient.
height
number The height of the gradient.
- Source:
Returns:
The Linear Gradient.
- Type
- CanvasGradient
-
createRadialGradient(x0, y0, r0, x1, y1, r1) → {CanvasGradient}
-
Creates a radial gradient.
Parameters:
Name Type Description x0
number y0
number r0
number x1
number y1
number r1
number - Source:
Returns:
The Radial Gradient.
- Type
- CanvasGradient
-
dc()
-
Shortcut to drawCircle.
- Source:
-
de()
-
Shortcut to drawEllipse.
- Source:
-
dp()
-
Shortcut to drawPolyStar.
- Source:
-
dr()
-
Shortcut to rect.
- Source:
-
ef()
-
Shortcut to endFill.
- Source:
-
ellipse(x, y, w, h) → {Phaser.BitmapData}
-
Draws an ellipse (oval) with a specified width (w) and height (h).
Parameters:
Name Type Description x
number x coordinate center point of ellipse.
y
number y coordinate center point of ellipse.
w
number height (horizontal diameter) of ellipse. The horizontal radius will be half of this number.
h
number width (vertical diameter) of ellipse. The vertical radius will be half of this number.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
es()
-
Shortcut to endStroke.
- Source:
-
f()
-
Shortcut to beginFill.
- Source:
-
fill() → {Phaser.BitmapData}
-
Fills the subpaths with the current fill style.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
fillRect(x, y, width, height) → {Phaser.BitmapData}
-
Draws a filled rectangle at (x, y) position whose size is determined by width and height.
Parameters:
Name Type Description x
number The x axis of the coordinate for the rectangle starting point.
y
number The y axis of the coordinate for the rectangle starting point.
width
number The rectangles width.
height
number The rectangles height.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
fillStyle(color) → {Phaser.BitmapData}
-
Sets the fill style.
Parameters:
Name Type Description color
string The fill color value in CSS format: #RRGGBB or rgba(r,g,b,a)
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
font(font) → {Phaser.BitmapData}
-
Sets the font.
Parameters:
Name Type Description font
DOMString The font to be used for any text rendering. Default value 10px sans-serif.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
getPixel(x, y) → {number}
-
Get a color of a specific pixel.
Parameters:
Name Type Description x
number The X coordinate of the pixel to get.
y
number The Y coordinate of the pixel to get.
- Source:
Returns:
A native color value integer (format: 0xRRGGBB)
- Type
- number
-
getPixel32(x, y) → {number}
-
Get a color of a specific pixel (including alpha value).
Parameters:
Name Type Description x
number The X coordinate of the pixel to get.
y
number The Y coordinate of the pixel to get.
- Source:
Returns:
A native color value integer (format: 0xAARRGGBB)
- Type
- number
-
getPixels(rect) → {array}
-
Get pixels in array in a specific Rectangle.
Parameters:
Name Type Description rect
Rectangle The specific Rectangle.
- Source:
Returns:
CanvasPixelArray.
- Type
- array
-
globalAlpha(alpha) → {Phaser.BitmapData}
-
Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).
Parameters:
Name Type Description alpha
number Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
globalCompositeOperation(operation) → {Phaser.BitmapData}
-
With globalAlpha applied this sets how shapes and images are drawn onto the existing bitmap. Possible values: source-atop, source-in, source-out, source-over (default), destination-atop, destination-in, destination-out, destination-over, lighter, darker, copy and xor.
Parameters:
Name Type Description operation
DOMString The composite operation to apply.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
lf()
-
Shortcut to beginLinearGradientFill.
- Source:
-
lineCap(style) → {Phaser.BitmapData}
-
Type of endings on the end of lines. Possible values: butt (default), round, square.
Parameters:
Name Type Description style
DOMString Possible values: butt (default), round, square
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
lineDashOffset(offset) → {Phaser.BitmapData}
-
Specifies where to start a dasharray on a line.
Parameters:
Name Type Description offset
number Specifies where to start a dasharray on a line.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
lineJoin(join) → {Phaser.BitmapData}
-
Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default)
Parameters:
Name Type Description join
DOMString Possible values: round, bevel, miter (default)
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
lineTo(x, y) → {Phaser.BitmapData}
-
Connects the last point in the subpath to the x, y coordinates with a straight line.
Parameters:
Name Type Description x
number The x axis of the coordinate for the end of the line.
y
number The y axis of the coordinate for the end of the line.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
lineWidth(width) → {Phaser.BitmapData}
-
Width of lines. Default 1.0
Parameters:
Name Type Description width
number Width of lines. Default 1.0
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
ls()
-
Shortcut to beginLinearGradientStroke.
- Source:
-
miterLimit(limit) → {Phaser.BitmapData}
-
Default 10.
Parameters:
Name Type Description limit
number Default 10.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
moveTo(x, y) → {Phaser.BitmapData}
-
Moves the starting point of a new subpath to the (x, y) coordinates.
Parameters:
Name Type Description x
number The x axis of the point.
y
number The y axis of the point.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
mt()
-
Shortcut to moveTo.
- Source:
-
mt()
-
Shortcut to lineTo.
- Source:
-
qt()
-
Shortcut to quadraticCurveTo.
- Source:
-
quadraticCurveTo(cpx, cpy, x, y) → {Phaser.BitmapData}
-
Draws a quadratic curve from the current drawing point to (x, y) using the control point (cpx, cpy).
Parameters:
Name Type Description cpx
Number The x axis of the control point.
cpy
Number The y axis of the control point.
x
Number The x axis of the ending point.
y
Number The y axis of the ending point.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
r()
-
Shortcut to rect.
- Source:
-
rc()
-
Shortcut to drawRoundRectComplex.
- Source:
-
rect(x, y, width, height) → {Phaser.BitmapData}
-
Draws a rectangle at (x, y) position whose size is determined by width and height.
Parameters:
Name Type Description x
number The x axis of the coordinate for the rectangle starting point.
y
number The y axis of the coordinate for the rectangle starting point.
width
number The rectangles width.
height
number The rectangles height.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
render()
-
If the game is running in WebGL this will push the texture up to the GPU if it's dirty. This is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function.
- Source:
-
restore() → {Phaser.BitmapData}
-
Restores the drawing style state to the last element on the 'state stack' saved by save().
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
rf()
-
Shortcut to beginRadialGradientFill.
- Source:
-
rotate(angle) → {Phaser.BitmapData}
-
Rotates the drawing context values by r radians.
Parameters:
Name Type Description angle
number The angle of rotation given in radians.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
rr()
-
Shortcut to drawRoundRect.
- Source:
-
rs()
-
Shortcut to beginRadialGradientStroke.
- Source:
-
s()
-
Shortcut to beginStroke.
- Source:
-
save() → {Phaser.BitmapData}
-
Saves the current drawing style state using a stack so you can revert any change you make to it using restore().
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
scale(x, y) → {Phaser.BitmapData}
-
Scales the current drawing context.
Parameters:
Name Type Description x
number y
number - Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
scrollPathIntoView() → {Phaser.BitmapData}
-
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
setPixel(x, y, red, green, blue)
-
Sets the color of the given pixel to the specified red, green and blue values.
Parameters:
Name Type Description x
number The X coordinate of the pixel to be set.
y
number The Y coordinate of the pixel to be set.
red
number The red color value (between 0 and 255)
green
number The green color value (between 0 and 255)
blue
number The blue color value (between 0 and 255)
- Source:
-
setPixel32(x, y, red, green, blue, alpha)
-
Sets the color of the given pixel to the specified red, green, blue and alpha values.
Parameters:
Name Type Description x
number The X coordinate of the pixel to be set.
y
number The Y coordinate of the pixel to be set.
red
number The red color value, between 0 and 0xFF (255).
green
number The green color value, between 0 and 0xFF (255).
blue
number The blue color value, between 0 and 0xFF (255).
alpha
number The alpha color value, between 0 and 0xFF (255).
- Source:
-
setStrokeStyle(thickness, caps, joints, miterLimit, ignoreScale) → {Phaser.BitmapData}
-
Sets the stroke style for the current sub-path. Like all drawing methods, this can be chained, so you can define the stroke style and color in a single line of code like so:
```myGraphics.setStrokeStyle(8,"round").beginStroke("#F00");```
Parameters:
Name Type Argument Default Description thickness
number The width of the stroke.
caps
string | number <optional>
0 Indicates the type of caps to use at the end of lines. One of butt, round, or square. Defaults to "butt". Also accepts the values 0 (butt), 1 (round), and 2 (square) for use with he tiny API.
joints
string | number <optional>
0 Specifies the type of joints that should be used where two lines meet. One of bevel, round, or miter. Defaults to "miter". Also accepts the values 0 (miter), 1 (round), and 2 (bevel) for use with the tiny API.
miterLimit
number <optional>
10 If joints is set to "miter", then you can specify a miter limit ratio which controls at what point a mitered joint will be clipped.
ignoreScale
boolean <optional>
false If true, the stroke will be drawn at the specified thickness regardless of active transformations.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
ss()
-
Shortcut to setStrokeStyle.
- Source:
-
stroke() → {Phaser.BitmapData}
-
Strokes the subpaths with the current stroke style.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
strokeRect(x, y, width, height) → {Phaser.BitmapData}
-
Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.
Parameters:
Name Type Description x
number The x axis for the starting point of the rectangle.
y
number The y axis for the starting point of the rectangle.
width
number The rectangles width.
height
number The rectangles height.
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData
-
strokeStyle(style) → {Phaser.BitmapData}
-
Color or style to use for the lines around shapes. Default #000 (black).
Parameters:
Name Type Description style
string Color or style to use for the lines around shapes. Default #000 (black).
- Source:
Returns:
The BitmapData instance this method was called on.
- Type
- Phaser.BitmapData


Metal Album Generator
{% for cover, title, latents in albums %}
{{ title }}
{% endfor %}
Style Mixing
+
=>


A simple Node Express program. This one differs from Version 01 in that it breaks the code up into different folders:
Get Nine Result will be placed here.
Get NineGet Nine Result will be placed here.
Get Nine ParseOn the server side (server.js), use request.query to get the paramters.
Add Numbers
On the server side (server.js), use request.body to get the paramters. You must also include app.use(express.bodyParser());
Add Numbers


Message
Source: structures/
Represents a Message on WhatsApp
Properties
new Message()
- Extends
- Base
Properties
ack MessageAck
ACK status for the message
author string
If the message was sent to a group, this field will contain the user that sent the message.
body string
Message content
broadcast boolean
Indicates if the message was a broadcast
deviceType string
String that represents from which device type the message was sent
duration string
Indicates the duration of the message in seconds
forwardingScore number
Indicates how many times the message was forwarded.
The maximum value is 127.
from string
ID for the Chat that this message was sent to, except if the message was sent by the current user.
fromMe boolean
Indicates if the message was sent by the current user
hasMedia boolean
Indicates if the message has media available for download
hasQuotedMsg boolean
Indicates if the message was sent as a reply to another message.
hasReaction boolean
Indicates whether there are reactions to the message
id object
ID that represents the message
inviteV4 object
Group Invite Data
isEphemeral boolean
Indicates if the message will disappear after it expires
isForwarded boolean
Indicates if the message was forwarded
isGif boolean
Indicates whether the message is a Gif
isStarred boolean
Indicates if the message was starred
isStatus boolean
Indicates if the message is a status update
links Array of {link: string, isSuspicious: boolean}
Links included in the message.
location Location
Location information contained in the message, if the message is type "location"
mediaKey string
MediaKey that represents the sticker 'ID'
mentionedIds Array of string
Indicates the mentions in the message body.
orderId string
Order ID for message type ORDER
rawData Object
Returns message in a raw format
timestamp number
Unix timestamp for when the message was created
to string
ID for who this message is for.
If the message is sent by the current user, it will be the Chat to which the message is being sent. If the message is sent by another user, it will be the ID for the current user.
token string
Order Token for message type ORDER
type MessageTypes
Message type
vCards Array of string
List of vCards contained in the message.
Methods
acceptGroupV4Invite() → Promise containing Object
Accept Group V4 Invite
- Returns
-
Promise containing Object
delete(everyone)
Deletes a message from the chat
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
everyone |
boolean |
|
If true and the message is sent by the current user or the user is an admin, will delete it for everyone in the chat. Value can be null. |
downloadMedia() → Promise containing MessageMedia
Downloads and returns the attatched message media
- Returns
-
Promise containing MessageMedia
edit(content[, options]) → Promise containing nullable Message
Edits the current message.
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
content |
string |
|
|
|
options |
MessageEditOptions |
Yes |
Options used when editing the message |
- Returns
-
Promise containing nullable Message
forward(chat) → Promise
Forwards this message to another chat (that you chatted before, otherwise it will fail)
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
chat |
(string or Chat) |
|
Chat model or chat ID to which the message will be forwarded |
- Returns
-
Promise
getChat() → Promise containing Chat
Returns the Chat this message was sent in
- Returns
-
Promise containing Chat
getContact() → Promise containing Contact
Returns the Contact this message was sent from
- Returns
-
Promise containing Contact
getInfo() → Promise containing nullable MessageInfo
Get information about message delivery status. May return null if the message does not exist or is not sent by you.
- Returns
-
Promise containing nullable MessageInfo
getMentions() → Promise containing Array of Contact
Returns the Contacts mentioned in this message
- Returns
-
Promise containing Array of Contact
getOrder() → Promise containing Order
Gets the order associated with a given message
- Returns
-
Promise containing Order
getPayment() → Promise containing Payment
Gets the payment details associated with a given message
- Returns
-
Promise containing Payment
getQuotedMessage() → Promise containing Message
Returns the quoted message, if any
- Returns
-
Promise containing Message
getReactions() → Promise containing Array of ReactionList
Gets the reactions associated with the given message
- Returns
-
Promise containing Array of ReactionList
react(reaction) → Promise
React to this message with an emoji
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
reaction |
string |
|
Emoji to react with. Send an empty string to remove the reaction. |
- Returns
-
Promise
reload() → Promise containing Message
Reloads this Message object's data in-place with the latest values from WhatsApp Web. Note that the Message must still be in the web app cache for this to work, otherwise will return null.
- Returns
-
Promise containing Message
reply(content[, chatId][, options]) → Promise containing Message
Sends a message as a reply to this message. If chatId is specified, it will be sent through the specified Chat. If not, it will send the message in the same Chat as the original message was sent.
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
content |
(string, MessageMedia, or Location) |
|
|
|
chatId |
string |
Yes |
|
|
options |
Yes |
- Returns
-
Promise containing Message
star()
Stars this message
unstar()
Unstars this message


This is my first stab at Plotly. I am refering to Ricks Demo. This is my process so far. I looked up some data sets. I came across an "auto mpg set" that I found interesting. See here
What I have done so far is understand how the Plotly.d3.csv pulls the data in and maps. Rick's demo leverages an array and then plots everything. Mine is an array of objects. This took me quite some time to debug.
So what I have done is only grabbed the first 5 objects. Once I understand this a little more I am going to try to plot the data relative to the fields
acceleration: "12"
cylinders: "8"
displacement: "307"
horsepower: "130"
model-year: "70"
mpg: "18"
weight: "3504"


WITNESS LIST
Higher Education
April 3, 2019 9:00 AM
FOR:
Frazier, Frederick 1st Vice President Dallas Police Assoc FOP 716 (Self; Dallas Police
Assoc/FOP716 State FOP), Dallas, TX
Registering, but not testifying:
FOR:
Anderson, Jessica Lieutenant (Houston Police Department), Houston, TX
Berry, Justin (Self; Austin Police Assoc.), Austin, TX
Bullock, Michael (Self; Austin Police Association), Austin, TX
Harmon, Micah Sheriff (Self; Sheriffs' Association of Texas), Hallettsville, TX
Hawthorne, Brian Sheriff (Self; Sheriffs Association of Texas), Mont Belvieu, TX
Hunt, Ray Past President (Self; Houston police officers union), Houston, TX
Jankovsky III, Richard President of DPS Officers Association (DPSOA) (DPS Officers
Association), Refugio, TX
Louderback, AJ Sheriff (Sheriffs Association of Texas), Edna, TX
Martinez, Ray President (Independent Colleges and Universities of Texas), Austin, TX
Rhodes, Terrence (Dallas Police Department), Dallas, TX
Szimanski, Jennifer PAC Vice Chair (Self; Austin Police Association), Lakeway, TX
Tittle, Gary Captain of Police (Self), Richardson, TX
Wilkison, Charley Executive Director (Combined Law Enforcement Associations of Texas,
CLEAT), Austin, TX
ON:
Puls, Charles Deputy Assistant Commissioner (Texas Higher Education Coordinating
Board), Austin, TX
ON:
Murr, Christopher (Tx State University), San Marcos, TX
Registering, but not testifying:
FOR:
Martinez, Ray President (Independent Colleges and Universities of Texas), Austin, TX
ON:
Gossman, Ginger Senior Director for Innovation, Policy and Develop (Texas Higher
Education Coordinating Board), Austin, TX
Providing written testimony:
FOR:
Falks, Delisa (Texas Association of Student Financial Aid Administrators), Tx, TX
Parker, Jimmy President (Self), Canyon, TX
FOR:
Martinez, Ray Presideny (Independent Colleges and Universities of Texas), Austin, TX
ON:
Marquez, Raquel Dr. (also providing written testimony) (UTSA), San Antonio, TX
Sanchez, Patricia Dr. (also providing written testimony) (UTSA), San Antonio, TX
WITNESS LIST
Higher Education
April 3, 2019 9:00 AM
Registering, but not testifying:
FOR:
Fountain, Sandra (Self), Austin, TX
MacDougal, Vanessa Ms (Self), Austin, TX
Menendez, Fatima Legislative Attorney (MALDEF), San Antonio, TX
Person, Maria (Self), Austin, TX
Ross, Robyn (Self), Austin, TX
Simon, Arthur (Self), Austin, TX
ON:
Kromrei, Liz Director of Services (Dept. of Family and Protective Services), Austin, TX
Puls, Charles Deputy Assistant Commissioner (Texas Higher Education Coordinating
Board), Austin, TX
Registering, but not testifying:
FOR:
Fountain, Sandra (Self), Austin Tx, TX
Frandsen, Chris (Self; Texas League Of Women Voters), Austin, TX
MacDougal, Vanessa Ms (Self), Austin, TX
Person, Maria (Self), Austin, TX
Ross, Robyn (Self), Austin, TX
Simon, Arthur (Self), Austin, TX
ON:
Hoffman, Shannon Policy Fellow (The Hogg Foundation for Mental Health), Austin, TX
ON:
Eighmy (pronounced Amy), Taylor President of UTSA (University of Texas at San
Antonio), San antinio, TX
Hellyer, Brenda Texas Assc of Community Colleges (also providing written testimony)
(TACC), Pasadena, TX
Hoyt, Dana President (Sam Houston State University), Huntsville, TX
Paredes, Raymund Commissioner of Higher Education (Texas Higher Education
Coordinating Board), Austin, TX
Registering, but not testifying:
FOR:
Yancy, Justin President (Texas Business Leadership Council), Austin, TX
ON:
Eklund, Julie Assistant Commissioner (Texas Higher Education Coordinating Board),
Austin, TX
ON:
Paredes, Raymund Commissioner of Higher Education (Texas Higher Education
Coordinating Board), Austin, TX
WITNESS LIST
Higher Education
April 3, 2019 9:00 AM
Registering, but not testifying:
FOR:
MacDougal, Vanessa Ms (Self), Austin, TX
Ross, Robyn (Self), Austin, TX
Simon, Arthur (Self), Austin, TX
Yancy, Justin President (Texas Business Leadership Council), Austin, TX
ON:
Eklund, Julie Assistant Commissioner (Texas Higher Education Coordinating Board),
Austin, TX
Hoyt, Dana President (Sam Houston State University), Huntsville, TX
Registering, but not testifying:
FOR:
Lowry, Lance Director (Texas Association of Taxpayers), Huntsville, TX
ON:
Pifko, Melissa Vice President and Chief Legal Officer UTHealth (University of Texas
Health Science Center Houston), Houston, TX


| open |
/SeaChangePlatform/login |
|
| type |
id=username_or_email |
<EMAIL_ADDRESS>|
| type |
id=password |
a |
| clickAndWait |
id=login |
|
| clickAndWait |
id=authoringImage |
|
| clickAndWait |
link=Create a new Roleplay |
|
| type |
id=roleplayName |
Buying Oranges |
| clickAndWait |
id=createButton |
|
| clickAndWait |
id=authorHomeLink |
|
| clickAndWait |
link=Enter Learning Objectives |
|
| type |
id=objectives |
Teach basic negotiation. |
| clickAndWait |
id=enterSave |
|
| type |
id=objectives |
Teach one aspect of basic negotiation. |
| clickAndWait |
id=enterSave |
|
| clickAndWait |
id=cancel |
|
| clickAndWait |
link=Enter Your Audience |
|
| type |
id=audience |
learners |
| clickAndWait |
id=enterSave |
|
| clickAndWait |
id=cancel |
|
| clickAndWait |
id=authorCreateActors |
|
| type |
id=actorName |
Orange Salesman |
| type |
id=publicDescription |
Owns a booth where he sells oranges |
| click |
id=roleTypeControl |
|
| type |
id=actorImage |
C:\SeaChangePlatform\src\test\images\actor.png |
| clickAndWait |
id=createButton |
|
| clickAndWait |
id=authorCreateActorsClear |
|
| type |
id=actorName |
Buyer 1 - The Juicer |
| type |
id=publicDescription |
Has a booth where he sells juices. |
| click |
id=roleTypeNormal |
|
| clickAndWait |
id=createButton |
|
| clickAndWait |
id=authorCreateActorsClear |
|
| type |
id=actorName |
Buyer 2 - The Jellier |
| type |
id=publicDescription |
Has a booth where he sells jams and jellies |
| click |
id=roleTypeNormal |
|
| clickAndWait |
id=createButton |
|
| clickAndWait |
id=authorHomeLink |
|
| clickAndWait |
id=authorCreatePhases |
|
| type |
id=phaseName |
Purchasing Phase |
| type |
id=publicDescription |
During this phase the actors will purchase what they will need. |
| clickAndWait |
id=createButton |
|
| type |
id=phaseName |
Reflection |
| type |
id=publicDescription |
During this phase the actors will reflect on events and their performance in the previous phase. |
| clickAndWait |
id=createButton |
|
| clickAndWait |
id=authorHomeLink |
|
| clickAndWait |
id=authorPlacePlugins |
|
| type |
id=pluginHeading |
Introduction |
| clickAndWait |
id=addPluginButton |
|
| clickAndWait |
link=Introduction |
|
| type |
id=documentName_2 |
Intro Text |
| type |
id=documentText_2 |

Welcome

 This is your roleplay
 |
| clickAndWait |
id=addObject |
|
| clickAndWait |
id=authorPlacePlugins |
|
| type |
id=pluginHeading |
Background |
| clickAndWait |
id=addPluginButton |
|
| clickAndWait |
link=Background |
|
| type |
id=documentName_3 |
Background |
| type |
id=documentText_3 |

Sceneario Background Info

 You need to purchase oranges..
 |
| clickAndWait |
id=addObject |
|
| clickAndWait |
id=authorPlacePlugins |
|
| select |
id=selectActorList |
value=1 |
| type |
id=pluginHeading |
Info for Facilitator |
| clickAndWait |
id=addPluginButton |
|
| clickAndWait |
link=Info for Facilitator |
|
| type |
id=documentName_4 |
Faciliator Information |
| type |
id=documentText_4 |

Facilitator

You want to guide them toward win-win, while trying to look like you are not doing so. Maybe start a bidding war, and let them see how that goes.
 |
| clickAndWait |
id=addObject |
|
| clickAndWait |
id=authorPlacePlugins |
|
| select |
id=rawPluginId |
label=Basic View Messages Page |
| type |
id=pluginHeading |
Messages |
| clickAndWait |
id=addPluginButton |
|
| clickAndWait |
id=authorHomeLink |
|
| clickAndWait |
id=authorPublishRoleplay |
|
| clickAndWait |
id=makeTestableButton |
|
| clickAndWait |
id=publishButton |
|
| clickAndWait |
id=authorHomeLink |
|
| clickAndWait |
id=linkToLogout |
|


Ansible is capable of handling many powerful automation tasks with the flexibility to adapt to many environments and workflows. With Ansible, users can very quickly get up and running to do real work.
It's a simple automation language that can perfectly describe an IT application infrastructure in Ansible Playbooks.
It's an automation engine that runs Ansible Playbooks.
Ansible Tower is an enterprise framework for controlling, securing and managing your Ansible automation with a UI and RESTful API.
CROSS PLATFORM – Linux, Windows, UNIX Agentless support for all major OS variants, physical, virtual, cloud and network
HUMAN READABLE – YAML Perfectly describe and document every aspect of your application environment
PERFECT DESCRIPTION OF APPLICATION Every change can be made by playbooks, ensuring everyone is on the same page
VERSION CONTROLLED Playbooks are plain-text. Treat them like code in your existing version control.
DYNAMIC INVENTORIES Capture all the servers 100% of the time, regardless of infrastructure, location, etc.
ORCHESTRATION THAT PLAYS WELL WITH OTHERS – HP SA, Puppet, Jenkins, RHNSS, etc. Homogenize existing environments by leveraging current toolsets and update mechanisms.
COMMUNICATION IS THE KEY TO DEVOPS.
Ansible is the first automation language
that can be read and written across IT.
Ansible is the only automation engine
that can automate the entire application lifecycle
and continuous delivery pipeline.
Ansible comes bundled with hundreds of modules for a wide variety of automation tasks
THE MOST POPULAR OPEN-SOURCE AUTOMATION COMMUNITY ON GITHUB
http://ansible.com/community
# the best way to install Ansible on
# CentOS, RHEL, or Scientific Linux
# is to configure the EPEL repository
# and install Ansible directly
$ sudo yum install ansible
# on Debian or Ubuntu you will need the PPA
# repo configured
$ sudo apt-get install ansible
# on all other platforms it can be
# installed via pip
$ sudo pip install ansible
Modules are bits of code transferred to the target system and executed to satisfy the task declaration.
https://docs.ansible.com/ansible/latest/modules/modules_by_category.html
# List out all modules installed
$ ansible-doc -l
...
copy
cron
...
# Read documentation for installed module
$ ansible-doc copy
> COPY
The [copy] module copies a file on the local box to remote locations. Use the [fetch] module to copy files from remote locations to the local
box. If you need variable interpolation in copied files, use the [template] module.
* note: This module has a corresponding action plugin.
Options (= is mandatory):
...
If Ansible doesn't have a module that suits your needs there are the “run command” modules:
/bin/sh
so you can use pipes etc. Be careful.
NOTE: Unlike standard modules, run commands have no concept of desired state and should only be used as a last resort.
Inventory is a collection of hosts (nodes) with associated data and groupings that Ansible can connect and manage.
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
host.example.com
[control]
control ansible_host=<IP_ADDRESS>
[web]
node-[1:3] ansible_host=10.42.0.[6:8]
[haproxy]
haproxy ansible_host=<IP_ADDRESS>
[all:vars]
ansible_user=vagrant
ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
An ad-hoc command is a single Ansible task to perform quickly, but don’t want to save for later.
# check all my inventory hosts are ready to be
# managed by Ansible
$ ansible all -m ping
# collect and display the discovered facts
# for the localhost
$ ansible localhost -m setup
# run the uptime command on all hosts in the
# web group
$ ansible web -m command -a "uptime"
Facts are bits of information derived from examining a host systems that are stored as variables for later use in a play.
$ ansible localhost -m setup
localhost | success >> {
"ansible_facts": {
"ansible_default_ipv4": {
"address": "<IP_ADDRESS>",
"alias": "wlan0",
"gateway": "<IP_ADDRESS>",
"interface": "wlan0",
"macaddress": "c4:85:08:3b:a9:16",
"mtu": 1500,
"netmask": "<IP_ADDRESS>",
"network": "<IP_ADDRESS>",
"type": "ether"
},
Ansible can work with metadata from various sources and manage their context in the form of variables.
The order in which the same variable from different sources will override each other.
Tasks are the application of a module to perform a specific unit of work.
tasks:
- name: Ensure httpd package is latest
yum:
name: httpd
state: latest
- name: Ensure latest index.html file is present
copy:
src: files/index.html
dest: /var/www/html/
- name: Restart httpd
service:
name: httpd
state: restarted
This example shows the task list of an Ansible playbook.
Handlers are special tasks that run at the end of a play if notified by another task when a change occurs.
If a package gets installed or updated, notify a service restart task that it needs to run.
Normal tasks run sequentially; handler tasks run on notification of a change and will only run once at the end of a play.
For more information see Handler Tasks.
tasks:
- name: Ensure httpd package is latest
yum:
name: httpd
state: latest
notify: restart httpd
- name: Ensure latest index.html file is present
copy:
src: files/index.html
dest: /var/www/html/
handlers:
- name: restart httpd
service:
name: httpd
state: restarted
Here is our previous example with a few slight modifications that have been highlighted.
In this version of our example, we add a notify
keyword to the first task to trigger a handler task if it returns "changed" as being true. The third tasks now is under a "handlers" section that signifies that the handler task will run on notification at the end of the play of change occurs during the first task.
Plays are ordered sets of tasks to execute against host selections from your inventory. A playbook is a file containing one or more plays.
Playbooks are text files that contain one or more plays that are expressed in YAML. A play defines target hosts and a task list that are executed sequentially (i.e top to bottom) to achieve a certain state on those hosts.
For more details see the Playbook page in the Ansible documentation.
---
- name: Ensure apache is installed and started
hosts: web
become: yes
vars:
http_port: 80
tasks:
- name: Ensure httpd package is present
yum:
name: httpd
state: latest
- name: Ensure latest index.html file is present
copy:
src: files/index.html
dest: /var/www/html/
- name: Ensure httpd is started
service:
name: httpd
state: started
Here we can see an example of a simple but complete Ansible play. The slides that follow will explore each of these parts and what they do.
---
- name: install and start apache
hosts: web
become: yes
vars:
http_port: 80
tasks:
- name: httpd package is present
yum:
name: httpd
state: latest
- name: latest index.html file is present
copy:
src: files/index.html
dest: /var/www/html/
- name: httpd is started
service:
name: httpd
state: started
Every play and each task in it can be assigned a name that describes its objective in the automation workflow and is output during execution.
It's best practice to always name your plays and tasks. Adding name with a human-meaningful description better communicates the intent to users when running a play.
---
- name: Ensure apache is installed and started
hosts: web
become: yes
vars:
http_port: 80
tasks:
- name: Ensure httpd package is present
yum:
name: httpd
state: latest
- name: Ensure latest index.html file is present
copy:
src: files/index.html
dest: /var/www/html/
- name: Ensure httpd is started
service:
name: httpd
state: started
The Ansible play host selector defines which nodes in the inventory the automation is targeting.
In this example, a single group of "web" is being targeted. Ansible supports targeting intersections, unions and filters of multiple groups or hosts though.
For more details see the host selector Patterns page in the Ansible documentation.
---
- name: Ensure apache is installed and started
hosts: web
become: yes
vars:
http_port: 80
tasks:
- name: Ensure httpd package is present
yum:
name: httpd
state: latest
- name: Ensure latest index.html file is present
copy:
src: files/index.html
dest: /var/www/html/
- name: Ensure httpd is started
service:
name: httpd
state: started
Ansible allows you to "become" another user or with elevated rights to execute a task or an entire play (shown above). This is done using existing privilege escalation tools, which you probably already use or have configured, like sudo (the default), su, pfexec, doas, pbrun, dzdo, ksu and others.
For more details see the Privilege Escalation page in the Ansible documentation.
---
- name: Ensure apache is installed and started
hosts: web
become: yes
vars:
http_port: 80
tasks:
- name: Ensure httpd package is present
yum:
name: httpd
state: latest
- name: Ensure latest index.html file is present
copy:
src: files/index.html
dest: /var/www/html/
- name: Ensure httpd is started
service:
name: httpd
state: started
Variables are used to store metadata for each host drawing from numerous sources. Here we see another one of those sources, a variable "http_port" that has been embedded in a play.
Recalling the previous variable precedence slide, play variables are number 7 in Ansible's the precedence chain.
---
- name: Ensure apache is installed and started
hosts: web
become: yes
vars:
http_port: 80
tasks:
- name: Ensure latest httpd package is present
yum:
name: httpd
state: latest
- name: Ensure latest index.html file is present
copy:
src: files/index.html
dest: /var/www/html/
- name: Ensure httpd is started
service:
name: httpd
state: started
Here we see modules, such as yum, being applied to a to perform a unit of automation such as to assure the latest httpd package is present on a host.
To demonstrate how an Ansible, open an SSH session to your control host and run the playbook in examples/apache-simple-playbook
. That example playbook is essentially the same one we just examined.
Don't forget to reverse what this playbook does before continuing to not interfere with later demos and workshops.
This assignment provides a quick introduction to playbook structure to give them a feel for how Ansible works, but in practice is too simplistic to be useful.
See workshops/simple_playbook
in the Ansible Lightbulb repo.
Note: If your time is limited, this is a workshop you can skip. We'll cover this and more topics in the next workshop.
Here are some more essential playbook features that you can apply:
We only have covered the most essential capabilities of what can be done with a playbook so far.
Here we list a few more though this is still far from all there is. There's many other powerful playbook features for handling less common though vital automation workflows. No need to learn everything at once. You can start small and pick up more features over time as you need them.
Ansible embeds the Jinja2 templating engine that can be used to dynamically:
Templates are a vital feature provided by the Jinja2 template engine, a powerful piece of software independent of Ansible. Ansible makes this usage as seamless and transparent as possible. Most will not realize they are doing templating when they develop plays with Ansible.
We don't show any specific template examples at the moment because we'll have plenty of opportunity to see templates in action as we cover other topics.
In all actuality, what is covered here only touches upon a few of its most basic features. To go deeper see these docs:
Loops can do one task on multiple things, such as create a lot of users, install a lot of packages, or repeat a polling step until a certain result is reached.
- yum:
name: "{{ item }}"
state: latest
loop:
- httpd
- mod_wsgi
This example demonstrates a basic loop with loop
. The loop sets a variable called "item", a template variable courtesy of the embedded Jinja2 template engine, with the list value that is in context.
There are many different and specialized types of task loops to work with. See the Loops documentation to go deeper.
Ansible supports the conditional execution of a task based on the run-time evaluation of variable, fact, or previous task result.
- yum:
name: httpd
state: latest
when: ansible_os_family == "RedHat"
Conditionals are another instance of Jinja2 in action within Ansible plays themselves. In the provided example "ansible_os_family" is a fact variable Ansible will set.
There are other forms of conditional clauses, but when
is usually all that is needed.
NOTE: Conditional clauses are considered to be raw Jinja2 expression without double curly braces.
Tags are useful to be able to run a subset of a playbook on-demand.
- yum:
name: "{{ item }}"
state: latest
loop:
- httpd
- mod_wsgi
tags:
- packages
- template:
src: templates/httpd.conf.j2
dest: /etc/httpd/conf/httpd.conf
tags:
- configuration
In the provided example, if the playbook were run with --tags "packages"
the yum task would execute and the template task would be skipped. If the playbook were run with --tags "configuration"
the opposite would happen. Without a --tags
both tasks would execute like normal.
Tags can be seen as a simple though specialized form of conditional statement designed to enable the execution of a subset tasks. Tags are a bit more than simple boolean flags though. To dig deeper see the playbook Tags documentation.
Blocks cut down on repetitive task directives, allow for logical grouping of tasks and even in play error handling.
- block:
- yum:
name: "{{ item }}"
state: latest
loop:
- httpd
- mod_wsgi
- template:
src: templates/httpd.conf.j2
dest: /etc/httpd/conf/httpd.conf
when: ansible_os_family == "RedHat"
In the provided example we use a block to group two tasks that are to be conditional executed if a host is running a Red Hat family linux using one conditional clause. In practice, we could have copied the when
clause onto each task and gotten same result. Using a block, there is less clutter thereby less to maintain and nothing to keep in sync. The utility of using a block increases the more tasks and clauses are in use.
Blocks have a play in error handling and automating roll backs that we won't get into here given the scope of that topic.
See the documentation on blocks to dig deeper.
The simple playbook we examined gave us a sense of the structure of a playbook and how they work, but in reality was too simplistic to be practical. Here we look at a basic playbook that it more complete to what users will commonly do with Ansible.
Walk thru the site.yml playbook in examples/apache-basic-playbook
and note the added logic and its function. Then, run the playbook on the control host.
Don't forget to reverse what this playbook does before continuing to not interfere with later demos and workshops.
In this workshop assignment students are tasked with developing their first complete playbook. The assignment approximates the tasks they will typical need to take in order to deploy and configure a single application service using Nginx.
See workshops/basic_playbook/
in the Ansible Lightbulb repo.
Tip: Don't rush this workshop. Give students ample time to do this workshop themselves to completion. This workshop covers the essential concepts and features of effectively automation with Ansible and builds up their core skills for further exploration.
Roles are a packages of closely related Ansible content that can be shared more easily than plays alone.
Roles are closely related Ansible content that are organized into a pre-defined directory structure, making them easier to reuse and share among groups.
site.yml
roles/
common/
files/
templates/
tasks/
handlers/
vars/
defaults/
meta/
apache/
files/
templates/
tasks/
handlers/
vars/
defaults/
meta/
This slide shows an example file system with a top-level playbook (site.yml) and two sample roles (common and apache) embedded in the project. Notice how the file structure under each role are similar to what we find in a play. Role deconstruct the content we'd put in a play and package it up in such a way that it is portable and easily shared and reused.
# site.yml
---
- name: Execute common and apache role
hosts: web
roles:
- common
- apache
This slide shows the site.yml playbook using the roles in our example project. Notice that it is much more concise than what we've seen.
http://galaxy.ansible.com
Ansible Galaxy is a hub for finding, reusing and sharing Ansible content.
Jump-start your automation project with content contributed and reviewed by the Ansible community.
Ansible Galaxy refers to the Galaxy website, a hub for finding, downloading, and sharing community developed roles. Downloading roles from Galaxy is a great way to jump-start your automation projects.
Galaxy also refers to a command line tool, ansible-galaxy
, for installing, creating and managing roles from the Galaxy website or directly from a git based SCM. You can also use it to create a new role, remove roles, or perform tasks on the Galaxy website.
Walk thru the site.yml playbook and the contents of roles/apache
in examples/apache-role
. Note how the tasks, variables and handlers from the basic Ansible playbook we've been examined and have been refactored into a role.
Run the playbook on the control host. Notice anything different?  What's important is how roles let you better organize, share and reuse Ansible content that will be vital as the scope and sophistication of your automation accelerates.
Here students are tasked with refactoring their previous work from the Practical Playbook workshop into a role and modifying their playbook accordingly. We intentionally avoid introducing any new tasks or functionality otherwise. The objective here is to focus students specifically on how roles are structured and develop.
You should emphasize the value of roles in better organizing playbooks as they grow in sophistication and making Ansible automation more portable and reusable than a basic playbook.
See workshops/roles
in the Ansible Lightbulb repo.


MM_Wrapper Submodule¶
janus.mm_wrapper.MMWrapper (class_type[, …]) |
A super class for all molecular mechanics wrappers |
janus.mm_wrapper.OpenMMWrapper ([sys_info, …]) |
A MM wrapper class that calls OpenMM to obtain molecular mechanics information. |
MMWrapper¶
-
class
janus.mm_wrapper.
 Not applicable for MM programs
- include_coulomb (str) – whether to include coulombic interactions. ‘all’ (default) includes coulombic forces for all particles, ‘no_link’ excludes coulombic forces for link atoms, ‘only’ excludes all other forces for all atoms, ‘none’ excludes coulombic forces for all particles.
- link_atoms (list) – indices of link_atoms
- minimize (bool) – whether to return the geometry optimized energy
- charges (list) – charges and corresponding positions in angstroms as xyz coordinates
Returns: A dictionary with energy(‘energy’) and gradient(‘gradients’) information
Return type: dict
-
get_geom_from_trajectory
()¶ Function not implemented for MM wrappers
-
get_main_charges
()¶ Function implemented in individual child classes
-
get_main_info
()¶ Function implemented in individual child classes
-
initialize
()¶ Function implemented in individual child classes
-
kjmol_nm_to_au_bohr
= 2.0155397435886694e-05¶
-
kjmol_to_au
= 0.0003808798033989866¶
-
nm_to_angstrom
= 10.0¶
-
nm_to_bohr
= 0.052917999999¶
-
optimize_geometry
()¶ Function not implemented for MM wrappers
-
set_external_charges
()¶ Function implemented in individual child classes
-
set_qm_geometry
()¶ Function not implemented for MM wrappers
-
set_up_reporters
()¶ Function implemented in individual child classes
-
take_step
(force)¶ Function implemented in individual child classes
-
OpenMMWrapper¶
-
class
janus.mm_wrapper.
OpenMMWrapper
(sys_info=None, sys_info_format='pdb', mm_forcefield='amber99sb.xml', mm_water_forcefield='tip3p.xml', NVE_integrator='Verlet', NVT_integrator='Langevin', temp=300, step_size=1, fric_coeff=1, nonbondedCutoff=0.8, **kwargs)¶ Bases:
janus.mm_wrapper.mm_wrapper.MMWrapper
A MM wrapper class that calls OpenMM to obtain molecular mechanics information. Also can be used to take steps in a molecular dynamics simulation. Class inherits from MMWrapper.
Parameters: - sys_info (str) – A string with the filename or a list with multiple filenames that contain position and topology information. Default is None.
- sys_info_format (str) – A str describing what kind of input is contained in sys_info. Default is pdb. Possible values also include Amber and Gromacs.
- mm_forcefield (str) – The name of the forcefield to use, default is amber99sb.xml.
- mm_water_forcefield (str) – The name of the forcefield to use for water, default is tip3p.xml.
- NVE_integrator (str) – What type of integrator to use for a NVE ensemble, default is Verlet.
- NVT_integrator (str) – What type of integrator to use for a NVT ensemble, default is Langevin.
- temp (Int) – The temperature at which to run a simulation in kelvin, default is 300.
- step_size (float) – The step size to integrate system in femtoseconds, default is 1.
- fric_coeff (float) – friction coefficient to couple the system to heat bath in a NVT ensemble in inverse picoseconds, default is 1.
- nonbondedCutoff (float) – The cutoff distance for nonbonded interactions in nanometers, default is 1.
- **kwargs –
Other parameters for OpenMM, which include: - nonbondedMethod : method for nonbonded interactions, default is OM_app.NoCutoff - constraints : which bonds and angles implemented with constraints,
default is None- rigid_water : whether water is treated as rigid, default is True
- removeCMMotion : whether to include a CMMotionRemover, default is True
- ignoreExternalBonds : whether to ignore external bonds when matching residues to templates,
- default is True
- flexibleConstraints : whether to add parameters for constrained parameters,
- default is False
- hydrogenMass : the mass to use for hydrogen atoms bonded to heavy atoms,
- default is False
- residueTemplates : allows user to specify a template for a residue,
- default is empty dict {}
- switchDistance : the distance to turn on potential energy switching function for
- Lennard-Jones interactions. Default is None
- keywords for MD simulation parameters.
- For possible keywords consult the Molecular Dynamics section of the manual.
Each pair of key:value in the dictionary is given as a string. For more information about these pararmeters and other possible parameter values consult docs.openmm.org
-
compute_info
(topology, positions, include_coulomb='all', initialize=False, return_system=False, return_simulation=False, link_atoms=None, minimize=False)¶ Gets information about a system.
Parameters: - topology (OpenMM topology object) –
- positions (OpenMM Vec3 vector) – contains the positions of the system in nm
- include_coulomb (str) – whether to include coulombic interactions. ‘all’ (default) includes coulombic forces for all particles, ‘no_link’ excludes coulombic forces for link atoms, ‘only’ excludes all other forces for all atoms, ‘none’ excludes coulombic forces for all particles.
- initialize (bool) – Whether the main system is being initialized.
- return_system (bool) – True(default) to return OpenMM system object
- return_simulation (bool) – True(default) to return OpenMM simulation object
- link_atoms (list) – if included as a list with include_coulomb=’no_link’, specifies which atoms to remove coulombic forces from. Default is None.
- minimize (bool) – whether to minimize the energy of the system
Returns: - dict – A dictionary with state information
- OpenMM system object – OpenMM system object returned unless return_system=False
- OpenMM simulation object – OpenMM simulation object returned unless return_simulation=False
Examples
>>> system, simulation, state = compute_info(top, pos)
>>> state = compute_info(top, pos, return_simulation=False, return_system=False)
-
convert_input
()¶ Converts inputs to OpenMM readable topologies and positions. Currently supports pdb inputs as well as Amber and Gromacs input files.
-
convert_trajectory
(traj)¶ Converts an OpenMM trajectory to get topology and positions that are compatible with MDtraj
Parameters: traj (OpenMM trajectory object) – Returns: - list – positions in nm
- OpenMM topology object
Examples
>>> positions, topology = convert_trajectory(OpenMM_traj)
-
create_modeller
(atoms, keep_atoms=False)¶ Makes a OpenMM modeller object based on given geometry
Parameters: - atoms (list) – The subset of atom indices to either keep or delete
- keep_atoms (bool) – Whether to keep the atoms specified in the modeller or delete them. Default is false.
Returns: Return type: A OpenMM modeller object
Examples
>>> modeller = self.make_modeller() modeller = self.make_modeller(keep_qm=True)
-
create_new_residue_template
(topology)¶ Create a new OpeMM residue template when there is no matching residue and registers it into self.forcefield forcefield object.
Note
currently, if there is unmatched name, currently only checks original unmodified residue, N-terminus form, and C-terminus form. This may not be robust.
Parameters: topology (OpenMM topology object) – Examples
>>> create_new_residue_template(topology)
-
create_openmm_simulation
(openmm_system, topology, positions, integrator, return_integrator=False, seed=0)¶ Creates an OpenMM simulation object given an OpenMM system, topology, and positions
Parameters: - openmm_system (OpenMM system object) –
- topology (OpenMM topology object) –
- positions (OpenMM Vec3 vector) – contains the positions of the system in nm
- integrator (str) – What type of integrator to use. Currently support Langevin and Verlet.
- return_integrator (bool) – Whether to return the OpenMM integrator object
- seed (int) – Set a random seed number for the Langevin integrator. Default is 0, which means seed is randomized every time.
Returns: - OpenMM simulation object
- OpenMM integrator object – Returned unless return_integrator is False
Examples
>>> create_open_simulation(openmm_sys, top, pos) create_open_simulation(openmm_sys, pdb.topology. pdb.positions)
-
create_openmm_system
(topology, include_coulomb='all', link_atoms=None, initialize=False)¶ Calls OpenMM to create an OpenMM System object give a topology, forcefield, and other parameters specified in the instantiation parameters.
Note
Currently there is no support for customized forcefields
Parameters: - topology (OpenMM topology object) –
- include_coulomb (str) – whether to include coulombic interactions. ‘all’ (default) includes coulombic forces for all particles, ‘no_link’ excludes coulombic forces for link atoms, ‘only’ excludes all other forces for all atoms, ‘none’ excludes coulombic forces for all particles.
- link_atoms (list) – if included as a list with include_coulomb=’no_link’, specifies which atoms to remove coulombic forces from. Default is None.
- initialize (bool) – Whether the main system is being initialized.
Returns: Return type: OpenMM system object
Examples
>>> openmm_sys = create_openmm_system(topology) openmm_sys = create_openmm_system(top, include_coulomb='no_link', link_atoms=[0,1,2]) openmm_sys = create_openmm_system(top, include_coulomb='only') openmm_sys = create_openmm_system(top, initialize=True)
-
delete_atoms
(atoms)¶ Delete specified atoms from an OpenMM Modeller object
Parameters: - model (OpenMM Modeller object) –
- atoms (list) – which atom IDs (int) or atom names (str) to delete an OpenMM Modeller object
Examples
>>> delete_atoms(model, [0, 3, 5]) delete_atoms(model, ['Cl'])
-
get_main_charges
()¶ Gets the MM point charges for the system of interest
Returns: charges of system Return type: list Examples
>>> charges = get_main_charges()
-
get_main_info
()¶ Gets the information for the system of interest. Calls
get_state_info()
to obtain information.Returns: Information including the current energy, gradient, and positions for the system of interest Return type: dict
-
get_state_info
(main_info=False, energy=True, positions=True, velocity=False, forces=True, parameters=False, param_deriv=False, periodic_box=False, groups_included=-1)¶ Gets information like the kinetic and potential energy, positions, forces, and topology from an OpenMM state. Some of these may need to be made accessible to user.
Parameters: - simulation (OpenMM simulation object) –
- main_info (bool) – specifies whether to return the topology of the system
- energy (bool) – spcifies whether to get the energy, returned in hartrees(a.u.), default is true.
- positions (bool) – specifies whether to get the positions, returns in nanometers, default is true
- velocity (bool) – specifies whether to get the velocities, default is false
- forces (bool) – specifies whether to get the forces acting on the system, returns as numpy array in jk/mol/nm, as well as the gradients, in au/bohr, default is true
- parameters (bool) – specifies whether to get the parameters of the state, default is false
- param_deriv (bool) – specifies whether to get the parameter derivatives of the state, default is false
- periodic_box (bool) – whether to translate the positions so the center of every molecule lies in the same periodic box, default is false
- groups (list) – a set of indices for which force groups to include when computing forces and energies. Default is all groups
Returns: Information specified by parameters. Keys include ‘energy’, ‘potential’, ‘kinetic’, ‘forces’, ‘gradients’, ‘topology’
Return type: dict
Examples
>>> get_state_info(sim) get_state_info(sim, groups_included=set{0,1,2}) get_state_info(sim, positions=True, forces=True)
-
initialize
(embedding_method)¶ Gets information for the system of interest in its initial state. The simulation object and information dictionary returned by
compute_info()
is saved.Parameters: embedding_method (str) – what QM/MM embedding method to use for initialization. If ‘Mechanical’, all forces are included If ‘Electrostatic’, all coulombic forces are excluded
-
keep_atoms
(atoms)¶ Acts on an OpenMM Modeller object to keep the specified atoms in the MM system and deletes everything else
Parameters: - model (OpenMM Modeller object) –
- atoms (list) – which atoms to keep in an OpenMM Modeller object
Examples
>>> keep_atom(mod, [0,1]) keep_atom(mod, ['O', 'H'])
-
restart
(embedding_method, chkpt_file, restart_forces)¶
-
set_LJ_zero
(OM_system)¶ Removes the Lennard-Jones (van der Waals) force from the system
Parameters: OM_system (OpenMM system object) –
-
set_charge_zero
(OM_system, link_atoms=None)¶ Removes the coulombic forces by setting charges of specified atoms to zero
Parameters: - OM_system (OpenMM system object) –
- link_atoms (list) – link_atoms to set the charge to zero, if link_atoms is None (default), the charge of all particles in the system will be set to zero
Examples
>>> set_charge_zero(system) set_charge_zero(system, link_atoms=[0,1,2])
-
set_external_charges
()¶ Function not implemented for classes
-
set_up_reporters
(simulation)¶ Sets up reporters according to options specified by arguments in md_param. See keywords in the Molecular Dynamics section of the manual for more information.
Parameters: simulation (OpenMM simulation object) – Adds reporters to simulation object
-
take_step
(num)¶ Takes a specified num of steps in the MD simulation
Parameters: num (int) – the number of pure MD steps to take
-
take_updated_step
(force)¶ Updates the system with forces from qmmm and takes a simulation step
Parameters: force (dict) – forces(particle index : forces) in au/bohr to be updated in custom qmmm force and fed into simulation
-
update_forces
(forces, force_obj, simulation)¶ Updates a simulation with external forces
Parameters: - force (dict) – forces(particle index : forces) in au/bohr to be updated in a force object and fed into simulation
- force_obj (OpenMM Force object) – the force object to add the forces to. Can be built in or custom
- simulation (OpenMM simulation object) – where the forces are to be updated in
-
write_pdb
(info)¶ Write a pdb file
Parameters: info (dict) – dictionary containing the topology and positions of the system to write to file


'Friends' alum Courteney Cox, reunites with Matthew Perry after fans express concern over actor's appearance
by Mariah HaasChandler and Monica are still there for each other.
"Friends" alum Courteney Cox shared a rare picture of herself reuniting with former co-star Matthew Perry on Thursday. The pair's characters famously fell in love and got married on the hit '90s sitcom.
"Guess who I had lunch with today....I KNOW!!" the 55-year-old actress captioned the shot.
JENNIFER ANISTON REUNITES WITH 'FRIENDS' CAST FOR HER INSTAGRAM DEBUT
"Could I BE any happier? #realfriends," she added.
Needless to say, the comments were flooded with fans -- including the duo's "Friends" co-stars -- losing it over the picture.
"MATTY!! ❤❤❤ I LOVE YOU, GUYS" said Jennifer Aniston, who played Rachel on the series.
PHOTOS OF MATTHEW PERRY HAVE ACTOR'S FANS WONDERING IF HE'S OK
Lisa Kudrow, who starred as Phoebe, commented: "Lucky lucky. #beautifulpeople."
The selfie comes after fans expressed concern over Perry, 50, when he was photographed looking a bit disheveled with a mystery woman in Los Angeles.
Last month, Perry made an appearance in Aniston's Instagram debut, which featured the full cast of "Friends."
CLICK HERE TO GET THE FOX NEWS APP
In the photo, the cast members are smiling from ear-to-ear as they crammed into the frame in front of a table as Aniston snapped the selfie.
"Friends" came to an end in May 2004 after 10 seasons.


If you you have already been invited to the Merit world, then you can start using the Merit Web Wallet in a few simple clicks.
Simply click Create Wallet Below, and you will be able to enter an "Invite Code" and an "Alias."
The invite code should have been provided by the referring friend..

*NOTE:* You will not be able to add or change your alias later; so it is recommended that you choose one now.


Welcome
| #{text['webapp.name']}
AppFuse Light
Home
Users
Resources
The following is a list of resources that will make
Spring
infinitely easier to use.
Spring 4.0 Docs
Spring 4.0 API
Spring Books
Spring Forums


--- bg: "rails.jpg" layout: twitter crawlertitle: "The AIA Research Group" title: "The AIA Research Group" summary: "UCLouvain" twitter: "AIA_UCLouvain" ---
Welcome to the website of the AIA research group of the UCLouvain, led by Yves Deville, Pierre Dupont, Sébastien Jodogne, Siegfried Nijssen and Pierre Schaus. Our research focuses on the algorithmic aspects of artificial intelligence. Topics we study are:


Current The layer of an open Sheet.JB0 file which receives new segments as they are created..
You may declare any layer of an open sheet Current.
Select target layer, and
Choose Current radio button.
New drawing segements are added to the Current Layer of the Open file as they are created.
You can move segments from Active layers to the Current layer using MenuBar - Cut and Paste
Only one Layer may be current at a time.
One Layer must be current.
By default, the first layer listed is current when the sheet is opened.


To construct the centre of a given circle:
pick three points on the circle, A, B and C;
find the perpendicular bisectors of AB ad AC;
mark the intersection, D, of these two bisectors - this is the centre of the circle.
(Compare the procedure for constructing the circumcircle of a given triangle).


My Site
Home
(current)
Contact
interactive
>
Coming Soon!
Search
Azhar Alali
Build apps that interact with public services!
Enter your name (2 to 55 characters):
Enter first number (1 to 99):
Enter second number (1 to 99):
Try these:
sum


--- layout: default title: PostgreSQL JDBC Community resource: ../media nav: ../ --- {% include submenu_community.html %}
PostgreSQL is well supported by its active community. Current developments are chronicled in the PostgreSQL Weekly News and there are more than a dozen mailing lists available, categorized into topics like administration, announcements, jobs, performance, and SQL.
The PostgreSQL JDBC Driver is a subset of the PostgreSQL database active community that strives to create a compliant Java interface for users. Please see the mailing list link or development menu for additional information regarding the community.


2017.07.08-2017.07.16
2017 Beijing International Composition Workshop
2017.05.21-2017.05.27
2017 Beijing Modern Music Festival
2017.05.05-2017.05.07
Inaugural Conference of Music Education Alliance Across the ...
2016.10.17-2016.10.30
The 1st Beijing International Fryderyk Chopin Piano Competit...
The "Golden October" Joint Opera Concert of Central Conservatory of Music and Toronto School of Music ...
After two days hard work rehearsals, the "Golden October" Joint Opera Concert of Central Conservatory of Music and Toronto Schoo...
The "Golden October" Joint Opera Concert of Central ...
2017-10-19
Excellent Works of 2017 Beijing International Compos...
2017-10-10
Cross-cultural Journey of Chinese Music--Youth Music...
2017-09-29
Orient String Quartet Performs in Double Happiness C...
2017-09-20
Opening Ceremony of the Academic Year 2017-2018 & th...
2017-09-15
Activity Schedule of Inaugural Conference of Music E...
2017-05-03
Call for Papers: 6th Symposium of the ICTM S...
2017-10-09
3rd ICTM Forum: Approaches to Research on Mu...
2017-10-09
------------ Home ------------
+ What's New?
+ About CCOM
. Message from the President
. Introduction
. CCOM Leadership
. CCOM Facts
. History of CCOM
. Former Presidents
. Events Calendar
. Programs
+ Academics
. Departments and Institutes
. Affiliated Colleges
+ Admission
. Undergraduate Program
. Graduate Program
. Program for International Students
. Middle School and Elementary School attached to CCOM
. Continuing Education Program
. Distance Learning Program
. Department of Training & Further Education
. EOS
+ Administrations
. Office of the President
. Foreign Affairs Office
. Human Resource Office
. Student Affairs Office
. Administrative Office
. Academic Administration Office
. Graduate Affairs Division
. Art Master and Degree Management Office
+ Achievements
. Composition
. Academic Research
. Performance
. Teaching
+ Faculty
. Departments and Institutes
. Distinguished Professors
. Doctoral Advisors
. Honorary Professors
+ Research Institutes and Publications
. Institute of Musicology of CCOM
. Department of Scientific Research
. Press of CCOM
. Journal of CCOM
. Xiao Youmei Music Education Promotion Association
. Institute of Ma Si Cong
. Institute of Buddhist Music
+ Performances and Exchanges
+ Library
+ Campus Life
+ Network Services
+ Alumni
+ Employment
+ Giving to CCOM
11111111111111111


MSSQL backend, thru either pymssq, adodbapi or pyodbc interfaces.
IDENTITY columns are supported by using SA schema.Sequence() objects. In other words:
Table('test', mss_engine, Column('id', Integer, Sequence('blah',100,10), primary_key=True), Column('name', String(20)) ).create()
would yield:
CREATE TABLE test ( id INTEGER NOT NULL IDENTITY(100,10) PRIMARY KEY, name VARCHAR(20) )
Note that the start & increment values for sequences are optional and will default to 1,1.
Support for SET IDENTITY_INSERT ON mode (automagic on / off for INSERT s)
Support for auto-fetching of @@IDENTITY/@@SCOPE_IDENTITY() on INSERT
select._limit implemented as SELECT TOP n
Experimental implemention of LIMIT / OFFSET with row_number()
Known issues / TODO:
overrides bindparam/result processing to not convert any unicode strings
Floating point class for decimal arithmetic.
Represents the number as a triple tuple.
To show the internals exactly as they are.
Compares one to another.
-1 => a < b 0 => a = b 1 => a > b NaN => one is NaN Like __cmp__, but returns Decimal instances.
Returns the larger value.
like max(self, other) except if one is not a number, returns NaN (and signals if one is sNaN). Also rounds.
Returns the smaller value.
like min(self, other) except if one is not a number, returns NaN (and signals if one is sNaN). Also rounds.
Quantize self so its exponent is the same as that of exp.
Similar to self._rescale(exp._exp) but with error checking.
Remainder nearest to 0- abs(remainder-near) <= other/2
Test whether self and other have the same exponent.
same as self._exp == other._exp, except NaN == sNaN
Return the square root of self.
Uses a converging algorithm (Xn+1 = 0.5*(Xn + self / Xn)) Should quadratically approach the right answer.
Convert to engineering-type string.
Engineering notation has an exponent which is a multiple of 3, so there are up to 3 digits left of the decimal place.
Same rules for when in exponential and when as a value as in __str__.
Rounds to the nearest integer, without raising inexact, rounded.
Returns the absolute value of self.
If the second argument is 0, do not round.
Returns self + other.
-INF + INF (or the reverse) cause InvalidOperation errors.
Returns self + other.
-INF + INF (or the reverse) cause InvalidOperation errors.
Return self * other.
(+-) INF * 0 (or its reverse) raise InvalidOperation.
Return self * other.
(+-) INF * 0 (or its reverse) raise InvalidOperation.
Returns a copy, unless it is a sNaN.
Rounds the number (if more then precision digits)
Return self ** n (mod modulo)
If modulo is None (default), don't take it mod modulo.
Move bind parameters to the right-hand side of an operator, where possible.
Look for LIMIT and OFFSET in a select statement, and if so tries to wrap it in a subquery with row_number() criterion.
Pull the raw pymmsql connection out--sensative to "pool.ConnectionFairy" and pymssql.pymssqlCnx Classes
Turn off the INDENTITY_INSERT mode if it's been activated, and fetch recently inserted IDENTIFY values (works only for one column).
MS-SQL has a special mode for inserting non-NULL values into IDENTITY columns.
Activate it if the feature is turned on and needed.


Alograg\Wp\Nonces::verify
Verify that correct nonce was used with time limit.
The user is given an amount of time to use the token, so therefore, since the UID and $action remain the same, the independent variable is the time.
Signature
public function verify(string
$nonce,
[integer
$action = 1] )
Parameters
$nonce
— string- Nonce that was used in the form to verify
$action
— integer- Should give context to what is taking place and be
the same when nonce was created.
Returns
- false|int
- False if the nonce is invalid, 1 if the nonce is valid and
generated between 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
Test Coverage
Information
- Coverage: 4/5 Lines (80%)
- Tests: 1
- Passed: 1 (100%)
Tests
- [ PASSED ] — Alograg\Wp\Tests\NoncesTest::testValidate


Confirmation is only available after the booking is paid in full.


Hello there?
Cynix_pizza_inn is a pizza restaursnt located at Ngara, Nairobi. We sell variety of pizzas' to our
customers. To view and purchase our products click here. We as well offer job oppotunities to potential applicants. Click here to reach to us and we will get to you as soon as we recieve your message.


Cracking the Interview
+
Type of Question
Technical Question
Behavioral Question
Algorithm Question
Programming Language
Javascript
HTML
CSS
Difficulty
Basic
Intermediate
Advanced
Question
Answer
Submit
Type
Language
Difficulty
Question
Answer


2 references to
System.Management.Automation (2)
engine\debugger\debugger.cs (2)
5810
:
base
(runspace, PSMonitorRunspaceType.Standalone)
5874
:
base
(runspace, runspaceType)


--- layout: post title: "Mythbusters: Yes to Ubuntu, No to Vista" date: 2008-01-29 18:43:19 +0000 permalink: /2008/01/29/mythbusters-yes-to-ubuntu-no-to-vista/ category: Misc redirect_from: - /blog/mythbusters-yes-to-ubuntu-no-to-vista/ ---
Jamie Hyneman of Discovery Channel's Mythbusters (an awesome show) occasionally writes a bit for Popular Mechanics. This time he's talking about Technology Headaches. One of those headaches, as most of the IT world has seen, is Windows Vista. His solution? Ubuntu Linux. Pretty awesome that one of the guys that can build ANYTHING chooses Ubuntu. Now if only we could get a Ubuntu-powered robot out of him. :)
http://www.popularmechanics.com/technology/upgrade/4243994.html?page=1