BY EDWIN JAHIEL
FOR LOVE OF THE GAME (1999) *** Directed by Sam Raimi. Written by Dana Stevens from the novel by Michael Shaara. Produced by Armyan Bernstein, Amy Robinson. Photography, John Bailey. Editing, Eric L. Beason, Arthur Coburn. Production design, Neil Spisak. Music, Basil Poledouris. Cast: Kevin Costner (Billy Chapel), Kelly Preston (Jane Aubrey), John C. Reilly (Gus Sinski), Jena Malone (Heather), Brian Cox (Gary Wheeler), J.K. Simmons (Frank Perry), Vin Scully & Steve Lyons (as themselves), Carmine D. Giovinazzo (Ken Strout), Bill Rogers (Davis Birch), Hugh Ross (Mike Udall). A Universal release. 137 minutes. PG-13
Does America love baseball? Has Kevin Costner had box-office hits with the baseball films Bull Durham and Field of Dreams? Has been unlucky with some recent movies --except for Tin Cup where he plays a golfer? Is The Pope Catholic?
So it made good sense to do a third baseball picture. He is Billy Chapel, the Detroit Tigers ace pitcher and prime Hall of Fame candidate. Now he's in New York for a game at Yankee Stadium. His shoulder hurts. His soul hurts as he is told that his team is being sold. He's 40, getting older by sports standards.  And his heart is breaking because his girl, magazine writer Jane (Kelly Preston) announces that it's all over between them; that he really needs no one; that his real love is baseball; that in a few hours she's off to England where a dream-job is expecting her.
That's the set-up. From here on out it's flashbacks and flashforwards that would be artsy and tiresome (but can be a tad tiring) except that Sam Raimi --who directed The Evil Dead but caught us by surprise in 1998 with the so-different A Simple Plan-- manages his script and his team (of actors) with a sure-hand and an obvious passion for The Game.
Five years ago Billy and Jane first met. They met cute, but it's funny and fresh. Their relationship is charted back and forth, surprises abound, there's even a surprise young girl, Heather (Jena Malone) who livens, warms up and helps crystallize the lovers' on-off relationship. More, I cannot say, since this is sports movie but also a character-driven picture. It has its own levels of suspense, in personal and in sports matters.
There are some clever inventions (events, scenes, sequences), whether in rainy New York, sunny Florida or the snowy West. The plot is highly manipulative of course, as it plays with the characters' actions and reactions, and with the audience's response to what is on the screen. The tricks of the trade, both filmic and baseballic, are out in force. But they are well handled, keep your attention and do not ever get boring. Even the music score by Greek-American Poledouris, though generic/romantic, skirts the bombastic repetitions by Greek-Greek composer Vangelis in that popular sports-movie Chariots of Fire.
All this would still be high-class routine stuff, were it not for the superb scenes in the ballpark, their mise-en-scene, their photography, the realistically filmed crowds : excellent, imaginative photography, sound-mixes, editing that coordinates people and actions in the diamond and off it. We get the players, the raucous fans, and we get the iffy but touching thoughts of Billy during his mind games with the opponents. He's fighting (under physical and psychological handicaps) for his team, his good name, and his exit from the Tigers (he'll be traded, no matter what happens).
The movie treats its players with a glove (not kid, but still), as we only see and hear rather comradely things with no trace of locker-roomitis. The closest to a nasty presence is a young Yankees batter who looks satanic. Billy foils him again and again. But the game is a gem of excitement and suspense.
The players (in both senses) are very good, although there is no true depth in the affair, the setbacks and the Fun With Bill and Jane. Costner has the right physique for the role, but it does get a bit redundant as we watch him suffer. Kelly Preston is convincing as a real person, as opposed to one playing a part. She does not want to be a groupie, but the presumed intensity of the affair is made somewhat ho-hum by three things: the lightning fast, out-of-character (hers) speed of her initial sex with Billy; our knowledge that so many male sports figures are incorrigible woman-collectors; and the studio-imposed carnal cuts in order to get a PG-13 rating. Young Jena Malone is beautifully cast as she matches perfectly Preston's looks.
The winningest side of the film is the great edge-of-the-seat footage which works both on baseball lovers and on non-aficionados.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


More games
Bounce
and don't let them catch you!
A simple HTML5 game inspired by a now pretty old version of
Insanity!
Click anywhere and drag the mouse to move the circle.
Avoid the moving shapes for as long as you can.
Mutators:
Fast
Speedup
Five
UI:
Mouse
Touch
Play
Game Over
Score:
High Score:
Times played:
Try Again
About
|
Terms of Use
|
Privacy Policy


The Common Table Expressions or CTE’s for short are used within SQL databases to simplify complex joins and subqueries. You can think of them as named subqueries that can be referenced in other parts of the query, including other CTEs (i.e. recursive CTEs).
In Presto, CTEs take the form of WITH
clauses. There can be multiple named CTE within the single
WITH
clause. They need to be defined before the main
SELECT
query.
At the time of this writing (late 2022), DBI
APIs don’t
have an official way of implementing CTEs yet. dbplyr
just
begins to introduce CTEs into its APIs as an experimental feature. So
our implementation of CTE support in RPresto
is very much
avant-garde and should be used with discretion.
We attach CTEs to the PrestoConnection
so that they are
available across the queries executed via the connection.
library(RPresto)
library(DBI)
library(dplyr)
library(dbplyr)
You can check your RPresto
version by running the
packageVersion()
function. You need version 1.4.0
or later to use the CTE feature.
packageVersion("RPresto")
#> [1] '1.4.5'
PrestoConnection
You can define and attach CTEs while creating a
PrestoConnection
. Here we assume that the user already have
a Presto server with a memory connector set up. If you don’t have such a
server set up, refer to the Presto
documentation for instructions if you want to follow along.
<- DBI::dbConnect(
con drv = RPresto::Presto(),
host = "http://localhost",
port = 8080,
user = Sys.getenv("USER"),
catalog = "memory",
schema = "default",
# Define a testing CTE using dummy VALUES
ctes = list(
"dummy_values" =
"SELECT * FROM (VALUES (1, 'a'), (2, 'b'), (3, 'c') ) AS t (id, name)"
) )
Now dummy_values
is not an existing permanent table
available in the PrestoConnection
. It only exists as a
temporary feature for the connection.
db_has_table(con, "dummy_values")
#> [1] FALSE
We can read the content of the CTE.
dbReadTable(con, "dummy_values")
#> # A tibble: 3 × 2
#> id name
#> <int> <chr>
#> 1 1 a
#> 2 2 b
#> 3 3 c
We can also execute arbitrary SELECT
queries on top of
the CTE.
dbGetQuery(con, "SELECT id * 2 AS id_2, name FROM dummy_values")
#> # A tibble: 3 × 2
#> id_2 name
#> <int> <chr>
#> 1 2 a
#> 2 4 b
#> 3 6 c
dplyr
backendAnother way of leveraging CTEs in your workflow is to incorporate
them into the dplyr
workflow.
# We first copy mtcars to Presto and create a remote table on it
<- copy_to(con, mtcars, "test_mtcars", overwrite = TRUE)
tbl.mtcars %>% colnames()
tbl.mtcars #> [1] "mpg" "cyl" "disp" "hp" "drat" "wt" "qsec" "vs" "am" "gear"
#> [11] "carb"
We call a few dplyr
verbs on the remote table to mimic a
typical analysis work flow.
<- tbl.mtcars %>%
tbl.mtcars.transform mutate(hp2 = pow(hp, 2)) %>%
group_by(cyl) %>%
mutate(mean_mpg_by_cyl = mean(mpg, na.rm = TRUE))
We can see the underlying SQL query generated so far.
%>% show_query()
tbl.mtcars.transform #> <SQL>
#> SELECT *, AVG("mpg") OVER (PARTITION BY "cyl") AS "mean_mpg_by_cyl"
#> FROM (
#> SELECT *, pow("hp", 2.0) AS "hp2"
#> FROM "test_mtcars"
#> ) "q01"
For illustration, let’s say we filter the same transformed table
twice on the cyl
field and UNION ALL
them
together in the next step.
<- union(
tbl.mtcars.union filter(tbl.mtcars.transform, cyl == 4L),
filter(tbl.mtcars.transform, cyl == 8L),
all = TRUE
)%>% show_query()
tbl.mtcars.union #> <SQL>
#> (
#> SELECT *
#> FROM (
#> SELECT *, AVG("mpg") OVER (PARTITION BY "cyl") AS "mean_mpg_by_cyl"
#> FROM (
#> SELECT *, pow("hp", 2.0) AS "hp2"
#> FROM "test_mtcars"
#> ) "q01"
#> ) "q02"
#> WHERE ("cyl" = 4)
#> )
#> UNION ALL
#> (
#> SELECT *
#> FROM (
#> SELECT *, AVG("mpg") OVER (PARTITION BY "cyl") AS "mean_mpg_by_cyl"
#> FROM (
#> SELECT *, pow("hp", 2.0) AS "hp2"
#> FROM "test_mtcars"
#> ) "q03"
#> ) "q04"
#> WHERE ("cyl" = 8)
#> )
The underlying SQL query of the transformed table
(i.e. tbl.mtcars.transform
) has to be replicated twice in
this step and thus makes the resulting query long and repetitive. It
offers a prime opportunity to simplify using CTEs.
We can “save” the underlying SQL query of the transformed table into
a CTE and use that in the union step by calling the
compute()
function with cte = TRUE
.
<- tbl.mtcars.transform %>%
tbl.mtcars.transform compute(name = "mtcars_transform", cte = TRUE)
%>% show_query()
tbl.mtcars.transform #> <SQL>
#> WITH "mtcars_transform" AS (
#> SELECT *, AVG("mpg") OVER (PARTITION BY "cyl") AS "mean_mpg_by_cyl"
#> FROM (
#> SELECT *, pow("hp", 2.0) AS "hp2"
#> FROM "test_mtcars"
#> ) "q01"
#> )
#> SELECT *
#> FROM "mtcars_transform"
Here the content of tbl.mtcars.transform
hasn’t changed
at all and we can use the remote table as it is just like before. The
only change underneath is that the underlying logic is now captured and
stored in a CTE. You can almost think of it as saving
tbl.mtcars.transform
as a temporary table named
mtcars_transform
and pointing the new remote table on that
temporary table. The difference is that no query has actually been
executed yet.
Now we’ve leveraged CTE, the query for the union step looks more clean and readable.
<- union(
tbl.mtcars.union filter(tbl.mtcars.transform, cyl == 4L),
filter(tbl.mtcars.transform, cyl == 8L),
all = TRUE
)%>% show_query()
tbl.mtcars.union #> <SQL>
#> WITH "mtcars_transform" AS (
#> SELECT *, AVG("mpg") OVER (PARTITION BY "cyl") AS "mean_mpg_by_cyl"
#> FROM (
#> SELECT *, pow("hp", 2.0) AS "hp2"
#> FROM "test_mtcars"
#> ) "q01"
#> )
#> (
#> SELECT *
#> FROM "mtcars_transform"
#> WHERE ("cyl" = 4)
#> )
#> UNION ALL
#> (
#> SELECT *
#> FROM "mtcars_transform"
#> WHERE ("cyl" = 8)
#> )
We can even create nested CTEs that depend on other CTEs (Presto
calls it chained CTEs). Below we call compute()
on
tbl.mtcars.union
which already utilizies the
mtcars_transform
CTE.
<- tbl.mtcars.union %>%
tbl.mtcars.union compute(name = "mtcars_union", cte = TRUE)
%>% show_query()
tbl.mtcars.union #> <SQL>
#> WITH "mtcars_transform" AS (
#> SELECT *, AVG("mpg") OVER (PARTITION BY "cyl") AS "mean_mpg_by_cyl"
#> FROM (
#> SELECT *, pow("hp", 2.0) AS "hp2"
#> FROM "test_mtcars"
#> ) "q01"
#> ),
#> "mtcars_union" AS (
#> (
#> SELECT *
#> FROM "mtcars_transform"
#> WHERE ("cyl" = 4)
#> )
#> UNION ALL
#> (
#> SELECT *
#> FROM "mtcars_transform"
#> WHERE ("cyl" = 8)
#> )
#> )
#> SELECT *
#> FROM "mtcars_union"
Now the underlying query of the previous
tbl.mtcars.union
is saved into the
mtcars_union
CTE which in turn depends on the
mtcars_transform
CTE.


/** * @author Richard Davey<EMAIL_ADDRESS>* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ /** * The Physics Body is linked to a single Sprite and defines properties that determine how the physics body is simulated. * These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene. In most cases, the properties are used to simulate physical effects. * Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene. * * @class Phaser.Physics.Arcade.Body * @classdesc Arcade Physics Body Constructor * @constructor * @param {Phaser.Sprite} sprite - The Sprite object this physics body belongs to. */ Phaser.Physics.Arcade.Body = function (sprite) { /** * @property {Phaser.Sprite} sprite - Reference to the parent Sprite. */ this.sprite = sprite; /** * @property {Phaser.Game} game - Local reference to game. */ this.game = sprite.game; /** * @property {Phaser.Point} offset - The offset of the Physics Body from the Sprite x/y position. */ this.offset = new Phaser.Point(); /** * @property {number} preX - The previous x position of the physics body. * @readonly */ this.preX = sprite.world.x; /** * @property {number} preY - The previous y position of the physics body. * @readonly */ this.preY = sprite.world.y; /** * @property {number} preRotation - The previous rotation of the physics body. * @readonly */ this.preRotation = sprite.angle; /** * @property {Phaser.Point} velocity - The velocity of the Body. */ this.velocity = new Phaser.Point(); /** * @property {Phaser.Point} acceleration - The acceleration in pixels per second sq. of the Body. */ this.acceleration = new Phaser.Point(); /** * @property {number} speed - The speed in pixels per second sq. of the Body. */ this.speed = 0; /** * @property {number} angle - The angle of the Body based on its velocity in radians. */ this.angle = 0; /** * @property {Phaser.Point} gravity - The gravity applied to the motion of the Body. This works in addition to any gravity set on the world. */ this.gravity = new Phaser.Point(); /** * @property {Phaser.Point} bounce - The elasticitiy of the Body when colliding. This property determines how much energy a body maintains during a collision, i.e. its bounciness. */ this.bounce = new Phaser.Point(); /** * @property {Phaser.Point} minVelocity - When a body rebounds off another body or a wall the minVelocity is checked. If the new velocity is lower than minVelocity the body is stopped. * @default */ this.minVelocity = new Phaser.Point(); /** * @property {Phaser.Point} maxVelocity - The maximum velocity that the Body can reach. * @default */ this.maxVelocity = new Phaser.Point(1000, 1000); /** * @property {number} angularVelocity - The angular velocity of the Body. * @default */ this.angularVelocity = 0; /** * @property {number} angularAcceleration - The angular acceleration of the Body. * @default */ this.angularAcceleration = 0; /** * @property {number} angularDrag - angularDrag is used to calculate friction on the body as it rotates. * @default */ this.angularDrag = 0; /** * @property {number} maxAngular - The maximum angular velocity that the Body can reach. * @default */ this.maxAngular = 1000; /** * @property {number} mass - The mass property determines how forces affect the body, as well as how much momentum the body has when it is involved in a collision. * @default */ this.mass = 1; /** * @property {number} linearDamping - linearDamping is used to calculate friction on the body as it moves through the world. For example, this might be used to simulate air or water friction. * @default */ this.linearDamping = 0.0; /** * Set the checkCollision properties to control which directions collision is processed for this Body. * For example checkCollision.up = false means it won't collide when the collision happened while moving up. * @property {object} checkCollision - An object containing allowed collision. */ this.checkCollision = { none: false, any: true, up: true, down: true, left: true, right: true }; /** * This object is populated with boolean values when the Body collides with another. * touching.up = true means the collision happened to the top of this Body for example. * @property {object} touching - An object containing touching results. */ this.touching = { none: true, up: false, down: false, left: false, right: false }; /** * This object is populated with boolean values when the Body collides with the World bounds or a Tile. * For example if blocked.up is true then the Body cannot move up. * @property {object} blocked - An object containing on which faces this Body is blocked from moving, if any. */ this.blocked = { x: 0, y: 0, up: false, down: false, left: false, right: false }; /** * @property {number} facing - A const reference to the direction the Body is traveling or facing. * @default */ this.facing = Phaser.NONE; /** * @property {boolean} rebound - A Body set to rebound will exchange velocity with another Body during collision. Set to false to allow this body to be 'pushed' rather than exchange velocity. * @default */ this.rebound = true; /** * @property {boolean} immovable - An immovable Body will not receive any impacts or exchanges of velocity from other bodies. * @default */ this.immovable = false; /** * @property {boolean} moves - Set to true to allow the Physics system (such as velocity) to move this Body, or false to move it manually. * @default */ this.moves = true; /** * @property {number} rotation - The amount the parent Sprite is rotated. * @default */ this.rotation = 0; /** * @property {boolean} allowRotation - Allow angular rotation? This will cause the Sprite to be rotated via angularVelocity, etc. * @default */ this.allowRotation = true; /** * @property {boolean} allowGravity - Allow this Body to be influenced by the global Gravity value? Note: It will always be influenced by the local gravity if set. * @default */ this.allowGravity = true; /** * @property {function} customSeparateCallback - If set this callback will be used for Body separation instead of the built-in one. Callback should return true if separated, otherwise false. * @default */ this.customSeparateCallback = null; /** * @property {object} customSeparateContext - The context in which the customSeparateCallback is called. * @default */ this.customSeparateContext = null; /** * @property {function} collideCallback - If set this callback will be fired whenever this Body is hit (on any face). It will send three parameters, the face it hit on, this Body and the Body that hit it. * @default */ this.collideCallback = null; /** * @property {object} collideCallbackContext - The context in which the collideCallback is called. * @default */ this.collideCallbackContext = null; /** * A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. * @property {boolean} collideWorldBounds - Should the Body collide with the World bounds? */ this.collideWorldBounds = false; /** * @property {Phaser.Physics.Arcade.RECT|Phaser.Physics.Arcade.CIRCLE} type - The type of SAT Shape. */ this.type = Phaser.Physics.Arcade.RECT; /** * @property {SAT.Box|SAT.Circle|SAT.Polygon} shape - The SAT Collision shape. */ this.shape = null; /** * @property {SAT.Polygon} polygon - The SAT Polygons, as derived from the Shape. */ this.polygon = null; /** * @property {number} left - The left-most point of this Body. * @readonly */ this.left = 0; /** * @property {number} right - The right-most point of this Body. * @readonly */ this.right = 0; /** * @property {number} top - The top-most point of this Body. * @readonly */ this.top = 0; /** * @property {number} bottom - The bottom-most point of this Body. * @readonly */ this.bottom = 0; /** * @property {number} width - The current width of the Body, taking into account the point rotation. * @readonly */ this.width = 0; /** * @property {number} height - The current height of the Body, taking into account the point rotation. * @readonly */ this.height = 0; /** * @property {array<Phaser.Physics.Arcade.Body>} contacts - Used to store references to bodies this Body is in contact with. * @protected */ this.contacts = []; /** * @property {number} overlapX - Mostly used internally to store the overlap values from Tile seperation. * @protected */ this.overlapX = 0; /** * @property {number} overlapY - Mostly used internally to store the overlap values from Tile seperation. * @protected */ this.overlapY = 0; /** * @property {Phaser.Point} _temp - Internal cache var. * @private */ this._temp = null; /** * @property {number} _dx - Internal cache var. * @private */ this._dx = 0; /** * @property {number} _dy - Internal cache var. * @private */ this._dy = 0; /** * @property {number} _sx - Internal cache var. * @private */ this._sx = sprite.scale.x; /** * @property {number} _sy - Internal cache var. * @private */ this._sy = sprite.scale.y; /** * @property {array} _distances - Internal cache var. * @private */ this._distances = [0, 0, 0, 0]; /** * @property {number} _vx - Internal cache var. * @private */ this._vx = 0; /** * @property {number} _vy - Internal cache var. * @private */ this._vy = 0; // Set-up the default shape this.setRectangle(sprite.width, sprite.height, 0, 0); // Set-up contact events this.sprite.events.onBeginContact = new Phaser.Signal(); this.sprite.events.onEndContact = new Phaser.Signal(); }; Phaser.Physics.Arcade.Body.prototype = { /** * Internal method that updates the Body scale in relation to the parent Sprite. * * @method Phaser.Physics.Arcade.Body#updateScale * @protected */ updateScale: function () { if (this.polygon) { this.polygon.scale(this.sprite.scale.x / this._sx, this.sprite.scale.y / this._sy); } else { this.shape.r *= Math.max(this.sprite.scale.x, this.sprite.scale.y); } this._sx = this.sprite.scale.x; this._sy = this.sprite.scale.y; }, /** * Internal method that updates the Body position in relation to the parent Sprite. * * @method Phaser.Physics.Arcade.Body#preUpdate * @protected */ preUpdate: function () { this.x = (this.sprite.world.x - (this.sprite.anchor.x * this.sprite.width)) + this.offset.x; this.y = (this.sprite.world.y - (this.sprite.anchor.y * this.sprite.height)) + this.offset.y; // This covers any motion that happens during this frame, not since the last frame this.preX = this.x; this.preY = this.y; this.preRotation = this.sprite.angle; this.rotation = this.preRotation; if (this.sprite.scale.x !== this._sx || this.sprite.scale.y !== this._sy) { this.updateScale(); } this.checkBlocked(); this.touching.none = true; this.touching.up = false; this.touching.down = false; this.touching.left = false; this.touching.right = false; if (this.moves) { if (this._vx !== this.velocity.x || this._vy !== this.velocity.y) { // No need to re-calc these if they haven't changed this._vx = this.velocity.x; this._vy = this.velocity.y; this.speed = Math.sqrt(this.velocity.x * this.velocity.x + this.velocity.y * this.velocity.y); this.angle = Math.atan2(this.velocity.y, this.velocity.x); } if (this.game.physics.checkBounds(this)) { this.reboundCheck(true, true, true); } this.applyDamping(); this.integrateVelocity(); this.updateBounds(); this.checkBlocked(); } else { this.updateBounds(); } }, /** * Internal method that checks and potentially resets the blocked status flags. * * @method Phaser.Physics.Arcade.Body#checkBlocked * @protected */ checkBlocked: function () { if ((this.blocked.left || this.blocked.right) && (Math.floor(this.x) !== this.blocked.x || Math.floor(this.y) !== this.blocked.y)) { this.blocked.left = false; this.blocked.right = false; } if ((this.blocked.up || this.blocked.down) && (Math.floor(this.x) !== this.blocked.x || Math.floor(this.y) !== this.blocked.y)) { this.blocked.up = false; this.blocked.down = false; } }, /** * Internal method that updates the left, right, top, bottom, width and height properties. * * @method Phaser.Physics.Arcade.Body#updateBounds * @protected */ updateBounds: function () { if (this.type === Phaser.Physics.Arcade.CIRCLE) { this.left = this.shape.pos.x - this.shape.r; this.right = this.shape.pos.x + this.shape.r; this.top = this.shape.pos.y - this.shape.r; this.bottom = this.shape.pos.y + this.shape.r; } else { this.left = Phaser.Math.minProperty('x', this.polygon.points) + this.polygon.pos.x; this.right = Phaser.Math.maxProperty('x', this.polygon.points) + this.polygon.pos.x; this.top = Phaser.Math.minProperty('y', this.polygon.points) + this.polygon.pos.y; this.bottom = Phaser.Math.maxProperty('y', this.polygon.points) + this.polygon.pos.y; } this.width = this.right - this.left; this.height = this.bottom - this.top; }, /** * Internal method that checks the acceleration and applies damping if not set. * * @method Phaser.Physics.Arcade.Body#applyDamping * @protected */ applyDamping: function () { if (this.linearDamping > 0 && this.acceleration.isZero()) { if (this.speed > this.linearDamping) { this.speed -= this.linearDamping; } else { this.speed = 0; } if (this.speed > 0 || !this.velocity.isZero()) { this.velocity.x = Math.cos(this.angle) * this.speed; this.velocity.y = Math.sin(this.angle) * this.speed; this.speed = Math.sqrt(this.velocity.x * this.velocity.x + this.velocity.y * this.velocity.y); this.angle = Math.atan2(this.velocity.y, this.velocity.x); } } }, /** * Check if we're below minVelocity and gravity isn't trying to drag us in the opposite direction. * * @method Phaser.Physics.Arcade.Body#reboundCheck * @protected * @param {boolean} x - Check the X axis? * @param {boolean} y - Check the Y axis? * @param {boolean} rebound - If true it will reverse the velocity on the given axis */ reboundCheck: function (x, y, rebound) { if (x) { if (rebound && this.bounce.x !== 0 && (this.blocked.left || this.blocked.right || this.touching.left || this.touching.right)) { // Don't rebound if they've already rebounded in this frame if (!(this._vx <= 0 && this.velocity.x > 0) && !(this._vx >= 0 && this.velocity.x < 0)) { this.velocity.x *= -this.bounce.x; this.angle = Math.atan2(this.velocity.y, this.velocity.x); } } if (this.bounce.x === 0 || Math.abs(this.velocity.x) < this.minVelocity.x) { var gx = this.getUpwardForce(); if (((this.blocked.left || this.touching.left) && (gx < 0 || this.velocity.x < 0)) || ((this.blocked.right || this.touching.right) && (gx > 0 || this.velocity.x > 0))) { this.velocity.x = 0; } } } if (y) { if (rebound && this.bounce.y !== 0 && (this.blocked.up || this.blocked.down || this.touching.up || this.touching.down)) { // Don't rebound if they've already rebounded in this frame if (!(this._vy <= 0 && this.velocity.y > 0) && !(this._vy >= 0 && this.velocity.y < 0)) { this.velocity.y *= -this.bounce.y; this.angle = Math.atan2(this.velocity.y, this.velocity.x); } } if (this.bounce.y === 0 || Math.abs(this.velocity.y) < this.minVelocity.y) { var gy = this.getDownwardForce(); if (((this.blocked.up || this.touching.up) && (gy < 0 || this.velocity.y < 0)) || ((this.blocked.down || this.touching.down) && (gy > 0 || this.velocity.y > 0))) { this.velocity.y = 0; } } } }, /** * Gets the total force being applied on the X axis, including gravity and velocity. * * @method Phaser.Physics.Arcade.Body#getUpwardForce * @return {number} The total force being applied on the X axis. */ getUpwardForce: function () { if (this.allowGravity) { return this.gravity.x + this.game.physics.gravity.x + this.velocity.x; } else { return this.gravity.x + this.velocity.x; } }, /** * Gets the total force being applied on the X axis, including gravity and velocity. * * @method Phaser.Physics.Arcade.Body#getDownwardForce * @return {number} The total force being applied on the Y axis. */ getDownwardForce: function () { if (this.allowGravity) { return this.gravity.y + this.game.physics.gravity.y + this.velocity.y; } else { return this.gravity.y + this.velocity.y; } }, /** * Subtracts the given Vector from this Body. * * @method Phaser.Physics.Arcade.Body#sub * @protected * @param {SAT.Vector} v - The vector to substract from this Body. */ sub: function (v) { this.x -= v.x; this.y -= v.y; }, /** * Adds the given Vector to this Body. * * @method Phaser.Physics.Arcade.Body#add * @protected * @param {SAT.Vector} v - The vector to add to this Body. */ add: function (v) { this.x += v.x; this.y += v.y; }, /** * Separation response handler. * * @method Phaser.Physics.Arcade.Body#give * @protected * @param {Phaser.Physics.Arcade.Body} body - The Body that collided. * @param {SAT.Response} response - The SAT Response object containing the collision data. */ give: function (body, response) { this.add(response.overlapV); if (this.rebound) { this.processRebound(body); this.reboundCheck(true, true, false); body.reboundCheck(true, true, false); } }, /** * Separation response handler. * * @method Phaser.Physics.Arcade.Body#take * @protected * @param {Phaser.Physics.Arcade.Body} body - The Body that collided. * @param {SAT.Response} response - The SAT Response object containing the collision data. */ take: function (body, response) { this.sub(response.overlapV); if (this.rebound) { this.processRebound(body); this.reboundCheck(true, true, false); body.reboundCheck(true, true, false); } }, /** * Split the collision response evenly between the two bodies. * * @method Phaser.Physics.Arcade.Body#split * @protected * @param {Phaser.Physics.Arcade.Body} body - The Body that collided. * @param {SAT.Response} response - The SAT Response object containing the collision data. */ split: function (body, response) { response.overlapV.scale(0.5); this.sub(response.overlapV); body.add(response.overlapV); if (this.rebound) { this.exchange(body); this.reboundCheck(true, true, false); body.reboundCheck(true, true, false); } }, /** * Exchange velocity with the given Body. * * @method Phaser.Physics.Arcade.Body#exchange * @protected * @param {Phaser.Physics.Arcade.Body} body - The Body that collided. */ exchange: function (body) { if (this.mass === body.mass && this.speed > 0 && body.speed > 0) { // A direct velocity exchange (as they are both moving and have the same mass) this._dx = body.velocity.x; this._dy = body.velocity.y; body.velocity.x = this.velocity.x * body.bounce.x; body.velocity.y = this.velocity.y * body.bounce.x; this.velocity.x = this._dx * this.bounce.x; this.velocity.y = this._dy * this.bounce.y; } else { var nv1 = Math.sqrt((body.velocity.x * body.velocity.x * body.mass) / this.mass) * ((body.velocity.x > 0) ? 1 : -1); var nv2 = Math.sqrt((this.velocity.x * this.velocity.x * this.mass) / body.mass) * ((this.velocity.x > 0) ? 1 : -1); var average = (nv1 + nv2) * 0.5; nv1 -= average; nv2 -= average; this.velocity.x = nv1; body.velocity.x = nv2; nv1 = Math.sqrt((body.velocity.y * body.velocity.y * body.mass) / this.mass) * ((body.velocity.y > 0) ? 1 : -1); nv2 = Math.sqrt((this.velocity.y * this.velocity.y * this.mass) / body.mass) * ((this.velocity.y > 0) ? 1 : -1); average = (nv1 + nv2) * 0.5; nv1 -= average; nv2 -= average; this.velocity.y = nv1; body.velocity.y = nv2; } // update speed / angle? }, /** * Rebound the velocity of this Body. * * @method Phaser.Physics.Arcade.Body#processRebound * @protected * @param {Phaser.Physics.Arcade.Body} body - The Body that collided. */ processRebound: function (body) { // Don't rebound again if they've already rebounded in this frame if (!(this._vx <= 0 && this.velocity.x > 0) && !(this._vx >= 0 && this.velocity.x < 0)) { this.velocity.x = body.velocity.x - this.velocity.x * this.bounce.x; } if (!(this._vy <= 0 && this.velocity.y > 0) && !(this._vy >= 0 && this.velocity.y < 0)) { this.velocity.y = body.velocity.y - this.velocity.y * this.bounce.y; } this.angle = Math.atan2(this.velocity.y, this.velocity.x); this.reboundCheck(true, true, false); }, /** * Checks for an overlap between this Body and the given Body. * * @method Phaser.Physics.Arcade.Body#overlap * @param {Phaser.Physics.Arcade.Body} body - The Body that is being checked against this Body. * @param {SAT.Response} response - SAT Response handler. * @return {boolean} True if the two bodies overlap, otherwise false. */ overlap: function (body, response) { var result = false; if ((this.type === Phaser.Physics.Arcade.RECT || this.type === Phaser.Physics.Arcade.POLYGON) && (body.type === Phaser.Physics.Arcade.RECT || body.type === Phaser.Physics.Arcade.POLYGON)) { result = SAT.testPolygonPolygon(this.polygon, body.polygon, response); } else if (this.type === Phaser.Physics.Arcade.CIRCLE && body.type === Phaser.Physics.Arcade.CIRCLE) { result = SAT.testCircleCircle(this.shape, body.shape, response); } else if ((this.type === Phaser.Physics.Arcade.RECT || this.type === Phaser.Physics.Arcade.POLYGON) && body.type === Phaser.Physics.Arcade.CIRCLE) { result = SAT.testPolygonCircle(this.polygon, body.shape, response); } else if (this.type === Phaser.Physics.Arcade.CIRCLE && (body.type === Phaser.Physics.Arcade.RECT || body.type === Phaser.Physics.Arcade.POLYGON)) { result = SAT.testCirclePolygon(this.shape, body.polygon, response); } if (!result) { this.removeContact(body); } return result; }, /** * Checks if this Body is already in contact with the given Body. * * @method Phaser.Physics.Arcade.Body#inContact * @param {Phaser.Physics.Arcade.Body} body - The Body to be checked. * @return {boolean} True if the given Body is already in contact with this Body. */ inContact: function (body) { return (this.contacts.indexOf(body) != -1); }, /** * Adds the given Body to the contact list of this Body. Also adds this Body to the contact list of the given Body. * * @method Phaser.Physics.Arcade.Body#addContact * @param {Phaser.Physics.Arcade.Body} body - The Body to be added. * @return {boolean} True if the given Body was added to this contact list, false if already on it. */ addContact: function (body) { if (this.inContact(body)) { return false; } this.contacts.push(body); this.sprite.events.onBeginContact.dispatch(this.sprite, body.sprite, this, body); body.addContact(this); return true; }, /** * Removes the given Body from the contact list of this Body. Also removes this Body from the contact list of the given Body. * * @method Phaser.Physics.Arcade.Body#removeContact * @param {Phaser.Physics.Arcade.Body} body - The Body to be removed. * @return {boolean} True if the given Body was removed from this contact list, false if wasn't on it. */ removeContact: function (body) { if (!this.inContact(body)) { return false; } this.contacts.splice(this.contacts.indexOf(body), 1); this.sprite.events.onEndContact.dispatch(this.sprite, body.sprite, this, body); body.removeContact(this); return true; }, /** * This separates this Body from the given Body unless a customSeparateCallback is set. * It assumes they have already been overlap checked and the resulting overlap is stored in the SAT response. * * @method Phaser.Physics.Arcade.Body#separate * @protected * @param {Phaser.Physics.Arcade.Body} body - The Body to be separated from this one. * @param {SAT.Response} response - SAT Response handler. * @return {boolean} True if the bodies were separated, false if not (for example checkCollide allows them to pass through) */ separate: function (body, response) { // if (this.inContact(body)) // { // return false; // } this._distances[0] = body.right - this.x; // Distance of B to face on left side of A this._distances[1] = this.right - body.x; // Distance of B to face on right side of A this._distances[2] = body.bottom - this.y; // Distance of B to face on bottom side of A this._distances[3] = this.bottom - body.y; // Distance of B to face on top side of A // If we've zero distance then check for side-slicing if (response.overlapN.x && (this._distances[0] === 0 || this._distances[1] === 0)) { response.overlapN.x = false; response.overlapN.y = true; } else if (response.overlapN.y && (this._distances[2] === 0 || this._distances[3] === 0)) { response.overlapN.x = true; response.overlapN.y = false; } if (this.customSeparateCallback) { return this.customSeparateCallback.call(this.customSeparateContext, this, response, this._distances); } var hasSeparated = false; if (response.overlapN.x) { // Which is smaller? Left or Right? if (this._distances[0] < this._distances[1]) { hasSeparated = this.hitLeft(body, response); } else if (this._distances[1] < this._distances[0]) { hasSeparated = this.hitRight(body, response); } } else if (response.overlapN.y) { // Which is smaller? Top or Bottom? if (this._distances[2] < this._distances[3]) { hasSeparated = this.hitTop(body, response); } else if (this._distances[3] < this._distances[2]) { hasSeparated = this.hitBottom(body, response); } } if (hasSeparated) { this.game.physics.checkBounds(this); this.game.physics.checkBounds(body); } else { // They can only contact like this if at least one of their sides is open, otherwise it's a separation if (!this.checkCollision.up || !this.checkCollision.down || !this.checkCollision.left || !this.checkCollision.right || !body.checkCollision.up || !body.checkCollision.down || !body.checkCollision.left || !body.checkCollision.right) { this.addContact(body); } } return hasSeparated; }, /** * Process a collision with the left face of this Body. * Collision and separation can be further checked by setting a collideCallback. * This callback will be sent 4 parameters: The face of collision, this Body, the colliding Body and the SAT Response. * If the callback returns true then separation, rebounds and the touching flags will all be set. * If it returns false this will be skipped and must be handled manually. * * @method Phaser.Physics.Arcade.Body#hitLeft * @protected * @param {Phaser.Physics.Arcade.Body} body - The Body that collided. * @param {SAT.Response} response - The SAT Response object containing the collision data. */ hitLeft: function (body, response) { if (!this.checkCollision.left || !body.checkCollision.right) { return false; } if (this.collideCallback && !this.collideCallback.call(this.collideCallbackContext, Phaser.LEFT, this, body, response)) { return false; } if (!this.moves || this.immovable || this.blocked.right || this.touching.right) { body.give(this, response); } else { if (body.immovable || body.blocked.left || body.touching.left) { // We take the full separation this.take(body, response); } else { // Share out the separation this.split(body, response); } } this.touching.left = true; body.touching.right = true; return true; }, /** * Process a collision with the right face of this Body. * Collision and separation can be further checked by setting a collideCallback. * This callback will be sent 4 parameters: The face of collision, this Body, the colliding Body and the SAT Response. * If the callback returns true then separation, rebounds and the touching flags will all be set. * If it returns false this will be skipped and must be handled manually. * * @method Phaser.Physics.Arcade.Body#hitRight * @protected * @param {Phaser.Physics.Arcade.Body} body - The Body that collided. * @param {SAT.Response} response - The SAT Response object containing the collision data. */ hitRight: function (body, response) { if (!this.checkCollision.right || !body.checkCollision.left) { return false; } if (this.collideCallback && !this.collideCallback.call(this.collideCallbackContext, Phaser.RIGHT, this, body)) { return false; } if (!this.moves || this.immovable || this.blocked.left || this.touching.left) { body.give(this, response); } else { if (body.immovable || body.blocked.right || body.touching.right) { // We take the full separation this.take(body, response); } else { // Share out the separation this.split(body, response); } } this.touching.right = true; body.touching.left = true; return true; }, /** * Process a collision with the top face of this Body. * Collision and separation can be further checked by setting a collideCallback. * This callback will be sent 4 parameters: The face of collision, this Body, the colliding Body and the SAT Response. * If the callback returns true then separation, rebounds and the touching flags will all be set. * If it returns false this will be skipped and must be handled manually. * * @method Phaser.Physics.Arcade.Body#hitTop * @protected * @param {Phaser.Physics.Arcade.Body} body - The Body that collided. * @param {SAT.Response} response - The SAT Response object containing the collision data. */ hitTop: function (body, response) { if (!this.checkCollision.up || !body.checkCollision.down) { return false; } if (this.collideCallback && !this.collideCallback.call(this.collideCallbackContext, Phaser.UP, this, body)) { return false; } if (!this.moves || this.immovable || this.blocked.down || this.touching.down) { body.give(this, response); } else { if (body.immovable || body.blocked.up || body.touching.up) { // We take the full separation this.take(body, response); } else { // Share out the separation this.split(body, response); } } this.touching.up = true; body.touching.down = true; return true; }, /** * Process a collision with the bottom face of this Body. * Collision and separation can be further checked by setting a collideCallback. * This callback will be sent 4 parameters: The face of collision, this Body, the colliding Body and the SAT Response. * If the callback returns true then separation, rebounds and the touching flags will all be set. * If it returns false this will be skipped and must be handled manually. * * @method Phaser.Physics.Arcade.Body#hitBottom * @protected * @param {Phaser.Physics.Arcade.Body} body - The Body that collided. * @param {SAT.Response} response - The SAT Response object containing the collision data. */ hitBottom: function (body, response) { if (!this.checkCollision.down || !body.checkCollision.up) { return false; } if (this.collideCallback && !this.collideCallback.call(this.collideCallbackContext, Phaser.DOWN, this, body)) { return false; } if (!this.moves || this.immovable || this.blocked.up || this.touching.up) { body.give(this, response); } else { if (body.immovable || body.blocked.down || body.touching.down) { // We take the full separation this.take(body, response); } else { // Share out the separation this.split(body, response); } } this.touching.down = true; body.touching.up = true; return true; }, /** * Internal method. Integrates velocity, global gravity and the delta timer. * * @method Phaser.Physics.Arcade.Body#integrateVelocity * @protected */ integrateVelocity: function () { this._temp = this.game.physics.updateMotion(this); this._dx = this.game.time.physicsElapsed * (this.velocity.x + this._temp.x / 2); this._dy = this.game.time.physicsElapsed * (this.velocity.y + this._temp.y / 2); // positive = RIGHT / DOWN // negative = LEFT / UP if ((this._dx < 0 && !this.blocked.left && !this.touching.left) || (this._dx > 0 && !this.blocked.right && !this.touching.right)) { this.x += this._dx; this.velocity.x += this._temp.x; } if ((this._dy < 0 && !this.blocked.up && !this.touching.up) || (this._dy > 0 && !this.blocked.down && !this.touching.down)) { this.y += this._dy; this.velocity.y += this._temp.y; } if (this.velocity.x > this.maxVelocity.x) { this.velocity.x = this.maxVelocity.x; } else if (this.velocity.x < -this.maxVelocity.x) { this.velocity.x = -this.maxVelocity.x; } if (this.velocity.y > this.maxVelocity.y) { this.velocity.y = this.maxVelocity.y; } else if (this.velocity.y < -this.maxVelocity.y) { this.velocity.y = -this.maxVelocity.y; } }, /** * Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished. * * @method Phaser.Physics.Arcade.Body#postUpdate * @protected */ postUpdate: function () { if (this.moves) { this.game.physics.checkBounds(this); this.reboundCheck(true, true, true); this._dx = this.deltaX(); this._dy = this.deltaY(); if (this._dx < 0) { this.facing = Phaser.LEFT; } else if (this._dx > 0) { this.facing = Phaser.RIGHT; } if (this._dy < 0) { this.facing = Phaser.UP; } else if (this._dy > 0) { this.facing = Phaser.DOWN; } if (this._dx !== 0 || this._dy !== 0) { this.sprite.x += this._dx; this.sprite.y += this._dy; } if (this.allowRotation && this.deltaZ() !== 0) { this.sprite.angle += this.deltaZ(); } if (this.sprite.scale.x !== this._sx || this.sprite.scale.y !== this._sy) { this.updateScale(); } } }, /** * Resets the Body motion values: velocity, acceleration, angularVelocity and angularAcceleration. * Also resets the forces to defaults: gravity, bounce, minVelocity,maxVelocity, angularDrag, maxAngular, mass, friction and checkCollision if 'full' specified. * * @method Phaser.Physics.Arcade.Body#reset * @param {boolean} [full=false] - A full reset clears down settings you may have set, such as gravity, bounce and drag. A non-full reset just clears motion values. */ reset: function (full) { if (typeof full === 'undefined') { full = false; } if (full) { this.gravity.setTo(0, 0); this.bounce.setTo(0, 0); this.minVelocity.setTo(5, 5); this.maxVelocity.setTo(1000, 1000); this.angularDrag = 0; this.maxAngular = 1000; this.mass = 1; this.friction = 0.0; this.checkCollision = { none: false, any: true, up: true, down: true, left: true, right: true }; } this.velocity.setTo(0, 0); this.acceleration.setTo(0, 0); this.angularVelocity = 0; this.angularAcceleration = 0; this.blocked = { x: 0, y: 0, up: false, down: false, left: false, right: false }; this.x = (this.sprite.world.x - (this.sprite.anchor.x * this.sprite.width)) + this.offset.x; this.y = (this.sprite.world.y - (this.sprite.anchor.y * this.sprite.height)) + this.offset.y; this.preX = this.x; this.preY = this.y; this.updateBounds(); this.contacts.length = 0; }, /** * Destroys this Body and all references it holds to other objects. * * @method Phaser.Physics.Arcade.Body#destroy */ destroy: function () { this.sprite = null; this.collideCallback = null; this.collideCallbackContext = null; this.customSeparateCallback = null; this.customSeparateContext = null; this.contacts.length = 0; }, /** * Sets this Body to use a circle of the given radius for all collision. * The Circle will be centered on the center of the Sprite by default, but can be adjusted via the Body.offset property and the setCircle x/y parameters. * * @method Phaser.Physics.Arcade.Body#setCircle * @param {number} radius - The radius of this circle (in pixels) * @param {number} [offsetX=0] - The x amount the circle will be offset from the Sprites center. * @param {number} [offsetY=0] - The y amount the circle will be offset from the Sprites center. */ setCircle: function (radius, offsetX, offsetY) { if (typeof offsetX === 'undefined') { offsetX = this.sprite._cache.halfWidth; } if (typeof offsetY === 'undefined') { offsetY = this.sprite._cache.halfHeight; } this.type = Phaser.Physics.Arcade.CIRCLE; this.shape = new SAT.Circle(new SAT.Vector(this.sprite.x, this.sprite.y), radius); this.polygon = null; this.offset.setTo(offsetX, offsetY); }, /** * Sets this Body to use a rectangle for all collision. * If you don't specify any parameters it will be sized to match the parent Sprites current width and height (including scale factor) and centered on the sprite. * * @method Phaser.Physics.Arcade.Body#setRectangle * @param {number} [width] - The width of the rectangle. If not specified it will default to the width of the parent Sprite. * @param {number} [height] - The height of the rectangle. If not specified it will default to the height of the parent Sprite. * @param {number} [translateX] - The x amount the rectangle will be translated from the Sprites center. * @param {number} [translateY] - The y amount the rectangle will be translated from the Sprites center. */ setRectangle: function (width, height, translateX, translateY) { if (typeof width === 'undefined') { width = this.sprite.width; } if (typeof height === 'undefined') { height = this.sprite.height; } if (typeof translateX === 'undefined') { translateX = -this.sprite._cache.halfWidth; } if (typeof translateY === 'undefined') { translateY = -this.sprite._cache.halfHeight; } this.type = Phaser.Physics.Arcade.RECT; this.shape = new SAT.Box(new SAT.Vector(this.sprite.world.x, this.sprite.world.y), width, height); this.polygon = this.shape.toPolygon(); this.polygon.translate(translateX, translateY); this.offset.setTo(0, 0); }, /** * Sets this Body to use a convex polygon for collision. * The points are specified in a counter-clockwise direction and must create a convex polygon. * Use Body.translate and/or Body.offset to re-position the polygon from the Sprite origin. * * @method Phaser.Physics.Arcade.Body#setPolygon * @param {(SAT.Vector[]|number[]|...SAT.Vector|...number)} points - This can be an array of Vectors that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `setPolygon(new SAT.Vector(), new SAT.Vector(), ...)`, or the * arguments passed can be flat x,y values e.g. `setPolygon(x,y, x,y, x,y, ...)` where `x` and `y` are Numbers. */ setPolygon: function (points) { this.type = Phaser.Physics.Arcade.POLYGON; this.shape = null; if (!Array.isArray(points)) { points = Array.prototype.slice.call(arguments); } if (typeof points[0] === 'number') { var p = []; for (var i = 0, len = points.length; i < len; i += 2) { p.push(new SAT.Vector(points[i], points[i + 1])); } points = p; } this.polygon = new SAT.Polygon(new SAT.Vector(this.sprite.center.x, this.sprite.center.y), points); this.offset.setTo(0, 0); }, /** * Used for translating rectangle and polygon bodies from the Sprite parent. Doesn't apply to Circles. * See also the Body.offset property. * * @method Phaser.Physics.Arcade.Body#translate * @param {number} x - The x amount the polygon or rectangle will be translated by from the Sprite. * @param {number} y - The y amount the polygon or rectangle will be translated by from the Sprite. */ translate: function (x, y) { if (this.polygon) { this.polygon.translate(x, y); } }, /** * Determines if this Body is 'on the floor', which means in contact with a Tile or World bounds, or other object that has set 'down' as blocked. * * @method Phaser.Physics.Arcade.Body#onFloor * @return {boolean} True if this Body is 'on the floor', which means in contact with a Tile or World bounds, or object that has set 'down' as blocked. */ onFloor: function () { return this.blocked.down; }, /** * Determins if this Body is 'on a wall', which means horizontally in contact with a Tile or World bounds, or other object but not the ground. * * @method Phaser.Physics.Arcade.Body#onWall * @return {boolean} True if this Body is 'on a wall', which means horizontally in contact with a Tile or World bounds, or other object but not the ground. */ onWall: function () { return (!this.blocked.down && (this.blocked.left || this.blocked.right)); }, /** * Returns the delta x value. The amount the Body has moved horizontally in the current step. * * @method Phaser.Physics.Arcade.Body#deltaX * @return {number} The delta value. Positive if the motion was to the right, negative if to the left. */ deltaX: function () { return this.x - this.preX; }, /** * Returns the delta y value. The amount the Body has moved vertically in the current step. * * @method Phaser.Physics.Arcade.Body#deltaY * @return {number} The delta value. Positive if the motion was downwards, negative if upwards. */ deltaY: function () { return this.y - this.preY; }, /** * Returns the delta z value. The amount the Body has rotated in the current step. * * @method Phaser.Physics.Arcade.Body#deltaZ * @return {number} The delta value. */ deltaZ: function () { return this.rotation - this.preRotation; } }; Phaser.Physics.Arcade.Body.prototype.constructor = Phaser.Physics.Arcade.Body; /** * @name Phaser.Physics.Arcade.Body#x * @property {number} x - The x coordinate of this Body. */ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "x", { get: function () { if (this.type === Phaser.Physics.Arcade.CIRCLE) { return this.shape.pos.x; } else { return this.polygon.pos.x; } }, set: function (value) { if (this.type === Phaser.Physics.Arcade.CIRCLE) { this.shape.pos.x = value; } else { this.polygon.pos.x = value; } } }); /** * @name Phaser.Physics.Arcade.Body#y * @property {number} y - The y coordinate of this Body. */ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "y", { get: function () { if (this.type === Phaser.Physics.Arcade.CIRCLE) { return this.shape.pos.y; } else { return this.polygon.pos.y; } }, set: function (value) { if (this.type === Phaser.Physics.Arcade.CIRCLE) { this.shape.pos.y = value; } else { this.polygon.pos.y = value; } } });


Thank you for using our framework, please pick a topic.
General Librarys Sessions Database Settings Controllers Models Views Credits
This framework is opensource and free.


With freezing weather and family coming into town, working from home today. I miss my fancy single-cup Starbucks machine. Drip is old-skool.
12/15/2008, 8:21:50 AM
Favs: 0
Retweets: 0
link--- layout: tweet ---
With freezing weather and family coming into town, working from home today. I miss my fancy single-cup Starbucks machine. Drip is old-skool.
12/15/2008, 8:21:50 AM
Favs: 0
Retweets: 0
link


[gecode-users] Memory management bug in 2.2.0?
Filip Konvička
filip.konvicka at logis.cz
Fri Mar 27 08:46:32 CET 2009
Hi Guido,
> the idea was (and still is) to initially allocate all VarArrays from
> the space, and only when they are resized (by using add), the array is
> copied to the heap. That way, most arrays are still efficiently
> allocated in the space (e.g. copying an array always allocates it in
> the space again).
>
> The invariant I had in mind (and which now actually works only since
> 3.0.0) is the following: the array has been allocated from the space
> iff used==n (and we renamed used to n and n to capacity...).
> If you're interested in the correct invariants (or back-porting stuff
> to 2.2.0), they are documented in gecode/kernel/array.hpp in the
> current version.
thanks for the explanation. The workaround for 2.2.0 is simple:
struct MySpace : Space {
BoolVarArray bva;
MySpace(...) {
std::vector<BoolVar> bva_;
...
bva_.push_back(v);
...
BoolVarArray tmp(this, bva_.size());
for(int i=bva_.size()-1; i>=0; --i)
tmp[i]=bva_[i];
bva=tmp;
...
}
...
};
Cheers,
Filip
More information about the gecode-users
mailing list


Germany's Maas Cancels Trip To Donbas Front Line Ahead Of Peace Summit
by RFE/RL's Ukrainian ServiceGermany Foreign Minister Heiko Maas has canceled a trip to the front line of the Donbas conflict in eastern Ukraine due to adverse weather conditions, German broadcaster Deutsche Welle reported.
He was scheduled to visit the line of contact on November 19 ahead of next month's planned four-way talks to end the bloody conflict at a summit involving Germany, France, Ukraine, and Russia.
Plans foresaw flying to the city of Kharkiv, east of Kyiv, on November 18 and then to the Donbas by helicopter the following day.
Instead, Maas will meet with Foreign Minister Vadym Prystayko and President Volodymyr Zelenskiy in Kyiv to discuss the December 9 four-way talks known as the Normandy Four.
The last time the leaders of the four countries met was in October 2016.
French President Emmanuel Macron is scheduled to host the talks in Paris to seek peace in the war that has killed more than 13,000 people and displaced 1.5 million more in what is the largest internal migration of people on the European continent since World War II.


Verta Terms of Service and Privacy Policy
1. Terms
By accessing the website at http://www.verta.ie, you are agreeing to be bound by these terms of service, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this website are protected by applicable copyright and trademark law.
2. Use License
- Permission is granted to temporarily download one copy of the materials (information, software, graphics or website created by Verta) on Verta's website for personal, non-commercial transitory viewing only, unless stated otherwise. This is the grant of a license, not a transfer of title, and under this license you may not:
- modify or copy the materials;
- use the materials for any commercial purpose, or for any public display (commercial or non-commercial);
- attempt to decompile or reverse engineer any software contained on Verta's website;
- remove any copyright or other proprietary notations from the materials; or
- transfer the materials to another person or "mirror" the materials on any other server.
- This license shall automatically terminate if you violate any of these restrictions and may be terminated by Verta at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.
3. Disclaimer
- The materials on Verta's website are provided on an 'as is' basis. Verta makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights.
- Further, Verta does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its website or otherwise relating to such materials or on any sites linked to this site.
4. Limitations
In no event shall Verta or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on Verta's website, even if Verta or a Verta authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.
5. Accuracy of materials
The materials appearing on Verta's website could include technical, typographical, or photographic errors. Verta does not warrant that any of the materials on its website are accurate, complete or current. Verta may make changes to the materials contained on its website at any time without notice. However Verta does not make any commitment to update the materials.
6. Links
Verta has not reviewed all of the sites linked to its website and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by Verta of the site. Use of any such linked website is at the user's own risk.
7. Modifications
Verta may revise these terms of service for its website at any time without notice. By using this website you are agreeing to be bound by the then current version of these terms of service.
8. Governing Law
These terms and conditions are governed by and construed in accordance with the laws of Ireland and you irrevocably submit to the exclusive jurisdiction of the courts in that State or location.
Privacy Policy
Your privacy is important to us.
It is Verta's policy to respect your privacy regarding any information we may collect while operating our website. Accordingly, we have developed this privacy policy in order for you to understand how we collect, use, communicate, disclose and otherwise make use of personal information. We have outlined our privacy policy below.
- We will collect personal information by lawful and fair means and, where appropriate, with the knowledge or consent of the individual concerned.
- Before or at the time of collecting personal information, we will identify the purposes for which information is being collected.
- We will collect and use personal information solely for fulfilling those purposes specified by us and for other ancillary purposes, unless we obtain the consent of the individual concerned or as required by law.
- Personal data should be relevant to the purposes for which it is to be used, and, to the extent necessary for those purposes, should be accurate, complete, and up-to-date.
- We will protect personal information by using reasonable security safeguards against loss or theft, as well as unauthorized access, disclosure, copying, use or modification.
- We will make readily available to customers information about our policies and practices relating to the management of personal information.
- We will only retain personal information for as long as necessary for the fulfilment of those purposes.
We are committed to conducting our business in accordance with these principles in order to ensure that the confidentiality of personal information is protected and maintained. Verta may change this privacy policy from time to time at Verta's sole discretion.


the and for data The from that datasets are can with this FLO our {background blockchain electron other []. record IPFS margin database files their they {border-style ETDB information metadata ;():–. file public px;} structural #ffffff;} ETDB-Caltech distributed published which OIP This more than also biology. data. dataset internal EMDB download lab not use users using was will about has have microscopy cell peer-to-peer these would available datasets. different may network records tomograms Data Electron Tomography acquisition all associated could distribution each first its large network. new only software through tomography IPFS. Information Journal been cryptographic e.g. feature hash imaging into like local publish px; search sharing single such used {font-family & Alexandria Available Computer Sciences collected features field fields font-size from: front-end interface labs light many miners node one original server, system type well August Caltech EMPIAR For Microscopy MySQL Research-Tomogram [], biological blockchain, but called central cryptocurrency currently data, double; find key ledger mission model multiple nodes page provide repository review server share store them user version ./j.jsb... ;:–. Database Each Fig Health Index Materials Open Protocol accessible addition, anyone applications automatically block border-color border-width cellular centralized comment community content curated deposited developed entries full groups hope host hosting images institutions make makes members method need over own repositories sample scheme smaller solid; still storage subset system. those tilt-series who {font-style {font-weight (e.g. Biol. Diagnostic However, MartoneME, Methods Nature PatwardhanA, Sciences: Software There Users While [cited access any application approach because between biologists block, blockchain. bold broader browser-based case, contain cost courier; database. datasets, decentralized designed details development digital directly display easily em; expect future, hosted how interested laboratories macromolecular necessary offers participating pt;} query raw reconstructions record. releases resource resources resulting same scientific script served server. simply since species specification tilt transaction transactions uses valid videos were wish years


Bar Gauge Widget
Default Colored Gauge
CSS Themed Ranges, Gradient Background, Updating to Random Values on 3s Timer
Declarative, Gradient Ranges, Gradient Background, No Indicator Boxes
Declarative, (Ugly) Colored Ranges, No Numbers, No Indicator Boxes


RedisInfoServer
public struct RedisInfoServer
A struct that contains a subset of the server information returned by the Redis INFO command in a parsed and more consumable fashion.
-
The version of Redis server
Declaration
Swift
public let redis_version: String
-
The mode of the Redis server
Declaration
Swift
public let redis_mode: String
-
The O/S the Redis server is running on.
Declaration
Swift
public let os: String
-
The number of bits in the architecture (32 or 64) of the hardware the Redis server is running on.
Declaration
Swift
public let arch_bits: Int
-
The process id of the Redis server.
Declaration
Swift
public let process_id: Int
-
The port the Redis server is listening on.
Declaration
Swift
public let tcp_port: Int
-
The amount of time, in seconds, the Redis server has been up.
Declaration
Swift
public let uptime_in_seconds: Int
-
The amount of time, in days, the Redis server has been up.
Declaration
Swift
public let uptime_in_days: Int
-
Check if the Redis server is compatable with a certain Major.Minor version of Redis
Parameter
Parameter major: The major portion of the Redis server version to compare against.Parameter
Parameter minor: The minor portion of the Redis server version to compare against.
Returns
true if the Redis server is compatable with the specified major and minor Redis version number.
Declaration
Swift
public func checkVersionCompatible(major: Int, minor: Int=0) -> Bool
Parameters
major
The major portion of the Redis server version to compare against.
minor
The minor portion of the Redis server version to compare against.
Return Value
true if the Redis server is compatable with the specified major and minor Redis version number.
-
Check if the Redis server is compatable with a certain Major.Minor.Micro version of Redis
Parameter
Parameter major: The major portion of the Redis server version to compare against.Parameter
Parameter minor: The minor portion of the Redis server version to compare against.Parameter
Parameter micro: The micro portion of the Redis server version to compare against.
Returns
true if the Redis server is compatable with the specified major, minor, and micro Redis version number.
Declaration
Swift
public func checkVersionCompatible(major: Int, minor: Int=0, micro: Int) -> Bool
Parameters
major
The major portion of the Redis server version to compare against.
minor
The minor portion of the Redis server version to compare against.
micro
The micro portion of the Redis server version to compare against.
Return Value
true if the Redis server is compatable with the specified major, minor, and micro Redis version number.


A B2B lead generation and website personalization software. Main language: Ruby 3.1.2 (Ruby on Rails 7.1 framework), PostgreSQL,
JavaScript. Additional Rack apps with sequel DSL.
Support legacy application.
Identity bottlenecks and bugs, and devise solutions to these problems.
Work with optimization SQL queries.
Developing features using Ruby on Rails, HTML, CSS and JavaScript.
Managed code with Rspec tests and Gitlab Actions.
Support product migration and platform upgrades.
Analyzing the system requirements specifications and also involved in product owner interaction during requirement specifications.
Responsible for developing report management tools.
Integrating third-party SOAP and rest APIs with web application(Stripe, IpInfo and etc ).
Create from scratch additional RoR apps, and deploy to AWS.
Work with StimulusJS and Cypress.
Work with WebRTC API for user video recording.
Ruby on Rails Developer
Ruby for Good, remote, part-time(as volunteer)
Ruby for Good - Open source projects for non-profit organizations.
Contributed to Casa - Volunteer management system for nonprofit CASA, which serves foster youth in counties across America..
Developed consumer based features using Ruby on Rails, JavaScript, HTML, CSS, and pair based programming.
Working in the design and development phases of the application.
Managed code with Rspec tests and GitHub.
Developed best practices and architecture.
Ruby on Rails Developer
Tallinn, Estonia, remote, part-time
Customer relationship management legacy application. Main language: Ruby 2.5.1 (Ruby on Rails 5.2 framework). PostgreSQL, JavaScript.
Support legacy application.
identity bottlenecks and bugs, and devise solutions to these problems.
Developing features using Ruby on Rails, HTML, CSS and JavaScript.
Support product migration and platform upgrades.
Analyzing the system requirements specifications and also involved in product owner interaction during requirement specifications.
Responsible for developing report management tools.
Working on implementing Bug Reporting Feature to allow customers to create reports about bugs directly to Redmine APIs.
Integrating third-party SOAP and rest APIs with web application(Stripe, Redmine, eSign Genie etc.).
Communicating directly with clients to help define features/user stories.
Ruby on Rails Developer
freelance, remote
Main language: Ruby (Ruby on Rails framework), JavaScript.
A wide range of tasks on various projects.
Development with Rails, test coverage, deployment and maintenance.
Worked from idea to deployment.
Ruby Backend Developer
Boston, Massachusetts, remote
TDD with Rspec, BDD with Capybara. Main language: Pure Ruby.
Migrated large Ruby 2.1.2 code base to Ruby 2.4 and rewrote confusing and under-documented parts.
Refactoring, optimizing and implementing new features.
Participated in code reviews.
Managed code with Rspec tests.
Developed various APIs.
Junior Ruby on Rails Developer
Kursk, Russia, remote
Capistrano deploy scripts to PaaS (Heroku/Locum). Main language: Ruby (Ruby on Rails framework), JavaScript.
Supported existed products.
Worked from idea to deployment.
Experienced with multiple 3rd party service integrations including Braintree, Google maps.
Setup and configured automated deployment and scaling infrastructure on Digital Ocean.


Featured Skills:
As a senior leader in Britain’s National Mapping Agency, I developed an approach to product and proposition design in order to diversify revenues and enter 3 international technology markets.
Featured Skills:
I built Customer Lifetime Value and increased Trust/Net Promoter Score (NPS) by identifying & fixing points-of-pain and churn triggers in the customer journey… winning some awards along the way.
Featured Skills:
I founded Lean In’s South England chapter, growing it from 1-500+ members within a year. Ran peer support circles and events, drawing on expertise and content from the global community and personally developing and delivering content to audiences of 50+.


Spark Release 3.0.2
Spark 3.0.2 is a maintenance release containing stability fixes. This release is based on the branch-3.0 maintenance branch of Spark. We strongly recommend all 3.0 users to upgrade to this stable release.
Notable changes
- [SPARK-31511]: Make BytesToBytesMap iterator() thread-safe
- [SPARK-32635]: When pyspark.sql.functions.lit() function is used with dataframe cache, it returns wrong result
- [SPARK-32753]: Deduplicating and repartitioning the same column create duplicate rows with AQE
- [SPARK-32764]: compare of -0.0 < 0.0 return true
- [SPARK-32840]: Invalid interval value can happen to be just adhesive with the unit
- [SPARK-32908]: percentile_approx() returns incorrect results
- [SPARK-33019]: Use spark.hadoop.mapreduce.fileoutputcommitter.algorithm.version=1 by default
- [SPARK-33183]: Bug in optimizer rule EliminateSorts
- [SPARK-33260]: SortExec produces incorrect results if sortOrder is a Stream
- [SPARK-33290]: SPARK-33507 REFRESH TABLE should invalidate cache even though the table itself may not be cached
- [SPARK-33358]: Spark SQL CLI command processing loop can’t exit while one comand fail
- [SPARK-33404]: “date_trunc” expression returns incorrect results
- [SPARK-33435]: SPARK-33507 DSv2: REFRESH TABLE should invalidate caches
- [SPARK-33591]: NULL is recognized as the “null” string in partition specs
- [SPARK-33593]: Vector reader got incorrect data with binary partition value
- [SPARK-33726]: Duplicate field names causes wrong answers during aggregation
- [SPARK-33819]: SingleFileEventLogFileReader/RollingEventLogFilesFileReader should be
package private
- [SPARK-33950]: ALTER TABLE .. DROP PARTITION doesn’t refresh cache
- [SPARK-34011]: ALTER TABLE .. RENAME TO PARTITION doesn’t refresh cache
- [SPARK-34027]: ALTER TABLE .. RECOVER PARTITIONS doesn’t refresh cache
- [SPARK-34055]: ALTER TABLE .. ADD PARTITION doesn’t refresh cache
- [SPARK-34187]: Use available offset range obtained during polling when checking offset validation
- [SPARK-34212]: For parquet table, after changing the precision and scale of decimal type in hive, spark reads incorrect value
- [SPARK-34213]: LOAD DATA doesn’t refresh v1 table cache
- [SPARK-34229]: Avro should read decimal values with the file schema
- [SPARK-34262]: ALTER TABLE .. SET LOCATION doesn’t refresh v1 table cache
Dependency Changes
While being a maintence release we did still upgrade some dependencies in this release they are:
Known issues
You can consult JIRA for the detailed changes.
We would like to acknowledge all community members for contributing patches to this release.
Spark News Archive


Length Converter
Enter In Length in Metres to get the output in Feet, Inches and Centimetres.
cm.
in.
ft.
m.


While browsing/surfing the Internet, you will come across many web pages that you really like. Maybe it's a recipe you want to make, a picture you like or a tutorial from this Web site. The currently open web page can be saved and/or be printed for later use.
For example, if you have accessed a long and useful text file on the net, you may want to save it to read it off-line later on(especially if you're paying per minute for connection time!). You can also print it out later as well.
To save a Web Page:
First, check to make sure that the whole file is loaded. Watch the indicator at the bottom of your browser, or hit Ctrl+End to take you to the bottom of the document to see if it is all there.
From the Main Menu at the top of your browser, click File. Then, from the drop-down menu click Save As.
Printing the Web Page
To print your desired web page,follow the given instructions :-
1. Open Your Web Page that you want to print, in your browser.
2. On the top of your browser is a menu. Click on the first option "File" in the menu. Another menu will drop down.
3. After this menu drops down click on the option "Print".
4. A box will pop up when you click on "Print". Click on the button that says "OK" and your printer will start printing the page.


These bytecodes execute both concretely and symbolically. Meaning the concrete values are preserved and the symbolic attributes are passed along to the output.


{% extends "admin/change_list.html" %} {% load i18n %} {% block extrahead %} {{ block.super }} {% endblock %} {% block content_title %} {{ block.super }} {% block orderable_help_text %}
{% blocktrans with cl.opts.verbose_name_plural as verbose_name_plural %} TIP: You can drag and drop the {{ verbose_name_plural }} in this list to change their order on the site — just be sure to click the Save button in the lower right of the list when you're done! {% endblocktrans %}
{% endblock %} {% endblock %}


who am i?
geographer + hack developer
tech support
jsapi/flex/silverlight
open source, small, popular
so, what is esri leaflet?
leaflet + arcgis = <3
loading esri basemaps
L.esri.basemapLayer('Topographic').addTo(map);
draw some features
L.esri.featureLayer( {
url: "http://server.domain/../MyService/FeatureServer/0"
}).addTo(map);
a group effort
supported by our community
no roadmap or product lifecycle
over 500 stars/forks
30+ non-esri contributors!
doc suggestions, bug fixes, features
contributions from
USGS, State Dept, Netflix, Stanford University, City of Philadelphia, Utah AGRC
apps from
Stanford University, Forest Service, Ride Amigos, Mapillary, Storymaps team...
demo #1 layer with popup
demo #2 using a renderer
demo #3 adding search
demo #4 editing
but wait there's more!
- clustering
- heatmaps
- map services
- image services
- vector basemaps*
esri leaflet <3
- open source mandate
- familiarity
- simpler toolset
- easy integration with build systems*
- you're a nerd
why choose the JSAPI
- our flagship product
- can be cut lean
- unlocks the whole platform
- UI components
- builders/templates
- support for custom projections*
for the path less travelled
- we build esri leaflet in our spare time
- only unlocks some of the platform
- almost no UI components
- mix and match with other plugins
- beware of scope creep
there is no roadmap
- Leaflet itself is maturing
- no major new features on the horizon
the community is here to help
- github
- geonet
- stack exchange
- spatial community
- technical support


FAQ
How do I use the site?
Click or tap the button at the top of the main page to geolocate your device and look up the nearest safe voting locations in your county. Alternatively, you can type your address into the text box just below the button at the top of the page. Take me back to the main page now.
I am getting an error or nothing happens when I tap on the green button. Can you help me?
The green button accesses geolocation services on your device.  If nothing happens when you click the green button, simply just type your address into the text box just below the button at the top of the page. Take me back to the main page now.
Who and what is https://WeVoteSafely.org
The site is a resource designed and built by a variety of volunteers from across the country who believe that every person in the United States should have one-click access to information that can help them exercise their Constitutional right to vote safely during the unprecedented health crisis of the COVID-19 pandemic.
Many people in this country can take advantage of ballot drop boxes, early voting sites, county election offices, and other similar options for delivering their mail-in/absentee ballot personally by hand to election officials. Given the expansion of vote-by-mail and absentee voting in many states due to COVID-19, we want to simplify the information gathering process for every voter in the United States to eliminate voter confusion and ballot disqualification.
How did you build this?
We have an entire page devoted to this topic.
Why should I trust this data?
We will allow selected non-partisan and/or news organizations to examine our code, data, infrastructure, and/or methods to the extent that any such examination does not compromise the security measures that we have in place for the systems.
We believe that it is ALWAYS a best practice to NOT blindly believe something you happen to read on the Internet. That is even (especially!) true with information on voting for the following reasons:
To help you in the process of verifying our voter information, every location on our maps include a link back to the original city/county/state source of official information so that you can validate for yourself that the information is correct. More than ever, democracy is in your hands. Take me back to the main page now.
What technologies are you using?
We use best-of-breed services from Google and Microsoft, although our usage of these technologies is not an endorsement of any kind from either of those companies.
What is your privacy policy?
We do NOT collect personally identifiable information. Full details are here. If you do not believe our policy in this regard, feel free to use a nearby address for locating nearest safe voting locations. :)
I do not see data for my area. What is up with that?
In some cases, states and/or counties have not yet published their information. In other cases, we have not yet collected, standardized, geocoded, and published information that election authorities have published. We do expect to have a complete set of data published here by the end of the second week in October.
What are the terms and conditions of using this site?
In some cases, states and/or counties have not yet published their information. In other cases, we have not yet collected, standardized, geocoded, and published information that election authorities have published. We do expect to have a complete set of data published here by the end of the first week in October.
Why can I not use my zip code? Why do I have to use my full address?
 Elections in the United States are run by county authorities. Your active voter registration is on file in one (and only one) county. However, zip codes can (and sometimes do) span more than one county. In fact, a few zip codes even span more than one state! But don't just take our word for it, you can verify this for yourself and read more fun facts about US zip codes here. With this in mind, a zip code by itself is simply not enough information for us to be able to give you accurate information on where your county's safe voting locations are. In short, we cannot accurately determine your county from your zip code. Although there are some situations across the United States where a ballot belonging to one county and is deposited into another county's system can potentially be forwarded to the correct county, the risk of that ballot potentially going uncounted is quite high. We're guessing that your interest in this question comes from your concern about privacy considerations. If that is true, we think you will like our Privacy Policy. If you don't believe our privacy policy, we recommend that you use your next-door neighbor's address. ;) Now that we have this out of the way, you may want to return to the main page so that you can find your safe voting locations.
I have another question - how do I get it answered?
Please send us any questions or concerns that you might have here.


The concept of fixed positioning is pretty straightforward. Elements with a fixed position stay in place, even when a document is scrolled. Elements with a fixed position are always positioned relative to the browser's viewport, no matter where they appear in a document's structure.
IE6 and IE7 in quirks mode do not support fixed positioning, even though IE7 in standards mode does support fixed positioning. Some tricks are employed to make the document work in IE6, in standards mode.
Even though fixed positioning technically allows an element to be placed anywhere in the document's structure, the IE hacks that I present here require that fixed position elements always be immediate children of the <body> element.
This element is used to make the document longer, so that scroll bars are invoked.


G1 Performance
- 2-Way SLI™ / CrossFire™ Graphics Support
- Precise Digital CPU Power Design
- SATA Express Support for up to 10 Gb/s Data Transfer
- M.2 Connector for SSDs Drives with up to 10 Gb/s Data Transfer
- Long Lifespan Durable Solid Caps
- GIGABYTE App Center including EasyTune™ and Cloud Station™ Utilities
- High Efficient MOSFET Design
G1 Audio
GIGABYTE AMP-UP Audio Technology- Realtek ALC1150 115dB SNR HD Audio with Built-in Rear Audio Amplifier
- Swapable OP-AMP Technology with Gain Boost
- Dedicated Audio Hardware Zone
- Audio Noise Guard with Trace Path Lighting
- High-End Audio Capacitors
- Gold Plated Audio Ports
- Quad DAC-UP USB Ports
G1 Networking
- Killer E2200 Netwoking Platform
G1 Looks
- All New Heat Sink Design
Specifications
| CPU Support | 4th Gen & 5th Intel® Core™ processors |
| CPU Socket | LGA 1150 |
| Chipset | Intel Z97 Chipset |
| Graphics Interface | 1*PCIE 3.0x16 + 1*PCIE 3.0x8 |
| Display Interface | HDMI, DVI-D, D-SUB |
| Memory Type | 2 Channel DDR3 |
| Memory DIMM | 4*DDR3 |
| Expansion Slots | 1*PCI-E x4 + 1*PCI-E x1 |
| SATA connectors | 6*SATA3**, M.2, SATA EXPRESS |
| SATA RAID | RAID 0, 1, 5, 10 |
| USB | 6*USB 3.0 + 8*USB 2.0 |
| Audio / LAN | 8-channel HD / Killer GbE LAN |
| Form Factor (mm) | mATX (244x244) |


Resize the browser window to see how it works.
Hover over the dropdown button to open the dropdown menu.


Error {{.Status}}
{{.Message}}
If you believe that this is an error, please contact the adminestrator.